Class: OCI::LimitsIncrease::Models::LimitsIncreaseItemRequest
- Inherits:
-
Object
- Object
- OCI::LimitsIncrease::Models::LimitsIncreaseItemRequest
- Defined in:
- lib/oci/limits_increase/models/limits_increase_item_request.rb
Overview
The properties that define a limit increase item in a limit increase request. For information about limit increase requests, see Working with Limit Increase Requests.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_ACCEPTED = 'ACCEPTED'.freeze, LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'.freeze, LIFECYCLE_STATE_SUCCEEDED = 'SUCCEEDED'.freeze, LIFECYCLE_STATE_CANCELED = 'CANCELED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
[Required] The OCID of the compartment that contains the limit increase item.
-
#current_value ⇒ Integer
[Required] The value of the limit for the tenancy at the time of the request.
-
#id ⇒ String
[Required] The OCID of the limit increase item.
-
#lifecycle_state ⇒ String
[Required] The current status of the limit increase item.
-
#limit_name ⇒ String
[Required] The name of the limit to be increased.
-
#limits_increase_request_id ⇒ String
[Required] The OCID of the limit increase request that the limit increase item belongs to.
-
#questionnaire_response ⇒ Array<OCI::LimitsIncrease::Models::LimitsIncreaseItemQuestionResponse>
List of questionnaire responses for the limit increase item.
-
#region ⇒ String
[Required] The region code for the limit increase item.
-
#scope ⇒ String
The scope of the limit increase item.
-
#service_name ⇒ String
[Required] The name of the service that owns the limit.
-
#time_created ⇒ DateTime
[Required] The time that the limit increase item was created.
-
#time_resolution ⇒ DateTime
The time that the limit increase item was resolved.
-
#time_updated ⇒ DateTime
The time that the limit increase item was last updated.
-
#value ⇒ Integer
[Required] The new value requested for the limit.
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 = {}) ⇒ LimitsIncreaseItemRequest
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 = {}) ⇒ LimitsIncreaseItemRequest
Initializes the object
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 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 153 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.id = attributes[:'id'] if attributes[:'id'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self.region = attributes[:'region'] if attributes[:'region'] self.scope = attributes[:'scope'] if attributes[:'scope'] self.service_name = attributes[:'serviceName'] if attributes[:'serviceName'] raise 'You cannot provide both :serviceName and :service_name' if attributes.key?(:'serviceName') && attributes.key?(:'service_name') self.service_name = attributes[:'service_name'] if attributes[:'service_name'] self.limit_name = attributes[:'limitName'] if attributes[:'limitName'] raise 'You cannot provide both :limitName and :limit_name' if attributes.key?(:'limitName') && attributes.key?(:'limit_name') self.limit_name = attributes[:'limit_name'] if attributes[:'limit_name'] self.current_value = attributes[:'currentValue'] if attributes[:'currentValue'] raise 'You cannot provide both :currentValue and :current_value' if attributes.key?(:'currentValue') && attributes.key?(:'current_value') self.current_value = attributes[:'current_value'] if attributes[:'current_value'] self.value = attributes[:'value'] if attributes[:'value'] self.limits_increase_request_id = attributes[:'limitsIncreaseRequestId'] if attributes[:'limitsIncreaseRequestId'] raise 'You cannot provide both :limitsIncreaseRequestId and :limits_increase_request_id' if attributes.key?(:'limitsIncreaseRequestId') && attributes.key?(:'limits_increase_request_id') self.limits_increase_request_id = attributes[:'limits_increase_request_id'] if attributes[:'limits_increase_request_id'] self.time_resolution = attributes[:'timeResolution'] if attributes[:'timeResolution'] raise 'You cannot provide both :timeResolution and :time_resolution' if attributes.key?(:'timeResolution') && attributes.key?(:'time_resolution') self.time_resolution = attributes[:'time_resolution'] if attributes[:'time_resolution'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self.questionnaire_response = attributes[:'questionnaireResponse'] if attributes[:'questionnaireResponse'] raise 'You cannot provide both :questionnaireResponse and :questionnaire_response' if attributes.key?(:'questionnaireResponse') && attributes.key?(:'questionnaire_response') self.questionnaire_response = attributes[:'questionnaire_response'] if attributes[:'questionnaire_response'] end |
Instance Attribute Details
#compartment_id ⇒ String
[Required] The OCID of the compartment that contains the limit increase item. Note: The tenancy is the root compartment).
33 34 35 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 33 def compartment_id @compartment_id end |
#current_value ⇒ Integer
[Required] The value of the limit for the tenancy at the time of the request. Purely informative.
58 59 60 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 58 def current_value @current_value end |
#id ⇒ String
[Required] The OCID of the limit increase item.
27 28 29 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 27 def id @id end |
#lifecycle_state ⇒ String
[Required] The current status of the limit increase item.
83 84 85 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 83 def lifecycle_state @lifecycle_state end |
#limit_name ⇒ String
[Required] The name of the limit to be increased.
54 55 56 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 54 def limit_name @limit_name end |
#limits_increase_request_id ⇒ String
[Required] The OCID of the limit increase request that the limit increase item belongs to.
67 68 69 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 67 def limits_increase_request_id @limits_increase_request_id end |
#questionnaire_response ⇒ Array<OCI::LimitsIncrease::Models::LimitsIncreaseItemQuestionResponse>
List of questionnaire responses for the limit increase item.
87 88 89 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 87 def questionnaire_response @questionnaire_response end |
#region ⇒ String
[Required] The region code for the limit increase item.
37 38 39 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 37 def region @region end |
#scope ⇒ String
The scope of the limit increase item. For OCI, use the logical availability domain (AD) of the request. For Multicloud, use the availability zone (AZ) of the request
44 45 46 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 44 def scope @scope end |
#service_name ⇒ String
[Required] The name of the service that owns the limit.
49 50 51 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 49 def service_name @service_name end |
#time_created ⇒ DateTime
[Required] The time that the limit increase item was created. Format defined by RFC3339.
75 76 77 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 75 def time_created @time_created end |
#time_resolution ⇒ DateTime
The time that the limit increase item was resolved. Format defined by RFC3339.
71 72 73 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 71 def time_resolution @time_resolution end |
#time_updated ⇒ DateTime
The time that the limit increase item was last updated. Format defined by RFC3339.
79 80 81 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 79 def time_updated @time_updated end |
#value ⇒ Integer
[Required] The new value requested for the limit.
62 63 64 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 62 def value @value end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 90 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'compartment_id': :'compartmentId', 'region': :'region', 'scope': :'scope', 'service_name': :'serviceName', 'limit_name': :'limitName', 'current_value': :'currentValue', 'value': :'value', 'limits_increase_request_id': :'limitsIncreaseRequestId', 'time_resolution': :'timeResolution', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'lifecycle_state': :'lifecycleState', 'questionnaire_response': :'questionnaireResponse' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 112 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'compartment_id': :'String', 'region': :'String', 'scope': :'String', 'service_name': :'String', 'limit_name': :'String', 'current_value': :'Integer', 'value': :'Integer', 'limits_increase_request_id': :'String', 'time_resolution': :'DateTime', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'lifecycle_state': :'String', 'questionnaire_response': :'Array<OCI::LimitsIncrease::Models::LimitsIncreaseItemQuestionResponse>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 248 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && compartment_id == other.compartment_id && region == other.region && scope == other.scope && service_name == other.service_name && limit_name == other.limit_name && current_value == other.current_value && value == other.value && limits_increase_request_id == other.limits_increase_request_id && time_resolution == other.time_resolution && time_created == other.time_created && time_updated == other.time_updated && lifecycle_state == other.lifecycle_state && questionnaire_response == other.questionnaire_response end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 291 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
271 272 273 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 271 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
280 281 282 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 280 def hash [id, compartment_id, region, scope, service_name, limit_name, current_value, value, limits_increase_request_id, time_resolution, time_created, time_updated, lifecycle_state, questionnaire_response].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
324 325 326 327 328 329 330 331 332 333 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 324 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
318 319 320 |
# File 'lib/oci/limits_increase/models/limits_increase_item_request.rb', line 318 def to_s to_hash.to_s end |