Class: OCI::DataCatalog::Models::ImportDataAssetJobResult

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/data_catalog/models/import_data_asset_job_result.rb

Overview

Information about a data asset import operation.

Constant Summary collapse

IMPORT_JOB_EXECUTION_STATUS_ENUM =
[
  IMPORT_JOB_EXECUTION_STATUS_CREATED = 'CREATED'.freeze,
  IMPORT_JOB_EXECUTION_STATUS_IN_PROGRESS = 'IN_PROGRESS'.freeze,
  IMPORT_JOB_EXECUTION_STATUS_INACTIVE = 'INACTIVE'.freeze,
  IMPORT_JOB_EXECUTION_STATUS_FAILED = 'FAILED'.freeze,
  IMPORT_JOB_EXECUTION_STATUS_SUCCEEDED = 'SUCCEEDED'.freeze,
  IMPORT_JOB_EXECUTION_STATUS_CANCELED = 'CANCELED'.freeze,
  IMPORT_JOB_EXECUTION_STATUS_SUCCEEDED_WITH_WARNINGS = 'SUCCEEDED_WITH_WARNINGS'.freeze,
  IMPORT_JOB_EXECUTION_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ImportDataAssetJobResult

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/oci/data_catalog/models/import_data_asset_job_result.rb', line 80

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

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

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

  self.import_job_definition_key = attributes[:'importJobDefinitionKey'] if attributes[:'importJobDefinitionKey']

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

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

  self.import_job_key = attributes[:'importJobKey'] if attributes[:'importJobKey']

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

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

  self.import_job_execution_key = attributes[:'importJobExecutionKey'] if attributes[:'importJobExecutionKey']

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

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

  self.import_job_execution_status = attributes[:'importJobExecutionStatus'] if attributes[:'importJobExecutionStatus']

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

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

Instance Attribute Details

#data_asset_keyString

[Required] The unique key of the data asset on which import is triggered.

Returns:

  • (String)


25
26
27
# File 'lib/oci/data_catalog/models/import_data_asset_job_result.rb', line 25

def data_asset_key
  @data_asset_key
end

#import_job_definition_keyString

The unique key of the job definition resource that is used for the import.

Returns:

  • (String)


29
30
31
# File 'lib/oci/data_catalog/models/import_data_asset_job_result.rb', line 29

def import_job_definition_key
  @import_job_definition_key
end

#import_job_execution_keyString

The unique key of the parent job execution for which the log resource is created.

Returns:

  • (String)


37
38
39
# File 'lib/oci/data_catalog/models/import_data_asset_job_result.rb', line 37

def import_job_execution_key
  @import_job_execution_key
end

#import_job_execution_statusString

The status of the import job execution.

Returns:

  • (String)


41
42
43
# File 'lib/oci/data_catalog/models/import_data_asset_job_result.rb', line 41

def import_job_execution_status
  @import_job_execution_status
end

#import_job_keyString

The unique key of the job policy for the import.

Returns:

  • (String)


33
34
35
# File 'lib/oci/data_catalog/models/import_data_asset_job_result.rb', line 33

def import_job_key
  @import_job_key
end

Class Method Details

.attribute_mapObject

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



44
45
46
47
48
49
50
51
52
53
54
# File 'lib/oci/data_catalog/models/import_data_asset_job_result.rb', line 44

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'data_asset_key': :'dataAssetKey',
    'import_job_definition_key': :'importJobDefinitionKey',
    'import_job_key': :'importJobKey',
    'import_job_execution_key': :'importJobExecutionKey',
    'import_job_execution_status': :'importJobExecutionStatus'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



57
58
59
60
61
62
63
64
65
66
67
# File 'lib/oci/data_catalog/models/import_data_asset_job_result.rb', line 57

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'data_asset_key': :'String',
    'import_job_definition_key': :'String',
    'import_job_key': :'String',
    'import_job_execution_key': :'String',
    'import_job_execution_status': :'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



137
138
139
140
141
142
143
144
145
146
# File 'lib/oci/data_catalog/models/import_data_asset_job_result.rb', line 137

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

  self.class == other.class &&
    data_asset_key == other.data_asset_key &&
    import_job_definition_key == other.import_job_definition_key &&
    import_job_key == other.import_job_key &&
    import_job_execution_key == other.import_job_execution_key &&
    import_job_execution_status == other.import_job_execution_status
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



171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# File 'lib/oci/data_catalog/models/import_data_asset_job_result.rb', line 171

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


151
152
153
# File 'lib/oci/data_catalog/models/import_data_asset_job_result.rb', line 151

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



160
161
162
# File 'lib/oci/data_catalog/models/import_data_asset_job_result.rb', line 160

def hash
  [data_asset_key, import_job_definition_key, import_job_key, import_job_execution_key, import_job_execution_status].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



204
205
206
207
208
209
210
211
212
213
# File 'lib/oci/data_catalog/models/import_data_asset_job_result.rb', line 204

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



198
199
200
# File 'lib/oci/data_catalog/models/import_data_asset_job_result.rb', line 198

def to_s
  to_hash.to_s
end