Class Parameter
Provides a description about a parameter value carried in the message.
Inherited Members
Namespace: Nevatech.Vsb.Repository.Entities
Assembly: Nevatech.Vsb.Repository.dll
Syntax
public class Parameter : IValidator, IEquatable<Parameter>, IExtensibleDataObject
Constructors
Parameter()
Initializes an empty instance.
Declaration
public Parameter()
Properties
ArrayFormat
Gets or sets the format of the array, if Array type is used.
Declaration
public ParameterArrayFormat? ArrayFormat { get; set; }
Property Value
Type | Description |
---|---|
Nullable<ParameterArrayFormat> |
ArrayItem
Gets or sets the description of the type of items in the array, if Array type is used.
Declaration
public Parameter ArrayItem { get; set; }
Property Value
Type | Description |
---|---|
Parameter |
ArrayMaximumItems
Gets or sets the maximum size of the array. The number of items must be less than, or equal to, the value of this property.
Declaration
public int? ArrayMaximumItems { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Int32> |
ArrayMinimumItems
Gets or sets the minimum size of the array. The number of items must be greater than, or equal to, the value of this property.
Declaration
public int? ArrayMinimumItems { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Int32> |
DataFormat
Gets or sets the extending format for the previously mentioned type. The examples are: "int32", "int64", "float", "byte", "binary", "date", "date-time", "password".
Declaration
public string DataFormat { get; set; }
Property Value
Type | Description |
---|---|
String |
DataType
Gets or sets the value data type.
Declaration
public ParameterDataType DataType { get; set; }
Property Value
Type | Description |
---|---|
ParameterDataType |
DefaultValue
Gets or sets the value of the parameter that the server will use if none is provided.
Declaration
public string DefaultValue { get; set; }
Property Value
Type | Description |
---|---|
String |
ErrorMessage
Gets the summary of validation errors.
Declaration
public string ErrorMessage { get; protected set; }
Property Value
Type | Description |
---|---|
String |
ExtensionData
Gets or sets ExtensionDataObject that enables serialization roundtrips.
Declaration
public ExtensionDataObject ExtensionData { get; set; }
Property Value
Type | Description |
---|---|
ExtensionDataObject |
IsArrayUnique
Gets or sets the flag indicating that all items of the array must be unique.
Declaration
public bool? IsArrayUnique { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Boolean> |
IsEmptyValueAllowed
Gets or sets flag that sets the ability to pass empty-valued parameters. This is valid only for either "query" or "formData" parameters and allows you to send a parameter with a name only or an empty value.
Declaration
public bool IsEmptyValueAllowed { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
IsExclusiveMaximum
Gets or sets the flag indicating that value must be strictly lower than MaximumValue.
Declaration
public bool IsExclusiveMaximum { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
IsExclusiveMinimum
Gets or sets the flag indicating that value must be strictly greater than MinimumValue.
Declaration
public bool IsExclusiveMinimum { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
IsRequired
Gets or sets flag indicating whether this parameter is mandatory. If the parameter is in "path", this property is required and its value MUST be true.
Declaration
public bool IsRequired { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
MaximumLength
Gets or sets the maximum string length of the value. The value length must be less than, or equal to, the value of this property.
Declaration
public int? MaximumLength { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Int32> |
MaximumValue
Gets or sets the maximum value of the parameter.
Declaration
public decimal? MaximumValue { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Decimal> |
MinimumLength
Gets or sets the minimum string length of the value. The value length must be greater than, or equal to, the value of this property.
Declaration
public int? MinimumLength { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Int32> |
MinimumValue
Gets or sets the minimum value of the parameter.
Declaration
public decimal? MinimumValue { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Decimal> |
MultipleOf
Gets or sets the positive, greater than zero number to be used to check, if the division of the parameter value by this number is an integer.
Declaration
public decimal? MultipleOf { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Decimal> |
Pattern
Gets or sets the regular expression that should match the parameter value.
Declaration
public string Pattern { get; set; }
Property Value
Type | Description |
---|---|
String |
Schema
Gets or sets the reference to (name of) JSON schema type that describes the parameter structure. This property is used for complex types only.
Declaration
public string Schema { get; set; }
Property Value
Type | Description |
---|---|
String |
Values
Gets collection of permitted values that can be used with this parameter. If empty then no restriction is applied.
Declaration
public Collection<string> Values { get; }
Property Value
Type | Description |
---|---|
Collection<String> |
Methods
CopyFrom(Parameter)
Populates this instance from the provided parameter.
Declaration
public virtual void CopyFrom(Parameter parameter)
Parameters
Type | Name | Description |
---|---|---|
Parameter | parameter | Parameter to copy properties from. |
Equals(Parameter)
Determines whether the specified object is equal to the current object.
Declaration
public virtual bool Equals(Parameter other)
Parameters
Type | Name | Description |
---|---|---|
Parameter | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
Boolean | True, if objects are equal. False, if objects are not equal. |
Equals(Object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
Boolean | True, if objects are equal. False, if objects are not equal. |
Overrides
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | Hash code of the current instance. |
Overrides
ToString()
Returns the text representation of the object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | Text description of the object. |
Overrides
Validate()
Evaluates the state of this object.
Declaration
public virtual bool Validate()
Returns
Type | Description |
---|---|
Boolean | True if state is valid; otherwise, false. |