Class: Google::Apis::CesV1::WidgetTool

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/ces_v1/classes.rb,
lib/google/apis/ces_v1/representations.rb,
lib/google/apis/ces_v1/representations.rb

Overview

Represents a widget tool that the agent can invoke. When the tool is chosen by the agent, agent will return the widget to the client. The client is responsible for processing the widget and generating the next user query to continue the interaction with the agent.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ WidgetTool

Returns a new instance of WidgetTool.



7017
7018
7019
# File 'lib/google/apis/ces_v1/classes.rb', line 7017

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#data_mappingGoogle::Apis::CesV1::WidgetToolDataMapping

Configuration for mapping data from a source tool to the widget's input parameters. Corresponds to the JSON property dataMapping



6984
6985
6986
# File 'lib/google/apis/ces_v1/classes.rb', line 6984

def data_mapping
  @data_mapping
end

#descriptionString

Optional. The description of the widget tool. Corresponds to the JSON property description

Returns:

  • (String)


6989
6990
6991
# File 'lib/google/apis/ces_v1/classes.rb', line 6989

def description
  @description
end

#nameString

Required. The display name of the widget tool. Corresponds to the JSON property name

Returns:

  • (String)


6994
6995
6996
# File 'lib/google/apis/ces_v1/classes.rb', line 6994

def name
  @name
end

#parametersGoogle::Apis::CesV1::Schema

Represents a select subset of an OpenAPI 3.0 schema object. Corresponds to the JSON property parameters



6999
7000
7001
# File 'lib/google/apis/ces_v1/classes.rb', line 6999

def parameters
  @parameters
end

#text_response_configGoogle::Apis::CesV1::WidgetToolTextResponseConfig

Configuration for the text response returned with the widget. Corresponds to the JSON property textResponseConfig



7004
7005
7006
# File 'lib/google/apis/ces_v1/classes.rb', line 7004

def text_response_config
  @text_response_config
end

#ui_configHash<String,Object>

Optional. Configuration for rendering the widget. Corresponds to the JSON property uiConfig

Returns:

  • (Hash<String,Object>)


7009
7010
7011
# File 'lib/google/apis/ces_v1/classes.rb', line 7009

def ui_config
  @ui_config
end

#widget_typeString

Optional. The type of the widget tool. If not specified, the default type will be CUSTOMIZED. Corresponds to the JSON property widgetType

Returns:

  • (String)


7015
7016
7017
# File 'lib/google/apis/ces_v1/classes.rb', line 7015

def widget_type
  @widget_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7022
7023
7024
7025
7026
7027
7028
7029
7030
# File 'lib/google/apis/ces_v1/classes.rb', line 7022

def update!(**args)
  @data_mapping = args[:data_mapping] if args.key?(:data_mapping)
  @description = args[:description] if args.key?(:description)
  @name = args[:name] if args.key?(:name)
  @parameters = args[:parameters] if args.key?(:parameters)
  @text_response_config = args[:text_response_config] if args.key?(:text_response_config)
  @ui_config = args[:ui_config] if args.key?(:ui_config)
  @widget_type = args[:widget_type] if args.key?(:widget_type)
end