Class: Google::Apis::ServicecontrolV2::Response

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/servicecontrol_v2/classes.rb,
generated/google/apis/servicecontrol_v2/representations.rb,
generated/google/apis/servicecontrol_v2/representations.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Response

Returns a new instance of Response.



1010
1011
1012
# File 'generated/google/apis/servicecontrol_v2/classes.rb', line 1010

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#codeFixnum

The HTTP response status code, such as 200 and 404. Corresponds to the JSON property code

Returns:

  • (Fixnum)


990
991
992
# File 'generated/google/apis/servicecontrol_v2/classes.rb', line 990

def code
  @code
end

#headersHash<String,String>

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. Corresponds to the JSON property headers

Returns:

  • (Hash<String,String>)


997
998
999
# File 'generated/google/apis/servicecontrol_v2/classes.rb', line 997

def headers
  @headers
end

#sizeFixnum

The HTTP response size in bytes. If unknown, it must be -1. Corresponds to the JSON property size

Returns:

  • (Fixnum)


1002
1003
1004
# File 'generated/google/apis/servicecontrol_v2/classes.rb', line 1002

def size
  @size
end

#timeString

The timestamp when the destination service generates the first byte of the response. Corresponds to the JSON property time

Returns:

  • (String)


1008
1009
1010
# File 'generated/google/apis/servicecontrol_v2/classes.rb', line 1008

def time
  @time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1015
1016
1017
1018
1019
1020
# File 'generated/google/apis/servicecontrol_v2/classes.rb', line 1015

def update!(**args)
  @code = args[:code] if args.key?(:code)
  @headers = args[:headers] if args.key?(:headers)
  @size = args[:size] if args.key?(:size)
  @time = args[:time] if args.key?(:time)
end