Class: OCI::AiSpeech::Models::CreateTranscriptionJobDetails
- Inherits:
-
Object
- Object
- OCI::AiSpeech::Models::CreateTranscriptionJobDetails
- Defined in:
- lib/oci/ai_speech/models/create_transcription_job_details.rb
Overview
The information about new Transcription Job.
Constant Summary collapse
- ADDITIONAL_TRANSCRIPTION_FORMATS_ENUM =
[ ADDITIONAL_TRANSCRIPTION_FORMATS_SRT = 'SRT'.freeze ].freeze
Instance Attribute Summary collapse
-
#additional_transcription_formats ⇒ Array<String>
Transcription Format.
-
#compartment_id ⇒ String
[Required] The OCID of the compartment where you want to create the job.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
A short description of the job.
-
#display_name ⇒ String
A user-friendly display name for the job.
-
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope.
-
#input_location ⇒ OCI::AiSpeech::Models::InputLocation
This attribute is required.
- #model_details ⇒ OCI::AiSpeech::Models::TranscriptionModelDetails
- #normalization ⇒ OCI::AiSpeech::Models::TranscriptionNormalization
-
#output_location ⇒ OCI::AiSpeech::Models::OutputLocation
This attribute is required.
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 = {}) ⇒ CreateTranscriptionJobDetails
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 = {}) ⇒ CreateTranscriptionJobDetails
Initializes the object
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 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/oci/ai_speech/models/create_transcription_job_details.rb', line 109 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.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.additional_transcription_formats = attributes[:'additionalTranscriptionFormats'] if attributes[:'additionalTranscriptionFormats'] raise 'You cannot provide both :additionalTranscriptionFormats and :additional_transcription_formats' if attributes.key?(:'additionalTranscriptionFormats') && attributes.key?(:'additional_transcription_formats') self.additional_transcription_formats = attributes[:'additional_transcription_formats'] if attributes[:'additional_transcription_formats'] self.model_details = attributes[:'modelDetails'] if attributes[:'modelDetails'] raise 'You cannot provide both :modelDetails and :model_details' if attributes.key?(:'modelDetails') && attributes.key?(:'model_details') self.model_details = attributes[:'model_details'] if attributes[:'model_details'] self.normalization = attributes[:'normalization'] if attributes[:'normalization'] self.input_location = attributes[:'inputLocation'] if attributes[:'inputLocation'] raise 'You cannot provide both :inputLocation and :input_location' if attributes.key?(:'inputLocation') && attributes.key?(:'input_location') self.input_location = attributes[:'input_location'] if attributes[:'input_location'] self.output_location = attributes[:'outputLocation'] if attributes[:'outputLocation'] raise 'You cannot provide both :outputLocation and :output_location' if attributes.key?(:'outputLocation') && attributes.key?(:'output_location') self.output_location = attributes[:'output_location'] if attributes[:'output_location'] 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'] end |
Instance Attribute Details
#additional_transcription_formats ⇒ Array<String>
Transcription Format. By default, the JSON format is used.
29 30 31 |
# File 'lib/oci/ai_speech/models/create_transcription_job_details.rb', line 29 def additional_transcription_formats @additional_transcription_formats end |
#compartment_id ⇒ String
[Required] The OCID of the compartment where you want to create the job.
21 22 23 |
# File 'lib/oci/ai_speech/models/create_transcription_job_details.rb', line 21 def compartment_id @compartment_id end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace-1\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}, \"foo-namespace-2\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}}
.
55 56 57 |
# File 'lib/oci/ai_speech/models/create_transcription_job_details.rb', line 55 def @defined_tags end |
#description ⇒ String
A short description of the job.
25 26 27 |
# File 'lib/oci/ai_speech/models/create_transcription_job_details.rb', line 25 def description @description end |
#display_name ⇒ String
A user-friendly display name for the job.
17 18 19 |
# File 'lib/oci/ai_speech/models/create_transcription_job_details.rb', line 17 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}
.
49 50 51 |
# File 'lib/oci/ai_speech/models/create_transcription_job_details.rb', line 49 def @freeform_tags end |
#input_location ⇒ OCI::AiSpeech::Models::InputLocation
This attribute is required.
39 40 41 |
# File 'lib/oci/ai_speech/models/create_transcription_job_details.rb', line 39 def input_location @input_location end |
#model_details ⇒ OCI::AiSpeech::Models::TranscriptionModelDetails
32 33 34 |
# File 'lib/oci/ai_speech/models/create_transcription_job_details.rb', line 32 def model_details @model_details end |
#normalization ⇒ OCI::AiSpeech::Models::TranscriptionNormalization
35 36 37 |
# File 'lib/oci/ai_speech/models/create_transcription_job_details.rb', line 35 def normalization @normalization end |
#output_location ⇒ OCI::AiSpeech::Models::OutputLocation
This attribute is required.
43 44 45 |
# File 'lib/oci/ai_speech/models/create_transcription_job_details.rb', line 43 def output_location @output_location end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/oci/ai_speech/models/create_transcription_job_details.rb', line 58 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'display_name': :'displayName', 'compartment_id': :'compartmentId', 'description': :'description', 'additional_transcription_formats': :'additionalTranscriptionFormats', 'model_details': :'modelDetails', 'normalization': :'normalization', 'input_location': :'inputLocation', 'output_location': :'outputLocation', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/oci/ai_speech/models/create_transcription_job_details.rb', line 76 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'display_name': :'String', 'compartment_id': :'String', 'description': :'String', 'additional_transcription_formats': :'Array<String>', 'model_details': :'OCI::AiSpeech::Models::TranscriptionModelDetails', 'normalization': :'OCI::AiSpeech::Models::TranscriptionNormalization', 'input_location': :'OCI::AiSpeech::Models::InputLocation', 'output_location': :'OCI::AiSpeech::Models::OutputLocation', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/oci/ai_speech/models/create_transcription_job_details.rb', line 190 def ==(other) return true if equal?(other) self.class == other.class && display_name == other.display_name && compartment_id == other.compartment_id && description == other.description && additional_transcription_formats == other.additional_transcription_formats && model_details == other.model_details && normalization == other.normalization && input_location == other.input_location && output_location == other.output_location && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/oci/ai_speech/models/create_transcription_job_details.rb', line 229 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
209 210 211 |
# File 'lib/oci/ai_speech/models/create_transcription_job_details.rb', line 209 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
218 219 220 |
# File 'lib/oci/ai_speech/models/create_transcription_job_details.rb', line 218 def hash [display_name, compartment_id, description, additional_transcription_formats, model_details, normalization, input_location, output_location, , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
262 263 264 265 266 267 268 269 270 271 |
# File 'lib/oci/ai_speech/models/create_transcription_job_details.rb', line 262 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
256 257 258 |
# File 'lib/oci/ai_speech/models/create_transcription_job_details.rb', line 256 def to_s to_hash.to_s end |