Class: OCI::Mngdmac::Models::MacOrderSummary
- Inherits:
-
Object
- Object
- OCI::Mngdmac::Models::MacOrderSummary
- Defined in:
- lib/oci/mngdmac/models/mac_order_summary.rb
Overview
Summary information about a MacOrder.
Instance Attribute Summary collapse
-
#commitment_term ⇒ String
[Required] Enum indicating the agreed commitment term on the MacOrder.
-
#compartment_id ⇒ String
[Required] OCID of the compartment to which the resource belongs to.
-
#display_name ⇒ String
[Required] 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] The requested shape for Macs in this MacOrder.
-
#time_billing_ended ⇒ DateTime
An RFC3339-formatted datetime string containing the date and time this MacOrder begins.
-
#time_billing_started ⇒ DateTime
An RFC3339-formatted datetime string containing the date and time this MacOrder begins.
-
#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 = {}) ⇒ MacOrderSummary
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 = {}) ⇒ MacOrderSummary
Initializes the object
152 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 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 152 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'] end |
Instance Attribute Details
#commitment_term ⇒ String
[Required] Enum indicating the agreed commitment term on the MacOrder.
59 60 61 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 59 def commitment_term @commitment_term end |
#compartment_id ⇒ String
[Required] OCID of the compartment to which the resource belongs to.
17 18 19 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 17 def compartment_id @compartment_id end |
#display_name ⇒ String
[Required] A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
Example: My new resource
25 26 27 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 25 def display_name @display_name end |
#id ⇒ String
[Required] The OCID of the resource.
13 14 15 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 13 def id @id end |
#ip_range ⇒ String
The IP Range specified by the customer for this order.
39 40 41 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 39 def ip_range @ip_range end |
#is_docusigned ⇒ BOOLEAN
[Required] Checkbox value that indicates whether the customer completed docusign process.
43 44 45 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 43 def is_docusigned @is_docusigned end |
#lifecycle_details ⇒ String
A message that describes the current state of the MacOrder in more detail.
80 81 82 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 80 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the MacOrder.
75 76 77 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 75 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.
31 32 33 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 31 def order_description @order_description end |
#order_size ⇒ Integer
[Required] Number of macs requested in this MacOrder.
35 36 37 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 35 def order_size @order_size end |
#order_status ⇒ String
[Required] The current status of the MacOrder.
71 72 73 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 71 def order_status @order_status end |
#shape ⇒ String
[Required] The requested shape for Macs in this MacOrder.
47 48 49 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 47 def shape @shape end |
#time_billing_ended ⇒ DateTime
An RFC3339-formatted datetime string containing the date and time this MacOrder begins.
67 68 69 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 67 def time_billing_ended @time_billing_ended end |
#time_billing_started ⇒ DateTime
An RFC3339-formatted datetime string containing the date and time this MacOrder begins.
63 64 65 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 63 def time_billing_started @time_billing_started end |
#time_created ⇒ DateTime
[Required] The time this resource was created. An RFC3339 formatted datetime string.
51 52 53 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 51 def time_created @time_created end |
#time_updated ⇒ DateTime
The time this resource was last updated. An RFC3339 formatted datetime string.
55 56 57 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 55 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 83 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' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 107 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' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 256 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 end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 301 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
281 282 283 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 281 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
290 291 292 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 290 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].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
334 335 336 337 338 339 340 341 342 343 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 334 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
328 329 330 |
# File 'lib/oci/mngdmac/models/mac_order_summary.rb', line 328 def to_s to_hash.to_s end |