Class: OCI::ResourceManager::Models::TerraformAdvancedOptions
- Inherits:
-
Object
- Object
- OCI::ResourceManager::Models::TerraformAdvancedOptions
- Defined in:
- lib/oci/resource_manager/models/terraform_advanced_options.rb
Overview
Specifies advanced options for Terraform commands. These options are not necessary for normal usage of Terraform.
Constant Summary collapse
- DETAILED_LOG_LEVEL_ENUM =
[ DETAILED_LOG_LEVEL_ERROR = 'ERROR'.freeze, DETAILED_LOG_LEVEL_WARN = 'WARN'.freeze, DETAILED_LOG_LEVEL_INFO = 'INFO'.freeze, DETAILED_LOG_LEVEL_DEBUG = 'DEBUG'.freeze, DETAILED_LOG_LEVEL_TRACE = 'TRACE'.freeze, DETAILED_LOG_LEVEL_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#detailed_log_level ⇒ String
Enables detailed logs at the specified verbosity for running the job (operation).
-
#is_refresh_required ⇒ BOOLEAN
Specifies whether to refresh the state for each resource before running the job (operation).
-
#parallelism ⇒ Integer
Limits the number of concurrent Terraform operations when [walking the graph](www.terraform.io/docs/internals/graph.html#walking-the-graph).
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 = {}) ⇒ TerraformAdvancedOptions
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.
Constructor Details
#initialize(attributes = {}) ⇒ TerraformAdvancedOptions
Initializes the object
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/oci/resource_manager/models/terraform_advanced_options.rb', line 72 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.is_refresh_required = attributes[:'isRefreshRequired'] unless attributes[:'isRefreshRequired'].nil? self.is_refresh_required = true if is_refresh_required.nil? && !attributes.key?(:'isRefreshRequired') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isRefreshRequired and :is_refresh_required' if attributes.key?(:'isRefreshRequired') && attributes.key?(:'is_refresh_required') self.is_refresh_required = attributes[:'is_refresh_required'] unless attributes[:'is_refresh_required'].nil? self.is_refresh_required = true if is_refresh_required.nil? && !attributes.key?(:'isRefreshRequired') && !attributes.key?(:'is_refresh_required') # rubocop:disable Style/StringLiterals self.parallelism = attributes[:'parallelism'] if attributes[:'parallelism'] self.detailed_log_level = attributes[:'detailedLogLevel'] if attributes[:'detailedLogLevel'] raise 'You cannot provide both :detailedLogLevel and :detailed_log_level' if attributes.key?(:'detailedLogLevel') && attributes.key?(:'detailed_log_level') self.detailed_log_level = attributes[:'detailed_log_level'] if attributes[:'detailed_log_level'] end |
Instance Attribute Details
#detailed_log_level ⇒ String
Enables detailed logs at the specified verbosity for running the job (operation).
39 40 41 |
# File 'lib/oci/resource_manager/models/terraform_advanced_options.rb', line 39 def detailed_log_level @detailed_log_level end |
#is_refresh_required ⇒ BOOLEAN
Specifies whether to refresh the state for each resource before running the job (operation). Refreshing the state can affect performance. Consider setting to `false` if the configuration includes several resources. Used with the following operations: `PLAN`, `APPLY`, `DESTROY`.
26 27 28 |
# File 'lib/oci/resource_manager/models/terraform_advanced_options.rb', line 26 def is_refresh_required @is_refresh_required end |
#parallelism ⇒ Integer
Limits the number of concurrent Terraform operations when [walking the graph](www.terraform.io/docs/internals/graph.html#walking-the-graph). Use this parameter to help debug Terraform issues or to accomplish certain special use cases. A higher value might cause resources to be throttled. Used with the following operations: `PLAN`, `APPLY`, `DESTROY`.
34 35 36 |
# File 'lib/oci/resource_manager/models/terraform_advanced_options.rb', line 34 def parallelism @parallelism end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
42 43 44 45 46 47 48 49 50 |
# File 'lib/oci/resource_manager/models/terraform_advanced_options.rb', line 42 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'is_refresh_required': :'isRefreshRequired', 'parallelism': :'parallelism', 'detailed_log_level': :'detailedLogLevel' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
53 54 55 56 57 58 59 60 61 |
# File 'lib/oci/resource_manager/models/terraform_advanced_options.rb', line 53 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'is_refresh_required': :'BOOLEAN', 'parallelism': :'Integer', 'detailed_log_level': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
115 116 117 118 119 120 121 122 |
# File 'lib/oci/resource_manager/models/terraform_advanced_options.rb', line 115 def ==(other) return true if equal?(other) self.class == other.class && is_refresh_required == other.is_refresh_required && parallelism == other.parallelism && detailed_log_level == other.detailed_log_level end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/oci/resource_manager/models/terraform_advanced_options.rb', line 147 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
127 128 129 |
# File 'lib/oci/resource_manager/models/terraform_advanced_options.rb', line 127 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
136 137 138 |
# File 'lib/oci/resource_manager/models/terraform_advanced_options.rb', line 136 def hash [is_refresh_required, parallelism, detailed_log_level].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
180 181 182 183 184 185 186 187 188 189 |
# File 'lib/oci/resource_manager/models/terraform_advanced_options.rb', line 180 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
174 175 176 |
# File 'lib/oci/resource_manager/models/terraform_advanced_options.rb', line 174 def to_s to_hash.to_s end |