Class: Google::Apis::ServicecontrolV2::Peer
- Inherits:
-
Object
- Object
- Google::Apis::ServicecontrolV2::Peer
- 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 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.
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.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Peer
constructor
A new instance of Peer.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Peer
Returns a new instance of Peer.
672 673 674 |
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 672 def initialize(**args) update!(**args) end |
Instance Attribute Details
#ip ⇒ String
The IP address of the peer.
Corresponds to the JSON property ip
646 647 648 |
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 646 def ip @ip end |
#labels ⇒ Hash<String,String>
The labels associated with the peer.
Corresponds to the JSON property labels
651 652 653 |
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 651 def labels @labels end |
#port ⇒ Fixnum
The network port of the peer.
Corresponds to the JSON property port
656 657 658 |
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 656 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 identity associated with
a load balancer that forwarded the request.
Corresponds to the JSON property principal
663 664 665 |
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 663 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
670 671 672 |
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 670 def region_code @region_code end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
677 678 679 680 681 682 683 |
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 677 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) end |