Class: Google::Apis::ServicecontrolV2::AttributeContext
- Inherits:
-
Object
- Object
- Google::Apis::ServicecontrolV2::AttributeContext
- 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 the standard attribute vocabulary for Google APIs. An
attribute is a piece of metadata that describes an activity on a network
service. For example, the size of an HTTP request, or the status code of an
HTTP response. Each attribute has a type and a name, which is logically
defined as a proto message field in AttributeContext
. The field type becomes
the attribute type, and the field path becomes the attribute name. For example,
the attribute source.ip
maps to field AttributeContext.source.ip
. This
message definition is guaranteed not to have any wire breaking change. So you
can use it directly for passing attributes across different systems. NOTE:
Different system may generate different subset of attributes. Please verify
the system specification before relying on an attribute generated a system.
Instance Attribute Summary collapse
-
#api ⇒ Google::Apis::ServicecontrolV2::Api
This message defines attributes associated with API operations, such as a network API request.
-
#destination ⇒ Google::Apis::ServicecontrolV2::Peer
This message defines attributes for a node that handles a network request.
-
#extensions ⇒ Array<Hash<String,Object>>
Supports extensions for advanced use cases, such as logs and metrics.
-
#origin ⇒ Google::Apis::ServicecontrolV2::Peer
This message defines attributes for a node that handles a network request.
-
#request ⇒ Google::Apis::ServicecontrolV2::Request
This message defines attributes for an HTTP request.
-
#resource ⇒ Google::Apis::ServicecontrolV2::Resource
This message defines core attributes for a resource.
-
#response ⇒ Google::Apis::ServicecontrolV2::Response
This message defines attributes for a typical network response.
-
#source ⇒ Google::Apis::ServicecontrolV2::Peer
This message defines attributes for a node that handles a network request.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AttributeContext
constructor
A new instance of AttributeContext.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ AttributeContext
Returns a new instance of AttributeContext.
140 141 142 |
# File 'generated/google/apis/servicecontrol_v2/classes.rb', line 140 def initialize(**args) update!(**args) end |
Instance Attribute Details
#api ⇒ Google::Apis::ServicecontrolV2::Api
This message defines attributes associated with API operations, such as a
network API request. The terminology is based on the conventions used by
Google APIs, Istio, and OpenAPI.
Corresponds to the JSON property api
89 90 91 |
# File 'generated/google/apis/servicecontrol_v2/classes.rb', line 89 def api @api end |
#destination ⇒ Google::Apis::ServicecontrolV2::Peer
This message defines attributes for a node that handles a network request. The
node can be either a service or an application that sends, forwards, or
receives the request. Service peers should fill in principal
and labels
as
appropriate.
Corresponds to the JSON property destination
97 98 99 |
# File 'generated/google/apis/servicecontrol_v2/classes.rb', line 97 def destination @destination end |
#extensions ⇒ Array<Hash<String,Object>>
Supports extensions for advanced use cases, such as logs and metrics.
Corresponds to the JSON property extensions
102 103 104 |
# File 'generated/google/apis/servicecontrol_v2/classes.rb', line 102 def extensions @extensions end |
#origin ⇒ Google::Apis::ServicecontrolV2::Peer
This message defines attributes for a node that handles a network request. The
node can be either a service or an application that sends, forwards, or
receives the request. Service peers should fill in principal
and labels
as
appropriate.
Corresponds to the JSON property origin
110 111 112 |
# File 'generated/google/apis/servicecontrol_v2/classes.rb', line 110 def origin @origin end |
#request ⇒ Google::Apis::ServicecontrolV2::Request
This message defines attributes for an HTTP request. If the actual request is
not an HTTP request, the runtime system should try to map the actual request
to an equivalent HTTP request.
Corresponds to the JSON property request
117 118 119 |
# File 'generated/google/apis/servicecontrol_v2/classes.rb', line 117 def request @request end |
#resource ⇒ Google::Apis::ServicecontrolV2::Resource
This message defines core attributes for a resource. A resource is an
addressable (named) entity provided by the destination service. For example, a
file stored on a network storage service.
Corresponds to the JSON property resource
124 125 126 |
# File 'generated/google/apis/servicecontrol_v2/classes.rb', line 124 def resource @resource end |
#response ⇒ Google::Apis::ServicecontrolV2::Response
This message defines attributes for a typical network response. It generally
models semantics of an HTTP response.
Corresponds to the JSON property response
130 131 132 |
# File 'generated/google/apis/servicecontrol_v2/classes.rb', line 130 def response @response end |
#source ⇒ Google::Apis::ServicecontrolV2::Peer
This message defines attributes for a node that handles a network request. The
node can be either a service or an application that sends, forwards, or
receives the request. Service peers should fill in principal
and labels
as
appropriate.
Corresponds to the JSON property source
138 139 140 |
# File 'generated/google/apis/servicecontrol_v2/classes.rb', line 138 def source @source end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
145 146 147 148 149 150 151 152 153 154 |
# File 'generated/google/apis/servicecontrol_v2/classes.rb', line 145 def update!(**args) @api = args[:api] if args.key?(:api) @destination = args[:destination] if args.key?(:destination) @extensions = args[:extensions] if args.key?(:extensions) @origin = args[:origin] if args.key?(:origin) @request = args[:request] if args.key?(:request) @resource = args[:resource] if args.key?(:resource) @response = args[:response] if args.key?(:response) @source = args[:source] if args.key?(:source) end |