class OCI::Integration::Models::IntegrationInstance

Description of Integration Instance.

Constants

CONSUMPTION_MODEL_ENUM
INTEGRATION_INSTANCE_TYPE_ENUM
LIFECYCLE_STATE_ENUM

Attributes

alternate_custom_endpoints[RW]

A list of alternate custom endpoints used for the integration instance URL.

@return [Array<OCI::Integration::Models::CustomEndpointDetails>]

compartment_id[RW]

[Required] Compartment Identifier. @return [String]

consumption_model[R]

The entitlement used for billing purposes. @return [String]

custom_endpoint[RW]

@return [OCI::Integration::Models::CustomEndpointDetails]

defined_tags[RW]

Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: `{"foo-namespace": {"bar-key": "value"}}`

@return [Hash<String, Hash<String, Object>>]

display_name[RW]

[Required] Integration Instance Identifier, can be renamed. @return [String]

freeform_tags[RW]

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`

@return [Hash<String, String>]

id[RW]

[Required] Unique identifier that is immutable on creation. @return [String]

instance_url[RW]

[Required] The Integration Instance URL. @return [String]

integration_instance_type[R]

[Required] Standard or Enterprise type @return [String]

is_byol[RW]

[Required] Bring your own license. @return [BOOLEAN]

is_file_server_enabled[RW]

The file server is enabled or not. @return [BOOLEAN]

is_visual_builder_enabled[RW]

VisualBuilder is enabled or not. @return [BOOLEAN]

lifecycle_state[R]

The current state of the integration instance. @return [String]

message_packs[RW]

[Required] The number of configured message packs (if any) @return [Integer]

network_endpoint_details[RW]

@return [OCI::Integration::Models::NetworkEndpointDetails]

state_message[RW]

An message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. @return [String]

time_created[RW]

The time the the IntegrationInstance was created. An RFC3339 formatted datetime string. @return [DateTime]

time_updated[RW]

The time the IntegrationInstance was updated. An RFC3339 formatted datetime string. @return [DateTime]

Public Class Methods

attribute_map() click to toggle source

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

# File lib/oci/integration/models/integration_instance.rb, line 117
def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'display_name': :'displayName',
    'compartment_id': :'compartmentId',
    'integration_instance_type': :'integrationInstanceType',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'lifecycle_state': :'lifecycleState',
    'state_message': :'stateMessage',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags',
    'is_byol': :'isByol',
    'instance_url': :'instanceUrl',
    'message_packs': :'messagePacks',
    'is_file_server_enabled': :'isFileServerEnabled',
    'is_visual_builder_enabled': :'isVisualBuilderEnabled',
    'custom_endpoint': :'customEndpoint',
    'alternate_custom_endpoints': :'alternateCustomEndpoints',
    'consumption_model': :'consumptionModel',
    'network_endpoint_details': :'networkEndpointDetails'
    # rubocop:enable Style/SymbolLiteral
  }
end
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash @option attributes [String] :id The value to assign to the {#id} property @option attributes [String] :display_name The value to assign to the {#display_name} property @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property @option attributes [String] :integration_instance_type The value to assign to the {#integration_instance_type} property @option attributes [DateTime] :time_created The value to assign to the {#time_created} property @option attributes [DateTime] :time_updated The value to assign to the {#time_updated} property @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property @option attributes [String] :state_message The value to assign to the {#state_message} property @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property @option attributes [BOOLEAN] :is_byol The value to assign to the {#is_byol} property @option attributes [String] :instance_url The value to assign to the {#instance_url} property @option attributes [Integer] :message_packs The value to assign to the {#message_packs} property @option attributes [BOOLEAN] :is_file_server_enabled The value to assign to the {#is_file_server_enabled} property @option attributes [BOOLEAN] :is_visual_builder_enabled The value to assign to the {#is_visual_builder_enabled} property @option attributes [OCI::Integration::Models::CustomEndpointDetails] :custom_endpoint The value to assign to the {#custom_endpoint} property @option attributes [Array<OCI::Integration::Models::CustomEndpointDetails>] :alternate_custom_endpoints The value to assign to the {#alternate_custom_endpoints} property @option attributes [String] :consumption_model The value to assign to the {#consumption_model} property @option attributes [OCI::Integration::Models::NetworkEndpointDetails] :network_endpoint_details The value to assign to the {#network_endpoint_details} property

# File lib/oci/integration/models/integration_instance.rb, line 195
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.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.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.integration_instance_type = attributes[:'integrationInstanceType'] if attributes[:'integrationInstanceType']

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

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

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

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

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

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

  self.is_byol = attributes[:'isByol'] unless attributes[:'isByol'].nil?

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

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

  self.instance_url = attributes[:'instanceUrl'] if attributes[:'instanceUrl']

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

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

  self.message_packs = attributes[:'messagePacks'] if attributes[:'messagePacks']

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

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

  self.is_file_server_enabled = attributes[:'isFileServerEnabled'] unless attributes[:'isFileServerEnabled'].nil?

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

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

  self.is_visual_builder_enabled = attributes[:'isVisualBuilderEnabled'] unless attributes[:'isVisualBuilderEnabled'].nil?

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

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

  self.custom_endpoint = attributes[:'customEndpoint'] if attributes[:'customEndpoint']

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

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

  self.alternate_custom_endpoints = attributes[:'alternateCustomEndpoints'] if attributes[:'alternateCustomEndpoints']

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

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

  self.consumption_model = attributes[:'consumptionModel'] if attributes[:'consumptionModel']

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

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

  self.network_endpoint_details = attributes[:'networkEndpointDetails'] if attributes[:'networkEndpointDetails']

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

  self.network_endpoint_details = attributes[:'network_endpoint_details'] if attributes[:'network_endpoint_details']
end
swagger_types() click to toggle source

Attribute type mapping.

# File lib/oci/integration/models/integration_instance.rb, line 144
def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'display_name': :'String',
    'compartment_id': :'String',
    'integration_instance_type': :'String',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'lifecycle_state': :'String',
    'state_message': :'String',
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'is_byol': :'BOOLEAN',
    'instance_url': :'String',
    'message_packs': :'Integer',
    'is_file_server_enabled': :'BOOLEAN',
    'is_visual_builder_enabled': :'BOOLEAN',
    'custom_endpoint': :'OCI::Integration::Models::CustomEndpointDetails',
    'alternate_custom_endpoints': :'Array<OCI::Integration::Models::CustomEndpointDetails>',
    'consumption_model': :'String',
    'network_endpoint_details': :'OCI::Integration::Models::NetworkEndpointDetails'
    # rubocop:enable Style/SymbolLiteral
  }
end

Public Instance Methods

==(other) click to toggle source

Checks equality by comparing each attribute. @param [Object] other the other object to be compared

# File lib/oci/integration/models/integration_instance.rb, line 358
def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    id == other.id &&
    display_name == other.display_name &&
    compartment_id == other.compartment_id &&
    integration_instance_type == other.integration_instance_type &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    lifecycle_state == other.lifecycle_state &&
    state_message == other.state_message &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags &&
    is_byol == other.is_byol &&
    instance_url == other.instance_url &&
    message_packs == other.message_packs &&
    is_file_server_enabled == other.is_file_server_enabled &&
    is_visual_builder_enabled == other.is_visual_builder_enabled &&
    custom_endpoint == other.custom_endpoint &&
    alternate_custom_endpoints == other.alternate_custom_endpoints &&
    consumption_model == other.consumption_model &&
    network_endpoint_details == other.network_endpoint_details
end
build_from_hash(attributes) click to toggle source

Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself

# File lib/oci/integration/models/integration_instance.rb, line 406
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
consumption_model=(consumption_model) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] consumption_model Object to be assigned

# File lib/oci/integration/models/integration_instance.rb, line 342
def consumption_model=(consumption_model)
  # rubocop:disable Style/ConditionalAssignment
  if consumption_model && !CONSUMPTION_MODEL_ENUM.include?(consumption_model)
    OCI.logger.debug("Unknown value for 'consumption_model' [" + consumption_model + "]. Mapping to 'CONSUMPTION_MODEL_UNKNOWN_ENUM_VALUE'") if OCI.logger
    @consumption_model = CONSUMPTION_MODEL_UNKNOWN_ENUM_VALUE
  else
    @consumption_model = consumption_model
  end
  # rubocop:enable Style/ConditionalAssignment
end
eql?(other) click to toggle source

@see the `==` method @param [Object] other the other object to be compared

# File lib/oci/integration/models/integration_instance.rb, line 386
def eql?(other)
  self == other
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# File lib/oci/integration/models/integration_instance.rb, line 395
def hash
  [id, display_name, compartment_id, integration_instance_type, time_created, time_updated, lifecycle_state, state_message, freeform_tags, defined_tags, is_byol, instance_url, message_packs, is_file_server_enabled, is_visual_builder_enabled, custom_endpoint, alternate_custom_endpoints, consumption_model, network_endpoint_details].hash
end
integration_instance_type=(integration_instance_type) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] integration_instance_type Object to be assigned

# File lib/oci/integration/models/integration_instance.rb, line 316
def integration_instance_type=(integration_instance_type)
  # rubocop:disable Style/ConditionalAssignment
  if integration_instance_type && !INTEGRATION_INSTANCE_TYPE_ENUM.include?(integration_instance_type)
    OCI.logger.debug("Unknown value for 'integration_instance_type' [" + integration_instance_type + "]. Mapping to 'INTEGRATION_INSTANCE_TYPE_UNKNOWN_ENUM_VALUE'") if OCI.logger
    @integration_instance_type = INTEGRATION_INSTANCE_TYPE_UNKNOWN_ENUM_VALUE
  else
    @integration_instance_type = integration_instance_type
  end
  # rubocop:enable Style/ConditionalAssignment
end
lifecycle_state=(lifecycle_state) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] lifecycle_state Object to be assigned

# File lib/oci/integration/models/integration_instance.rb, line 329
def lifecycle_state=(lifecycle_state)
  # rubocop:disable Style/ConditionalAssignment
  if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
    OCI.logger.debug("Unknown value for 'lifecycle_state' [" + lifecycle_state + "]. Mapping to 'LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE'") if OCI.logger
    @lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
  else
    @lifecycle_state = lifecycle_state
  end
  # rubocop:enable Style/ConditionalAssignment
end
to_hash() click to toggle source

Returns the object in the form of hash @return [Hash] Returns the object in the form of hash

# File lib/oci/integration/models/integration_instance.rb, line 439
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_s() click to toggle source

Returns the string representation of the object @return [String] String presentation of the object

# File lib/oci/integration/models/integration_instance.rb, line 433
def to_s
  to_hash.to_s
end

Private Instance Methods

_to_hash(value) click to toggle source

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash

# File lib/oci/integration/models/integration_instance.rb, line 456
def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end