Class: OCI::TenantManagerControlPlane::Models::OrganizationTenancy
- Inherits:
-
Object
- Object
- OCI::TenantManagerControlPlane::Models::OrganizationTenancy
- Defined in:
- lib/oci/tenant_manager_control_plane/models/organization_tenancy.rb
Overview
The information about the organization tenancy.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_INACTIVE = 'INACTIVE'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- ROLE_ENUM =
[ ROLE_PARENT = 'PARENT'.freeze, ROLE_CHILD = 'CHILD'.freeze, ROLE_NONE = 'NONE'.freeze, ROLE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- GOVERNANCE_STATUS_ENUM =
[ GOVERNANCE_STATUS_OPTED_IN = 'OPTED_IN'.freeze, GOVERNANCE_STATUS_OPTED_OUT = 'OPTED_OUT'.freeze, GOVERNANCE_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#governance_status ⇒ String
[Required] The governance status of the tenancy.
-
#is_approved_for_transfer ⇒ BOOLEAN
Parameter to indicate the tenancy is approved for transfer to another organization.
-
#lifecycle_state ⇒ String
Lifecycle state of the organization tenancy.
-
#name ⇒ String
Name of the tenancy.
-
#role ⇒ String
Role of the organization tenancy.
-
#tenancy_id ⇒ String
[Required] OCID of the tenancy.
-
#time_joined ⇒ DateTime
Date and time when the tenancy joined the organization.
-
#time_left ⇒ DateTime
Date and time when the tenancy left the organization.
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 = {}) ⇒ OrganizationTenancy
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 = {}) ⇒ OrganizationTenancy
Initializes the object
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/oci/tenant_manager_control_plane/models/organization_tenancy.rb', line 113 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.tenancy_id = attributes[:'tenancyId'] if attributes[:'tenancyId'] raise 'You cannot provide both :tenancyId and :tenancy_id' if attributes.key?(:'tenancyId') && attributes.key?(:'tenancy_id') self.tenancy_id = attributes[:'tenancy_id'] if attributes[:'tenancy_id'] self.name = attributes[:'name'] if attributes[:'name'] 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.role = attributes[:'role'] if attributes[:'role'] self.time_joined = attributes[:'timeJoined'] if attributes[:'timeJoined'] raise 'You cannot provide both :timeJoined and :time_joined' if attributes.key?(:'timeJoined') && attributes.key?(:'time_joined') self.time_joined = attributes[:'time_joined'] if attributes[:'time_joined'] self.time_left = attributes[:'timeLeft'] if attributes[:'timeLeft'] raise 'You cannot provide both :timeLeft and :time_left' if attributes.key?(:'timeLeft') && attributes.key?(:'time_left') self.time_left = attributes[:'time_left'] if attributes[:'time_left'] self.is_approved_for_transfer = attributes[:'isApprovedForTransfer'] unless attributes[:'isApprovedForTransfer'].nil? raise 'You cannot provide both :isApprovedForTransfer and :is_approved_for_transfer' if attributes.key?(:'isApprovedForTransfer') && attributes.key?(:'is_approved_for_transfer') self.is_approved_for_transfer = attributes[:'is_approved_for_transfer'] unless attributes[:'is_approved_for_transfer'].nil? self.governance_status = attributes[:'governanceStatus'] if attributes[:'governanceStatus'] raise 'You cannot provide both :governanceStatus and :governance_status' if attributes.key?(:'governanceStatus') && attributes.key?(:'governance_status') self.governance_status = attributes[:'governance_status'] if attributes[:'governance_status'] end |
Instance Attribute Details
#governance_status ⇒ String
[Required] The governance status of the tenancy.
65 66 67 |
# File 'lib/oci/tenant_manager_control_plane/models/organization_tenancy.rb', line 65 def governance_status @governance_status end |
#is_approved_for_transfer ⇒ BOOLEAN
Parameter to indicate the tenancy is approved for transfer to another organization.
61 62 63 |
# File 'lib/oci/tenant_manager_control_plane/models/organization_tenancy.rb', line 61 def is_approved_for_transfer @is_approved_for_transfer end |
#lifecycle_state ⇒ String
Lifecycle state of the organization tenancy.
45 46 47 |
# File 'lib/oci/tenant_manager_control_plane/models/organization_tenancy.rb', line 45 def lifecycle_state @lifecycle_state end |
#name ⇒ String
Name of the tenancy.
41 42 43 |
# File 'lib/oci/tenant_manager_control_plane/models/organization_tenancy.rb', line 41 def name @name end |
#role ⇒ String
Role of the organization tenancy.
49 50 51 |
# File 'lib/oci/tenant_manager_control_plane/models/organization_tenancy.rb', line 49 def role @role end |
#tenancy_id ⇒ String
[Required] OCID of the tenancy.
37 38 39 |
# File 'lib/oci/tenant_manager_control_plane/models/organization_tenancy.rb', line 37 def tenancy_id @tenancy_id end |
#time_joined ⇒ DateTime
Date and time when the tenancy joined the organization.
53 54 55 |
# File 'lib/oci/tenant_manager_control_plane/models/organization_tenancy.rb', line 53 def time_joined @time_joined end |
#time_left ⇒ DateTime
Date and time when the tenancy left the organization.
57 58 59 |
# File 'lib/oci/tenant_manager_control_plane/models/organization_tenancy.rb', line 57 def time_left @time_left end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/oci/tenant_manager_control_plane/models/organization_tenancy.rb', line 68 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'tenancy_id': :'tenancyId', 'name': :'name', 'lifecycle_state': :'lifecycleState', 'role': :'role', 'time_joined': :'timeJoined', 'time_left': :'timeLeft', 'is_approved_for_transfer': :'isApprovedForTransfer', 'governance_status': :'governanceStatus' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/oci/tenant_manager_control_plane/models/organization_tenancy.rb', line 84 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'tenancy_id': :'String', 'name': :'String', 'lifecycle_state': :'String', 'role': :'String', 'time_joined': :'DateTime', 'time_left': :'DateTime', 'is_approved_for_transfer': :'BOOLEAN', 'governance_status': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
206 207 208 209 210 211 212 213 214 215 216 217 218 |
# File 'lib/oci/tenant_manager_control_plane/models/organization_tenancy.rb', line 206 def ==(other) return true if equal?(other) self.class == other.class && tenancy_id == other.tenancy_id && name == other.name && lifecycle_state == other.lifecycle_state && role == other.role && time_joined == other.time_joined && time_left == other.time_left && is_approved_for_transfer == other.is_approved_for_transfer && governance_status == other.governance_status end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
# File 'lib/oci/tenant_manager_control_plane/models/organization_tenancy.rb', line 243 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
223 224 225 |
# File 'lib/oci/tenant_manager_control_plane/models/organization_tenancy.rb', line 223 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
232 233 234 |
# File 'lib/oci/tenant_manager_control_plane/models/organization_tenancy.rb', line 232 def hash [tenancy_id, name, lifecycle_state, role, time_joined, time_left, is_approved_for_transfer, governance_status].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
276 277 278 279 280 281 282 283 284 285 |
# File 'lib/oci/tenant_manager_control_plane/models/organization_tenancy.rb', line 276 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
270 271 272 |
# File 'lib/oci/tenant_manager_control_plane/models/organization_tenancy.rb', line 270 def to_s to_hash.to_s end |