Class: OCI::Devops::Models::CreateBuildStageDetails
- Inherits:
-
CreateBuildPipelineStageDetails
- Object
- CreateBuildPipelineStageDetails
- OCI::Devops::Models::CreateBuildStageDetails
- Defined in:
- lib/oci/devops/models/create_build_stage_details.rb
Overview
Specifies the build stage.
Instance Attribute Summary collapse
- #build_runner_shape_config ⇒ OCI::Devops::Models::BuildRunnerShapeConfig
-
#build_source_collection ⇒ OCI::Devops::Models::BuildSourceCollection
This attribute is required.
-
#build_spec_file ⇒ String
The path to the build specification file for this environment.
-
#image ⇒ String
[Required] Image name for the build environment.
-
#primary_build_source ⇒ String
Name of the build source where the build_spec.yml file is located.
- #private_access_config ⇒ OCI::Devops::Models::NetworkChannel
-
#stage_execution_timeout_in_seconds ⇒ Integer
Timeout for the build stage execution.
Attributes inherited from CreateBuildPipelineStageDetails
#build_pipeline_id, #build_pipeline_stage_predecessor_collection, #build_pipeline_stage_type, #defined_tags, #description, #display_name, #freeform_tags
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CreateBuildStageDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Methods inherited from CreateBuildPipelineStageDetails
Constructor Details
#initialize(attributes = {}) ⇒ CreateBuildStageDetails
Initializes the object
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/oci/devops/models/create_build_stage_details.rb', line 101 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.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.build_runner_shape_config = attributes[:'buildRunnerShapeConfig'] if attributes[:'buildRunnerShapeConfig'] raise 'You cannot provide both :buildRunnerShapeConfig and :build_runner_shape_config' if attributes.key?(:'buildRunnerShapeConfig') && attributes.key?(:'build_runner_shape_config') self.build_runner_shape_config = attributes[:'build_runner_shape_config'] if attributes[:'build_runner_shape_config'] 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
#build_runner_shape_config ⇒ OCI::Devops::Models::BuildRunnerShapeConfig
33 34 35 |
# File 'lib/oci/devops/models/create_build_stage_details.rb', line 33 def build_runner_shape_config @build_runner_shape_config end |
#build_source_collection ⇒ OCI::Devops::Models::BuildSourceCollection
This attribute is required.
26 27 28 |
# File 'lib/oci/devops/models/create_build_stage_details.rb', line 26 def build_source_collection @build_source_collection end |
#build_spec_file ⇒ String
The path to the build specification file for this environment. The default location of the file if not specified is build_spec.yaml.
18 19 20 |
# File 'lib/oci/devops/models/create_build_stage_details.rb', line 18 def build_spec_file @build_spec_file end |
#image ⇒ String
[Required] Image name for the build environment
14 15 16 |
# File 'lib/oci/devops/models/create_build_stage_details.rb', line 14 def image @image end |
#primary_build_source ⇒ String
Name of the build source where the build_spec.yml file is located. If not specified, the first entry in the build source collection is chosen as primary build source.
30 31 32 |
# File 'lib/oci/devops/models/create_build_stage_details.rb', line 30 def primary_build_source @primary_build_source end |
#private_access_config ⇒ OCI::Devops::Models::NetworkChannel
36 37 38 |
# File 'lib/oci/devops/models/create_build_stage_details.rb', line 36 def private_access_config @private_access_config end |
#stage_execution_timeout_in_seconds ⇒ Integer
Timeout for the build stage execution. Specify value in seconds.
22 23 24 |
# File 'lib/oci/devops/models/create_build_stage_details.rb', line 22 def stage_execution_timeout_in_seconds @stage_execution_timeout_in_seconds end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/oci/devops/models/create_build_stage_details.rb', line 39 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'display_name': :'displayName', 'description': :'description', 'build_pipeline_stage_type': :'buildPipelineStageType', 'build_pipeline_id': :'buildPipelineId', 'build_pipeline_stage_predecessor_collection': :'buildPipelineStagePredecessorCollection', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'image': :'image', 'build_spec_file': :'buildSpecFile', 'stage_execution_timeout_in_seconds': :'stageExecutionTimeoutInSeconds', 'build_source_collection': :'buildSourceCollection', 'primary_build_source': :'primaryBuildSource', 'build_runner_shape_config': :'buildRunnerShapeConfig', 'private_access_config': :'privateAccessConfig' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/oci/devops/models/create_build_stage_details.rb', line 61 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'display_name': :'String', 'description': :'String', 'build_pipeline_stage_type': :'String', 'build_pipeline_id': :'String', 'build_pipeline_stage_predecessor_collection': :'OCI::Devops::Models::BuildPipelineStagePredecessorCollection', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'image': :'String', 'build_spec_file': :'String', 'stage_execution_timeout_in_seconds': :'Integer', 'build_source_collection': :'OCI::Devops::Models::BuildSourceCollection', 'primary_build_source': :'String', 'build_runner_shape_config': :'OCI::Devops::Models::BuildRunnerShapeConfig', 'private_access_config': :'OCI::Devops::Models::NetworkChannel' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/oci/devops/models/create_build_stage_details.rb', line 157 def ==(other) return true if equal?(other) self.class == other.class && display_name == other.display_name && description == other.description && build_pipeline_stage_type == other.build_pipeline_stage_type && build_pipeline_id == other.build_pipeline_id && build_pipeline_stage_predecessor_collection == other.build_pipeline_stage_predecessor_collection && == other. && == other. && 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 && build_runner_shape_config == other.build_runner_shape_config && private_access_config == other.private_access_config end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/oci/devops/models/create_build_stage_details.rb', line 200 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
180 181 182 |
# File 'lib/oci/devops/models/create_build_stage_details.rb', line 180 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
189 190 191 |
# File 'lib/oci/devops/models/create_build_stage_details.rb', line 189 def hash [display_name, description, build_pipeline_stage_type, build_pipeline_id, build_pipeline_stage_predecessor_collection, , , image, build_spec_file, stage_execution_timeout_in_seconds, build_source_collection, primary_build_source, build_runner_shape_config, private_access_config].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
233 234 235 236 237 238 239 240 241 242 |
# File 'lib/oci/devops/models/create_build_stage_details.rb', line 233 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_s ⇒ String
Returns the string representation of the object
227 228 229 |
# File 'lib/oci/devops/models/create_build_stage_details.rb', line 227 def to_s to_hash.to_s end |