Class: OCI::DataIntegration::Models::CreateExportRequestDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/data_integration/models/create_export_request_details.rb

Overview

Details of export request. Export is supported using three ways. First, when objectKeys are provided, export of those objects take place. Second, when filter are provided, all the objects based on the filter provided are exported. Third, when neither objectKeys nor filters are provided, we export all the design objects for the workspace.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CreateExportRequestDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/oci/data_integration/models/create_export_request_details.rb', line 93

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

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

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

  self.file_name = attributes[:'fileName'] if attributes[:'fileName']

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

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

  self.object_storage_tenancy_id = attributes[:'objectStorageTenancyId'] if attributes[:'objectStorageTenancyId']

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

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

  self.object_storage_region = attributes[:'objectStorageRegion'] if attributes[:'objectStorageRegion']

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

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

  self.is_object_overwrite_enabled = attributes[:'isObjectOverwriteEnabled'] unless attributes[:'isObjectOverwriteEnabled'].nil?
  self.is_object_overwrite_enabled = false if is_object_overwrite_enabled.nil? && !attributes.key?(:'isObjectOverwriteEnabled') # rubocop:disable Style/StringLiterals

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

  self.is_object_overwrite_enabled = attributes[:'is_object_overwrite_enabled'] unless attributes[:'is_object_overwrite_enabled'].nil?
  self.is_object_overwrite_enabled = false if is_object_overwrite_enabled.nil? && !attributes.key?(:'isObjectOverwriteEnabled') && !attributes.key?(:'is_object_overwrite_enabled') # rubocop:disable Style/StringLiterals

  self.object_keys = attributes[:'objectKeys'] if attributes[:'objectKeys']

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

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

  self.are_references_included = attributes[:'areReferencesIncluded'] unless attributes[:'areReferencesIncluded'].nil?
  self.are_references_included = true if are_references_included.nil? && !attributes.key?(:'areReferencesIncluded') # rubocop:disable Style/StringLiterals

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

  self.are_references_included = attributes[:'are_references_included'] unless attributes[:'are_references_included'].nil?
  self.are_references_included = true if are_references_included.nil? && !attributes.key?(:'areReferencesIncluded') && !attributes.key?(:'are_references_included') # rubocop:disable Style/StringLiterals

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

Instance Attribute Details

#are_references_includedBOOLEAN

This field controls if the references will be exported along with the objects

Returns:

  • (BOOLEAN)


41
42
43
# File 'lib/oci/data_integration/models/create_export_request_details.rb', line 41

def are_references_included
  @are_references_included
end

#bucket_nameString

[Required] Name of the Object Storage bucket where the object will be exported.

Returns:

  • (String)


17
18
19
# File 'lib/oci/data_integration/models/create_export_request_details.rb', line 17

def bucket_name
  @bucket_name
end

#file_nameString

Name of the exported zip file.

Returns:

  • (String)


21
22
23
# File 'lib/oci/data_integration/models/create_export_request_details.rb', line 21

def file_name
  @file_name
end

#filtersArray<String>

Filters for exported objects

Returns:

  • (Array<String>)


45
46
47
# File 'lib/oci/data_integration/models/create_export_request_details.rb', line 45

def filters
  @filters
end

#is_object_overwrite_enabledBOOLEAN

Flag to control whether to overwrite the object if it is already present at the provided object storage location.

Returns:

  • (BOOLEAN)


33
34
35
# File 'lib/oci/data_integration/models/create_export_request_details.rb', line 33

def is_object_overwrite_enabled
  @is_object_overwrite_enabled
end

#object_keysArray<String>

Field is used to specify which object keys to export

Returns:

  • (Array<String>)


37
38
39
# File 'lib/oci/data_integration/models/create_export_request_details.rb', line 37

def object_keys
  @object_keys
end

#object_storage_regionString

Region of the object storage (if using object storage of different region)

Returns:

  • (String)


29
30
31
# File 'lib/oci/data_integration/models/create_export_request_details.rb', line 29

def object_storage_region
  @object_storage_region
end

#object_storage_tenancy_idString

Optional parameter to point to object storage tenancy (if using Object Storage of different tenancy)

Returns:

  • (String)


25
26
27
# File 'lib/oci/data_integration/models/create_export_request_details.rb', line 25

def object_storage_tenancy_id
  @object_storage_tenancy_id
end

Class Method Details

.attribute_mapObject

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



48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/oci/data_integration/models/create_export_request_details.rb', line 48

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'bucket_name': :'bucketName',
    'file_name': :'fileName',
    'object_storage_tenancy_id': :'objectStorageTenancyId',
    'object_storage_region': :'objectStorageRegion',
    'is_object_overwrite_enabled': :'isObjectOverwriteEnabled',
    'object_keys': :'objectKeys',
    'are_references_included': :'areReferencesIncluded',
    'filters': :'filters'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/oci/data_integration/models/create_export_request_details.rb', line 64

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'bucket_name': :'String',
    'file_name': :'String',
    'object_storage_tenancy_id': :'String',
    'object_storage_region': :'String',
    'is_object_overwrite_enabled': :'BOOLEAN',
    'object_keys': :'Array<String>',
    'are_references_included': :'BOOLEAN',
    'filters': :'Array<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



155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/oci/data_integration/models/create_export_request_details.rb', line 155

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

  self.class == other.class &&
    bucket_name == other.bucket_name &&
    file_name == other.file_name &&
    object_storage_tenancy_id == other.object_storage_tenancy_id &&
    object_storage_region == other.object_storage_region &&
    is_object_overwrite_enabled == other.is_object_overwrite_enabled &&
    object_keys == other.object_keys &&
    are_references_included == other.are_references_included &&
    filters == other.filters
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



192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'lib/oci/data_integration/models/create_export_request_details.rb', line 192

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


172
173
174
# File 'lib/oci/data_integration/models/create_export_request_details.rb', line 172

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



181
182
183
# File 'lib/oci/data_integration/models/create_export_request_details.rb', line 181

def hash
  [bucket_name, file_name, object_storage_tenancy_id, object_storage_region, is_object_overwrite_enabled, object_keys, are_references_included, filters].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



225
226
227
228
229
230
231
232
233
234
# File 'lib/oci/data_integration/models/create_export_request_details.rb', line 225

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



219
220
221
# File 'lib/oci/data_integration/models/create_export_request_details.rb', line 219

def to_s
  to_hash.to_s
end