Class: Google::Apis::NetworkservicesV1::TrafficPortSelector

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/networkservices_v1/classes.rb,
lib/google/apis/networkservices_v1/representations.rb,
lib/google/apis/networkservices_v1/representations.rb

Overview

Specification of a port-based selector.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TrafficPortSelector

Returns a new instance of TrafficPortSelector.



4460
4461
4462
# File 'lib/google/apis/networkservices_v1/classes.rb', line 4460

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

Instance Attribute Details

#portsArray<String>

Optional. A list of ports. Can be port numbers or port range (example, [80-90] specifies all ports from 80 to 90, including 80 and 90) or named ports or * to specify all ports. If the list is empty, all ports are selected. Corresponds to the JSON property ports

Returns:

  • (Array<String>)


4458
4459
4460
# File 'lib/google/apis/networkservices_v1/classes.rb', line 4458

def ports
  @ports
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4465
4466
4467
# File 'lib/google/apis/networkservices_v1/classes.rb', line 4465

def update!(**args)
  @ports = args[:ports] if args.key?(:ports)
end