Class: Google::Apis::CloudbuildV2::WorkspaceDeclaration

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

WorkspaceDeclaration is a declaration of a volume that a Task requires.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ WorkspaceDeclaration

Returns a new instance of WorkspaceDeclaration.



3203
3204
3205
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 3203

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

Instance Attribute Details

#descriptionString

Description is a human readable description of this volume. Corresponds to the JSON property description

Returns:

  • (String)


3178
3179
3180
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 3178

def description
  @description
end

#mount_pathString

MountPath overrides the directory that the volume will be made available at. Corresponds to the JSON property mountPath

Returns:

  • (String)


3183
3184
3185
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 3183

def mount_path
  @mount_path
end

#nameString

Name is the name by which you can bind the volume at runtime. Corresponds to the JSON property name

Returns:

  • (String)


3188
3189
3190
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 3188

def name
  @name
end

#optionalBoolean Also known as: optional?

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

Returns:

  • (Boolean)


3194
3195
3196
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 3194

def optional
  @optional
end

#read_onlyBoolean Also known as: read_only?

ReadOnly dictates whether a mounted volume is writable. Corresponds to the JSON property readOnly

Returns:

  • (Boolean)


3200
3201
3202
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 3200

def read_only
  @read_only
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3208
3209
3210
3211
3212
3213
3214
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 3208

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