Class ResponseMessage
Represents a container for the expected response of an operation. The container maps a HTTP response code to the expected response. It is not expected from the documentation to necessarily cover all possible HTTP response codes, since they may not be known in advance. However, it is expected from the documentation to cover a successful operation response and any known errors.
Inherited Members
Namespace: Nevatech.Vsb.Repository.Entities
Assembly: Nevatech.Vsb.Repository.dll
Syntax
public sealed class ResponseMessage : IValidator, IEquatable<ResponseMessage>, IExtensibleDataObject
Constructors
ResponseMessage()
Initializes an empty instance.
Declaration
public ResponseMessage()
ResponseMessage(ResponseMessage)
Initializes new instance by copying properties from the provided response message.
Declaration
public ResponseMessage(ResponseMessage message)
Parameters
Type | Name | Description |
---|---|---|
ResponseMessage | message | Response message to copy properties from. |
Properties
Description
Gets or sets the short description of the response.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
String |
ErrorMessage
Gets the summary of validation errors.
Declaration
public string ErrorMessage { get; }
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 |
Headers
Gets collection of HTTP headers that are sent with the response.
Declaration
public Collection<ResponseMessageHeader> Headers { get; }
Property Value
Type | Description |
---|---|
Collection<ResponseMessageHeader> |
Schema
Gets or sets the reference to (name of) JSON schema type that describes the response body.
Declaration
public string Schema { get; set; }
Property Value
Type | Description |
---|---|
String |
StatusCode
Gets or sets the HTTP status code of the response. The "default" or "*" can be used a default response object for all HTTP codes that are not covered individually by the specification.
Declaration
public string StatusCode { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
CopyFrom(ResponseMessage)
Populates this instance from the provided response message.
Declaration
public void CopyFrom(ResponseMessage message)
Parameters
Type | Name | Description |
---|---|---|
ResponseMessage | message | Response message to copy properties from. |
Equals(ResponseMessage)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(ResponseMessage other)
Parameters
Type | Name | Description |
---|---|---|
ResponseMessage | 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 a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A string that represents the current object. |
Overrides
Validate()
Evaluates the state of this object.
Declaration
public bool Validate()
Returns
Type | Description |
---|---|
Boolean | True if state is valid; otherwise, false. |