Class: OCI::LimitsIncrease::Models::LimitsIncreaseItemRequestSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/limits_increase/models/limits_increase_item_request_summary.rb

Overview

A summary of properties for a limit increase item within the indicated limit increase request.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ LimitsIncreaseItemRequestSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :id (String)

    The value to assign to the #id property

  • :compartment_id (String)

    The value to assign to the #compartment_id property

  • :region (String)

    The value to assign to the #region property

  • :scope (String)

    The value to assign to the #scope property

  • :service_name (String)

    The value to assign to the #service_name property

  • :limit_name (String)

    The value to assign to the #limit_name property

  • :value (Integer)

    The value to assign to the #value property

  • :current_value (Integer)

    The value to assign to the #current_value property

  • :limits_increase_request_id (String)

    The value to assign to the #limits_increase_request_id property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property



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
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
# File 'lib/oci/limits_increase/models/limits_increase_item_request_summary.rb', line 119

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.value = attributes[:'value'] if attributes[:'value']

  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.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_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.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']
end

Instance Attribute Details

#compartment_idString

[Required] The OCID of the compartment that contains the limit increase item. Note: The tenancy is the root compartment.

Returns:

  • (String)


21
22
23
# File 'lib/oci/limits_increase/models/limits_increase_item_request_summary.rb', line 21

def compartment_id
  @compartment_id
end

#current_valueInteger

[Required] The value of the limit for the tenancy at the time of the request. Purely informative.

Returns:

  • (Integer)


50
51
52
# File 'lib/oci/limits_increase/models/limits_increase_item_request_summary.rb', line 50

def current_value
  @current_value
end

#idString

[Required] The OCID of the limit increase item.

Returns:

  • (String)


15
16
17
# File 'lib/oci/limits_increase/models/limits_increase_item_request_summary.rb', line 15

def id
  @id
end

#lifecycle_stateString

[Required] The current status of the limit increase item.

Returns:

  • (String)


62
63
64
# File 'lib/oci/limits_increase/models/limits_increase_item_request_summary.rb', line 62

def lifecycle_state
  @lifecycle_state
end

#limit_nameString

[Required] The name of the limit to be increased.

Returns:

  • (String)


42
43
44
# File 'lib/oci/limits_increase/models/limits_increase_item_request_summary.rb', line 42

def limit_name
  @limit_name
end

#limits_increase_request_idString

[Required] The OCID of the limit increase request that the limit increase item belongs to.

Returns:

  • (String)


54
55
56
# File 'lib/oci/limits_increase/models/limits_increase_item_request_summary.rb', line 54

def limits_increase_request_id
  @limits_increase_request_id
end

#regionString

[Required] The region code for the limit increase item.

Returns:

  • (String)


25
26
27
# File 'lib/oci/limits_increase/models/limits_increase_item_request_summary.rb', line 25

def region
  @region
end

#scopeString

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

Returns:

  • (String)


32
33
34
# File 'lib/oci/limits_increase/models/limits_increase_item_request_summary.rb', line 32

def scope
  @scope
end

#service_nameString

[Required] The name of the service that owns the limit.

Returns:

  • (String)


37
38
39
# File 'lib/oci/limits_increase/models/limits_increase_item_request_summary.rb', line 37

def service_name
  @service_name
end

#time_createdDateTime

[Required] The time that the limit increase request was created. Format defined by RFC3339.

Returns:

  • (DateTime)


58
59
60
# File 'lib/oci/limits_increase/models/limits_increase_item_request_summary.rb', line 58

def time_created
  @time_created
end

#valueInteger

[Required] The requested value for the limit.

Returns:

  • (Integer)


46
47
48
# File 'lib/oci/limits_increase/models/limits_increase_item_request_summary.rb', line 46

def value
  @value
end

Class Method Details

.attribute_mapObject

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



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/oci/limits_increase/models/limits_increase_item_request_summary.rb', line 65

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'compartment_id': :'compartmentId',
    'region': :'region',
    'scope': :'scope',
    'service_name': :'serviceName',
    'limit_name': :'limitName',
    'value': :'value',
    'current_value': :'currentValue',
    'limits_increase_request_id': :'limitsIncreaseRequestId',
    'time_created': :'timeCreated',
    'lifecycle_state': :'lifecycleState'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/oci/limits_increase/models/limits_increase_item_request_summary.rb', line 84

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'compartment_id': :'String',
    'region': :'String',
    'scope': :'String',
    'service_name': :'String',
    'limit_name': :'String',
    'value': :'Integer',
    'current_value': :'Integer',
    'limits_increase_request_id': :'String',
    'time_created': :'DateTime',
    'lifecycle_state': :'String'
    # 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



183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/oci/limits_increase/models/limits_increase_item_request_summary.rb', line 183

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 &&
    value == other.value &&
    current_value == other.current_value &&
    limits_increase_request_id == other.limits_increase_request_id &&
    time_created == other.time_created &&
    lifecycle_state == other.lifecycle_state
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



223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# File 'lib/oci/limits_increase/models/limits_increase_item_request_summary.rb', line 223

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


203
204
205
# File 'lib/oci/limits_increase/models/limits_increase_item_request_summary.rb', line 203

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



212
213
214
# File 'lib/oci/limits_increase/models/limits_increase_item_request_summary.rb', line 212

def hash
  [id, compartment_id, region, scope, service_name, limit_name, value, current_value, limits_increase_request_id, time_created, lifecycle_state].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



256
257
258
259
260
261
262
263
264
265
# File 'lib/oci/limits_increase/models/limits_increase_item_request_summary.rb', line 256

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



250
251
252
# File 'lib/oci/limits_increase/models/limits_increase_item_request_summary.rb', line 250

def to_s
  to_hash.to_s
end