Class: Google::Apis::CloudbuildV2::PipelineWorkspaceDeclaration

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

Overview

Workspaces declares a set of named workspaces that are expected to be provided by a PipelineRun.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PipelineWorkspaceDeclaration

Returns a new instance of PipelineWorkspaceDeclaration.



2021
2022
2023
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2021

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

Instance Attribute Details

#descriptionString

Description is a human readable string describing how the workspace will be used in the Pipeline. Corresponds to the JSON property description

Returns:

  • (String)


2007
2008
2009
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2007

def description
  @description
end

#nameString

Name is the name of a workspace to be provided by a PipelineRun. Corresponds to the JSON property name

Returns:

  • (String)


2012
2013
2014
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2012

def name
  @name
end

#optionalBoolean Also known as: optional?

Optional marks a Workspace as not being required in PipelineRuns. By default this field is false and so declared workspaces are required. Corresponds to the JSON property optional

Returns:

  • (Boolean)


2018
2019
2020
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2018

def optional
  @optional
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2026
2027
2028
2029
2030
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2026

def update!(**args)
  @description = args[:description] if args.key?(:description)
  @name = args[:name] if args.key?(:name)
  @optional = args[:optional] if args.key?(:optional)
end