Class: OCI::Devops::Models::BuildStageRunProgress

Inherits:
BuildPipelineStageRunProgress show all
Defined in:
lib/oci/devops/models/build_stage_run_progress.rb

Overview

Specifies the run details for Build stage.

Constant Summary collapse

IMAGE_ENUM =
[
  IMAGE_OL7_X86_64_STANDARD_10 = 'OL7_X86_64_STANDARD_10'.freeze,
  IMAGE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Constants inherited from BuildPipelineStageRunProgress

OCI::Devops::Models::BuildPipelineStageRunProgress::STATUS_ENUM

Instance Attribute Summary collapse

Attributes inherited from BuildPipelineStageRunProgress

#build_pipeline_stage_id, #build_pipeline_stage_predecessors, #build_pipeline_stage_type, #stage_display_name, #status, #time_finished, #time_started

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BuildPipelineStageRunProgress

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ BuildStageRunProgress

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# File 'lib/oci/devops/models/build_stage_run_progress.rb', line 127

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  attributes['buildPipelineStageType'] = 'BUILD'

  super(attributes)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.actual_build_runner_shape = attributes[:'actualBuildRunnerShape'] if attributes[:'actualBuildRunnerShape']

  raise 'You cannot provide both :actualBuildRunnerShape and :actual_build_runner_shape' if attributes.key?(:'actualBuildRunnerShape') && attributes.key?(:'actual_build_runner_shape')

  self.actual_build_runner_shape = attributes[:'actual_build_runner_shape'] if attributes[:'actual_build_runner_shape']

  self.actual_build_runner_shape_config = attributes[:'actualBuildRunnerShapeConfig'] if attributes[:'actualBuildRunnerShapeConfig']

  raise 'You cannot provide both :actualBuildRunnerShapeConfig and :actual_build_runner_shape_config' if attributes.key?(:'actualBuildRunnerShapeConfig') && attributes.key?(:'actual_build_runner_shape_config')

  self.actual_build_runner_shape_config = attributes[:'actual_build_runner_shape_config'] if attributes[:'actual_build_runner_shape_config']

  self.image = attributes[:'image'] if attributes[:'image']

  self.build_spec_file = attributes[:'buildSpecFile'] if attributes[:'buildSpecFile']

  raise 'You cannot provide both :buildSpecFile and :build_spec_file' if attributes.key?(:'buildSpecFile') && attributes.key?(:'build_spec_file')

  self.build_spec_file = attributes[:'build_spec_file'] if attributes[:'build_spec_file']

  self.stage_execution_timeout_in_seconds = attributes[:'stageExecutionTimeoutInSeconds'] if attributes[:'stageExecutionTimeoutInSeconds']

  raise 'You cannot provide both :stageExecutionTimeoutInSeconds and :stage_execution_timeout_in_seconds' if attributes.key?(:'stageExecutionTimeoutInSeconds') && attributes.key?(:'stage_execution_timeout_in_seconds')

  self.stage_execution_timeout_in_seconds = attributes[:'stage_execution_timeout_in_seconds'] if attributes[:'stage_execution_timeout_in_seconds']

  self.build_source_collection = attributes[:'buildSourceCollection'] if attributes[:'buildSourceCollection']

  raise 'You cannot provide both :buildSourceCollection and :build_source_collection' if attributes.key?(:'buildSourceCollection') && attributes.key?(:'build_source_collection')

  self.build_source_collection = attributes[:'build_source_collection'] if attributes[:'build_source_collection']

  self.primary_build_source = attributes[:'primaryBuildSource'] if attributes[:'primaryBuildSource']

  raise 'You cannot provide both :primaryBuildSource and :primary_build_source' if attributes.key?(:'primaryBuildSource') && attributes.key?(:'primary_build_source')

  self.primary_build_source = attributes[:'primary_build_source'] if attributes[:'primary_build_source']

  self.steps = attributes[:'steps'] if attributes[:'steps']

  self.exported_variables = attributes[:'exportedVariables'] if attributes[:'exportedVariables']

  raise 'You cannot provide both :exportedVariables and :exported_variables' if attributes.key?(:'exportedVariables') && attributes.key?(:'exported_variables')

  self.exported_variables = attributes[:'exported_variables'] if attributes[:'exported_variables']

  self.private_access_config = attributes[:'privateAccessConfig'] if attributes[:'privateAccessConfig']

  raise 'You cannot provide both :privateAccessConfig and :private_access_config' if attributes.key?(:'privateAccessConfig') && attributes.key?(:'private_access_config')

  self.private_access_config = attributes[:'private_access_config'] if attributes[:'private_access_config']
end

Instance Attribute Details

#actual_build_runner_shapeString

Name of Build Runner shape where this Build Stage is running.

Returns:

  • (String)


20
21
22
# File 'lib/oci/devops/models/build_stage_run_progress.rb', line 20

def actual_build_runner_shape
  @actual_build_runner_shape
end

#actual_build_runner_shape_configOCI::Devops::Models::ActualBuildRunnerShapeConfig



23
24
25
# File 'lib/oci/devops/models/build_stage_run_progress.rb', line 23

def actual_build_runner_shape_config
  @actual_build_runner_shape_config
end

#build_source_collectionOCI::Devops::Models::BuildSourceCollection

This attribute is required.



39
40
41
# File 'lib/oci/devops/models/build_stage_run_progress.rb', line 39

def build_source_collection
  @build_source_collection
end

#build_spec_fileString

The path to the build specification file for this Environment. The default location if not specified is build_spec.yaml

Returns:

  • (String)


31
32
33
# File 'lib/oci/devops/models/build_stage_run_progress.rb', line 31

def build_spec_file
  @build_spec_file
end

#exported_variablesOCI::Devops::Models::ExportedVariableCollection



50
51
52
# File 'lib/oci/devops/models/build_stage_run_progress.rb', line 50

def exported_variables
  @exported_variables
end

#imageString

[Required] Image name for the Build Environment

Returns:

  • (String)


27
28
29
# File 'lib/oci/devops/models/build_stage_run_progress.rb', line 27

def image
  @image
end

#primary_build_sourceString

Name of the BuildSource in which the build_spec.yml file need to be located. If not specified, the 1st entry in the BuildSource collection will be chosen as Primary.

Returns:

  • (String)


43
44
45
# File 'lib/oci/devops/models/build_stage_run_progress.rb', line 43

def primary_build_source
  @primary_build_source
end

#private_access_configOCI::Devops::Models::NetworkChannel



53
54
55
# File 'lib/oci/devops/models/build_stage_run_progress.rb', line 53

def private_access_config
  @private_access_config
end

#stage_execution_timeout_in_secondsInteger

Timeout for the Build Stage Execution. Value in seconds.

Returns:

  • (Integer)


35
36
37
# File 'lib/oci/devops/models/build_stage_run_progress.rb', line 35

def stage_execution_timeout_in_seconds
  @stage_execution_timeout_in_seconds
end

#stepsArray<OCI::Devops::Models::BuildStageRunStep>

The details about all the steps in a Build stage



47
48
49
# File 'lib/oci/devops/models/build_stage_run_progress.rb', line 47

def steps
  @steps
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/oci/devops/models/build_stage_run_progress.rb', line 56

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'stage_display_name': :'stageDisplayName',
    'build_pipeline_stage_type': :'buildPipelineStageType',
    'build_pipeline_stage_id': :'buildPipelineStageId',
    'time_started': :'timeStarted',
    'time_finished': :'timeFinished',
    'status': :'status',
    'build_pipeline_stage_predecessors': :'buildPipelineStagePredecessors',
    'actual_build_runner_shape': :'actualBuildRunnerShape',
    'actual_build_runner_shape_config': :'actualBuildRunnerShapeConfig',
    'image': :'image',
    'build_spec_file': :'buildSpecFile',
    'stage_execution_timeout_in_seconds': :'stageExecutionTimeoutInSeconds',
    'build_source_collection': :'buildSourceCollection',
    'primary_build_source': :'primaryBuildSource',
    'steps': :'steps',
    'exported_variables': :'exportedVariables',
    'private_access_config': :'privateAccessConfig'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/oci/devops/models/build_stage_run_progress.rb', line 81

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'stage_display_name': :'String',
    'build_pipeline_stage_type': :'String',
    'build_pipeline_stage_id': :'String',
    'time_started': :'DateTime',
    'time_finished': :'DateTime',
    'status': :'String',
    'build_pipeline_stage_predecessors': :'OCI::Devops::Models::BuildPipelineStagePredecessorCollection',
    'actual_build_runner_shape': :'String',
    'actual_build_runner_shape_config': :'OCI::Devops::Models::ActualBuildRunnerShapeConfig',
    'image': :'String',
    'build_spec_file': :'String',
    'stage_execution_timeout_in_seconds': :'Integer',
    'build_source_collection': :'OCI::Devops::Models::BuildSourceCollection',
    'primary_build_source': :'String',
    'steps': :'Array<OCI::Devops::Models::BuildStageRunStep>',
    'exported_variables': :'OCI::Devops::Models::ExportedVariableCollection',
    'private_access_config': :'OCI::Devops::Models::NetworkChannel'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/oci/devops/models/build_stage_run_progress.rb', line 210

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    stage_display_name == other.stage_display_name &&
    build_pipeline_stage_type == other.build_pipeline_stage_type &&
    build_pipeline_stage_id == other.build_pipeline_stage_id &&
    time_started == other.time_started &&
    time_finished == other.time_finished &&
    status == other.status &&
    build_pipeline_stage_predecessors == other.build_pipeline_stage_predecessors &&
    actual_build_runner_shape == other.actual_build_runner_shape &&
    actual_build_runner_shape_config == other.actual_build_runner_shape_config &&
    image == other.image &&
    build_spec_file == other.build_spec_file &&
    stage_execution_timeout_in_seconds == other.stage_execution_timeout_in_seconds &&
    build_source_collection == other.build_source_collection &&
    primary_build_source == other.primary_build_source &&
    steps == other.steps &&
    exported_variables == other.exported_variables &&
    private_access_config == other.private_access_config
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
# File 'lib/oci/devops/models/build_stage_run_progress.rb', line 256

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


236
237
238
# File 'lib/oci/devops/models/build_stage_run_progress.rb', line 236

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



245
246
247
# File 'lib/oci/devops/models/build_stage_run_progress.rb', line 245

def hash
  [stage_display_name, build_pipeline_stage_type, build_pipeline_stage_id, time_started, time_finished, status, build_pipeline_stage_predecessors, actual_build_runner_shape, actual_build_runner_shape_config, image, build_spec_file, stage_execution_timeout_in_seconds, build_source_collection, primary_build_source, steps, exported_variables, private_access_config].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



289
290
291
292
293
294
295
296
297
298
# File 'lib/oci/devops/models/build_stage_run_progress.rb', line 289

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



283
284
285
# File 'lib/oci/devops/models/build_stage_run_progress.rb', line 283

def to_s
  to_hash.to_s
end