Class: Google::Apis::RunV1::ContainerPort
- Inherits:
-
Object
- Object
- Google::Apis::RunV1::ContainerPort
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/run_v1/classes.rb,
lib/google/apis/run_v1/representations.rb,
lib/google/apis/run_v1/representations.rb
Overview
ContainerPort represents a network port in a single container.
Instance Attribute Summary collapse
-
#container_port ⇒ Fixnum
(Optional) Port number the container listens on.
-
#name ⇒ String
(Optional) If specified, used to specify which protocol to use.
-
#protocol ⇒ String
(Optional) Protocol for port.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ContainerPort
constructor
A new instance of ContainerPort.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ContainerPort
Returns a new instance of ContainerPort.
644 645 646 |
# File 'lib/google/apis/run_v1/classes.rb', line 644 def initialize(**args) update!(**args) end |
Instance Attribute Details
#container_port ⇒ Fixnum
(Optional) Port number the container listens on. This must be a valid port
number, 0 < x < 65536.
Corresponds to the JSON property containerPort
631 632 633 |
# File 'lib/google/apis/run_v1/classes.rb', line 631 def container_port @container_port end |
#name ⇒ String
(Optional) If specified, used to specify which protocol to use. Allowed values
are "http1" and "h2c".
Corresponds to the JSON property name
637 638 639 |
# File 'lib/google/apis/run_v1/classes.rb', line 637 def name @name end |
#protocol ⇒ String
(Optional) Protocol for port. Must be "TCP". Defaults to "TCP".
Corresponds to the JSON property protocol
642 643 644 |
# File 'lib/google/apis/run_v1/classes.rb', line 642 def protocol @protocol end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
649 650 651 652 653 |
# File 'lib/google/apis/run_v1/classes.rb', line 649 def update!(**args) @container_port = args[:container_port] if args.key?(:container_port) @name = args[:name] if args.key?(:name) @protocol = args[:protocol] if args.key?(:protocol) end |