Class: Google::Apis::ContaineranalysisV1::Command

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

Overview

Command describes a step performed as part of the build pipeline.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Command

Returns a new instance of Command.



1119
1120
1121
# File 'lib/google/apis/containeranalysis_v1/classes.rb', line 1119

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

Instance Attribute Details

#argsArray<String>

Command-line arguments used when executing this command. Corresponds to the JSON property args

Returns:

  • (Array<String>)


1089
1090
1091
# File 'lib/google/apis/containeranalysis_v1/classes.rb', line 1089

def args
  @args
end

#dirString

Working directory (relative to project source root) used when running this command. Corresponds to the JSON property dir

Returns:

  • (String)


1095
1096
1097
# File 'lib/google/apis/containeranalysis_v1/classes.rb', line 1095

def dir
  @dir
end

#envArray<String>

Environment variables set before running this command. Corresponds to the JSON property env

Returns:

  • (Array<String>)


1100
1101
1102
# File 'lib/google/apis/containeranalysis_v1/classes.rb', line 1100

def env
  @env
end

#idString

Optional unique identifier for this command, used in wait_for to reference this command as a dependency. Corresponds to the JSON property id

Returns:

  • (String)


1106
1107
1108
# File 'lib/google/apis/containeranalysis_v1/classes.rb', line 1106

def id
  @id
end

#nameString

Required. Name of the command, as presented on the command line, or if the command is packaged as a Docker container, as presented to docker pull. Corresponds to the JSON property name

Returns:

  • (String)


1112
1113
1114
# File 'lib/google/apis/containeranalysis_v1/classes.rb', line 1112

def name
  @name
end

#wait_forArray<String>

The ID(s) of the command(s) that this command depends on. Corresponds to the JSON property waitFor

Returns:

  • (Array<String>)


1117
1118
1119
# File 'lib/google/apis/containeranalysis_v1/classes.rb', line 1117

def wait_for
  @wait_for
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1124
1125
1126
1127
1128
1129
1130
1131
# File 'lib/google/apis/containeranalysis_v1/classes.rb', line 1124

def update!(**args)
  @args = args[:args] if args.key?(:args)
  @dir = args[:dir] if args.key?(:dir)
  @env = args[:env] if args.key?(:env)
  @id = args[:id] if args.key?(:id)
  @name = args[:name] if args.key?(:name)
  @wait_for = args[:wait_for] if args.key?(:wait_for)
end