Class: Google::Apis::CloudbuildV1alpha1::Network

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

Overview

Network describes the GCP network used to create workers in.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Network

Returns a new instance of Network.



1618
1619
1620
# File 'lib/google/apis/cloudbuild_v1alpha1/classes.rb', line 1618

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

Instance Attribute Details

#networkString

Network on which the workers are created. "default" network is used if empty. Corresponds to the JSON property network

Returns:

  • (String)


1601
1602
1603
# File 'lib/google/apis/cloudbuild_v1alpha1/classes.rb', line 1601

def network
  @network
end

#project_idString

Project id containing the defined network and subnetwork. For a peered VPC, this will be the same as the project_id in which the workers are created. For a shared VPC, this will be the project sharing the network with the project_id project in which workers will be created. For custom workers with no VPC, this will be the same as project_id. Corresponds to the JSON property projectId

Returns:

  • (String)


1610
1611
1612
# File 'lib/google/apis/cloudbuild_v1alpha1/classes.rb', line 1610

def project_id
  @project_id
end

#subnetworkString

Subnetwork on which the workers are created. "default" subnetwork is used if empty. Corresponds to the JSON property subnetwork

Returns:

  • (String)


1616
1617
1618
# File 'lib/google/apis/cloudbuild_v1alpha1/classes.rb', line 1616

def subnetwork
  @subnetwork
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1623
1624
1625
1626
1627
# File 'lib/google/apis/cloudbuild_v1alpha1/classes.rb', line 1623

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