class Google::Apis::ServicecontrolV1::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.

Attributes

ip[RW]

The IP address of the peer. Corresponds to the JSON property `ip` @return [String]

labels[RW]

The labels associated with the peer. Corresponds to the JSON property `labels` @return [Hash<String,String>]

port[RW]

The network port of the peer. Corresponds to the JSON property `port` @return [Fixnum]

principal[RW]

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` @return [String]

region_code[RW]

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` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/servicecontrol_v1/classes.rb, line 1547
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/servicecontrol_v1/classes.rb, line 1552
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