Class: OCI::AiLanguage::Models::CreateJobDetails
- Inherits:
-
Object
- Object
- OCI::AiLanguage::Models::CreateJobDetails
- Defined in:
- lib/oci/ai_language/models/create_job_details.rb
Overview
Job creation detail which will have documents on which language services need to run prediction along with output folder
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
[Required] The OCID of the compartment where you want to create the job.
-
#description ⇒ String
A short description of the job.
-
#display_name ⇒ String
A user-friendly display name for the job.
- #input_configuration ⇒ OCI::AiLanguage::Models::InputConfiguration
-
#input_location ⇒ OCI::AiLanguage::Models::InputLocation
This attribute is required.
-
#model_metadata_details ⇒ Array<OCI::AiLanguage::Models::ModelMetadataDetails>
[Required] training model details For this release only one model is allowed to be input here.
-
#output_location ⇒ OCI::AiLanguage::Models::ObjectPrefixOutputLocation
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 = {}) ⇒ CreateJobDetails
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 = {}) ⇒ CreateJobDetails
Initializes the object
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 123 124 125 126 127 |
# File 'lib/oci/ai_language/models/create_job_details.rb', line 84 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.description = attributes[:'description'] if attributes[:'description'] 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.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.input_configuration = attributes[:'inputConfiguration'] if attributes[:'inputConfiguration'] raise 'You cannot provide both :inputConfiguration and :input_configuration' if attributes.key?(:'inputConfiguration') && attributes.key?(:'input_configuration') self.input_configuration = attributes[:'input_configuration'] if attributes[:'input_configuration'] self. = attributes[:'modelMetadataDetails'] if attributes[:'modelMetadataDetails'] raise 'You cannot provide both :modelMetadataDetails and :model_metadata_details' if attributes.key?(:'modelMetadataDetails') && attributes.key?(:'model_metadata_details') self. = attributes[:'model_metadata_details'] if attributes[:'model_metadata_details'] 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'] end |
Instance Attribute Details
#compartment_id ⇒ String
[Required] The OCID of the compartment where you want to create the job.
21 22 23 |
# File 'lib/oci/ai_language/models/create_job_details.rb', line 21 def compartment_id @compartment_id end |
#description ⇒ String
A short description of the job.
17 18 19 |
# File 'lib/oci/ai_language/models/create_job_details.rb', line 17 def description @description end |
#display_name ⇒ String
A user-friendly display name for the job.
13 14 15 |
# File 'lib/oci/ai_language/models/create_job_details.rb', line 13 def display_name @display_name end |
#input_configuration ⇒ OCI::AiLanguage::Models::InputConfiguration
28 29 30 |
# File 'lib/oci/ai_language/models/create_job_details.rb', line 28 def input_configuration @input_configuration end |
#input_location ⇒ OCI::AiLanguage::Models::InputLocation
This attribute is required.
25 26 27 |
# File 'lib/oci/ai_language/models/create_job_details.rb', line 25 def input_location @input_location end |
#model_metadata_details ⇒ Array<OCI::AiLanguage::Models::ModelMetadataDetails>
[Required] training model details For this release only one model is allowed to be input here. One of the three modelType, ModelId, endpointId should be given other wise error will be thrown from API
35 36 37 |
# File 'lib/oci/ai_language/models/create_job_details.rb', line 35 def @model_metadata_details end |
#output_location ⇒ OCI::AiLanguage::Models::ObjectPrefixOutputLocation
This attribute is required.
39 40 41 |
# File 'lib/oci/ai_language/models/create_job_details.rb', line 39 def output_location @output_location end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/oci/ai_language/models/create_job_details.rb', line 42 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'display_name': :'displayName', 'description': :'description', 'compartment_id': :'compartmentId', 'input_location': :'inputLocation', 'input_configuration': :'inputConfiguration', 'model_metadata_details': :'modelMetadataDetails', 'output_location': :'outputLocation' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/oci/ai_language/models/create_job_details.rb', line 57 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'display_name': :'String', 'description': :'String', 'compartment_id': :'String', 'input_location': :'OCI::AiLanguage::Models::InputLocation', 'input_configuration': :'OCI::AiLanguage::Models::InputConfiguration', 'model_metadata_details': :'Array<OCI::AiLanguage::Models::ModelMetadataDetails>', 'output_location': :'OCI::AiLanguage::Models::ObjectPrefixOutputLocation' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/oci/ai_language/models/create_job_details.rb', line 136 def ==(other) return true if equal?(other) self.class == other.class && display_name == other.display_name && description == other.description && compartment_id == other.compartment_id && input_location == other.input_location && input_configuration == other.input_configuration && == other. && output_location == other.output_location end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/oci/ai_language/models/create_job_details.rb', line 172 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
152 153 154 |
# File 'lib/oci/ai_language/models/create_job_details.rb', line 152 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
161 162 163 |
# File 'lib/oci/ai_language/models/create_job_details.rb', line 161 def hash [display_name, description, compartment_id, input_location, input_configuration, , output_location].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
205 206 207 208 209 210 211 212 213 214 |
# File 'lib/oci/ai_language/models/create_job_details.rb', line 205 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
199 200 201 |
# File 'lib/oci/ai_language/models/create_job_details.rb', line 199 def to_s to_hash.to_s end |