Class AttributeContext.Types.Response (2.2.0)

public sealed class Response : Protobuf.IMessage<AttributeContext.Types.Response>, Protobuf.IBufferMessage

This message defines attributes for a typical network response. It generally models semantics of an HTTP response.

Inheritance

Object > AttributeContext.Types.Response

Namespace

Google.Rpc.Context

Assembly

Google.Api.CommonProtos.dll

Constructors

Response()

public Response()

Response(AttributeContext.Types.Response)

public Response(AttributeContext.Types.Response other)
Parameter
NameDescription
otherAttributeContext.Types.Response

Fields

CodeFieldNumber

public const int CodeFieldNumber = 1

Field number for the "code" field.

Field Value
TypeDescription
Int32

HeadersFieldNumber

public const int HeadersFieldNumber = 3

Field number for the "headers" field.

Field Value
TypeDescription
Int32

SizeFieldNumber

public const int SizeFieldNumber = 2

Field number for the "size" field.

Field Value
TypeDescription
Int32

TimeFieldNumber

public const int TimeFieldNumber = 4

Field number for the "time" field.

Field Value
TypeDescription
Int32

Properties

Code

public long Code { get; set; }

The HTTP response status code, such as 200 and 404.

Property Value
TypeDescription
Int64

Descriptor

public static Protobuf.Reflection.MessageDescriptor Descriptor { get; }
Property Value
TypeDescription
Protobuf.Reflection.MessageDescriptor

Headers

public Protobuf.Collections.MapField<string, string> Headers { get; }

The HTTP response headers. If multiple headers share the same key, they must be merged according to HTTP spec. All header keys must be lowercased, because HTTP header keys are case-insensitive.

Property Value
TypeDescription
Protobuf.Collections.MapField<String, String>

Parser

public static Protobuf.MessageParser<AttributeContext.Types.Response> Parser { get; }
Property Value
TypeDescription
Protobuf.MessageParser<AttributeContext.Types.Response>

Size

public long Size { get; set; }

The HTTP response size in bytes. If unknown, it must be -1.

Property Value
TypeDescription
Int64

Time

public Protobuf.WellKnownTypes.Timestamp Time { get; set; }

The timestamp when the destination service generates the first byte of the response.

Property Value
TypeDescription
Protobuf.WellKnownTypes.Timestamp

Methods

CalculateSize()

public int CalculateSize()
Returns
TypeDescription
Int32

Clone()

public AttributeContext.Types.Response Clone()
Returns
TypeDescription
AttributeContext.Types.Response

Equals(AttributeContext.Types.Response)

public bool Equals(AttributeContext.Types.Response other)
Parameter
NameDescription
otherAttributeContext.Types.Response
Returns
TypeDescription
Boolean

Equals(Object)

public override bool Equals(object other)
Parameter
NameDescription
otherObject
Returns
TypeDescription
Boolean

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
Int32

MergeFrom(Protobuf.CodedInputStream)

public void MergeFrom(Protobuf.CodedInputStream input)
Parameter
NameDescription
inputProtobuf.CodedInputStream

MergeFrom(AttributeContext.Types.Response)

public void MergeFrom(AttributeContext.Types.Response other)
Parameter
NameDescription
otherAttributeContext.Types.Response

ToString()

public override string ToString()
Returns
TypeDescription
String

WriteTo(Protobuf.CodedOutputStream)

public void WriteTo(Protobuf.CodedOutputStream output)
Parameter
NameDescription
outputProtobuf.CodedOutputStream