Class: OCI::Analytics::Models::AnalyticsInstanceSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/analytics/models/analytics_instance_summary.rb

Overview

Analytics Instance metadata (summary view).

Constant Summary collapse

LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
  LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
  LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
  LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_INACTIVE = 'INACTIVE'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
FEATURE_SET_ENUM =
[
  FEATURE_SET_SELF_SERVICE_ANALYTICS = 'SELF_SERVICE_ANALYTICS'.freeze,
  FEATURE_SET_ENTERPRISE_ANALYTICS = 'ENTERPRISE_ANALYTICS'.freeze,
  FEATURE_SET_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LICENSE_TYPE_ENUM =
[
  LICENSE_TYPE_LICENSE_INCLUDED = 'LICENSE_INCLUDED'.freeze,
  LICENSE_TYPE_BRING_YOUR_OWN_LICENSE = 'BRING_YOUR_OWN_LICENSE'.freeze,
  LICENSE_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 = {}) ⇒ AnalyticsInstanceSummary

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

  • :name (String)

    The value to assign to the #name property

  • :description (String)

    The value to assign to the #description property

  • :compartment_id (String)

    The value to assign to the #compartment_id property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :feature_set (String)

    The value to assign to the #feature_set property

  • :capacity (OCI::Analytics::Models::Capacity)

    The value to assign to the #capacity property

  • :license_type (String)

    The value to assign to the #license_type property

  • :email_notification (String)

    The value to assign to the #email_notification property

  • :service_url (String)

    The value to assign to the #service_url 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



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
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 156

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

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

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

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

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

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

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

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

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

  self.service_url = attributes[:'serviceUrl'] if attributes[:'serviceUrl']

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

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

  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']
end

Instance Attribute Details

#capacityOCI::Analytics::Models::Capacity

This attribute is required.



67
68
69
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 67

def capacity
  @capacity
end

#compartment_idString

[Required] The OCID of the compartment.

Returns:

  • (String)


53
54
55
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 53

def compartment_id
  @compartment_id
end

#descriptionString

Optional description.

Returns:

  • (String)


48
49
50
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 48

def description
  @description
end

#email_notificationString

Email address receiving notifications.

Returns:

  • (String)


77
78
79
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 77

def email_notification
  @email_notification
end

#feature_setString

[Required] Analytics feature set.

Returns:

  • (String)


63
64
65
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 63

def feature_set
  @feature_set
end

#idString

[Required] The resource OCID.

Returns:

  • (String)


38
39
40
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 38

def id
  @id
end

#license_typeString

The license used for the service.

Returns:

  • (String)


72
73
74
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 72

def license_type
  @license_type
end

#lifecycle_stateString

[Required] The current state of an instance.

Returns:

  • (String)


58
59
60
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 58

def lifecycle_state
  @lifecycle_state
end

#nameString

[Required] The name of the Analytics instance. This name must be unique in the tenancy and cannot be changed.

Returns:

  • (String)


43
44
45
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 43

def name
  @name
end

#service_urlString

URL of the Analytics service.

Returns:

  • (String)


82
83
84
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 82

def service_url
  @service_url
end

#time_createdDateTime

[Required] The date and time the instance was created, in the format defined by RFC3339.

Example: 2016-08-25T21:10:29.600Z

Returns:

  • (DateTime)


89
90
91
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 89

def time_created
  @time_created
end

#time_updatedDateTime

The date and time the instance was last updated (in the format defined by RFC3339). This timestamp represents updates made through this API. External events do not influence it.

Returns:

  • (DateTime)


96
97
98
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 96

def time_updated
  @time_updated
end

Class Method Details

.attribute_mapObject

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



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 99

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'name': :'name',
    'description': :'description',
    'compartment_id': :'compartmentId',
    'lifecycle_state': :'lifecycleState',
    'feature_set': :'featureSet',
    'capacity': :'capacity',
    'license_type': :'licenseType',
    'email_notification': :'emailNotification',
    'service_url': :'serviceUrl',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 119

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'name': :'String',
    'description': :'String',
    'compartment_id': :'String',
    'lifecycle_state': :'String',
    'feature_set': :'String',
    'capacity': :'OCI::Analytics::Models::Capacity',
    'license_type': :'String',
    'email_notification': :'String',
    'service_url': :'String',
    'time_created': :'DateTime',
    'time_updated': :'DateTime'
    # 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



265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 265

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

  self.class == other.class &&
    id == other.id &&
    name == other.name &&
    description == other.description &&
    compartment_id == other.compartment_id &&
    lifecycle_state == other.lifecycle_state &&
    feature_set == other.feature_set &&
    capacity == other.capacity &&
    license_type == other.license_type &&
    email_notification == other.email_notification &&
    service_url == other.service_url &&
    time_created == other.time_created &&
    time_updated == other.time_updated
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



306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 306

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


286
287
288
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 286

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



295
296
297
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 295

def hash
  [id, name, description, compartment_id, lifecycle_state, feature_set, capacity, license_type, email_notification, service_url, time_created, time_updated].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



339
340
341
342
343
344
345
346
347
348
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 339

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



333
334
335
# File 'lib/oci/analytics/models/analytics_instance_summary.rb', line 333

def to_s
  to_hash.to_s
end