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

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

Overview

Create a domain details

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CreateDomainDetails

Initializes the object

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



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

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 admin email address



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

def admin_email
  @admin_email
end

#admin_first_nameString

The admin first name



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

def admin_first_name
  @admin_first_name
end

#admin_last_nameString

The admin last name



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

def admin_last_name
  @admin_last_name
end

#admin_user_nameString

The admin user name



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

def admin_user_name
  @admin_user_name
end

#compartment_idString

[Required] The OCID of the Compartment where domain is created



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

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](docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: ‘{"CostCenter": "42"}`



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

def defined_tags
  @defined_tags
end

#descriptionString

[Required] Domain entity description



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

def description
  @description
end

#display_nameString

[Required] The mutable display name of the domain.



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

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](docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: ‘"Finance"`



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

def freeform_tags
  @freeform_tags
end

#home_regionString

[Required] The region’s name identifier. See [Regions and Availability Domains](docs.cloud.oracle.com/Content/General/Concepts/regions.htm) for the full list of supported region names.

Example: us-phoenix-1



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

def home_region
  @home_region
end

#is_hidden_on_loginBOOLEAN

Indicates whether domain is hidden on login screen or not.



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

def 
  
end

#is_notification_bypassedBOOLEAN

Indicates if admin user created in IDCS stripe would like to receive notification like welcome email or not. Required field only if admin information is provided, otherwise optional.



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 domain are required to have a primary email address or not Defaults to true



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

def is_primary_email_required
  @is_primary_email_required
end

#license_typeString

[Required] The License type of Domain



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

def license_type
  @license_type
end

Class Method Details

.attribute_mapObject

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



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

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.



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

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.



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

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



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

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

See Also:

  • `==` method


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

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.



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

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



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

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



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

def to_s
  to_hash.to_s
end