Class: OCI::TenantManagerControlPlane::Models::ClassicAssignedSubscriptionSummary
- Inherits:
-
AssignedSubscriptionSummary
- Object
- AssignedSubscriptionSummary
- OCI::TenantManagerControlPlane::Models::ClassicAssignedSubscriptionSummary
- Defined in:
- lib/oci/tenant_manager_control_plane/models/classic_assigned_subscription_summary.rb
Overview
Summary of assigned subscription information.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_INACTIVE = 'INACTIVE'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.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
- MANAGED_BY_ENUM =
[ MANAGED_BY_APPSMANAGER = 'APPSMANAGER'.freeze, MANAGED_BY_SERVICEMANAGERPROXY = 'SERVICEMANAGERPROXY'.freeze, MANAGED_BY_FUSIONAPPS = 'FUSIONAPPS'.freeze, MANAGED_BY_MYSERVICES = 'MYSERVICES'.freeze, MANAGED_BY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Constants inherited from AssignedSubscriptionSummary
AssignedSubscriptionSummary::ENTITY_VERSION_ENUM
Instance Attribute Summary collapse
-
#classic_subscription_id ⇒ String
[Required] Subscription ID.
-
#csi_number ⇒ String
Customer service identifier for the customer associated with the subscription.
-
#end_date ⇒ DateTime
Subscription end time.
-
#is_classic_subscription ⇒ BOOLEAN
Specifies whether or not the subscription is legacy.
-
#lifecycle_state ⇒ String
[Required] Lifecycle state of the subscription.
-
#managed_by ⇒ String
Service or component which is used to provision and manage the subscription.
-
#region_assignment ⇒ String
Region for the subscription.
-
#start_date ⇒ DateTime
Subscription start time.
Attributes inherited from AssignedSubscriptionSummary
#compartment_id, #defined_tags, #entity_version, #freeform_tags, #id, #service_name, #system_tags, #time_created, #time_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 = {}) ⇒ ClassicAssignedSubscriptionSummary
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.
Methods inherited from AssignedSubscriptionSummary
Constructor Details
#initialize(attributes = {}) ⇒ ClassicAssignedSubscriptionSummary
Initializes the object
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 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/oci/tenant_manager_control_plane/models/classic_assigned_subscription_summary.rb', line 136 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['entityVersion'] = 'V1' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 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.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.is_classic_subscription = attributes[:'isClassicSubscription'] unless attributes[:'isClassicSubscription'].nil? self.is_classic_subscription = false if is_classic_subscription.nil? && !attributes.key?(:'isClassicSubscription') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isClassicSubscription and :is_classic_subscription' if attributes.key?(:'isClassicSubscription') && attributes.key?(:'is_classic_subscription') self.is_classic_subscription = attributes[:'is_classic_subscription'] unless attributes[:'is_classic_subscription'].nil? self.is_classic_subscription = false if is_classic_subscription.nil? && !attributes.key?(:'isClassicSubscription') && !attributes.key?(:'is_classic_subscription') # rubocop:disable Style/StringLiterals self.region_assignment = attributes[:'regionAssignment'] if attributes[:'regionAssignment'] raise 'You cannot provide both :regionAssignment and :region_assignment' if attributes.key?(:'regionAssignment') && attributes.key?(:'region_assignment') self.region_assignment = attributes[:'region_assignment'] if attributes[:'region_assignment'] self.start_date = attributes[:'startDate'] if attributes[:'startDate'] raise 'You cannot provide both :startDate and :start_date' if attributes.key?(:'startDate') && attributes.key?(:'start_date') self.start_date = attributes[:'start_date'] if attributes[:'start_date'] self.end_date = attributes[:'endDate'] if attributes[:'endDate'] raise 'You cannot provide both :endDate and :end_date' if attributes.key?(:'endDate') && attributes.key?(:'end_date') self.end_date = attributes[:'end_date'] if attributes[:'end_date'] self.csi_number = attributes[:'csiNumber'] if attributes[:'csiNumber'] raise 'You cannot provide both :csiNumber and :csi_number' if attributes.key?(:'csiNumber') && attributes.key?(:'csi_number') self.csi_number = attributes[:'csi_number'] if attributes[:'csi_number'] self.managed_by = attributes[:'managedBy'] if attributes[:'managedBy'] raise 'You cannot provide both :managedBy and :managed_by' if attributes.key?(:'managedBy') && attributes.key?(:'managed_by') self.managed_by = attributes[:'managed_by'] if attributes[:'managed_by'] end |
Instance Attribute Details
#classic_subscription_id ⇒ String
[Required] Subscription ID.
38 39 40 |
# File 'lib/oci/tenant_manager_control_plane/models/classic_assigned_subscription_summary.rb', line 38 def classic_subscription_id @classic_subscription_id end |
#csi_number ⇒ String
Customer service identifier for the customer associated with the subscription.
58 59 60 |
# File 'lib/oci/tenant_manager_control_plane/models/classic_assigned_subscription_summary.rb', line 58 def csi_number @csi_number end |
#end_date ⇒ DateTime
Subscription end time.
54 55 56 |
# File 'lib/oci/tenant_manager_control_plane/models/classic_assigned_subscription_summary.rb', line 54 def end_date @end_date end |
#is_classic_subscription ⇒ BOOLEAN
Specifies whether or not the subscription is legacy.
42 43 44 |
# File 'lib/oci/tenant_manager_control_plane/models/classic_assigned_subscription_summary.rb', line 42 def is_classic_subscription @is_classic_subscription end |
#lifecycle_state ⇒ String
[Required] Lifecycle state of the subscription.
34 35 36 |
# File 'lib/oci/tenant_manager_control_plane/models/classic_assigned_subscription_summary.rb', line 34 def lifecycle_state @lifecycle_state end |
#managed_by ⇒ String
Service or component which is used to provision and manage the subscription.
62 63 64 |
# File 'lib/oci/tenant_manager_control_plane/models/classic_assigned_subscription_summary.rb', line 62 def managed_by @managed_by end |
#region_assignment ⇒ String
Region for the subscription.
46 47 48 |
# File 'lib/oci/tenant_manager_control_plane/models/classic_assigned_subscription_summary.rb', line 46 def region_assignment @region_assignment end |
#start_date ⇒ DateTime
Subscription start time.
50 51 52 |
# File 'lib/oci/tenant_manager_control_plane/models/classic_assigned_subscription_summary.rb', line 50 def start_date @start_date end |
Class Method Details
.attribute_map ⇒ Object
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 82 83 84 85 86 87 |
# File 'lib/oci/tenant_manager_control_plane/models/classic_assigned_subscription_summary.rb', line 65 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'entity_version': :'entityVersion', 'id': :'id', 'compartment_id': :'compartmentId', 'service_name': :'serviceName', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags', 'lifecycle_state': :'lifecycleState', 'classic_subscription_id': :'classicSubscriptionId', 'is_classic_subscription': :'isClassicSubscription', 'region_assignment': :'regionAssignment', 'start_date': :'startDate', 'end_date': :'endDate', 'csi_number': :'csiNumber', 'managed_by': :'managedBy' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/oci/tenant_manager_control_plane/models/classic_assigned_subscription_summary.rb', line 90 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'entity_version': :'String', 'id': :'String', 'compartment_id': :'String', 'service_name': :'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>>', 'lifecycle_state': :'String', 'classic_subscription_id': :'String', 'is_classic_subscription': :'BOOLEAN', 'region_assignment': :'String', 'start_date': :'DateTime', 'end_date': :'DateTime', 'csi_number': :'String', 'managed_by': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/oci/tenant_manager_control_plane/models/classic_assigned_subscription_summary.rb', line 230 def ==(other) return true if equal?(other) self.class == other.class && entity_version == other.entity_version && id == other.id && compartment_id == other.compartment_id && service_name == other.service_name && time_created == other.time_created && time_updated == other.time_updated && == other. && == other. && == other. && lifecycle_state == other.lifecycle_state && classic_subscription_id == other.classic_subscription_id && is_classic_subscription == other.is_classic_subscription && region_assignment == other.region_assignment && start_date == other.start_date && end_date == other.end_date && csi_number == other.csi_number && managed_by == other.managed_by end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 |
# File 'lib/oci/tenant_manager_control_plane/models/classic_assigned_subscription_summary.rb', line 276 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
256 257 258 |
# File 'lib/oci/tenant_manager_control_plane/models/classic_assigned_subscription_summary.rb', line 256 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
265 266 267 |
# File 'lib/oci/tenant_manager_control_plane/models/classic_assigned_subscription_summary.rb', line 265 def hash [entity_version, id, compartment_id, service_name, time_created, time_updated, , , , lifecycle_state, classic_subscription_id, is_classic_subscription, region_assignment, start_date, end_date, csi_number, managed_by].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
309 310 311 312 313 314 315 316 317 318 |
# File 'lib/oci/tenant_manager_control_plane/models/classic_assigned_subscription_summary.rb', line 309 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
303 304 305 |
# File 'lib/oci/tenant_manager_control_plane/models/classic_assigned_subscription_summary.rb', line 303 def to_s to_hash.to_s end |