Class: OCI::Mngdmac::Models::MacOrder

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/mngdmac/models/mac_order.rb

Overview

A description of a MacOrder resource.

Constant Summary collapse

SHAPE_ENUM =
[
  SHAPE_M2_PRO_MAC_MINI_32_GB_1_TB = 'M2_PRO_MAC_MINI_32GB_1TB'.freeze,
  SHAPE_M2_ULTRA_MAC_STUDIO_64_GB_4_TB = 'M2_ULTRA_MAC_STUDIO_64GB_4TB'.freeze,
  SHAPE_M2_ULTRA_MAC_STUDIO_192_GB_4_TB = 'M2_ULTRA_MAC_STUDIO_192GB_4TB'.freeze,
  SHAPE_M4_PRO_MAC_MINI_64_GB_2_TB = 'M4_PRO_MAC_MINI_64GB_2TB'.freeze,
  SHAPE_M4_PRO_MAC_MINI_64_GB_4_TB = 'M4_PRO_MAC_MINI_64GB_4TB'.freeze,
  SHAPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
COMMITMENT_TERM_ENUM =
[
  COMMITMENT_TERM_YEARS_3 = 'YEARS_3'.freeze,
  COMMITMENT_TERM_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
ORDER_STATUS_ENUM =
[
  ORDER_STATUS_SUBMITTED = 'SUBMITTED'.freeze,
  ORDER_STATUS_PENDING_DOCUSIGN = 'PENDING_DOCUSIGN'.freeze,
  ORDER_STATUS_ORDER_REVIEW = 'ORDER_REVIEW'.freeze,
  ORDER_STATUS_CUSTOMER_REVIEW = 'CUSTOMER_REVIEW'.freeze,
  ORDER_STATUS_CUSTOMER_APPROVED = 'CUSTOMER_APPROVED'.freeze,
  ORDER_STATUS_FUNDING_APPROVED = 'FUNDING_APPROVED'.freeze,
  ORDER_STATUS_PROVISIONING = 'PROVISIONING'.freeze,
  ORDER_STATUS_CUSTOMER_ACCEPTED = 'CUSTOMER_ACCEPTED'.freeze,
  ORDER_STATUS_COMPLETED = 'COMPLETED'.freeze,
  ORDER_STATUS_CANCELED = 'CANCELED'.freeze,
  ORDER_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
  LIFECYCLE_STATE_NEEDS_ATTENTION = 'NEEDS_ATTENTION'.freeze,
  LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
  LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ MacOrder

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

  • :display_name (String)

    The value to assign to the #display_name property

  • :order_description (String)

    The value to assign to the #order_description property

  • :order_size (Integer)

    The value to assign to the #order_size property

  • :ip_range (String)

    The value to assign to the #ip_range property

  • :is_docusigned (BOOLEAN)

    The value to assign to the #is_docusigned property

  • :shape (String)

    The value to assign to the #shape property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :time_updated (DateTime)

    The value to assign to the #time_updated property

  • :commitment_term (String)

    The value to assign to the #commitment_term property

  • :time_billing_started (DateTime)

    The value to assign to the #time_billing_started property

  • :time_billing_ended (DateTime)

    The value to assign to the #time_billing_ended property

  • :order_status (String)

    The value to assign to the #order_status property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :lifecycle_details (String)

    The value to assign to the #lifecycle_details property

  • :cancel_reason (String)

    The value to assign to the #cancel_reason property

  • :time_canceled (DateTime)

    The value to assign to the #time_canceled property



207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
# File 'lib/oci/mngdmac/models/mac_order.rb', line 207

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

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

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

  self.order_description = attributes[:'orderDescription'] if attributes[:'orderDescription']

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

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

  self.order_size = attributes[:'orderSize'] if attributes[:'orderSize']

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

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

  self.ip_range = attributes[:'ipRange'] if attributes[:'ipRange']

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

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

  self.is_docusigned = attributes[:'isDocusigned'] unless attributes[:'isDocusigned'].nil?
  self.is_docusigned = false if is_docusigned.nil? && !attributes.key?(:'isDocusigned') # rubocop:disable Style/StringLiterals

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

  self.is_docusigned = attributes[:'is_docusigned'] unless attributes[:'is_docusigned'].nil?
  self.is_docusigned = false if is_docusigned.nil? && !attributes.key?(:'isDocusigned') && !attributes.key?(:'is_docusigned') # rubocop:disable Style/StringLiterals

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

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

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

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

  self.time_billing_started = attributes[:'timeBillingStarted'] if attributes[:'timeBillingStarted']

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

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

  self.time_billing_ended = attributes[:'timeBillingEnded'] if attributes[:'timeBillingEnded']

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

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

  self.order_status = attributes[:'orderStatus'] if attributes[:'orderStatus']

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

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

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

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

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

  self.cancel_reason = attributes[:'cancelReason'] if attributes[:'cancelReason']

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

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

  self.time_canceled = attributes[:'timeCanceled'] if attributes[:'timeCanceled']

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

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

Instance Attribute Details

#cancel_reasonString

The reason for the MacOrder cancellation.

Returns:

  • (String)


125
126
127
# File 'lib/oci/mngdmac/models/mac_order.rb', line 125

def cancel_reason
  @cancel_reason
end

#commitment_termString

[Required] Enum indicating the agreed commitment term for the requested MacDevices.

Returns:

  • (String)


100
101
102
# File 'lib/oci/mngdmac/models/mac_order.rb', line 100

def commitment_term
  @commitment_term
end

#compartment_idString

[Required] OCID of the compartment to which the resource belongs to.

Returns:

  • (String)


58
59
60
# File 'lib/oci/mngdmac/models/mac_order.rb', line 58

def compartment_id
  @compartment_id
end

#display_nameString

A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

Example: My new resource

Returns:

  • (String)


66
67
68
# File 'lib/oci/mngdmac/models/mac_order.rb', line 66

def display_name
  @display_name
end

#idString

[Required] The OCID of the resource.

Returns:

  • (String)


54
55
56
# File 'lib/oci/mngdmac/models/mac_order.rb', line 54

def id
  @id
end

#ip_rangeString

The IP Range specified by the customer for this order.

Returns:

  • (String)


80
81
82
# File 'lib/oci/mngdmac/models/mac_order.rb', line 80

def ip_range
  @ip_range
end

#is_docusignedBOOLEAN

[Required] Checkbox value that indicates whether the customer completed docusign process.

Returns:

  • (BOOLEAN)


84
85
86
# File 'lib/oci/mngdmac/models/mac_order.rb', line 84

def is_docusigned
  @is_docusigned
end

#lifecycle_detailsString

A message that describes the current state of the MacOrder in more detail.

Returns:

  • (String)


121
122
123
# File 'lib/oci/mngdmac/models/mac_order.rb', line 121

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] The current state of the MacOrder.

Returns:

  • (String)


116
117
118
# File 'lib/oci/mngdmac/models/mac_order.rb', line 116

def lifecycle_state
  @lifecycle_state
end

#order_descriptionString

[Required] A user-friendly description. To provide some insight about the resource. Avoid entering confidential information.

Returns:

  • (String)


72
73
74
# File 'lib/oci/mngdmac/models/mac_order.rb', line 72

def order_description
  @order_description
end

#order_sizeInteger

[Required] Number of macs requested in this MacOrder.

Returns:

  • (Integer)


76
77
78
# File 'lib/oci/mngdmac/models/mac_order.rb', line 76

def order_size
  @order_size
end

#order_statusString

[Required] The current status of the MacOrder.

Returns:

  • (String)


112
113
114
# File 'lib/oci/mngdmac/models/mac_order.rb', line 112

def order_status
  @order_status
end

#shapeString

[Required] Enum indicating the requested shape for the MacDevices.

Returns:

  • (String)


88
89
90
# File 'lib/oci/mngdmac/models/mac_order.rb', line 88

def shape
  @shape
end

#time_billing_endedDateTime

An RFC3339-formatted datetime string containing the date and time that billing for this MacOrder ends.

Returns:

  • (DateTime)


108
109
110
# File 'lib/oci/mngdmac/models/mac_order.rb', line 108

def time_billing_ended
  @time_billing_ended
end

#time_billing_startedDateTime

An RFC3339-formatted datetime string containing the date and time that billing for this MacOrder begins.

Returns:

  • (DateTime)


104
105
106
# File 'lib/oci/mngdmac/models/mac_order.rb', line 104

def time_billing_started
  @time_billing_started
end

#time_canceledDateTime

An RFC3339-formatted datetime string containing the time this MacOrder was cancelled.

Returns:

  • (DateTime)


129
130
131
# File 'lib/oci/mngdmac/models/mac_order.rb', line 129

def time_canceled
  @time_canceled
end

#time_createdDateTime

[Required] The time this resource was created. An RFC3339 formatted datetime string.

Returns:

  • (DateTime)


92
93
94
# File 'lib/oci/mngdmac/models/mac_order.rb', line 92

def time_created
  @time_created
end

#time_updatedDateTime

The time this resource was last updated. An RFC3339 formatted datetime string.

Returns:

  • (DateTime)


96
97
98
# File 'lib/oci/mngdmac/models/mac_order.rb', line 96

def time_updated
  @time_updated
end

Class Method Details

.attribute_mapObject

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



132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# File 'lib/oci/mngdmac/models/mac_order.rb', line 132

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'compartment_id': :'compartmentId',
    'display_name': :'displayName',
    'order_description': :'orderDescription',
    'order_size': :'orderSize',
    'ip_range': :'ipRange',
    'is_docusigned': :'isDocusigned',
    'shape': :'shape',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'commitment_term': :'commitmentTerm',
    'time_billing_started': :'timeBillingStarted',
    'time_billing_ended': :'timeBillingEnded',
    'order_status': :'orderStatus',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_details': :'lifecycleDetails',
    'cancel_reason': :'cancelReason',
    'time_canceled': :'timeCanceled'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/oci/mngdmac/models/mac_order.rb', line 158

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'compartment_id': :'String',
    'display_name': :'String',
    'order_description': :'String',
    'order_size': :'Integer',
    'ip_range': :'String',
    'is_docusigned': :'BOOLEAN',
    'shape': :'String',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'commitment_term': :'String',
    'time_billing_started': :'DateTime',
    'time_billing_ended': :'DateTime',
    'order_status': :'String',
    'lifecycle_state': :'String',
    'lifecycle_details': :'String',
    'cancel_reason': :'String',
    'time_canceled': :'DateTime'
    # 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



375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
# File 'lib/oci/mngdmac/models/mac_order.rb', line 375

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

  self.class == other.class &&
    id == other.id &&
    compartment_id == other.compartment_id &&
    display_name == other.display_name &&
    order_description == other.order_description &&
    order_size == other.order_size &&
    ip_range == other.ip_range &&
    is_docusigned == other.is_docusigned &&
    shape == other.shape &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    commitment_term == other.commitment_term &&
    time_billing_started == other.time_billing_started &&
    time_billing_ended == other.time_billing_ended &&
    order_status == other.order_status &&
    lifecycle_state == other.lifecycle_state &&
    lifecycle_details == other.lifecycle_details &&
    cancel_reason == other.cancel_reason &&
    time_canceled == other.time_canceled
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



422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
# File 'lib/oci/mngdmac/models/mac_order.rb', line 422

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


402
403
404
# File 'lib/oci/mngdmac/models/mac_order.rb', line 402

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



411
412
413
# File 'lib/oci/mngdmac/models/mac_order.rb', line 411

def hash
  [id, compartment_id, display_name, order_description, order_size, ip_range, is_docusigned, shape, time_created, time_updated, commitment_term, time_billing_started, time_billing_ended, order_status, lifecycle_state, lifecycle_details, cancel_reason, time_canceled].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



455
456
457
458
459
460
461
462
463
464
# File 'lib/oci/mngdmac/models/mac_order.rb', line 455

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



449
450
451
# File 'lib/oci/mngdmac/models/mac_order.rb', line 449

def to_s
  to_hash.to_s
end