Class: OCI::GenerativeAiAgent::Models::AgentEndpointSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb

Overview

Summary information about an endpoint.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AgentEndpointSummary

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



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
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
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 202

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.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']

  raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')

  self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']

  self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']

  raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')

  self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']

  self.system_tags = attributes[:'systemTags'] if attributes[:'systemTags']

  raise 'You cannot provide both :systemTags and :system_tags' if attributes.key?(:'systemTags') && attributes.key?(:'system_tags')

  self.system_tags = attributes[:'system_tags'] if attributes[:'system_tags']
end

Instance Attribute Details

#agent_idString

[Required] The OCID of the agent that this AgentEndpoint is associated with.

Returns:

  • (String)


30
31
32
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 30

def agent_id
  @agent_id
end

#compartment_idString

[Required] The OCID of the compartment.

Returns:

  • (String)


26
27
28
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 26

def compartment_id
  @compartment_id
end

#content_moderation_configOCI::GenerativeAiAgent::Models::ContentModerationConfig



33
34
35
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 33

def content_moderation_config
  @content_moderation_config
end

#defined_tagsHash<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\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


105
106
107
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 105

def defined_tags
  @defined_tags
end

#descriptionString

An optional description of the endpoint.

Returns:

  • (String)


22
23
24
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 22

def description
  @description
end

#display_nameString

A user-friendly name. Does not have to be unique, and it's changeable.

Returns:

  • (String)


18
19
20
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 18

def display_name
  @display_name
end

#freeform_tagsHash<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\"}

Returns:

  • (Hash<String, String>)


97
98
99
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 97

def freeform_tags
  @freeform_tags
end

#guardrail_configOCI::GenerativeAiAgent::Models::GuardrailConfig



36
37
38
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 36

def guardrail_config
  @guardrail_config
end

#human_input_configOCI::GenerativeAiAgent::Models::HumanInputConfig



43
44
45
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 43

def human_input_config
  @human_input_config
end

#idString

[Required] The OCID of the AgentEndpoint.

Returns:

  • (String)


14
15
16
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 14

def id
  @id
end

#lifecycle_detailsString

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.

Returns:

  • (String)


89
90
91
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 89

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] The current state of the endpoint.

Returns:

  • (String)


83
84
85
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 83

def lifecycle_state
  @lifecycle_state
end

#metadataHash<String, String>

Key-value pairs to allow additional configurations.

Returns:

  • (Hash<String, String>)


40
41
42
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 40

def 
  @metadata
end

#output_configOCI::GenerativeAiAgent::Models::OutputConfig



46
47
48
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 46

def output_config
  @output_config
end

#session_configOCI::GenerativeAiAgent::Models::SessionConfig



65
66
67
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 65

def session_config
  @session_config
end

#should_enable_citationBOOLEAN

Whether to show citations in the chat result.

Returns:

  • (BOOLEAN)


54
55
56
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 54

def should_enable_citation
  @should_enable_citation
end

#should_enable_multi_languageBOOLEAN

Whether to enable multi-language for chat.

Returns:

  • (BOOLEAN)


62
63
64
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 62

def should_enable_multi_language
  @should_enable_multi_language
end

#should_enable_sessionBOOLEAN

Whether or not to enable Session-based chat.

Returns:

  • (BOOLEAN)


58
59
60
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 58

def should_enable_session
  @should_enable_session
end

#should_enable_traceBOOLEAN

Whether to show traces in the chat result.

Returns:

  • (BOOLEAN)


50
51
52
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 50

def should_enable_trace
  @should_enable_trace
end

#system_tagsHash<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\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


112
113
114
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 112

def system_tags
  @system_tags
end

#time_createdDateTime

[Required] The date and time the endpoint was created, in the format defined by RFC 3339.

Example: 2016-08-25T21:10:29.600Z

Returns:

  • (DateTime)


72
73
74
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 72

def time_created
  @time_created
end

#time_updatedDateTime

The date and time the AgentEndpoint was updated, in the format defined by RFC 3339.

Example: 2016-08-25T21:10:29.600Z

Returns:

  • (DateTime)


79
80
81
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 79

def time_updated
  @time_updated
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



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
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 115

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_typesObject

Attribute type mapping.



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 145

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.

Parameters:

  • other (Object)

    the other object to be compared



344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 344

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 &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags &&
    system_tags == other.system_tags
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 395

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


375
376
377
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 375

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



384
385
386
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 384

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, freeform_tags, defined_tags, system_tags].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



428
429
430
431
432
433
434
435
436
437
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 428

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



422
423
424
# File 'lib/oci/generative_ai_agent/models/agent_endpoint_summary.rb', line 422

def to_s
  to_hash.to_s
end