Class: OCI::GenerativeAiAgent::Models::CreateAgentEndpointDetails
- Inherits:
-
Object
- Object
- OCI::GenerativeAiAgent::Models::CreateAgentEndpointDetails
- Defined in:
- lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb
Overview
The data to create an endpoint.
Instance Attribute Summary collapse
-
#agent_id ⇒ String
[Required] The OCID of the agent that this endpoint is associated with.
-
#compartment_id ⇒ String
[Required] The OCID of the compartment to create the endpoint in.
- #content_moderation_config ⇒ OCI::GenerativeAiAgent::Models::ContentModerationConfig
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
An optional description of the endpoint.
-
#display_name ⇒ String
A user-friendly name.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
- #guardrail_config ⇒ OCI::GenerativeAiAgent::Models::GuardrailConfig
- #human_input_config ⇒ OCI::GenerativeAiAgent::Models::HumanInputConfig
-
#metadata ⇒ Hash<String, String>
Key-value pairs to allow additional configurations.
- #output_config ⇒ OCI::GenerativeAiAgent::Models::OutputConfig
- #session_config ⇒ OCI::GenerativeAiAgent::Models::SessionConfig
-
#should_enable_citation ⇒ BOOLEAN
Whether to show citations in the chat result.
-
#should_enable_multi_language ⇒ BOOLEAN
Whether to enable multi-language for chat.
-
#should_enable_session ⇒ BOOLEAN
Whether or not to enable Session-based chat.
-
#should_enable_trace ⇒ BOOLEAN
Whether to show traces in the chat result.
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 = {}) ⇒ CreateAgentEndpointDetails
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 = {}) ⇒ CreateAgentEndpointDetails
Initializes the object
150 151 152 153 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 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 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 150 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.agent_id = attributes[:'agentId'] if attributes[:'agentId'] raise 'You cannot provide both :agentId and :agent_id' if attributes.key?(:'agentId') && attributes.key?(:'agent_id') self.agent_id = attributes[:'agent_id'] if attributes[:'agent_id'] self.content_moderation_config = attributes[:'contentModerationConfig'] if attributes[:'contentModerationConfig'] raise 'You cannot provide both :contentModerationConfig and :content_moderation_config' if attributes.key?(:'contentModerationConfig') && attributes.key?(:'content_moderation_config') self.content_moderation_config = attributes[:'content_moderation_config'] if attributes[:'content_moderation_config'] self.guardrail_config = attributes[:'guardrailConfig'] if attributes[:'guardrailConfig'] raise 'You cannot provide both :guardrailConfig and :guardrail_config' if attributes.key?(:'guardrailConfig') && attributes.key?(:'guardrail_config') self.guardrail_config = attributes[:'guardrail_config'] if attributes[:'guardrail_config'] self. = attributes[:'metadata'] if attributes[:'metadata'] self.human_input_config = attributes[:'humanInputConfig'] if attributes[:'humanInputConfig'] raise 'You cannot provide both :humanInputConfig and :human_input_config' if attributes.key?(:'humanInputConfig') && attributes.key?(:'human_input_config') self.human_input_config = attributes[:'human_input_config'] if attributes[:'human_input_config'] self.output_config = attributes[:'outputConfig'] if attributes[:'outputConfig'] raise 'You cannot provide both :outputConfig and :output_config' if attributes.key?(:'outputConfig') && attributes.key?(:'output_config') self.output_config = attributes[:'output_config'] if attributes[:'output_config'] self.should_enable_trace = attributes[:'shouldEnableTrace'] unless attributes[:'shouldEnableTrace'].nil? self.should_enable_trace = false if should_enable_trace.nil? && !attributes.key?(:'shouldEnableTrace') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :shouldEnableTrace and :should_enable_trace' if attributes.key?(:'shouldEnableTrace') && attributes.key?(:'should_enable_trace') self.should_enable_trace = attributes[:'should_enable_trace'] unless attributes[:'should_enable_trace'].nil? self.should_enable_trace = false if should_enable_trace.nil? && !attributes.key?(:'shouldEnableTrace') && !attributes.key?(:'should_enable_trace') # rubocop:disable Style/StringLiterals self.should_enable_citation = attributes[:'shouldEnableCitation'] unless attributes[:'shouldEnableCitation'].nil? self.should_enable_citation = false if should_enable_citation.nil? && !attributes.key?(:'shouldEnableCitation') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :shouldEnableCitation and :should_enable_citation' if attributes.key?(:'shouldEnableCitation') && attributes.key?(:'should_enable_citation') self.should_enable_citation = attributes[:'should_enable_citation'] unless attributes[:'should_enable_citation'].nil? self.should_enable_citation = false if should_enable_citation.nil? && !attributes.key?(:'shouldEnableCitation') && !attributes.key?(:'should_enable_citation') # rubocop:disable Style/StringLiterals self.should_enable_session = attributes[:'shouldEnableSession'] unless attributes[:'shouldEnableSession'].nil? self.should_enable_session = true if should_enable_session.nil? && !attributes.key?(:'shouldEnableSession') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :shouldEnableSession and :should_enable_session' if attributes.key?(:'shouldEnableSession') && attributes.key?(:'should_enable_session') self.should_enable_session = attributes[:'should_enable_session'] unless attributes[:'should_enable_session'].nil? self.should_enable_session = true if should_enable_session.nil? && !attributes.key?(:'shouldEnableSession') && !attributes.key?(:'should_enable_session') # rubocop:disable Style/StringLiterals self.should_enable_multi_language = attributes[:'shouldEnableMultiLanguage'] unless attributes[:'shouldEnableMultiLanguage'].nil? self.should_enable_multi_language = false if should_enable_multi_language.nil? && !attributes.key?(:'shouldEnableMultiLanguage') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :shouldEnableMultiLanguage and :should_enable_multi_language' if attributes.key?(:'shouldEnableMultiLanguage') && attributes.key?(:'should_enable_multi_language') self.should_enable_multi_language = attributes[:'should_enable_multi_language'] unless attributes[:'should_enable_multi_language'].nil? self.should_enable_multi_language = false if should_enable_multi_language.nil? && !attributes.key?(:'shouldEnableMultiLanguage') && !attributes.key?(:'should_enable_multi_language') # rubocop:disable Style/StringLiterals self.session_config = attributes[:'sessionConfig'] if attributes[:'sessionConfig'] raise 'You cannot provide both :sessionConfig and :session_config' if attributes.key?(:'sessionConfig') && attributes.key?(:'session_config') self.session_config = attributes[:'session_config'] if attributes[:'session_config'] 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. = 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
#agent_id ⇒ String
[Required] The OCID of the agent that this endpoint is associated with.
22 23 24 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 22 def agent_id @agent_id end |
#compartment_id ⇒ String
[Required] The OCID of the compartment to create the endpoint in.
62 63 64 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 62 def compartment_id @compartment_id end |
#content_moderation_config ⇒ OCI::GenerativeAiAgent::Models::ContentModerationConfig
25 26 27 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 25 def content_moderation_config @content_moderation_config end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {\"Operations\": {\"CostCenter\": \"42\"}}
78 79 80 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 78 def @defined_tags end |
#description ⇒ String
An optional description of the endpoint.
18 19 20 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 18 def description @description end |
#display_name ⇒ String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
14 15 16 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 14 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example: {\"Department\": \"Finance\"}
70 71 72 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 70 def @freeform_tags end |
#guardrail_config ⇒ OCI::GenerativeAiAgent::Models::GuardrailConfig
28 29 30 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 28 def guardrail_config @guardrail_config end |
#human_input_config ⇒ OCI::GenerativeAiAgent::Models::HumanInputConfig
35 36 37 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 35 def human_input_config @human_input_config end |
#metadata ⇒ Hash<String, String>
Key-value pairs to allow additional configurations.
32 33 34 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 32 def @metadata end |
#output_config ⇒ OCI::GenerativeAiAgent::Models::OutputConfig
38 39 40 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 38 def output_config @output_config end |
#session_config ⇒ OCI::GenerativeAiAgent::Models::SessionConfig
57 58 59 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 57 def session_config @session_config end |
#should_enable_citation ⇒ BOOLEAN
Whether to show citations in the chat result.
46 47 48 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 46 def should_enable_citation @should_enable_citation end |
#should_enable_multi_language ⇒ BOOLEAN
Whether to enable multi-language for chat.
54 55 56 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 54 def should_enable_multi_language @should_enable_multi_language end |
#should_enable_session ⇒ BOOLEAN
Whether or not to enable Session-based chat.
50 51 52 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 50 def should_enable_session @should_enable_session end |
#should_enable_trace ⇒ BOOLEAN
Whether to show traces in the chat result.
42 43 44 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 42 def should_enable_trace @should_enable_trace end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 81 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'display_name': :'displayName', 'description': :'description', 'agent_id': :'agentId', 'content_moderation_config': :'contentModerationConfig', 'guardrail_config': :'guardrailConfig', 'metadata': :'metadata', 'human_input_config': :'humanInputConfig', 'output_config': :'outputConfig', 'should_enable_trace': :'shouldEnableTrace', 'should_enable_citation': :'shouldEnableCitation', 'should_enable_session': :'shouldEnableSession', 'should_enable_multi_language': :'shouldEnableMultiLanguage', 'session_config': :'sessionConfig', 'compartment_id': :'compartmentId', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 105 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'display_name': :'String', 'description': :'String', 'agent_id': :'String', 'content_moderation_config': :'OCI::GenerativeAiAgent::Models::ContentModerationConfig', 'guardrail_config': :'OCI::GenerativeAiAgent::Models::GuardrailConfig', 'metadata': :'Hash<String, String>', 'human_input_config': :'OCI::GenerativeAiAgent::Models::HumanInputConfig', 'output_config': :'OCI::GenerativeAiAgent::Models::OutputConfig', 'should_enable_trace': :'BOOLEAN', 'should_enable_citation': :'BOOLEAN', 'should_enable_session': :'BOOLEAN', 'should_enable_multi_language': :'BOOLEAN', 'session_config': :'OCI::GenerativeAiAgent::Models::SessionConfig', 'compartment_id': :'String', '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.
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 260 def ==(other) return true if equal?(other) self.class == other.class && display_name == other.display_name && description == other.description && agent_id == other.agent_id && content_moderation_config == other.content_moderation_config && guardrail_config == other.guardrail_config && == other. && human_input_config == other.human_input_config && output_config == other.output_config && should_enable_trace == other.should_enable_trace && should_enable_citation == other.should_enable_citation && should_enable_session == other.should_enable_session && should_enable_multi_language == other.should_enable_multi_language && session_config == other.session_config && compartment_id == other.compartment_id && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 305 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
285 286 287 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 285 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
294 295 296 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 294 def hash [display_name, description, agent_id, content_moderation_config, guardrail_config, , human_input_config, output_config, should_enable_trace, should_enable_citation, should_enable_session, should_enable_multi_language, session_config, compartment_id, , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
338 339 340 341 342 343 344 345 346 347 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 338 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
332 333 334 |
# File 'lib/oci/generative_ai_agent/models/create_agent_endpoint_details.rb', line 332 def to_s to_hash.to_s end |