Class: OCI::DataIntegration::Models::BipReadAttributes

Inherits:
AbstractReadAttribute show all
Defined in:
lib/oci/data_integration/models/bip_read_attributes.rb

Overview

Properties to configure reading from a FUSION_APP BIP data asset / connection.

Constant Summary

Constants inherited from AbstractReadAttribute

AbstractReadAttribute::MODEL_TYPE_ENUM

Instance Attribute Summary collapse

Attributes inherited from AbstractReadAttribute

#model_type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractReadAttribute

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ BipReadAttributes

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
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
# File 'lib/oci/data_integration/models/bip_read_attributes.rb', line 88

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  attributes['modelType'] = 'BIP_READ_ATTRIBUTE'

  super(attributes)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.fetch_size = attributes[:'fetchSize'] if attributes[:'fetchSize']

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

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

  self.row_limit = attributes[:'rowLimit'] if attributes[:'rowLimit']

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

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

  self.offset_parameter = attributes[:'offsetParameter'] if attributes[:'offsetParameter']

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

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

  self.fetch_next_rows_parameter = attributes[:'fetchNextRowsParameter'] if attributes[:'fetchNextRowsParameter']

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

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

  self.custom_parameters = attributes[:'customParameters'] if attributes[:'customParameters']

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

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

  self.staging_data_asset = attributes[:'stagingDataAsset'] if attributes[:'stagingDataAsset']

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

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

  self.staging_connection = attributes[:'stagingConnection'] if attributes[:'stagingConnection']

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

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

  self.bucket_schema = attributes[:'bucketSchema'] if attributes[:'bucketSchema']

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

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

Instance Attribute Details

#bucket_schemaOCI::DataIntegration::Models::Schema

Returns:

  • (OCI::DataIntegration::Models::Schema)


38
39
40
# File 'lib/oci/data_integration/models/bip_read_attributes.rb', line 38

def bucket_schema
  @bucket_schema
end

#custom_parametersArray<OCI::DataIntegration::Models::BipReportParameterValue>

An array of custom BIP report parameters and their values.



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

def custom_parameters
  @custom_parameters
end

#fetch_next_rows_parameterString

Name of BIP report parameter to control the start of the chunk

Returns:

  • (String)


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

def fetch_next_rows_parameter
  @fetch_next_rows_parameter
end

#fetch_sizeInteger

The fetch size for reading.

Returns:

  • (Integer)


13
14
15
# File 'lib/oci/data_integration/models/bip_read_attributes.rb', line 13

def fetch_size
  @fetch_size
end

#offset_parameterString

Name of BIP report parameter to control the start of the chunk

Returns:

  • (String)


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

def offset_parameter
  @offset_parameter
end

#row_limitInteger

The maximum number of rows to read.

Returns:

  • (Integer)


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

def row_limit
  @row_limit
end

#staging_connectionOCI::DataIntegration::Models::ConnectionSummaryFromObjectStorage



35
36
37
# File 'lib/oci/data_integration/models/bip_read_attributes.rb', line 35

def staging_connection
  @staging_connection
end

#staging_data_assetOCI::DataIntegration::Models::DataAssetSummaryFromObjectStorage



32
33
34
# File 'lib/oci/data_integration/models/bip_read_attributes.rb', line 32

def staging_data_asset
  @staging_data_asset
end

Class Method Details

.attribute_mapObject

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



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/oci/data_integration/models/bip_read_attributes.rb', line 41

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'model_type': :'modelType',
    'fetch_size': :'fetchSize',
    'row_limit': :'rowLimit',
    'offset_parameter': :'offsetParameter',
    'fetch_next_rows_parameter': :'fetchNextRowsParameter',
    'custom_parameters': :'customParameters',
    'staging_data_asset': :'stagingDataAsset',
    'staging_connection': :'stagingConnection',
    'bucket_schema': :'bucketSchema'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/oci/data_integration/models/bip_read_attributes.rb', line 58

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'model_type': :'String',
    'fetch_size': :'Integer',
    'row_limit': :'Integer',
    'offset_parameter': :'String',
    'fetch_next_rows_parameter': :'String',
    'custom_parameters': :'Array<OCI::DataIntegration::Models::BipReportParameterValue>',
    'staging_data_asset': :'OCI::DataIntegration::Models::DataAssetSummaryFromObjectStorage',
    'staging_connection': :'OCI::DataIntegration::Models::ConnectionSummaryFromObjectStorage',
    'bucket_schema': :'OCI::DataIntegration::Models::Schema'
    # 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



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

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

  self.class == other.class &&
    model_type == other.model_type &&
    fetch_size == other.fetch_size &&
    row_limit == other.row_limit &&
    offset_parameter == other.offset_parameter &&
    fetch_next_rows_parameter == other.fetch_next_rows_parameter &&
    custom_parameters == other.custom_parameters &&
    staging_data_asset == other.staging_data_asset &&
    staging_connection == other.staging_connection &&
    bucket_schema == other.bucket_schema
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/bip_read_attributes.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/bip_read_attributes.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/bip_read_attributes.rb', line 181

def hash
  [model_type, fetch_size, row_limit, offset_parameter, fetch_next_rows_parameter, custom_parameters, staging_data_asset, staging_connection, bucket_schema].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/bip_read_attributes.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/bip_read_attributes.rb', line 219

def to_s
  to_hash.to_s
end