Class: DataLabelingService::Models::Dataset
- Inherits:
-
Object
- Object
- DataLabelingService::Models::Dataset
- Defined in:
- lib/oci/data_labeling_service/models/dataset.rb
Overview
A dataset is a logical collection of records. The dataset contains all the information necessary to describe a record's source, format, type of annotations allowed on these records, and labels allowed on annotations.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_NEEDS_ATTENTION = 'NEEDS_ATTENTION'.freeze, LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#annotation_format ⇒ String
**[Required]** The annotation format name required for labeling records.
-
#compartment_id ⇒ String
**[Required]** The OCID of the compartment of the resource.
-
#dataset_format_details ⇒ OCI::DataLabelingService::Models::DatasetFormatDetails
This attribute is required.
-
#dataset_source_details ⇒ OCI::DataLabelingService::Models::DatasetSourceDetails
This attribute is required.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
The defined tags for this resource.
-
#description ⇒ String
A user provided description of the dataset.
-
#display_name ⇒ String
A user-friendly display name for the resource.
-
#freeform_tags ⇒ Hash<String, String>
A simple key-value pair that is applied without any predefined name, type, or scope.
-
#id ⇒ String
**[Required]** The OCID of the Dataset.
- #initial_record_generation_configuration ⇒ OCI::DataLabelingService::Models::InitialRecordGenerationConfiguration
-
#label_set ⇒ OCI::DataLabelingService::Models::LabelSet
This attribute is required.
-
#labeling_instructions ⇒ String
The labeling instructions for human labelers in rich text format.
-
#lifecycle_details ⇒ String
A message describing the current state in more detail.
-
#lifecycle_state ⇒ String
**[Required]** The state of a dataset.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
The usage of system tag keys.
-
#time_created ⇒ DateTime
**[Required]** The date and time the resource was created, in the timestamp format defined by RFC3339.
-
#time_updated ⇒ DateTime
**[Required]** The date and time the resource was last updated, in the timestamp format defined by RFC3339.
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 = {}) ⇒ Dataset
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 = {}) ⇒ Dataset
Initializes the object
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 177 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.id = attributes[:'id'] if attributes[:'id'] self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self.description = attributes[:'description'] if attributes[:'description'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails'] raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details') self.lifecycle_details = attributes[:'lifecycle_details'] if attributes[:'lifecycle_details'] self.annotation_format = attributes[:'annotationFormat'] if attributes[:'annotationFormat'] raise 'You cannot provide both :annotationFormat and :annotation_format' if attributes.key?(:'annotationFormat') && attributes.key?(:'annotation_format') self.annotation_format = attributes[:'annotation_format'] if attributes[:'annotation_format'] self.dataset_source_details = attributes[:'datasetSourceDetails'] if attributes[:'datasetSourceDetails'] raise 'You cannot provide both :datasetSourceDetails and :dataset_source_details' if attributes.key?(:'datasetSourceDetails') && attributes.key?(:'dataset_source_details') self.dataset_source_details = attributes[:'dataset_source_details'] if attributes[:'dataset_source_details'] self.dataset_format_details = attributes[:'datasetFormatDetails'] if attributes[:'datasetFormatDetails'] raise 'You cannot provide both :datasetFormatDetails and :dataset_format_details' if attributes.key?(:'datasetFormatDetails') && attributes.key?(:'dataset_format_details') self.dataset_format_details = attributes[:'dataset_format_details'] if attributes[:'dataset_format_details'] self.label_set = attributes[:'labelSet'] if attributes[:'labelSet'] raise 'You cannot provide both :labelSet and :label_set' if attributes.key?(:'labelSet') && attributes.key?(:'label_set') self.label_set = attributes[:'label_set'] if attributes[:'label_set'] self.initial_record_generation_configuration = attributes[:'initialRecordGenerationConfiguration'] if attributes[:'initialRecordGenerationConfiguration'] raise 'You cannot provide both :initialRecordGenerationConfiguration and :initial_record_generation_configuration' if attributes.key?(:'initialRecordGenerationConfiguration') && attributes.key?(:'initial_record_generation_configuration') self.initial_record_generation_configuration = attributes[:'initial_record_generation_configuration'] if attributes[:'initial_record_generation_configuration'] self.labeling_instructions = attributes[:'labelingInstructions'] if attributes[:'labelingInstructions'] raise 'You cannot provide both :labelingInstructions and :labeling_instructions' if attributes.key?(:'labelingInstructions') && attributes.key?(:'labeling_instructions') self.labeling_instructions = attributes[:'labeling_instructions'] if attributes[:'labeling_instructions'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] self. = attributes[:'systemTags'] if attributes[:'systemTags'] raise 'You cannot provide both :systemTags and :system_tags' if attributes.key?(:'systemTags') && attributes.key?(:'system_tags') self. = attributes[:'system_tags'] if attributes[:'system_tags'] end |
Instance Attribute Details
#annotation_format ⇒ String
**[Required]** The annotation format name required for labeling records.
65 66 67 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 65 def annotation_format @annotation_format end |
#compartment_id ⇒ String
**[Required]** The OCID of the compartment of the resource.
33 34 35 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 33 def compartment_id @compartment_id end |
#dataset_format_details ⇒ OCI::DataLabelingService::Models::DatasetFormatDetails
This attribute is required.
73 74 75 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 73 def dataset_format_details @dataset_format_details end |
#dataset_source_details ⇒ OCI::DataLabelingService::Models::DatasetSourceDetails
This attribute is required.
69 70 71 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 69 def dataset_source_details @dataset_source_details end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
The defined tags for this resource. Each key is predefined and scoped to a namespace. For example: `{"bar-key": "value"}`
96 97 98 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 96 def @defined_tags end |
#description ⇒ String
A user provided description of the dataset
37 38 39 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 37 def description @description end |
#display_name ⇒ String
A user-friendly display name for the resource.
29 30 31 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 29 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
A simple key-value pair that is applied without any predefined name, type, or scope. It exists for cross-compatibility only. For example: `"value"`
90 91 92 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 90 def @freeform_tags end |
#id ⇒ String
**[Required]** The OCID of the Dataset.
25 26 27 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 25 def id @id end |
#initial_record_generation_configuration ⇒ OCI::DataLabelingService::Models::InitialRecordGenerationConfiguration
80 81 82 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 80 def initial_record_generation_configuration @initial_record_generation_configuration end |
#label_set ⇒ OCI::DataLabelingService::Models::LabelSet
This attribute is required.
77 78 79 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 77 def label_set @label_set end |
#labeling_instructions ⇒ String
The labeling instructions for human labelers in rich text format
84 85 86 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 84 def labeling_instructions @labeling_instructions end |
#lifecycle_details ⇒ String
A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in FAILED or NEEDS_ATTENTION state.
61 62 63 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 61 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
**[Required]** The state of a dataset. CREATING - The dataset is being created. It will transition to ACTIVE when it is ready for labeling. ACTIVE - The dataset is ready for labeling. UPDATING - The dataset is being updated. It and its related resources may be unavailable for other updates until it returns to ACTIVE. NEEDS_ATTENTION - A dataset updation operation has failed due to validation or other errors and needs attention. DELETING - The dataset and its related resources are being deleted. DELETED - The dataset has been deleted and is no longer available. FAILED - The dataset has failed due to validation or other errors.
57 58 59 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 57 def lifecycle_state @lifecycle_state end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
The usage of system tag keys. These predefined keys are scoped to namespaces. For example: `{"free-tier-retained": "true"}`
102 103 104 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 102 def @system_tags end |
#time_created ⇒ DateTime
**[Required]** The date and time the resource was created, in the timestamp format defined by RFC3339.
41 42 43 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 41 def time_created @time_created end |
#time_updated ⇒ DateTime
**[Required]** The date and time the resource was last updated, in the timestamp format defined by RFC3339.
45 46 47 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 45 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 105 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'display_name': :'displayName', 'compartment_id': :'compartmentId', 'description': :'description', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails', 'annotation_format': :'annotationFormat', 'dataset_source_details': :'datasetSourceDetails', 'dataset_format_details': :'datasetFormatDetails', 'label_set': :'labelSet', 'initial_record_generation_configuration': :'initialRecordGenerationConfiguration', 'labeling_instructions': :'labelingInstructions', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 130 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'display_name': :'String', 'compartment_id': :'String', 'description': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'lifecycle_state': :'String', 'lifecycle_details': :'String', 'annotation_format': :'String', 'dataset_source_details': :'OCI::DataLabelingService::Models::DatasetSourceDetails', 'dataset_format_details': :'OCI::DataLabelingService::Models::DatasetFormatDetails', 'label_set': :'OCI::DataLabelingService::Models::LabelSet', 'initial_record_generation_configuration': :'OCI::DataLabelingService::Models::InitialRecordGenerationConfiguration', 'labeling_instructions': :'String', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'system_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 298 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && display_name == other.display_name && compartment_id == other.compartment_id && description == other.description && time_created == other.time_created && time_updated == other.time_updated && lifecycle_state == other.lifecycle_state && lifecycle_details == other.lifecycle_details && annotation_format == other.annotation_format && dataset_source_details == other.dataset_source_details && dataset_format_details == other.dataset_format_details && label_set == other.label_set && initial_record_generation_configuration == other.initial_record_generation_configuration && labeling_instructions == other.labeling_instructions && == other. && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 344 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
324 325 326 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 324 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
333 334 335 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 333 def hash [id, display_name, compartment_id, description, time_created, time_updated, lifecycle_state, lifecycle_details, annotation_format, dataset_source_details, dataset_format_details, label_set, initial_record_generation_configuration, labeling_instructions, , , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
377 378 379 380 381 382 383 384 385 386 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 377 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
371 372 373 |
# File 'lib/oci/data_labeling_service/models/dataset.rb', line 371 def to_s to_hash.to_s end |