Class: OCI::DataLabelingServiceDataplane::Models::Dataset
- Inherits:
-
Object
- Object
- OCI::DataLabelingServiceDataplane::Models::Dataset
- Defined in:
- lib/oci/data_labeling_service_dataplane/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, the type of annotations allowed for the record, and the 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
- LIFECYCLE_SUBSTATE_ENUM =
[ LIFECYCLE_SUBSTATE_IMPORT_DATASET = 'IMPORT_DATASET'.freeze, LIFECYCLE_SUBSTATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#additional_properties ⇒ Hash<String, String>
A simple key-value pair that is applied without any predefined name, type, or scope.
-
#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::DataLabelingServiceDataplane::Models::DatasetFormatDetails
This attribute is required.
-
#dataset_source_details ⇒ OCI::DataLabelingServiceDataplane::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_import_dataset_configuration ⇒ OCI::DataLabelingServiceDataplane::Models::InitialImportDatasetConfiguration
- #initial_record_generation_configuration ⇒ OCI::DataLabelingServiceDataplane::Models::InitialRecordGenerationConfiguration
-
#label_set ⇒ OCI::DataLabelingServiceDataplane::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.
-
#lifecycle_substate ⇒ String
The sub-state of the 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
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 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 207 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.lifecycle_substate = attributes[:'lifecycleSubstate'] if attributes[:'lifecycleSubstate'] raise 'You cannot provide both :lifecycleSubstate and :lifecycle_substate' if attributes.key?(:'lifecycleSubstate') && attributes.key?(:'lifecycle_substate') self.lifecycle_substate = attributes[:'lifecycle_substate'] if attributes[:'lifecycle_substate'] 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.initial_import_dataset_configuration = attributes[:'initialImportDatasetConfiguration'] if attributes[:'initialImportDatasetConfiguration'] raise 'You cannot provide both :initialImportDatasetConfiguration and :initial_import_dataset_configuration' if attributes.key?(:'initialImportDatasetConfiguration') && attributes.key?(:'initial_import_dataset_configuration') self.initial_import_dataset_configuration = attributes[:'initial_import_dataset_configuration'] if attributes[:'initial_import_dataset_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'] self.additional_properties = attributes[:'additionalProperties'] if attributes[:'additionalProperties'] raise 'You cannot provide both :additionalProperties and :additional_properties' if attributes.key?(:'additionalProperties') && attributes.key?(:'additional_properties') self.additional_properties = attributes[:'additional_properties'] if attributes[:'additional_properties'] end |
Instance Attribute Details
#additional_properties ⇒ 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: {\"bar-key\": \"value\"}
123 124 125 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 123 def additional_properties @additional_properties end |
#annotation_format ⇒ String
[Required] The annotation format name required for labeling records.
77 78 79 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 77 def annotation_format @annotation_format end |
#compartment_id ⇒ String
[Required] The OCID of the compartment of the resource.
39 40 41 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 39 def compartment_id @compartment_id end |
#dataset_format_details ⇒ OCI::DataLabelingServiceDataplane::Models::DatasetFormatDetails
This attribute is required.
85 86 87 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 85 def dataset_format_details @dataset_format_details end |
#dataset_source_details ⇒ OCI::DataLabelingServiceDataplane::Models::DatasetSourceDetails
This attribute is required.
81 82 83 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 81 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: {\"foo-namespace\": {\"bar-key\": \"value\"}}
111 112 113 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 111 def @defined_tags end |
#description ⇒ String
A user provided description of the dataset
43 44 45 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 43 def description @description end |
#display_name ⇒ String
A user-friendly display name for the resource.
35 36 37 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 35 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: {\"bar-key\": \"value\"}
105 106 107 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 105 def @freeform_tags end |
#id ⇒ String
[Required] The OCID of the Dataset.
31 32 33 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 31 def id @id end |
#initial_import_dataset_configuration ⇒ OCI::DataLabelingServiceDataplane::Models::InitialImportDatasetConfiguration
95 96 97 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 95 def initial_import_dataset_configuration @initial_import_dataset_configuration end |
#initial_record_generation_configuration ⇒ OCI::DataLabelingServiceDataplane::Models::InitialRecordGenerationConfiguration
92 93 94 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 92 def initial_record_generation_configuration @initial_record_generation_configuration end |
#label_set ⇒ OCI::DataLabelingServiceDataplane::Models::LabelSet
This attribute is required.
89 90 91 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 89 def label_set @label_set end |
#labeling_instructions ⇒ String
The labeling instructions for human labelers in rich text format
99 100 101 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 99 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.
67 68 69 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 67 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.
63 64 65 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 63 def lifecycle_state @lifecycle_state end |
#lifecycle_substate ⇒ String
The sub-state of the dataset. IMPORT_DATASET - The dataset is being imported.
73 74 75 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 73 def lifecycle_substate @lifecycle_substate end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
The usage of system tag keys. These predefined keys are scoped to namespaces. For example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}
117 118 119 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 117 def @system_tags end |
#time_created ⇒ DateTime
[Required] The date and time the resource was created, in the timestamp format defined by RFC3339.
47 48 49 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 47 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.
51 52 53 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 51 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 126 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', 'lifecycle_substate': :'lifecycleSubstate', 'annotation_format': :'annotationFormat', 'dataset_source_details': :'datasetSourceDetails', 'dataset_format_details': :'datasetFormatDetails', 'label_set': :'labelSet', 'initial_record_generation_configuration': :'initialRecordGenerationConfiguration', 'initial_import_dataset_configuration': :'initialImportDatasetConfiguration', 'labeling_instructions': :'labelingInstructions', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags', 'additional_properties': :'additionalProperties' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 154 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', 'lifecycle_substate': :'String', 'annotation_format': :'String', 'dataset_source_details': :'OCI::DataLabelingServiceDataplane::Models::DatasetSourceDetails', 'dataset_format_details': :'OCI::DataLabelingServiceDataplane::Models::DatasetFormatDetails', 'label_set': :'OCI::DataLabelingServiceDataplane::Models::LabelSet', 'initial_record_generation_configuration': :'OCI::DataLabelingServiceDataplane::Models::InitialRecordGenerationConfiguration', 'initial_import_dataset_configuration': :'OCI::DataLabelingServiceDataplane::Models::InitialImportDatasetConfiguration', 'labeling_instructions': :'String', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'system_tags': :'Hash<String, Hash<String, Object>>', 'additional_properties': :'Hash<String, String>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 359 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 && lifecycle_substate == other.lifecycle_substate && 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 && initial_import_dataset_configuration == other.initial_import_dataset_configuration && labeling_instructions == other.labeling_instructions && == other. && == other. && == other. && additional_properties == other.additional_properties end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 408 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
388 389 390 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 388 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
397 398 399 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 397 def hash [id, display_name, compartment_id, description, time_created, time_updated, lifecycle_state, lifecycle_details, lifecycle_substate, annotation_format, dataset_source_details, dataset_format_details, label_set, initial_record_generation_configuration, initial_import_dataset_configuration, labeling_instructions, , , , additional_properties].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
441 442 443 444 445 446 447 448 449 450 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 441 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
435 436 437 |
# File 'lib/oci/data_labeling_service_dataplane/models/dataset.rb', line 435 def to_s to_hash.to_s end |