Class: Google::Apis::RunV1alpha1::ContainerPort

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

Overview

ContainerPort represents a network port in a single container.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ContainerPort

Returns a new instance of ContainerPort.



330
331
332
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 330

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

Instance Attribute Details

#container_portFixnum

(Optional) Port number the container listens on. This must be a valid port number, 0 < x < 65536. Corresponds to the JSON property containerPort

Returns:

  • (Fixnum)


317
318
319
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 317

def container_port
  @container_port
end

#nameString

(Optional) If specified, used to specify which protocol to use. Allowed values are "http1" and "h2c". Corresponds to the JSON property name

Returns:

  • (String)


323
324
325
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 323

def name
  @name
end

#protocolString

(Optional) Protocol for port. Must be "TCP". Defaults to "TCP". Corresponds to the JSON property protocol

Returns:

  • (String)


328
329
330
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 328

def protocol
  @protocol
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



335
336
337
338
339
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 335

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