Class: OCI::Multicloud::Models::MulticloudSubscriptionSummary
- Inherits:
-
Object
- Object
- OCI::Multicloud::Models::MulticloudSubscriptionSummary
- Defined in:
- lib/oci/multicloud/models/multicloud_subscription_summary.rb
Overview
A Multicloud subscription.
Constant Summary collapse
- SERVICE_NAME_ENUM =
[ SERVICE_NAME_ORACLEDBATAZURE = 'ORACLEDBATAZURE'.freeze, SERVICE_NAME_ORACLEDBATGOOGLE = 'ORACLEDBATGOOGLE'.freeze, SERVICE_NAME_ORACLEDBATAWS = 'ORACLEDBATAWS'.freeze, SERVICE_NAME_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_INACTIVE = 'INACTIVE'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#active_commitment ⇒ String
Total value for the subscription.
-
#classic_subscription_id ⇒ String
[Required] Subscription ID for OCI and partner cloud in classic format.
-
#csp_additional_properties ⇒ Hash<String, String>
Properties specific to the cloud service provider.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#lifecycle_state ⇒ String
The current state of the subscription.
-
#partner_cloud_account_identifier ⇒ String
[Required] The partner cloud account ID.
-
#partner_cloud_tenant_identifier ⇒ String
The partner cloud tenant ID.
-
#payment_plan ⇒ String
Payment plan for the subscription.
-
#service_name ⇒ String
The cloud service provider.
-
#subscription_id ⇒ String
URL to the subscription details page.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource.
-
#time_created ⇒ DateTime
[Required] The date and time that the subscription was created, in the format defined by RFC 3339.
-
#time_end_date ⇒ DateTime
The end date and time for the subscription, in the format defined by RFC 3339.
-
#time_linked_date ⇒ DateTime
The date and time that the Multicloud base compartment was created, in the format defined by RFC 3339.
-
#time_updated ⇒ DateTime
The date and time that the subscription was updated, in the format defined by RFC 3339.
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 = {}) ⇒ MulticloudSubscriptionSummary
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 = {}) ⇒ MulticloudSubscriptionSummary
Initializes the object
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 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 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 181 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.classic_subscription_id = attributes[:'classicSubscriptionId'] if attributes[:'classicSubscriptionId'] raise 'You cannot provide both :classicSubscriptionId and :classic_subscription_id' if attributes.key?(:'classicSubscriptionId') && attributes.key?(:'classic_subscription_id') self.classic_subscription_id = attributes[:'classic_subscription_id'] if attributes[:'classic_subscription_id'] self.subscription_id = attributes[:'subscriptionId'] if attributes[:'subscriptionId'] raise 'You cannot provide both :subscriptionId and :subscription_id' if attributes.key?(:'subscriptionId') && attributes.key?(:'subscription_id') self.subscription_id = attributes[:'subscription_id'] if attributes[:'subscription_id'] self.partner_cloud_account_identifier = attributes[:'partnerCloudAccountIdentifier'] if attributes[:'partnerCloudAccountIdentifier'] raise 'You cannot provide both :partnerCloudAccountIdentifier and :partner_cloud_account_identifier' if attributes.key?(:'partnerCloudAccountIdentifier') && attributes.key?(:'partner_cloud_account_identifier') self.partner_cloud_account_identifier = attributes[:'partner_cloud_account_identifier'] if attributes[:'partner_cloud_account_identifier'] self.partner_cloud_tenant_identifier = attributes[:'partnerCloudTenantIdentifier'] if attributes[:'partnerCloudTenantIdentifier'] raise 'You cannot provide both :partnerCloudTenantIdentifier and :partner_cloud_tenant_identifier' if attributes.key?(:'partnerCloudTenantIdentifier') && attributes.key?(:'partner_cloud_tenant_identifier') self.partner_cloud_tenant_identifier = attributes[:'partner_cloud_tenant_identifier'] if attributes[:'partner_cloud_tenant_identifier'] 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.time_linked_date = attributes[:'timeLinkedDate'] if attributes[:'timeLinkedDate'] raise 'You cannot provide both :timeLinkedDate and :time_linked_date' if attributes.key?(:'timeLinkedDate') && attributes.key?(:'time_linked_date') self.time_linked_date = attributes[:'time_linked_date'] if attributes[:'time_linked_date'] self.payment_plan = attributes[:'paymentPlan'] if attributes[:'paymentPlan'] raise 'You cannot provide both :paymentPlan and :payment_plan' if attributes.key?(:'paymentPlan') && attributes.key?(:'payment_plan') self.payment_plan = attributes[:'payment_plan'] if attributes[:'payment_plan'] self.active_commitment = attributes[:'activeCommitment'] if attributes[:'activeCommitment'] raise 'You cannot provide both :activeCommitment and :active_commitment' if attributes.key?(:'activeCommitment') && attributes.key?(:'active_commitment') self.active_commitment = attributes[:'active_commitment'] if attributes[:'active_commitment'] self.time_end_date = attributes[:'timeEndDate'] if attributes[:'timeEndDate'] raise 'You cannot provide both :timeEndDate and :time_end_date' if attributes.key?(:'timeEndDate') && attributes.key?(:'time_end_date') self.time_end_date = attributes[:'time_end_date'] if attributes[:'time_end_date'] 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.csp_additional_properties = attributes[:'cspAdditionalProperties'] if attributes[:'cspAdditionalProperties'] raise 'You cannot provide both :cspAdditionalProperties and :csp_additional_properties' if attributes.key?(:'cspAdditionalProperties') && attributes.key?(:'csp_additional_properties') self.csp_additional_properties = attributes[:'csp_additional_properties'] if attributes[:'csp_additional_properties'] 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. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] self. = attributes[:'systemTags'] if attributes[:'systemTags'] raise 'You cannot provide both :systemTags and :system_tags' if attributes.key?(:'systemTags') && attributes.key?(:'system_tags') self. = attributes[:'system_tags'] if attributes[:'system_tags'] end |
Instance Attribute Details
#active_commitment ⇒ String
Total value for the subscription.
59 60 61 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 59 def active_commitment @active_commitment end |
#classic_subscription_id ⇒ String
[Required] Subscription ID for OCI and partner cloud in classic format.
27 28 29 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 27 def classic_subscription_id @classic_subscription_id end |
#csp_additional_properties ⇒ Hash<String, String>
Properties specific to the cloud service provider. For example, AzureSubnetId for Azure.
74 75 76 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 74 def csp_additional_properties @csp_additional_properties end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {\"Operations\": {\"CostCenter\": \"42\"}}
102 103 104 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 102 def @defined_tags end |
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example: {\"Department\": \"Finance\"}
94 95 96 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 94 def @freeform_tags end |
#lifecycle_state ⇒ String
The current state of the subscription.
69 70 71 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 69 def lifecycle_state @lifecycle_state end |
#partner_cloud_account_identifier ⇒ String
[Required] The partner cloud account ID.
37 38 39 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 37 def partner_cloud_account_identifier @partner_cloud_account_identifier end |
#partner_cloud_tenant_identifier ⇒ String
The partner cloud tenant ID.
41 42 43 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 41 def partner_cloud_tenant_identifier @partner_cloud_tenant_identifier end |
#payment_plan ⇒ String
Payment plan for the subscription.
55 56 57 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 55 def payment_plan @payment_plan end |
#service_name ⇒ String
The cloud service provider.
45 46 47 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 45 def service_name @service_name end |
#subscription_id ⇒ String
URL to the subscription details page. Example: https://{console-url}/org-mgmt/subscription/ocid1.organizationssubscription.oc1.iad.exampleuniqueid?region=us-ashburn-1.
33 34 35 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 33 def subscription_id @subscription_id end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource. Each key is predefined and scoped to a namespace.
Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}
109 110 111 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 109 def @system_tags end |
#time_created ⇒ DateTime
[Required] The date and time that the subscription was created, in the format defined by RFC 3339.
80 81 82 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 80 def time_created @time_created end |
#time_end_date ⇒ DateTime
The end date and time for the subscription, in the format defined by RFC 3339.
65 66 67 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 65 def time_end_date @time_end_date end |
#time_linked_date ⇒ DateTime
The date and time that the Multicloud base compartment was created, in the format defined by RFC 3339.
51 52 53 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 51 def time_linked_date @time_linked_date end |
#time_updated ⇒ DateTime
The date and time that the subscription was updated, in the format defined by RFC 3339.
86 87 88 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 86 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 112 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'classic_subscription_id': :'classicSubscriptionId', 'subscription_id': :'subscriptionId', 'partner_cloud_account_identifier': :'partnerCloudAccountIdentifier', 'partner_cloud_tenant_identifier': :'partnerCloudTenantIdentifier', 'service_name': :'serviceName', 'time_linked_date': :'timeLinkedDate', 'payment_plan': :'paymentPlan', 'active_commitment': :'activeCommitment', 'time_end_date': :'timeEndDate', 'lifecycle_state': :'lifecycleState', 'csp_additional_properties': :'cspAdditionalProperties', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 136 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'classic_subscription_id': :'String', 'subscription_id': :'String', 'partner_cloud_account_identifier': :'String', 'partner_cloud_tenant_identifier': :'String', 'service_name': :'String', 'time_linked_date': :'DateTime', 'payment_plan': :'String', 'active_commitment': :'String', 'time_end_date': :'DateTime', 'lifecycle_state': :'String', 'csp_additional_properties': :'Hash<String, String>', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'system_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 317 def ==(other) return true if equal?(other) self.class == other.class && classic_subscription_id == other.classic_subscription_id && subscription_id == other.subscription_id && partner_cloud_account_identifier == other.partner_cloud_account_identifier && partner_cloud_tenant_identifier == other.partner_cloud_tenant_identifier && service_name == other.service_name && time_linked_date == other.time_linked_date && payment_plan == other.payment_plan && active_commitment == other.active_commitment && time_end_date == other.time_end_date && lifecycle_state == other.lifecycle_state && csp_additional_properties == other.csp_additional_properties && time_created == other.time_created && time_updated == other.time_updated && == other. && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 362 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
342 343 344 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 342 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
351 352 353 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 351 def hash [classic_subscription_id, subscription_id, partner_cloud_account_identifier, partner_cloud_tenant_identifier, service_name, time_linked_date, payment_plan, active_commitment, time_end_date, lifecycle_state, csp_additional_properties, time_created, time_updated, , , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
395 396 397 398 399 400 401 402 403 404 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 395 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
389 390 391 |
# File 'lib/oci/multicloud/models/multicloud_subscription_summary.rb', line 389 def to_s to_hash.to_s end |