Class: OCI::Mngdmac::Models::MacOrder
- Inherits:
-
Object
- Object
- OCI::Mngdmac::Models::MacOrder
- 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
-
#cancel_reason ⇒ String
The reason for the MacOrder cancellation.
-
#commitment_term ⇒ String
[Required] Enum indicating the agreed commitment term for the requested MacDevices.
-
#compartment_id ⇒ String
[Required] OCID of the compartment to which the resource belongs to.
-
#display_name ⇒ String
A user-friendly name.
-
#id ⇒ String
[Required] The OCID of the resource.
-
#ip_range ⇒ String
The IP Range specified by the customer for this order.
-
#is_docusigned ⇒ BOOLEAN
[Required] Checkbox value that indicates whether the customer completed docusign process.
-
#lifecycle_details ⇒ String
A message that describes the current state of the MacOrder in more detail.
-
#lifecycle_state ⇒ String
[Required] The current state of the MacOrder.
-
#order_description ⇒ String
[Required] A user-friendly description.
-
#order_size ⇒ Integer
[Required] Number of macs requested in this MacOrder.
-
#order_status ⇒ String
[Required] The current status of the MacOrder.
-
#shape ⇒ String
[Required] Enum indicating the requested shape for the MacDevices.
-
#time_billing_ended ⇒ DateTime
An RFC3339-formatted datetime string containing the date and time that billing for this MacOrder ends.
-
#time_billing_started ⇒ DateTime
An RFC3339-formatted datetime string containing the date and time that billing for this MacOrder begins.
-
#time_canceled ⇒ DateTime
An RFC3339-formatted datetime string containing the time this MacOrder was cancelled.
-
#time_created ⇒ DateTime
[Required] The time this resource was created.
-
#time_updated ⇒ DateTime
The time this resource was last updated.
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 = {}) ⇒ MacOrder
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 = {}) ⇒ MacOrder
Initializes the object
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_reason ⇒ String
The reason for the MacOrder cancellation.
125 126 127 |
# File 'lib/oci/mngdmac/models/mac_order.rb', line 125 def cancel_reason @cancel_reason end |
#commitment_term ⇒ String
[Required] Enum indicating the agreed commitment term for the requested MacDevices.
100 101 102 |
# File 'lib/oci/mngdmac/models/mac_order.rb', line 100 def commitment_term @commitment_term end |
#compartment_id ⇒ String
[Required] OCID of the compartment to which the resource belongs to.
58 59 60 |
# File 'lib/oci/mngdmac/models/mac_order.rb', line 58 def compartment_id @compartment_id end |
#display_name ⇒ String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
Example: My new resource
66 67 68 |
# File 'lib/oci/mngdmac/models/mac_order.rb', line 66 def display_name @display_name end |
#id ⇒ String
[Required] The OCID of the resource.
54 55 56 |
# File 'lib/oci/mngdmac/models/mac_order.rb', line 54 def id @id end |
#ip_range ⇒ String
The IP Range specified by the customer for this order.
80 81 82 |
# File 'lib/oci/mngdmac/models/mac_order.rb', line 80 def ip_range @ip_range end |
#is_docusigned ⇒ BOOLEAN
[Required] Checkbox value that indicates whether the customer completed docusign process.
84 85 86 |
# File 'lib/oci/mngdmac/models/mac_order.rb', line 84 def is_docusigned @is_docusigned end |
#lifecycle_details ⇒ String
A message that describes the current state of the MacOrder in more detail.
121 122 123 |
# File 'lib/oci/mngdmac/models/mac_order.rb', line 121 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the MacOrder.
116 117 118 |
# File 'lib/oci/mngdmac/models/mac_order.rb', line 116 def lifecycle_state @lifecycle_state end |
#order_description ⇒ String
[Required] A user-friendly description. To provide some insight about the resource. Avoid entering confidential information.
72 73 74 |
# File 'lib/oci/mngdmac/models/mac_order.rb', line 72 def order_description @order_description end |
#order_size ⇒ Integer
[Required] Number of macs requested in this MacOrder.
76 77 78 |
# File 'lib/oci/mngdmac/models/mac_order.rb', line 76 def order_size @order_size end |
#order_status ⇒ String
[Required] The current status of the MacOrder.
112 113 114 |
# File 'lib/oci/mngdmac/models/mac_order.rb', line 112 def order_status @order_status end |
#shape ⇒ String
[Required] Enum indicating the requested shape for the MacDevices.
88 89 90 |
# File 'lib/oci/mngdmac/models/mac_order.rb', line 88 def shape @shape end |
#time_billing_ended ⇒ DateTime
An RFC3339-formatted datetime string containing the date and time that billing for this MacOrder ends.
108 109 110 |
# File 'lib/oci/mngdmac/models/mac_order.rb', line 108 def time_billing_ended @time_billing_ended end |
#time_billing_started ⇒ DateTime
An RFC3339-formatted datetime string containing the date and time that billing for this MacOrder begins.
104 105 106 |
# File 'lib/oci/mngdmac/models/mac_order.rb', line 104 def time_billing_started @time_billing_started end |
#time_canceled ⇒ DateTime
An RFC3339-formatted datetime string containing the time this MacOrder was cancelled.
129 130 131 |
# File 'lib/oci/mngdmac/models/mac_order.rb', line 129 def time_canceled @time_canceled end |
#time_created ⇒ DateTime
[Required] The time this resource was created. An RFC3339 formatted datetime string.
92 93 94 |
# File 'lib/oci/mngdmac/models/mac_order.rb', line 92 def time_created @time_created end |
#time_updated ⇒ DateTime
The time this resource was last updated. An RFC3339 formatted datetime string.
96 97 98 |
# File 'lib/oci/mngdmac/models/mac_order.rb', line 96 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
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_types ⇒ Object
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.
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
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
402 403 404 |
# File 'lib/oci/mngdmac/models/mac_order.rb', line 402 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
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_hash ⇒ 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_s ⇒ String
Returns the string representation of the object
449 450 451 |
# File 'lib/oci/mngdmac/models/mac_order.rb', line 449 def to_s to_hash.to_s end |