Class: OCI::FusionApps::Models::VanityDomainActivity

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/fusion_apps/models/vanity_domain_activity.rb

Overview

Vanity Domain Activity resource

Constant Summary collapse

LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_ACCEPTED = 'ACCEPTED'.freeze,
  LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_SUCCEEDED = 'SUCCEEDED'.freeze,
  LIFECYCLE_STATE_CANCELED = 'CANCELED'.freeze,
  LIFECYCLE_STATE_NEEDS_ATTENTION = 'NEEDS_ATTENTION'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_DETAILS_ENUM =
[
  LIFECYCLE_DETAILS_NONE = 'NONE'.freeze,
  LIFECYCLE_DETAILS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
OPERATION_TYPE_ENUM =
[
  OPERATION_TYPE_ENABLE_VANITY_DOMAIN = 'ENABLE_VANITY_DOMAIN'.freeze,
  OPERATION_TYPE_DELETE_VANITY_DOMAIN = 'DELETE_VANITY_DOMAIN'.freeze,
  OPERATION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ VanityDomainActivity

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :id (String)

    The value to assign to the #id property

  • :vanity_domain_id (String)

    The value to assign to the #vanity_domain_id property

  • :fusion_environment_id (String)

    The value to assign to the #fusion_environment_id property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :lifecycle_details (String)

    The value to assign to the #lifecycle_details property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :time_updated (DateTime)

    The value to assign to the #time_updated property

  • :time_enabled (DateTime)

    The value to assign to the #time_enabled property

  • :time_deactivated (DateTime)

    The value to assign to the #time_deactivated property

  • :time_scheduled (DateTime)

    The value to assign to the #time_scheduled property

  • :operation_type (String)

    The value to assign to the #operation_type property



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
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
# File 'lib/oci/fusion_apps/models/vanity_domain_activity.rb', line 132

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

  self.vanity_domain_id = attributes[:'vanityDomainId'] if attributes[:'vanityDomainId']

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

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

  self.fusion_environment_id = attributes[:'fusionEnvironmentId'] if attributes[:'fusionEnvironmentId']

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

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

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

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

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

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

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

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

  self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated']

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

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

  self.time_enabled = attributes[:'timeEnabled'] if attributes[:'timeEnabled']

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

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

  self.time_deactivated = attributes[:'timeDeactivated'] if attributes[:'timeDeactivated']

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

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

  self.time_scheduled = attributes[:'timeScheduled'] if attributes[:'timeScheduled']

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

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

  self.operation_type = attributes[:'operationType'] if attributes[:'operationType']

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

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

Instance Attribute Details

#fusion_environment_idString

[Required] The OCID of the Fusion environment that the VanityDomainActivity is created on

Returns:

  • (String)


43
44
45
# File 'lib/oci/fusion_apps/models/vanity_domain_activity.rb', line 43

def fusion_environment_id
  @fusion_environment_id
end

#idString

[Required] The unique identifier (OCID) of the VanityDomainActivity. Can't be changed after creation

Returns:

  • (String)


35
36
37
# File 'lib/oci/fusion_apps/models/vanity_domain_activity.rb', line 35

def id
  @id
end

#lifecycle_detailsString

[Required] The current lifecycleDetails of the VanityDomainActivity

Returns:

  • (String)


51
52
53
# File 'lib/oci/fusion_apps/models/vanity_domain_activity.rb', line 51

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] The current lifecycleState of the VanityDomainActivity

Returns:

  • (String)


47
48
49
# File 'lib/oci/fusion_apps/models/vanity_domain_activity.rb', line 47

def lifecycle_state
  @lifecycle_state
end

#operation_typeString

[Required] The type of operation

Returns:

  • (String)


75
76
77
# File 'lib/oci/fusion_apps/models/vanity_domain_activity.rb', line 75

def operation_type
  @operation_type
end

#time_createdDateTime

[Required] The time the VanityDomainactivity was created. An RFC3339 formatted datetime string

Returns:

  • (DateTime)


55
56
57
# File 'lib/oci/fusion_apps/models/vanity_domain_activity.rb', line 55

def time_created
  @time_created
end

#time_deactivatedDateTime

[Required] The time the VanityDomainactivity is scheduled to deactivate. An RFC3339 formatted datetime string

Returns:

  • (DateTime)


67
68
69
# File 'lib/oci/fusion_apps/models/vanity_domain_activity.rb', line 67

def time_deactivated
  @time_deactivated
end

#time_enabledDateTime

[Required] The time the VanityDomainactivity is scheduled to enable. An RFC3339 formatted datetime string

Returns:

  • (DateTime)


63
64
65
# File 'lib/oci/fusion_apps/models/vanity_domain_activity.rb', line 63

def time_enabled
  @time_enabled
end

#time_scheduledDateTime

[Required] Activity start time

Returns:

  • (DateTime)


71
72
73
# File 'lib/oci/fusion_apps/models/vanity_domain_activity.rb', line 71

def time_scheduled
  @time_scheduled
end

#time_updatedDateTime

[Required] The time the VanityDomainactivity was updated. An RFC3339 formatted datetime string

Returns:

  • (DateTime)


59
60
61
# File 'lib/oci/fusion_apps/models/vanity_domain_activity.rb', line 59

def time_updated
  @time_updated
end

#vanity_domain_idString

[Required] Vanity domain ID

Returns:

  • (String)


39
40
41
# File 'lib/oci/fusion_apps/models/vanity_domain_activity.rb', line 39

def vanity_domain_id
  @vanity_domain_id
end

Class Method Details

.attribute_mapObject

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



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/oci/fusion_apps/models/vanity_domain_activity.rb', line 78

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'vanity_domain_id': :'vanityDomainId',
    'fusion_environment_id': :'fusionEnvironmentId',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_details': :'lifecycleDetails',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'time_enabled': :'timeEnabled',
    'time_deactivated': :'timeDeactivated',
    'time_scheduled': :'timeScheduled',
    'operation_type': :'operationType'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# File 'lib/oci/fusion_apps/models/vanity_domain_activity.rb', line 97

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'vanity_domain_id': :'String',
    'fusion_environment_id': :'String',
    'lifecycle_state': :'String',
    'lifecycle_details': :'String',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'time_enabled': :'DateTime',
    'time_deactivated': :'DateTime',
    'time_scheduled': :'DateTime',
    'operation_type': :'String'
    # 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



247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
# File 'lib/oci/fusion_apps/models/vanity_domain_activity.rb', line 247

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

  self.class == other.class &&
    id == other.id &&
    vanity_domain_id == other.vanity_domain_id &&
    fusion_environment_id == other.fusion_environment_id &&
    lifecycle_state == other.lifecycle_state &&
    lifecycle_details == other.lifecycle_details &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    time_enabled == other.time_enabled &&
    time_deactivated == other.time_deactivated &&
    time_scheduled == other.time_scheduled &&
    operation_type == other.operation_type
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



287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
# File 'lib/oci/fusion_apps/models/vanity_domain_activity.rb', line 287

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


267
268
269
# File 'lib/oci/fusion_apps/models/vanity_domain_activity.rb', line 267

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



276
277
278
# File 'lib/oci/fusion_apps/models/vanity_domain_activity.rb', line 276

def hash
  [id, vanity_domain_id, fusion_environment_id, lifecycle_state, lifecycle_details, time_created, time_updated, time_enabled, time_deactivated, time_scheduled, operation_type].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



320
321
322
323
324
325
326
327
328
329
# File 'lib/oci/fusion_apps/models/vanity_domain_activity.rb', line 320

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



314
315
316
# File 'lib/oci/fusion_apps/models/vanity_domain_activity.rb', line 314

def to_s
  to_hash.to_s
end