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
74 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 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 74 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.
16 17 18 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 16 def entity_name @entity_name end |
#entity_name_filter ⇒ String
Filter rules with regular expression to specify entity names for this metadata harvest.
24 25 26 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 24 def entity_name_filter @entity_name_filter end |
#folder_name ⇒ String
Name of the folder or schema for this metadata harvest.
12 13 14 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 12 def folder_name @folder_name end |
#folder_name_filter ⇒ String
Filter rules with regular expression to specify folder names for this metadata harvest.
20 21 22 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 20 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.
28 29 30 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 28 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.
32 33 34 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 32 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.
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 35 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.
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 49 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.
130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 130 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
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 165 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
145 146 147 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 145 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
154 155 156 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 154 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
198 199 200 201 202 203 204 205 206 207 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 198 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
192 193 194 |
# File 'lib/oci/data_catalog/models/job_definition_scope.rb', line 192 def to_s to_hash.to_s end |