Class: OCI::DataCatalog::Models::JobDefinitionScope
- Inherits:
-
Object
- Object
- OCI::DataCatalog::Models::JobDefinitionScope
- Defined in:
- lib/oci/data_catalog/models/job_definition_scope.rb
Overview
Defines the rules or criteria based on which the scope for job definition is circumscribed.
Instance Attribute Summary collapse
-
#entity_name ⇒ String
Name of the entity for this metadata harvest.
-
#entity_name_filter ⇒ String
Filter rules with regular expression to specify entity names for this metadata harvest.
-
#folder_name ⇒ String
Name of the folder or schema for this metadata harvest.
-
#folder_name_filter ⇒ String
Filter rules with regular expression to specify folder names for this metadata harvest.
-
#is_sample_data_extracted ⇒ BOOLEAN
Specify if sample data to be extracted as part of this harvest.
-
#sample_data_size_in_mbs ⇒ Integer
Specify the sample data size in MB, specified as number of rows, for this metadata harvest.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ JobDefinitionScope
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ JobDefinitionScope
Initializes the object
75 76 77 78 79 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 116 117 118 119 120 121 122 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 75 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.folder_name = attributes[:'folderName'] if attributes[:'folderName'] self.folder_name = "*" if folder_name.nil? && !attributes.key?(:'folderName') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :folderName and :folder_name' if attributes.key?(:'folderName') && attributes.key?(:'folder_name') self.folder_name = attributes[:'folder_name'] if attributes[:'folder_name'] self.folder_name = "*" if folder_name.nil? && !attributes.key?(:'folderName') && !attributes.key?(:'folder_name') # rubocop:disable Style/StringLiterals self.entity_name = attributes[:'entityName'] if attributes[:'entityName'] self.entity_name = "*" if entity_name.nil? && !attributes.key?(:'entityName') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :entityName and :entity_name' if attributes.key?(:'entityName') && attributes.key?(:'entity_name') self.entity_name = attributes[:'entity_name'] if attributes[:'entity_name'] self.entity_name = "*" if entity_name.nil? && !attributes.key?(:'entityName') && !attributes.key?(:'entity_name') # rubocop:disable Style/StringLiterals self.folder_name_filter = attributes[:'folderNameFilter'] if attributes[:'folderNameFilter'] raise 'You cannot provide both :folderNameFilter and :folder_name_filter' if attributes.key?(:'folderNameFilter') && attributes.key?(:'folder_name_filter') self.folder_name_filter = attributes[:'folder_name_filter'] if attributes[:'folder_name_filter'] self.entity_name_filter = attributes[:'entityNameFilter'] if attributes[:'entityNameFilter'] raise 'You cannot provide both :entityNameFilter and :entity_name_filter' if attributes.key?(:'entityNameFilter') && attributes.key?(:'entity_name_filter') self.entity_name_filter = attributes[:'entity_name_filter'] if attributes[:'entity_name_filter'] self.is_sample_data_extracted = attributes[:'isSampleDataExtracted'] unless attributes[:'isSampleDataExtracted'].nil? self.is_sample_data_extracted = true if is_sample_data_extracted.nil? && !attributes.key?(:'isSampleDataExtracted') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isSampleDataExtracted and :is_sample_data_extracted' if attributes.key?(:'isSampleDataExtracted') && attributes.key?(:'is_sample_data_extracted') self.is_sample_data_extracted = attributes[:'is_sample_data_extracted'] unless attributes[:'is_sample_data_extracted'].nil? self.is_sample_data_extracted = true if is_sample_data_extracted.nil? && !attributes.key?(:'isSampleDataExtracted') && !attributes.key?(:'is_sample_data_extracted') # rubocop:disable Style/StringLiterals self.sample_data_size_in_mbs = attributes[:'sampleDataSizeInMBs'] if attributes[:'sampleDataSizeInMBs'] raise 'You cannot provide both :sampleDataSizeInMBs and :sample_data_size_in_mbs' if attributes.key?(:'sampleDataSizeInMBs') && attributes.key?(:'sample_data_size_in_mbs') self.sample_data_size_in_mbs = attributes[:'sample_data_size_in_mbs'] if attributes[:'sample_data_size_in_mbs'] end |
Instance Attribute Details
#entity_name ⇒ String
Name of the entity for this metadata harvest.
17 18 19 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 17 def entity_name @entity_name end |
#entity_name_filter ⇒ String
Filter rules with regular expression to specify entity names for this metadata harvest.
25 26 27 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 25 def entity_name_filter @entity_name_filter end |
#folder_name ⇒ String
Name of the folder or schema for this metadata harvest.
13 14 15 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 13 def folder_name @folder_name end |
#folder_name_filter ⇒ String
Filter rules with regular expression to specify folder names for this metadata harvest.
21 22 23 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 21 def folder_name_filter @folder_name_filter end |
#is_sample_data_extracted ⇒ BOOLEAN
Specify if sample data to be extracted as part of this harvest.
29 30 31 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 29 def is_sample_data_extracted @is_sample_data_extracted end |
#sample_data_size_in_mbs ⇒ Integer
Specify the sample data size in MB, specified as number of rows, for this metadata harvest.
33 34 35 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 33 def sample_data_size_in_mbs @sample_data_size_in_mbs end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 36 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'folder_name': :'folderName', 'entity_name': :'entityName', 'folder_name_filter': :'folderNameFilter', 'entity_name_filter': :'entityNameFilter', 'is_sample_data_extracted': :'isSampleDataExtracted', 'sample_data_size_in_mbs': :'sampleDataSizeInMBs' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 50 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'folder_name': :'String', 'entity_name': :'String', 'folder_name_filter': :'String', 'entity_name_filter': :'String', 'is_sample_data_extracted': :'BOOLEAN', 'sample_data_size_in_mbs': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 131 def ==(other) return true if equal?(other) self.class == other.class && folder_name == other.folder_name && entity_name == other.entity_name && folder_name_filter == other.folder_name_filter && entity_name_filter == other.entity_name_filter && is_sample_data_extracted == other.is_sample_data_extracted && sample_data_size_in_mbs == other.sample_data_size_in_mbs end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 166 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
146 147 148 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 146 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
155 156 157 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 155 def hash [folder_name, entity_name, folder_name_filter, entity_name_filter, is_sample_data_extracted, sample_data_size_in_mbs].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
199 200 201 202 203 204 205 206 207 208 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 199 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 ⇒ String
Returns the string representation of the object
193 194 195 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 193 def to_s to_hash.to_s end |