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

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/servicecontrol_v2/classes.rb,
lib/google/apis/servicecontrol_v2/representations.rb,
lib/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.



1337
1338
1339
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1337

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

Instance Attribute Details

#backend_latencyString

The amount of time it takes the backend service to fully respond to a request. Measured from when the destination service starts to send the request to the backend until when the destination service receives the complete response from the backend. Corresponds to the JSON property backendLatency

Returns:

  • (String)


1312
1313
1314
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1312

def backend_latency
  @backend_latency
end

#codeFixnum

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

Returns:

  • (Fixnum)


1317
1318
1319
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1317

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>)


1324
1325
1326
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1324

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)


1329
1330
1331
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1329

def size
  @size
end

#timeString

The timestamp when the destination service sends the last byte of the response. Corresponds to the JSON property time

Returns:

  • (String)


1335
1336
1337
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1335

def time
  @time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1342
1343
1344
1345
1346
1347
1348
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1342

def update!(**args)
  @backend_latency = args[:backend_latency] if args.key?(:backend_latency)
  @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