Class: Google::Apis::RunV2::GoogleCloudRunV2ContainerPort
- Inherits:
-
Object
- Object
- Google::Apis::RunV2::GoogleCloudRunV2ContainerPort
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/run_v2/classes.rb,
lib/google/apis/run_v2/representations.rb,
lib/google/apis/run_v2/representations.rb
Overview
ContainerPort represents a network port in a single container.
Instance Attribute Summary collapse
-
#container_port ⇒ Fixnum
Port number the container listens on.
-
#name ⇒ String
If specified, used to specify which protocol to use.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRunV2ContainerPort
constructor
A new instance of GoogleCloudRunV2ContainerPort.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRunV2ContainerPort
Returns a new instance of GoogleCloudRunV2ContainerPort.
388 389 390 |
# File 'lib/google/apis/run_v2/classes.rb', line 388 def initialize(**args) update!(**args) end |
Instance Attribute Details
#container_port ⇒ Fixnum
Port number the container listens on. This must be a valid TCP port number, 0 <
container_port < 65536.
Corresponds to the JSON property containerPort
380 381 382 |
# File 'lib/google/apis/run_v2/classes.rb', line 380 def container_port @container_port end |
#name ⇒ String
If specified, used to specify which protocol to use. Allowed values are "http1"
and "h2c".
Corresponds to the JSON property name
386 387 388 |
# File 'lib/google/apis/run_v2/classes.rb', line 386 def name @name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
393 394 395 396 |
# File 'lib/google/apis/run_v2/classes.rb', line 393 def update!(**args) @container_port = args[:container_port] if args.key?(:container_port) @name = args[:name] if args.key?(:name) end |