Class: Google::Apis::ServicecontrolV1::Peer

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Peer

Returns a new instance of Peer



1472
1473
1474
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1472

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

Instance Attribute Details

#ipString

The IP address of the peer. Corresponds to the JSON property ip

Returns:

  • (String)


1440
1441
1442
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1440

def ip
  @ip
end

#labelsHash<String,String>

The labels associated with the peer. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


1445
1446
1447
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1445

def labels
  @labels
end

#portFixnum

The network port of the peer. Corresponds to the JSON property port

Returns:

  • (Fixnum)


1450
1451
1452
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1450

def port
  @port
end

#principalString

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

Returns:

  • (String)


1457
1458
1459
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1457

def principal
  @principal
end

#region_codeString

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

Returns:

  • (String)


1464
1465
1466
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1464

def region_code
  @region_code
end

#serviceString

The canonical service name of the peer. NOTE: different systems may have different service naming schemes. Corresponds to the JSON property service

Returns:

  • (String)


1470
1471
1472
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1470

def service
  @service
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1477
1478
1479
1480
1481
1482
1483
1484
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1477

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