Class: OCI::Identity::Models::CreateDomainDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/identity/models/create_domain_details.rb

Overview

(For tenancies that support identity domains) Details for creating an identity domain.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CreateDomainDetails

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :compartment_id (String)

    The value to assign to the #compartment_id property

  • :display_name (String)

    The value to assign to the #display_name property

  • :description (String)

    The value to assign to the #description property

  • :home_region (String)

    The value to assign to the #home_region property

  • :license_type (String)

    The value to assign to the #license_type property

  • :is_hidden_on_login (BOOLEAN)

    The value to assign to the #is_hidden_on_login property

  • :admin_first_name (String)

    The value to assign to the #admin_first_name property

  • :admin_last_name (String)

    The value to assign to the #admin_last_name property

  • :admin_user_name (String)

    The value to assign to the #admin_user_name property

  • :admin_email (String)

    The value to assign to the #admin_email property

  • :is_notification_bypassed (BOOLEAN)

    The value to assign to the #is_notification_bypassed property

  • :is_primary_email_required (BOOLEAN)

    The value to assign to the #is_primary_email_required property

  • :freeform_tags (Hash<String, String>)

    The value to assign to the #freeform_tags property

  • :defined_tags (Hash<String, Hash<String, Object>>)

    The value to assign to the #defined_tags property



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
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
# File 'lib/oci/identity/models/create_domain_details.rb', line 145

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.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.description = attributes[:'description'] if attributes[:'description']

  self.home_region = attributes[:'homeRegion'] if attributes[:'homeRegion']

  raise 'You cannot provide both :homeRegion and :home_region' if attributes.key?(:'homeRegion') && attributes.key?(:'home_region')

  self.home_region = attributes[:'home_region'] if attributes[:'home_region']

  self.license_type = attributes[:'licenseType'] if attributes[:'licenseType']

  raise 'You cannot provide both :licenseType and :license_type' if attributes.key?(:'licenseType') && attributes.key?(:'license_type')

  self.license_type = attributes[:'license_type'] if attributes[:'license_type']

  self. = attributes[:'isHiddenOnLogin'] unless attributes[:'isHiddenOnLogin'].nil?

  raise 'You cannot provide both :isHiddenOnLogin and :is_hidden_on_login' if attributes.key?(:'isHiddenOnLogin') && attributes.key?(:'is_hidden_on_login')

  self. = attributes[:'is_hidden_on_login'] unless attributes[:'is_hidden_on_login'].nil?

  self.admin_first_name = attributes[:'adminFirstName'] if attributes[:'adminFirstName']

  raise 'You cannot provide both :adminFirstName and :admin_first_name' if attributes.key?(:'adminFirstName') && attributes.key?(:'admin_first_name')

  self.admin_first_name = attributes[:'admin_first_name'] if attributes[:'admin_first_name']

  self.admin_last_name = attributes[:'adminLastName'] if attributes[:'adminLastName']

  raise 'You cannot provide both :adminLastName and :admin_last_name' if attributes.key?(:'adminLastName') && attributes.key?(:'admin_last_name')

  self.admin_last_name = attributes[:'admin_last_name'] if attributes[:'admin_last_name']

  self.admin_user_name = attributes[:'adminUserName'] if attributes[:'adminUserName']

  raise 'You cannot provide both :adminUserName and :admin_user_name' if attributes.key?(:'adminUserName') && attributes.key?(:'admin_user_name')

  self.admin_user_name = attributes[:'admin_user_name'] if attributes[:'admin_user_name']

  self.admin_email = attributes[:'adminEmail'] if attributes[:'adminEmail']

  raise 'You cannot provide both :adminEmail and :admin_email' if attributes.key?(:'adminEmail') && attributes.key?(:'admin_email')

  self.admin_email = attributes[:'admin_email'] if attributes[:'admin_email']

  self.is_notification_bypassed = attributes[:'isNotificationBypassed'] unless attributes[:'isNotificationBypassed'].nil?

  raise 'You cannot provide both :isNotificationBypassed and :is_notification_bypassed' if attributes.key?(:'isNotificationBypassed') && attributes.key?(:'is_notification_bypassed')

  self.is_notification_bypassed = attributes[:'is_notification_bypassed'] unless attributes[:'is_notification_bypassed'].nil?

  self.is_primary_email_required = attributes[:'isPrimaryEmailRequired'] unless attributes[:'isPrimaryEmailRequired'].nil?

  raise 'You cannot provide both :isPrimaryEmailRequired and :is_primary_email_required' if attributes.key?(:'isPrimaryEmailRequired') && attributes.key?(:'is_primary_email_required')

  self.is_primary_email_required = attributes[:'is_primary_email_required'] unless attributes[:'is_primary_email_required'].nil?

  self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']

  raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')

  self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']

  self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']

  raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')

  self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
end

Instance Attribute Details

#admin_emailString

The administrator's email address.

Returns:

  • (String)


54
55
56
# File 'lib/oci/identity/models/create_domain_details.rb', line 54

def admin_email
  @admin_email
end

#admin_first_nameString

The administrator's first name.

Returns:

  • (String)


42
43
44
# File 'lib/oci/identity/models/create_domain_details.rb', line 42

def admin_first_name
  @admin_first_name
end

#admin_last_nameString

The administrator's last name.

Returns:

  • (String)


46
47
48
# File 'lib/oci/identity/models/create_domain_details.rb', line 46

def admin_last_name
  @admin_last_name
end

#admin_user_nameString

The administrator's user name.

Returns:

  • (String)


50
51
52
# File 'lib/oci/identity/models/create_domain_details.rb', line 50

def admin_user_name
  @admin_user_name
end

#compartment_idString

[Required] The OCID of the compartment where the identity domain is created.

Returns:

  • (String)


13
14
15
# File 'lib/oci/identity/models/create_domain_details.rb', line 13

def compartment_id
  @compartment_id
end

#defined_tagsHash<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\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


79
80
81
# File 'lib/oci/identity/models/create_domain_details.rb', line 79

def defined_tags
  @defined_tags
end

#descriptionString

[Required] The identity domain description. You can have an empty description.

Returns:

  • (String)


21
22
23
# File 'lib/oci/identity/models/create_domain_details.rb', line 21

def description
  @description
end

#display_nameString

[Required] The mutable display name of the identity domain.

Returns:

  • (String)


17
18
19
# File 'lib/oci/identity/models/create_domain_details.rb', line 17

def display_name
  @display_name
end

#freeform_tagsHash<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\"}

Returns:

  • (Hash<String, String>)


72
73
74
# File 'lib/oci/identity/models/create_domain_details.rb', line 72

def freeform_tags
  @freeform_tags
end

#home_regionString

[Required] The region's name identifier. See Regions and Availability Domains for the full list of supported region names.

Example: us-phoenix-1

Returns:

  • (String)


29
30
31
# File 'lib/oci/identity/models/create_domain_details.rb', line 29

def home_region
  @home_region
end

#is_hidden_on_loginBOOLEAN

Indicates whether the identity domain is hidden on the sign-in screen or not.

Returns:

  • (BOOLEAN)


38
39
40
# File 'lib/oci/identity/models/create_domain_details.rb', line 38

def 
  @is_hidden_on_login
end

#is_notification_bypassedBOOLEAN

Indicates whether or not the administrator user created in the IDCS stripe would like to receive notifications like a welcome email. This field is required only if admin information is provided. This field is otherwise optional.

Returns:

  • (BOOLEAN)


60
61
62
# File 'lib/oci/identity/models/create_domain_details.rb', line 60

def is_notification_bypassed
  @is_notification_bypassed
end

#is_primary_email_requiredBOOLEAN

Optional field to indicate whether users in the identity domain are required to have a primary email address or not. The default is true.

Returns:

  • (BOOLEAN)


65
66
67
# File 'lib/oci/identity/models/create_domain_details.rb', line 65

def is_primary_email_required
  @is_primary_email_required
end

#license_typeString

[Required] The license type of the identity domain.

Returns:

  • (String)


33
34
35
# File 'lib/oci/identity/models/create_domain_details.rb', line 33

def license_type
  @license_type
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/oci/identity/models/create_domain_details.rb', line 82

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'compartment_id': :'compartmentId',
    'display_name': :'displayName',
    'description': :'description',
    'home_region': :'homeRegion',
    'license_type': :'licenseType',
    'is_hidden_on_login': :'isHiddenOnLogin',
    'admin_first_name': :'adminFirstName',
    'admin_last_name': :'adminLastName',
    'admin_user_name': :'adminUserName',
    'admin_email': :'adminEmail',
    'is_notification_bypassed': :'isNotificationBypassed',
    'is_primary_email_required': :'isPrimaryEmailRequired',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/oci/identity/models/create_domain_details.rb', line 104

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'compartment_id': :'String',
    'display_name': :'String',
    'description': :'String',
    'home_region': :'String',
    'license_type': :'String',
    'is_hidden_on_login': :'BOOLEAN',
    'admin_first_name': :'String',
    'admin_last_name': :'String',
    'admin_user_name': :'String',
    'admin_email': :'String',
    'is_notification_bypassed': :'BOOLEAN',
    'is_primary_email_required': :'BOOLEAN',
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
# File 'lib/oci/identity/models/create_domain_details.rb', line 239

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    compartment_id == other.compartment_id &&
    display_name == other.display_name &&
    description == other.description &&
    home_region == other.home_region &&
    license_type == other.license_type &&
     == other. &&
    admin_first_name == other.admin_first_name &&
    admin_last_name == other.admin_last_name &&
    admin_user_name == other.admin_user_name &&
    admin_email == other.admin_email &&
    is_notification_bypassed == other.is_notification_bypassed &&
    is_primary_email_required == other.is_primary_email_required &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# File 'lib/oci/identity/models/create_domain_details.rb', line 282

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


262
263
264
# File 'lib/oci/identity/models/create_domain_details.rb', line 262

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



271
272
273
# File 'lib/oci/identity/models/create_domain_details.rb', line 271

def hash
  [compartment_id, display_name, description, home_region, license_type, , admin_first_name, admin_last_name, admin_user_name, admin_email, is_notification_bypassed, is_primary_email_required, freeform_tags, defined_tags].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



315
316
317
318
319
320
321
322
323
324
# File 'lib/oci/identity/models/create_domain_details.rb', line 315

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



309
310
311
# File 'lib/oci/identity/models/create_domain_details.rb', line 309

def to_s
  to_hash.to_s
end