Class: OCI::GenerativeAiAgent::Models::UpdateAgentEndpointDetails

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

Overview

The data to update an endpoint.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ UpdateAgentEndpointDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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

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.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_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.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']
end

Instance Attribute Details

#content_moderation_configOCI::GenerativeAiAgent::Models::ContentModerationConfig



21
22
23
# File 'lib/oci/generative_ai_agent/models/update_agent_endpoint_details.rb', line 21

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>>)


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

def defined_tags
  @defined_tags
end

#descriptionString

An optional description of the AgentEndpoint.

Returns:

  • (String)


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

def description
  @description
end

#display_nameString

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

Returns:

  • (String)


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

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>)


57
58
59
# File 'lib/oci/generative_ai_agent/models/update_agent_endpoint_details.rb', line 57

def freeform_tags
  @freeform_tags
end

#guardrail_configOCI::GenerativeAiAgent::Models::GuardrailConfig



24
25
26
# File 'lib/oci/generative_ai_agent/models/update_agent_endpoint_details.rb', line 24

def guardrail_config
  @guardrail_config
end

#human_input_configOCI::GenerativeAiAgent::Models::HumanInputConfig



31
32
33
# File 'lib/oci/generative_ai_agent/models/update_agent_endpoint_details.rb', line 31

def human_input_config
  @human_input_config
end

#metadataHash<String, String>

Key-value pairs to allow additional configurations.

Returns:

  • (Hash<String, String>)


28
29
30
# File 'lib/oci/generative_ai_agent/models/update_agent_endpoint_details.rb', line 28

def 
  @metadata
end

#output_configOCI::GenerativeAiAgent::Models::OutputConfig



34
35
36
# File 'lib/oci/generative_ai_agent/models/update_agent_endpoint_details.rb', line 34

def output_config
  @output_config
end

#session_configOCI::GenerativeAiAgent::Models::SessionConfig



49
50
51
# File 'lib/oci/generative_ai_agent/models/update_agent_endpoint_details.rb', line 49

def session_config
  @session_config
end

#should_enable_citationBOOLEAN

Whether to show citations in the chat result.

Returns:

  • (BOOLEAN)


42
43
44
# File 'lib/oci/generative_ai_agent/models/update_agent_endpoint_details.rb', line 42

def should_enable_citation
  @should_enable_citation
end

#should_enable_multi_languageBOOLEAN

Whether to enable multi-language for chat.

Returns:

  • (BOOLEAN)


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

def should_enable_multi_language
  @should_enable_multi_language
end

#should_enable_traceBOOLEAN

Whether to show traces in the chat result.

Returns:

  • (BOOLEAN)


38
39
40
# File 'lib/oci/generative_ai_agent/models/update_agent_endpoint_details.rb', line 38

def should_enable_trace
  @should_enable_trace
end

Class Method Details

.attribute_mapObject

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



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/oci/generative_ai_agent/models/update_agent_endpoint_details.rb', line 68

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'display_name': :'displayName',
    'description': :'description',
    '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_multi_language': :'shouldEnableMultiLanguage',
    'session_config': :'sessionConfig',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/oci/generative_ai_agent/models/update_agent_endpoint_details.rb', line 89

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'display_name': :'String',
    'description': :'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_multi_language': :'BOOLEAN',
    'session_config': :'OCI::GenerativeAiAgent::Models::SessionConfig',
    '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.

Parameters:

  • other (Object)

    the other object to be compared



218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/oci/generative_ai_agent/models/update_agent_endpoint_details.rb', line 218

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    display_name == other.display_name &&
    description == other.description &&
    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_multi_language == other.should_enable_multi_language &&
    session_config == other.session_config &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_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



260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
# File 'lib/oci/generative_ai_agent/models/update_agent_endpoint_details.rb', line 260

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


240
241
242
# File 'lib/oci/generative_ai_agent/models/update_agent_endpoint_details.rb', line 240

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



249
250
251
# File 'lib/oci/generative_ai_agent/models/update_agent_endpoint_details.rb', line 249

def hash
  [display_name, description, content_moderation_config, guardrail_config, , human_input_config, output_config, should_enable_trace, should_enable_citation, should_enable_multi_language, session_config, freeform_tags, defined_tags].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



293
294
295
296
297
298
299
300
301
302
# File 'lib/oci/generative_ai_agent/models/update_agent_endpoint_details.rb', line 293

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



287
288
289
# File 'lib/oci/generative_ai_agent/models/update_agent_endpoint_details.rb', line 287

def to_s
  to_hash.to_s
end