Class: Google::Apis::ServicecontrolV1::Peer
- Inherits:
-
Object
- Object
- Google::Apis::ServicecontrolV1::Peer
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/servicecontrol_v1/classes.rb,
generated/google/apis/servicecontrol_v1/representations.rb,
generated/google/apis/servicecontrol_v1/representations.rb
Overview
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 the service
,
principal
, and labels
as appropriate.
Instance Attribute Summary collapse
-
#ip ⇒ String
The IP address of the peer.
-
#labels ⇒ Hash<String,String>
The labels associated with the peer.
-
#port ⇒ Fixnum
The network port of the peer.
-
#principal ⇒ String
The identity of this peer.
-
#region_code ⇒ String
The CLDR country/region code associated with the above IP address.
-
#service ⇒ String
The canonical service name of the peer.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Peer
constructor
A new instance of Peer.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Peer
Returns a new instance of Peer
1417 1418 1419 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1417 def initialize(**args) update!(**args) end |
Instance Attribute Details
#ip ⇒ String
The IP address of the peer.
Corresponds to the JSON property ip
1385 1386 1387 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1385 def ip @ip end |
#labels ⇒ Hash<String,String>
The labels associated with the peer.
Corresponds to the JSON property labels
1390 1391 1392 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1390 def labels @labels end |
#port ⇒ Fixnum
The network port of the peer.
Corresponds to the JSON property port
1395 1396 1397 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1395 def port @port end |
#principal ⇒ String
The identity of this peer. Similar to Request.auth.principal
, but
relative to the peer instead of the request. For example, the
idenity associated with a load balancer that forwared the request.
Corresponds to the JSON property principal
1402 1403 1404 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1402 def principal @principal end |
#region_code ⇒ String
The CLDR country/region code associated with the above IP address.
If the IP address is private, the region_code
should reflect the
physical location where this peer is running.
Corresponds to the JSON property regionCode
1409 1410 1411 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1409 def region_code @region_code end |
#service ⇒ String
The canonical service name of the peer.
NOTE: different systems may have different service naming schemes.
Corresponds to the JSON property service
1415 1416 1417 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1415 def service @service end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1422 1423 1424 1425 1426 1427 1428 1429 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1422 def update!(**args) @ip = args[:ip] if args.key?(:ip) @labels = args[:labels] if args.key?(:labels) @port = args[:port] if args.key?(:port) @principal = args[:principal] if args.key?(:principal) @region_code = args[:region_code] if args.key?(:region_code) @service = args[:service] if args.key?(:service) end |