oraclebmc 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -2
- data/lib/oraclebmc/core/blockstorage_client.rb +2 -2
- data/lib/oraclebmc/core/compute_client.rb +8 -7
- data/lib/oraclebmc/core/core.rb +17 -0
- data/lib/oraclebmc/core/models/create_cross_connect_details.rb +203 -0
- data/lib/oraclebmc/core/models/create_cross_connect_group_details.rb +132 -0
- data/lib/oraclebmc/core/models/create_subnet_details.rb +24 -3
- data/lib/oraclebmc/core/models/create_vcn_details.rb +2 -2
- data/lib/oraclebmc/core/models/create_virtual_circuit_details.rb +261 -0
- data/lib/oraclebmc/core/models/create_vnic_details.rb +202 -0
- data/lib/oraclebmc/core/models/cross_connect.rb +234 -0
- data/lib/oraclebmc/core/models/cross_connect_group.rb +187 -0
- data/lib/oraclebmc/core/models/cross_connect_location.rb +135 -0
- data/lib/oraclebmc/core/models/cross_connect_mapping.rb +191 -0
- data/lib/oraclebmc/core/models/cross_connect_port_speed_shape.rb +138 -0
- data/lib/oraclebmc/core/models/cross_connect_status.rb +201 -0
- data/lib/oraclebmc/core/models/dhcp_dns_option.rb +7 -7
- data/lib/oraclebmc/core/models/dhcp_option.rb +1 -1
- data/lib/oraclebmc/core/models/dhcp_search_domain_option.rb +6 -7
- data/lib/oraclebmc/core/models/fast_connect_provider_service.rb +146 -0
- data/lib/oraclebmc/core/models/image.rb +1 -1
- data/lib/oraclebmc/core/models/instance.rb +6 -7
- data/lib/oraclebmc/core/models/launch_instance_details.rb +22 -19
- data/lib/oraclebmc/core/models/letter_of_authority.rb +195 -0
- data/lib/oraclebmc/core/models/subnet.rb +26 -5
- data/lib/oraclebmc/core/models/update_cross_connect_details.rb +137 -0
- data/lib/oraclebmc/core/models/update_cross_connect_group_details.rb +121 -0
- data/lib/oraclebmc/core/models/update_virtual_circuit_details.rb +240 -0
- data/lib/oraclebmc/core/models/vcn.rb +4 -4
- data/lib/oraclebmc/core/models/virtual_circuit.rb +395 -0
- data/lib/oraclebmc/core/models/virtual_circuit_bandwidth_shape.rb +138 -0
- data/lib/oraclebmc/core/models/vnic.rb +4 -4
- data/lib/oraclebmc/core/virtual_network_client.rb +962 -85
- data/lib/oraclebmc/identity/identity.rb +13 -0
- data/lib/oraclebmc/identity/identity_client.rb +533 -8
- data/lib/oraclebmc/identity/models/create_identity_provider_details.rb +213 -0
- data/lib/oraclebmc/identity/models/create_idp_group_mapping_details.rb +134 -0
- data/lib/oraclebmc/identity/models/create_region_subscription_details.rb +128 -0
- data/lib/oraclebmc/identity/models/create_saml2_identity_provider_details.rb +155 -0
- data/lib/oraclebmc/identity/models/create_user_details.rb +1 -1
- data/lib/oraclebmc/identity/models/identity_provider.rb +257 -0
- data/lib/oraclebmc/identity/models/idp_group_mapping.rb +221 -0
- data/lib/oraclebmc/identity/models/region.rb +142 -0
- data/lib/oraclebmc/identity/models/region_subscription.rb +179 -0
- data/lib/oraclebmc/identity/models/saml2_identity_provider.rb +181 -0
- data/lib/oraclebmc/identity/models/tenancy.rb +159 -0
- data/lib/oraclebmc/identity/models/update_identity_provider_details.rb +161 -0
- data/lib/oraclebmc/identity/models/update_idp_group_mapping_details.rb +132 -0
- data/lib/oraclebmc/identity/models/update_saml2_identity_provider_details.rb +146 -0
- data/lib/oraclebmc/regions.rb +1 -1
- data/lib/oraclebmc/version.rb +1 -1
- metadata +32 -2
@@ -0,0 +1,155 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
require_relative 'create_identity_provider_details'
|
5
|
+
|
6
|
+
module OracleBMC
|
7
|
+
class Identity::Models::CreateSaml2IdentityProviderDetails < Identity::Models::CreateIdentityProviderDetails
|
8
|
+
# The URL for retrieving the identity provider's metadata,
|
9
|
+
# which contains information required for federating.
|
10
|
+
#
|
11
|
+
# @return [String]
|
12
|
+
attr_accessor :metadata_url
|
13
|
+
|
14
|
+
# The XML that contains the information required for federating.
|
15
|
+
#
|
16
|
+
# @return [String]
|
17
|
+
attr_accessor :metadata
|
18
|
+
|
19
|
+
|
20
|
+
# Initializes the object
|
21
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
22
|
+
def initialize(attributes = {})
|
23
|
+
return unless attributes.is_a?(Hash)
|
24
|
+
|
25
|
+
attributes['protocol'] = 'SAML2'
|
26
|
+
|
27
|
+
super(attributes)
|
28
|
+
|
29
|
+
# convert string to symbol for hash key
|
30
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
31
|
+
|
32
|
+
|
33
|
+
if attributes[:'metadataUrl']
|
34
|
+
self.metadata_url = attributes[:'metadataUrl']
|
35
|
+
end
|
36
|
+
|
37
|
+
if attributes[:'metadata']
|
38
|
+
self.metadata = attributes[:'metadata']
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
|
43
|
+
# Checks equality by comparing each attribute.
|
44
|
+
# @param [Object] other_object to be compared
|
45
|
+
def ==(other_object)
|
46
|
+
return true if self.equal?(other_object)
|
47
|
+
self.class == other_object.class &&
|
48
|
+
compartment_id == other_object.compartment_id &&
|
49
|
+
name == other_object.name &&
|
50
|
+
description == other_object.description &&
|
51
|
+
product_type == other_object.product_type &&
|
52
|
+
protocol == other_object.protocol &&
|
53
|
+
metadata_url == other_object.metadata_url &&
|
54
|
+
metadata == other_object.metadata
|
55
|
+
end
|
56
|
+
|
57
|
+
# @see the `==` method
|
58
|
+
# @param [Object] other_object to be compared
|
59
|
+
def eql?(other_object)
|
60
|
+
self == other_object
|
61
|
+
end
|
62
|
+
|
63
|
+
# Calculates hash code according to all attributes.
|
64
|
+
# @return [Fixnum] Hash code
|
65
|
+
def hash
|
66
|
+
[compartment_id, name, description, product_type, protocol, metadata_url, metadata].hash
|
67
|
+
end
|
68
|
+
|
69
|
+
# Builds the object from hash
|
70
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
71
|
+
# @return [Object] Returns the model itself
|
72
|
+
def build_from_hash(attributes)
|
73
|
+
return nil unless attributes.is_a?(Hash)
|
74
|
+
self.class.swagger_types.each_pair do |key, type|
|
75
|
+
if type =~ /^Array<(.*)>/i
|
76
|
+
# check to ensure the input is an array given that the the attribute
|
77
|
+
# is documented as an array but the input is not
|
78
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
79
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
80
|
+
end
|
81
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
82
|
+
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
83
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
84
|
+
end
|
85
|
+
|
86
|
+
self
|
87
|
+
end
|
88
|
+
|
89
|
+
# Returns the string representation of the object
|
90
|
+
# @return [String] String presentation of the object
|
91
|
+
def to_s
|
92
|
+
to_hash.to_s
|
93
|
+
end
|
94
|
+
|
95
|
+
# Returns the object in the form of hash
|
96
|
+
# @return [Hash] Returns the object in the form of hash
|
97
|
+
def to_hash
|
98
|
+
hash = {}
|
99
|
+
self.class.attribute_map.each_pair do |attr, param|
|
100
|
+
value = self.send(attr)
|
101
|
+
next if value.nil?
|
102
|
+
hash[param] = _to_hash(value)
|
103
|
+
end
|
104
|
+
hash
|
105
|
+
end
|
106
|
+
|
107
|
+
private
|
108
|
+
|
109
|
+
# Outputs non-array value in the form of hash
|
110
|
+
# For object, use to_hash. Otherwise, just return the value
|
111
|
+
# @param [Object] value Any valid value
|
112
|
+
# @return [Hash] Returns the value in the form of hash
|
113
|
+
def _to_hash(value)
|
114
|
+
if value.is_a?(Array)
|
115
|
+
value.compact.map{ |v| _to_hash(v) }
|
116
|
+
elsif value.is_a?(Hash)
|
117
|
+
{}.tap do |hash|
|
118
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
119
|
+
end
|
120
|
+
elsif value.respond_to? :to_hash
|
121
|
+
value.to_hash
|
122
|
+
else
|
123
|
+
value
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
130
|
+
def self.attribute_map
|
131
|
+
{
|
132
|
+
:'compartment_id' => :'compartmentId',
|
133
|
+
:'name' => :'name',
|
134
|
+
:'description' => :'description',
|
135
|
+
:'product_type' => :'productType',
|
136
|
+
:'protocol' => :'protocol',
|
137
|
+
:'metadata_url' => :'metadataUrl',
|
138
|
+
:'metadata' => :'metadata'
|
139
|
+
}
|
140
|
+
end
|
141
|
+
|
142
|
+
# Attribute type mapping.
|
143
|
+
def self.swagger_types
|
144
|
+
{
|
145
|
+
:'compartment_id' => :'String',
|
146
|
+
:'name' => :'String',
|
147
|
+
:'description' => :'String',
|
148
|
+
:'product_type' => :'String',
|
149
|
+
:'protocol' => :'String',
|
150
|
+
:'metadata_url' => :'String',
|
151
|
+
:'metadata' => :'String'
|
152
|
+
}
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
@@ -8,7 +8,7 @@ module OracleBMC
|
|
8
8
|
# @return [String]
|
9
9
|
attr_accessor :compartment_id
|
10
10
|
|
11
|
-
# The name you assign to the user during creation. This is the user's login for the Console.
|
11
|
+
# The name you assign to the user during creation. This is the user's login for the Console.
|
12
12
|
# The name must be unique across all users in the tenancy and cannot be changed.
|
13
13
|
#
|
14
14
|
# @return [String]
|
@@ -0,0 +1,257 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OracleBMC
|
6
|
+
class Identity::Models::IdentityProvider
|
7
|
+
|
8
|
+
LIFECYCLE_STATE_ENUM = [LIFECYCLE_STATE_CREATING = 'CREATING',
|
9
|
+
LIFECYCLE_STATE_ACTIVE = 'ACTIVE',
|
10
|
+
LIFECYCLE_STATE_INACTIVE = 'INACTIVE',
|
11
|
+
LIFECYCLE_STATE_DELETING = 'DELETING',
|
12
|
+
LIFECYCLE_STATE_DELETED = 'DELETED',
|
13
|
+
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
14
|
+
|
15
|
+
# The OCID of the `IdentityProvider`.
|
16
|
+
# @return [String]
|
17
|
+
attr_accessor :id
|
18
|
+
|
19
|
+
# The OCID of the tenancy containing the `IdentityProvider`.
|
20
|
+
# @return [String]
|
21
|
+
attr_accessor :compartment_id
|
22
|
+
|
23
|
+
# The name you assign to the `IdentityProvider` during creation. The name
|
24
|
+
# must be unique across all `IdentityProvider` objects in the tenancy and
|
25
|
+
# cannot be changed. This is the name federated users see when choosing
|
26
|
+
# which identity provider to use when signing in to the Oracle Bare Metal Cloud
|
27
|
+
# Services Console.
|
28
|
+
#
|
29
|
+
# @return [String]
|
30
|
+
attr_accessor :name
|
31
|
+
|
32
|
+
# The description you assign to the `IdentityProvider` during creation. Does
|
33
|
+
# not have to be unique, and it's changeable.
|
34
|
+
#
|
35
|
+
# @return [String]
|
36
|
+
attr_accessor :description
|
37
|
+
|
38
|
+
# The identity provider service or product (e.g., Oracle Identity Cloud Service).
|
39
|
+
# Allowed value: `IDCS`.
|
40
|
+
#
|
41
|
+
# Example: `IDCS`
|
42
|
+
#
|
43
|
+
# @return [String]
|
44
|
+
attr_accessor :product_type
|
45
|
+
|
46
|
+
# Date and time the `IdentityProvider` was created, in the format defined by RFC3339.
|
47
|
+
#
|
48
|
+
# Example: `2016-08-25T21:10:29.600Z`
|
49
|
+
#
|
50
|
+
# @return [DateTime]
|
51
|
+
attr_accessor :time_created
|
52
|
+
|
53
|
+
# The current state. After creating an `IdentityProvider`, make sure its
|
54
|
+
# `lifecycleState` changes from CREATING to ACTIVE before using it.
|
55
|
+
#
|
56
|
+
# @return [String]
|
57
|
+
attr_accessor :lifecycle_state
|
58
|
+
|
59
|
+
# The detailed status of INACTIVE lifecycleState.
|
60
|
+
# @return [Integer]
|
61
|
+
attr_accessor :inactive_status
|
62
|
+
|
63
|
+
# The protocol used for federation. Allowed value: `SAML2`.
|
64
|
+
#
|
65
|
+
# Example: `SAML2`
|
66
|
+
#
|
67
|
+
# @return [String]
|
68
|
+
attr_accessor :protocol
|
69
|
+
|
70
|
+
|
71
|
+
# Given the hash representation of a subtype of this class,
|
72
|
+
# use the info in the hash to return the class of the subtype.
|
73
|
+
def self.get_subtype(object_hash)
|
74
|
+
type = object_hash[:'protocol']
|
75
|
+
|
76
|
+
return 'OracleBMC::Identity::Models::Saml2IdentityProvider' if type == 'SAML2'
|
77
|
+
|
78
|
+
# TODO: Log a warning when the subtype is not found.
|
79
|
+
return 'OracleBMC::Identity::Models::IdentityProvider'
|
80
|
+
end
|
81
|
+
|
82
|
+
# Initializes the object
|
83
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
84
|
+
def initialize(attributes = {})
|
85
|
+
return unless attributes.is_a?(Hash)
|
86
|
+
|
87
|
+
# convert string to symbol for hash key
|
88
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
89
|
+
|
90
|
+
|
91
|
+
if attributes[:'id']
|
92
|
+
self.id = attributes[:'id']
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes[:'compartmentId']
|
96
|
+
self.compartment_id = attributes[:'compartmentId']
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes[:'name']
|
100
|
+
self.name = attributes[:'name']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes[:'description']
|
104
|
+
self.description = attributes[:'description']
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes[:'productType']
|
108
|
+
self.product_type = attributes[:'productType']
|
109
|
+
end
|
110
|
+
|
111
|
+
if attributes[:'timeCreated']
|
112
|
+
self.time_created = attributes[:'timeCreated']
|
113
|
+
end
|
114
|
+
|
115
|
+
if attributes[:'lifecycleState']
|
116
|
+
self.lifecycle_state = attributes[:'lifecycleState']
|
117
|
+
end
|
118
|
+
|
119
|
+
if attributes[:'inactiveStatus']
|
120
|
+
self.inactive_status = attributes[:'inactiveStatus']
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes[:'protocol']
|
124
|
+
self.protocol = attributes[:'protocol']
|
125
|
+
end
|
126
|
+
|
127
|
+
end
|
128
|
+
|
129
|
+
# Custom attribute writer method checking allowed values (enum).
|
130
|
+
# @param [Object] lifecycle_state Object to be assigned
|
131
|
+
def lifecycle_state=(lifecycle_state)
|
132
|
+
if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
133
|
+
@lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
|
134
|
+
else
|
135
|
+
@lifecycle_state = lifecycle_state
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
# Checks equality by comparing each attribute.
|
140
|
+
# @param [Object] other_object to be compared
|
141
|
+
def ==(other_object)
|
142
|
+
return true if self.equal?(other_object)
|
143
|
+
self.class == other_object.class &&
|
144
|
+
id == other_object.id &&
|
145
|
+
compartment_id == other_object.compartment_id &&
|
146
|
+
name == other_object.name &&
|
147
|
+
description == other_object.description &&
|
148
|
+
product_type == other_object.product_type &&
|
149
|
+
time_created == other_object.time_created &&
|
150
|
+
lifecycle_state == other_object.lifecycle_state &&
|
151
|
+
inactive_status == other_object.inactive_status &&
|
152
|
+
protocol == other_object.protocol
|
153
|
+
end
|
154
|
+
|
155
|
+
# @see the `==` method
|
156
|
+
# @param [Object] other_object to be compared
|
157
|
+
def eql?(other_object)
|
158
|
+
self == other_object
|
159
|
+
end
|
160
|
+
|
161
|
+
# Calculates hash code according to all attributes.
|
162
|
+
# @return [Fixnum] Hash code
|
163
|
+
def hash
|
164
|
+
[id, compartment_id, name, description, product_type, time_created, lifecycle_state, inactive_status, protocol].hash
|
165
|
+
end
|
166
|
+
|
167
|
+
# Builds the object from hash
|
168
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
169
|
+
# @return [Object] Returns the model itself
|
170
|
+
def build_from_hash(attributes)
|
171
|
+
return nil unless attributes.is_a?(Hash)
|
172
|
+
self.class.swagger_types.each_pair do |key, type|
|
173
|
+
if type =~ /^Array<(.*)>/i
|
174
|
+
# check to ensure the input is an array given that the the attribute
|
175
|
+
# is documented as an array but the input is not
|
176
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
177
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
178
|
+
end
|
179
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
180
|
+
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
181
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
182
|
+
end
|
183
|
+
|
184
|
+
self
|
185
|
+
end
|
186
|
+
|
187
|
+
# Returns the string representation of the object
|
188
|
+
# @return [String] String presentation of the object
|
189
|
+
def to_s
|
190
|
+
to_hash.to_s
|
191
|
+
end
|
192
|
+
|
193
|
+
# Returns the object in the form of hash
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
195
|
+
def to_hash
|
196
|
+
hash = {}
|
197
|
+
self.class.attribute_map.each_pair do |attr, param|
|
198
|
+
value = self.send(attr)
|
199
|
+
next if value.nil?
|
200
|
+
hash[param] = _to_hash(value)
|
201
|
+
end
|
202
|
+
hash
|
203
|
+
end
|
204
|
+
|
205
|
+
private
|
206
|
+
|
207
|
+
# Outputs non-array value in the form of hash
|
208
|
+
# For object, use to_hash. Otherwise, just return the value
|
209
|
+
# @param [Object] value Any valid value
|
210
|
+
# @return [Hash] Returns the value in the form of hash
|
211
|
+
def _to_hash(value)
|
212
|
+
if value.is_a?(Array)
|
213
|
+
value.compact.map{ |v| _to_hash(v) }
|
214
|
+
elsif value.is_a?(Hash)
|
215
|
+
{}.tap do |hash|
|
216
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
217
|
+
end
|
218
|
+
elsif value.respond_to? :to_hash
|
219
|
+
value.to_hash
|
220
|
+
else
|
221
|
+
value
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
228
|
+
def self.attribute_map
|
229
|
+
{
|
230
|
+
:'id' => :'id',
|
231
|
+
:'compartment_id' => :'compartmentId',
|
232
|
+
:'name' => :'name',
|
233
|
+
:'description' => :'description',
|
234
|
+
:'product_type' => :'productType',
|
235
|
+
:'time_created' => :'timeCreated',
|
236
|
+
:'lifecycle_state' => :'lifecycleState',
|
237
|
+
:'inactive_status' => :'inactiveStatus',
|
238
|
+
:'protocol' => :'protocol'
|
239
|
+
}
|
240
|
+
end
|
241
|
+
|
242
|
+
# Attribute type mapping.
|
243
|
+
def self.swagger_types
|
244
|
+
{
|
245
|
+
:'id' => :'String',
|
246
|
+
:'compartment_id' => :'String',
|
247
|
+
:'name' => :'String',
|
248
|
+
:'description' => :'String',
|
249
|
+
:'product_type' => :'String',
|
250
|
+
:'time_created' => :'DateTime',
|
251
|
+
:'lifecycle_state' => :'String',
|
252
|
+
:'inactive_status' => :'Integer',
|
253
|
+
:'protocol' => :'String'
|
254
|
+
}
|
255
|
+
end
|
256
|
+
end
|
257
|
+
end
|
@@ -0,0 +1,221 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OracleBMC
|
6
|
+
class Identity::Models::IdpGroupMapping
|
7
|
+
|
8
|
+
LIFECYCLE_STATE_ENUM = [LIFECYCLE_STATE_CREATING = 'CREATING',
|
9
|
+
LIFECYCLE_STATE_ACTIVE = 'ACTIVE',
|
10
|
+
LIFECYCLE_STATE_INACTIVE = 'INACTIVE',
|
11
|
+
LIFECYCLE_STATE_DELETING = 'DELETING',
|
12
|
+
LIFECYCLE_STATE_DELETED = 'DELETED',
|
13
|
+
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
14
|
+
|
15
|
+
# The OCID of the `IdpGroupMapping`.
|
16
|
+
# @return [String]
|
17
|
+
attr_accessor :id
|
18
|
+
|
19
|
+
# The OCID of the `IdentityProvider` this mapping belongs to.
|
20
|
+
# @return [String]
|
21
|
+
attr_accessor :idp_id
|
22
|
+
|
23
|
+
# The name of the IdP group that is mapped to the IAM Service group.
|
24
|
+
# @return [String]
|
25
|
+
attr_accessor :idp_group_name
|
26
|
+
|
27
|
+
# The OCID of the IAM Service group that is mapped to the IdP group.
|
28
|
+
# @return [String]
|
29
|
+
attr_accessor :group_id
|
30
|
+
|
31
|
+
# The OCID of the tenancy containing the `IdentityProvider`.
|
32
|
+
# @return [String]
|
33
|
+
attr_accessor :compartment_id
|
34
|
+
|
35
|
+
# Date and time the mapping was created, in the format defined by RFC3339.
|
36
|
+
#
|
37
|
+
# Example: `2016-08-25T21:10:29.600Z`
|
38
|
+
#
|
39
|
+
# @return [DateTime]
|
40
|
+
attr_accessor :time_created
|
41
|
+
|
42
|
+
# The mapping's current state. After creating a mapping object, make sure its `lifecycleState` changes
|
43
|
+
# from CREATING to ACTIVE before using it.
|
44
|
+
#
|
45
|
+
# @return [String]
|
46
|
+
attr_accessor :lifecycle_state
|
47
|
+
|
48
|
+
# The detailed status of INACTIVE lifecycleState.
|
49
|
+
# @return [Integer]
|
50
|
+
attr_accessor :inactive_status
|
51
|
+
|
52
|
+
|
53
|
+
# Initializes the object
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
55
|
+
def initialize(attributes = {})
|
56
|
+
return unless attributes.is_a?(Hash)
|
57
|
+
|
58
|
+
# convert string to symbol for hash key
|
59
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
60
|
+
|
61
|
+
|
62
|
+
if attributes[:'id']
|
63
|
+
self.id = attributes[:'id']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes[:'idpId']
|
67
|
+
self.idp_id = attributes[:'idpId']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes[:'idpGroupName']
|
71
|
+
self.idp_group_name = attributes[:'idpGroupName']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes[:'groupId']
|
75
|
+
self.group_id = attributes[:'groupId']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes[:'compartmentId']
|
79
|
+
self.compartment_id = attributes[:'compartmentId']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes[:'timeCreated']
|
83
|
+
self.time_created = attributes[:'timeCreated']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes[:'lifecycleState']
|
87
|
+
self.lifecycle_state = attributes[:'lifecycleState']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes[:'inactiveStatus']
|
91
|
+
self.inactive_status = attributes[:'inactiveStatus']
|
92
|
+
end
|
93
|
+
|
94
|
+
end
|
95
|
+
|
96
|
+
# Custom attribute writer method checking allowed values (enum).
|
97
|
+
# @param [Object] lifecycle_state Object to be assigned
|
98
|
+
def lifecycle_state=(lifecycle_state)
|
99
|
+
if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
100
|
+
@lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
|
101
|
+
else
|
102
|
+
@lifecycle_state = lifecycle_state
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
# Checks equality by comparing each attribute.
|
107
|
+
# @param [Object] other_object to be compared
|
108
|
+
def ==(other_object)
|
109
|
+
return true if self.equal?(other_object)
|
110
|
+
self.class == other_object.class &&
|
111
|
+
id == other_object.id &&
|
112
|
+
idp_id == other_object.idp_id &&
|
113
|
+
idp_group_name == other_object.idp_group_name &&
|
114
|
+
group_id == other_object.group_id &&
|
115
|
+
compartment_id == other_object.compartment_id &&
|
116
|
+
time_created == other_object.time_created &&
|
117
|
+
lifecycle_state == other_object.lifecycle_state &&
|
118
|
+
inactive_status == other_object.inactive_status
|
119
|
+
end
|
120
|
+
|
121
|
+
# @see the `==` method
|
122
|
+
# @param [Object] other_object to be compared
|
123
|
+
def eql?(other_object)
|
124
|
+
self == other_object
|
125
|
+
end
|
126
|
+
|
127
|
+
# Calculates hash code according to all attributes.
|
128
|
+
# @return [Fixnum] Hash code
|
129
|
+
def hash
|
130
|
+
[id, idp_id, idp_group_name, group_id, compartment_id, time_created, lifecycle_state, inactive_status].hash
|
131
|
+
end
|
132
|
+
|
133
|
+
# Builds the object from hash
|
134
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
135
|
+
# @return [Object] Returns the model itself
|
136
|
+
def build_from_hash(attributes)
|
137
|
+
return nil unless attributes.is_a?(Hash)
|
138
|
+
self.class.swagger_types.each_pair do |key, type|
|
139
|
+
if type =~ /^Array<(.*)>/i
|
140
|
+
# check to ensure the input is an array given that the the attribute
|
141
|
+
# is documented as an array but the input is not
|
142
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
143
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
144
|
+
end
|
145
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
146
|
+
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
147
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
148
|
+
end
|
149
|
+
|
150
|
+
self
|
151
|
+
end
|
152
|
+
|
153
|
+
# Returns the string representation of the object
|
154
|
+
# @return [String] String presentation of the object
|
155
|
+
def to_s
|
156
|
+
to_hash.to_s
|
157
|
+
end
|
158
|
+
|
159
|
+
# Returns the object in the form of hash
|
160
|
+
# @return [Hash] Returns the object in the form of hash
|
161
|
+
def to_hash
|
162
|
+
hash = {}
|
163
|
+
self.class.attribute_map.each_pair do |attr, param|
|
164
|
+
value = self.send(attr)
|
165
|
+
next if value.nil?
|
166
|
+
hash[param] = _to_hash(value)
|
167
|
+
end
|
168
|
+
hash
|
169
|
+
end
|
170
|
+
|
171
|
+
private
|
172
|
+
|
173
|
+
# Outputs non-array value in the form of hash
|
174
|
+
# For object, use to_hash. Otherwise, just return the value
|
175
|
+
# @param [Object] value Any valid value
|
176
|
+
# @return [Hash] Returns the value in the form of hash
|
177
|
+
def _to_hash(value)
|
178
|
+
if value.is_a?(Array)
|
179
|
+
value.compact.map{ |v| _to_hash(v) }
|
180
|
+
elsif value.is_a?(Hash)
|
181
|
+
{}.tap do |hash|
|
182
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
183
|
+
end
|
184
|
+
elsif value.respond_to? :to_hash
|
185
|
+
value.to_hash
|
186
|
+
else
|
187
|
+
value
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
194
|
+
def self.attribute_map
|
195
|
+
{
|
196
|
+
:'id' => :'id',
|
197
|
+
:'idp_id' => :'idpId',
|
198
|
+
:'idp_group_name' => :'idpGroupName',
|
199
|
+
:'group_id' => :'groupId',
|
200
|
+
:'compartment_id' => :'compartmentId',
|
201
|
+
:'time_created' => :'timeCreated',
|
202
|
+
:'lifecycle_state' => :'lifecycleState',
|
203
|
+
:'inactive_status' => :'inactiveStatus'
|
204
|
+
}
|
205
|
+
end
|
206
|
+
|
207
|
+
# Attribute type mapping.
|
208
|
+
def self.swagger_types
|
209
|
+
{
|
210
|
+
:'id' => :'String',
|
211
|
+
:'idp_id' => :'String',
|
212
|
+
:'idp_group_name' => :'String',
|
213
|
+
:'group_id' => :'String',
|
214
|
+
:'compartment_id' => :'String',
|
215
|
+
:'time_created' => :'DateTime',
|
216
|
+
:'lifecycle_state' => :'String',
|
217
|
+
:'inactive_status' => :'Integer'
|
218
|
+
}
|
219
|
+
end
|
220
|
+
end
|
221
|
+
end
|