Class: OCI::GenerativeAiAgent::Models::AgentEndpoint
- Inherits:
-
Object
- Object
- OCI::GenerativeAiAgent::Models::AgentEndpoint
- Defined in:
- lib/oci/generative_ai_agent/models/agent_endpoint.rb
Overview
The endpoint to access a deployed agent.
To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.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
-
#agent_id ⇒ String
[Required] The OCID of the agent that this endpoint is associated with.
-
#compartment_id ⇒ String
[Required] The OCID of the compartment.
- #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
-
#id ⇒ String
[Required] The OCID of the endpoint.
-
#lifecycle_details ⇒ String
A message that describes the current state of the endpoint in more detail.
-
#lifecycle_state ⇒ String
[Required] The current state of the endpoint.
-
#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.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource.
-
#time_created ⇒ DateTime
[Required] The date and time the AgentEndpoint was created, in the format defined by RFC 3339.
-
#time_updated ⇒ DateTime
The date and time the endpoint was updated, in the format defined by RFC 3339.
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 = {}) ⇒ AgentEndpoint
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 = {}) ⇒ AgentEndpoint
Initializes the object
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 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 215 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.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.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.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. = 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
#agent_id ⇒ String
[Required] The OCID of the agent that this endpoint is associated with.
43 44 45 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 43 def agent_id @agent_id end |
#compartment_id ⇒ String
[Required] The OCID of the compartment.
39 40 41 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 39 def compartment_id @compartment_id end |
#content_moderation_config ⇒ OCI::GenerativeAiAgent::Models::ContentModerationConfig
46 47 48 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 46 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\"}}
118 119 120 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 118 def @defined_tags end |
#description ⇒ String
An optional description of the endpoint.
35 36 37 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 35 def description @description end |
#display_name ⇒ String
A user-friendly name. Does not have to be unique, and it's changeable.
31 32 33 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 31 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\"}
110 111 112 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 110 def @freeform_tags end |
#guardrail_config ⇒ OCI::GenerativeAiAgent::Models::GuardrailConfig
49 50 51 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 49 def guardrail_config @guardrail_config end |
#human_input_config ⇒ OCI::GenerativeAiAgent::Models::HumanInputConfig
56 57 58 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 56 def human_input_config @human_input_config end |
#id ⇒ String
[Required] The OCID of the endpoint.
27 28 29 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 27 def id @id end |
#lifecycle_details ⇒ String
A message that describes the current state of the endpoint in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
102 103 104 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 102 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the endpoint.
96 97 98 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 96 def lifecycle_state @lifecycle_state end |
#metadata ⇒ Hash<String, String>
Key-value pairs to allow additional configurations.
53 54 55 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 53 def @metadata end |
#output_config ⇒ OCI::GenerativeAiAgent::Models::OutputConfig
59 60 61 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 59 def output_config @output_config end |
#session_config ⇒ OCI::GenerativeAiAgent::Models::SessionConfig
78 79 80 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 78 def session_config @session_config end |
#should_enable_citation ⇒ BOOLEAN
Whether to show citations in the chat result.
67 68 69 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 67 def should_enable_citation @should_enable_citation end |
#should_enable_multi_language ⇒ BOOLEAN
Whether to enable multi-language for chat.
75 76 77 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 75 def should_enable_multi_language @should_enable_multi_language end |
#should_enable_session ⇒ BOOLEAN
Whether or not to enable Session-based chat.
71 72 73 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 71 def should_enable_session @should_enable_session end |
#should_enable_trace ⇒ BOOLEAN
Whether to show traces in the chat result.
63 64 65 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 63 def should_enable_trace @should_enable_trace end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource. Each key is predefined and scoped to a namespace.
Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}
125 126 127 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 125 def @system_tags end |
#time_created ⇒ DateTime
[Required] The date and time the AgentEndpoint was created, in the format defined by RFC 3339.
Example: 2016-08-25T21:10:29.600Z
85 86 87 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 85 def time_created @time_created end |
#time_updated ⇒ DateTime
The date and time the endpoint was updated, in the format defined by RFC 3339.
Example: 2016-08-25T21:10:29.600Z
92 93 94 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 92 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 128 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'display_name': :'displayName', 'description': :'description', 'compartment_id': :'compartmentId', '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', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 158 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'display_name': :'String', 'description': :'String', 'compartment_id': :'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', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'lifecycle_state': :'String', 'lifecycle_details': :'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.
370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 370 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && display_name == other.display_name && description == other.description && compartment_id == other.compartment_id && 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 && time_created == other.time_created && time_updated == other.time_updated && lifecycle_state == other.lifecycle_state && lifecycle_details == other.lifecycle_details && == other. && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 421 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
401 402 403 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 401 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
410 411 412 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 410 def hash [id, display_name, description, compartment_id, 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, time_created, time_updated, lifecycle_state, lifecycle_details, , , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
454 455 456 457 458 459 460 461 462 463 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 454 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
448 449 450 |
# File 'lib/oci/generative_ai_agent/models/agent_endpoint.rb', line 448 def to_s to_hash.to_s end |