Class: Google::Apis::ContainerV1::CidrBlock

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/container_v1/classes.rb,
generated/google/apis/container_v1/representations.rb,
generated/google/apis/container_v1/representations.rb

Overview

CidrBlock contains an optional name and one CIDR block.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ CidrBlock

Returns a new instance of CidrBlock.


318
319
320
# File 'generated/google/apis/container_v1/classes.rb', line 318

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

Instance Attribute Details

#cidr_blockString

cidr_block must be specified in CIDR notation. Corresponds to the JSON property cidrBlock

Returns:

  • (String)

311
312
313
# File 'generated/google/apis/container_v1/classes.rb', line 311

def cidr_block
  @cidr_block
end

#display_nameString

display_name is an optional field for users to identify CIDR blocks. Corresponds to the JSON property displayName

Returns:

  • (String)

316
317
318
# File 'generated/google/apis/container_v1/classes.rb', line 316

def display_name
  @display_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


323
324
325
326
# File 'generated/google/apis/container_v1/classes.rb', line 323

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