Class: Google::Cloud::Ces::V1beta::WidgetTool

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/ces/v1beta/widget_tool.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.

Defined Under Namespace

Modules: WidgetType Classes: DataMapping

Instance Attribute Summary collapse

Instance Attribute Details

#data_mapping::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping

Returns Optional. The mapping that defines how data from a source tool is mapped to the widget's input parameters.

Returns:



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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 'proto_docs/google/cloud/ces/v1beta/widget_tool.rb', line 48

class WidgetTool
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configuration for mapping data from a source tool to the widget's input
  # parameters.
  # @!attribute [rw] source_tool_name
  #   @return [::String]
  #     Optional. The resource name of the tool that provides the data for the
  #     widget (e.g., a search tool or a custom function). Format:
  #     `projects/{project}/locations/{location}/agents/{agent}/tools/{tool}`
  # @!attribute [rw] field_mappings
  #   @return [::Google::Protobuf::Map{::String => ::String}]
  #     Optional. A map of widget input parameter fields to the corresponding
  #     output fields of the source tool.
  # @!attribute [rw] python_function
  #   @return [::Google::Cloud::Ces::V1beta::PythonFunction]
  #     Optional. Configuration for a Python function used to transform the
  #     source tool's output into the widget's input format.
  # @!attribute [rw] mode
  #   @return [::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping::Mode]
  #     Optional. The mode of the data mapping.
  # @!attribute [rw] python_script
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::String]
  #     Deprecated: Use `python_function` instead.
  class DataMapping
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::String]
    class FieldMappingsEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The strategy used to map data from the source tool to the widget.
    module Mode
      # Unspecified mode.
      MODE_UNSPECIFIED = 0

      # Use the `field_mappings` map for data transformation.
      FIELD_MAPPING = 1

      # Use the `python_script` for data transformation.
      PYTHON_SCRIPT = 2
    end
  end

  # All available widget types.
  # New values may be added to this enum in the future.
  module WidgetType
    # Unspecified widget type.
    WIDGET_TYPE_UNSPECIFIED = 0

    # Custom widget type.
    CUSTOM = 1

    # Product carousel widget.
    PRODUCT_CAROUSEL = 2

    # Product details widget.
    PRODUCT_DETAILS = 3

    # Quick actions widget.
    QUICK_ACTIONS = 4

    # Product comparison widget.
    PRODUCT_COMPARISON = 5

    # Advanced product details widget.
    ADVANCED_PRODUCT_DETAILS = 6

    # Short form widget.
    SHORT_FORM = 7

    # Overall satisfaction widget.
    OVERALL_SATISFACTION = 8

    # Order summary widget.
    ORDER_SUMMARY = 9

    # Appointment details widget.
    APPOINTMENT_DETAILS = 10

    # Appointment scheduler widget.
    APPOINTMENT_SCHEDULER = 11

    # Contact form widget.
    CONTACT_FORM = 12
  end
end

#description::String

Returns Optional. The description of the widget tool.

Returns:

  • (::String)

    Optional. The description of the widget tool.



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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 'proto_docs/google/cloud/ces/v1beta/widget_tool.rb', line 48

class WidgetTool
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configuration for mapping data from a source tool to the widget's input
  # parameters.
  # @!attribute [rw] source_tool_name
  #   @return [::String]
  #     Optional. The resource name of the tool that provides the data for the
  #     widget (e.g., a search tool or a custom function). Format:
  #     `projects/{project}/locations/{location}/agents/{agent}/tools/{tool}`
  # @!attribute [rw] field_mappings
  #   @return [::Google::Protobuf::Map{::String => ::String}]
  #     Optional. A map of widget input parameter fields to the corresponding
  #     output fields of the source tool.
  # @!attribute [rw] python_function
  #   @return [::Google::Cloud::Ces::V1beta::PythonFunction]
  #     Optional. Configuration for a Python function used to transform the
  #     source tool's output into the widget's input format.
  # @!attribute [rw] mode
  #   @return [::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping::Mode]
  #     Optional. The mode of the data mapping.
  # @!attribute [rw] python_script
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::String]
  #     Deprecated: Use `python_function` instead.
  class DataMapping
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::String]
    class FieldMappingsEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The strategy used to map data from the source tool to the widget.
    module Mode
      # Unspecified mode.
      MODE_UNSPECIFIED = 0

      # Use the `field_mappings` map for data transformation.
      FIELD_MAPPING = 1

      # Use the `python_script` for data transformation.
      PYTHON_SCRIPT = 2
    end
  end

  # All available widget types.
  # New values may be added to this enum in the future.
  module WidgetType
    # Unspecified widget type.
    WIDGET_TYPE_UNSPECIFIED = 0

    # Custom widget type.
    CUSTOM = 1

    # Product carousel widget.
    PRODUCT_CAROUSEL = 2

    # Product details widget.
    PRODUCT_DETAILS = 3

    # Quick actions widget.
    QUICK_ACTIONS = 4

    # Product comparison widget.
    PRODUCT_COMPARISON = 5

    # Advanced product details widget.
    ADVANCED_PRODUCT_DETAILS = 6

    # Short form widget.
    SHORT_FORM = 7

    # Overall satisfaction widget.
    OVERALL_SATISFACTION = 8

    # Order summary widget.
    ORDER_SUMMARY = 9

    # Appointment details widget.
    APPOINTMENT_DETAILS = 10

    # Appointment scheduler widget.
    APPOINTMENT_SCHEDULER = 11

    # Contact form widget.
    CONTACT_FORM = 12
  end
end

#name::String

Returns Required. The display name of the widget tool.

Returns:

  • (::String)

    Required. The display name of the widget tool.



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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 'proto_docs/google/cloud/ces/v1beta/widget_tool.rb', line 48

class WidgetTool
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configuration for mapping data from a source tool to the widget's input
  # parameters.
  # @!attribute [rw] source_tool_name
  #   @return [::String]
  #     Optional. The resource name of the tool that provides the data for the
  #     widget (e.g., a search tool or a custom function). Format:
  #     `projects/{project}/locations/{location}/agents/{agent}/tools/{tool}`
  # @!attribute [rw] field_mappings
  #   @return [::Google::Protobuf::Map{::String => ::String}]
  #     Optional. A map of widget input parameter fields to the corresponding
  #     output fields of the source tool.
  # @!attribute [rw] python_function
  #   @return [::Google::Cloud::Ces::V1beta::PythonFunction]
  #     Optional. Configuration for a Python function used to transform the
  #     source tool's output into the widget's input format.
  # @!attribute [rw] mode
  #   @return [::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping::Mode]
  #     Optional. The mode of the data mapping.
  # @!attribute [rw] python_script
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::String]
  #     Deprecated: Use `python_function` instead.
  class DataMapping
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::String]
    class FieldMappingsEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The strategy used to map data from the source tool to the widget.
    module Mode
      # Unspecified mode.
      MODE_UNSPECIFIED = 0

      # Use the `field_mappings` map for data transformation.
      FIELD_MAPPING = 1

      # Use the `python_script` for data transformation.
      PYTHON_SCRIPT = 2
    end
  end

  # All available widget types.
  # New values may be added to this enum in the future.
  module WidgetType
    # Unspecified widget type.
    WIDGET_TYPE_UNSPECIFIED = 0

    # Custom widget type.
    CUSTOM = 1

    # Product carousel widget.
    PRODUCT_CAROUSEL = 2

    # Product details widget.
    PRODUCT_DETAILS = 3

    # Quick actions widget.
    QUICK_ACTIONS = 4

    # Product comparison widget.
    PRODUCT_COMPARISON = 5

    # Advanced product details widget.
    ADVANCED_PRODUCT_DETAILS = 6

    # Short form widget.
    SHORT_FORM = 7

    # Overall satisfaction widget.
    OVERALL_SATISFACTION = 8

    # Order summary widget.
    ORDER_SUMMARY = 9

    # Appointment details widget.
    APPOINTMENT_DETAILS = 10

    # Appointment scheduler widget.
    APPOINTMENT_SCHEDULER = 11

    # Contact form widget.
    CONTACT_FORM = 12
  end
end

#parameters::Google::Cloud::Ces::V1beta::Schema

Returns Optional. The input parameters of the widget tool.

Returns:



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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 'proto_docs/google/cloud/ces/v1beta/widget_tool.rb', line 48

class WidgetTool
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configuration for mapping data from a source tool to the widget's input
  # parameters.
  # @!attribute [rw] source_tool_name
  #   @return [::String]
  #     Optional. The resource name of the tool that provides the data for the
  #     widget (e.g., a search tool or a custom function). Format:
  #     `projects/{project}/locations/{location}/agents/{agent}/tools/{tool}`
  # @!attribute [rw] field_mappings
  #   @return [::Google::Protobuf::Map{::String => ::String}]
  #     Optional. A map of widget input parameter fields to the corresponding
  #     output fields of the source tool.
  # @!attribute [rw] python_function
  #   @return [::Google::Cloud::Ces::V1beta::PythonFunction]
  #     Optional. Configuration for a Python function used to transform the
  #     source tool's output into the widget's input format.
  # @!attribute [rw] mode
  #   @return [::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping::Mode]
  #     Optional. The mode of the data mapping.
  # @!attribute [rw] python_script
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::String]
  #     Deprecated: Use `python_function` instead.
  class DataMapping
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::String]
    class FieldMappingsEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The strategy used to map data from the source tool to the widget.
    module Mode
      # Unspecified mode.
      MODE_UNSPECIFIED = 0

      # Use the `field_mappings` map for data transformation.
      FIELD_MAPPING = 1

      # Use the `python_script` for data transformation.
      PYTHON_SCRIPT = 2
    end
  end

  # All available widget types.
  # New values may be added to this enum in the future.
  module WidgetType
    # Unspecified widget type.
    WIDGET_TYPE_UNSPECIFIED = 0

    # Custom widget type.
    CUSTOM = 1

    # Product carousel widget.
    PRODUCT_CAROUSEL = 2

    # Product details widget.
    PRODUCT_DETAILS = 3

    # Quick actions widget.
    QUICK_ACTIONS = 4

    # Product comparison widget.
    PRODUCT_COMPARISON = 5

    # Advanced product details widget.
    ADVANCED_PRODUCT_DETAILS = 6

    # Short form widget.
    SHORT_FORM = 7

    # Overall satisfaction widget.
    OVERALL_SATISFACTION = 8

    # Order summary widget.
    ORDER_SUMMARY = 9

    # Appointment details widget.
    APPOINTMENT_DETAILS = 10

    # Appointment scheduler widget.
    APPOINTMENT_SCHEDULER = 11

    # Contact form widget.
    CONTACT_FORM = 12
  end
end

#ui_config::Google::Protobuf::Struct

Returns Optional. Configuration for rendering the widget.

Returns:



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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 'proto_docs/google/cloud/ces/v1beta/widget_tool.rb', line 48

class WidgetTool
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configuration for mapping data from a source tool to the widget's input
  # parameters.
  # @!attribute [rw] source_tool_name
  #   @return [::String]
  #     Optional. The resource name of the tool that provides the data for the
  #     widget (e.g., a search tool or a custom function). Format:
  #     `projects/{project}/locations/{location}/agents/{agent}/tools/{tool}`
  # @!attribute [rw] field_mappings
  #   @return [::Google::Protobuf::Map{::String => ::String}]
  #     Optional. A map of widget input parameter fields to the corresponding
  #     output fields of the source tool.
  # @!attribute [rw] python_function
  #   @return [::Google::Cloud::Ces::V1beta::PythonFunction]
  #     Optional. Configuration for a Python function used to transform the
  #     source tool's output into the widget's input format.
  # @!attribute [rw] mode
  #   @return [::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping::Mode]
  #     Optional. The mode of the data mapping.
  # @!attribute [rw] python_script
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::String]
  #     Deprecated: Use `python_function` instead.
  class DataMapping
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::String]
    class FieldMappingsEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The strategy used to map data from the source tool to the widget.
    module Mode
      # Unspecified mode.
      MODE_UNSPECIFIED = 0

      # Use the `field_mappings` map for data transformation.
      FIELD_MAPPING = 1

      # Use the `python_script` for data transformation.
      PYTHON_SCRIPT = 2
    end
  end

  # All available widget types.
  # New values may be added to this enum in the future.
  module WidgetType
    # Unspecified widget type.
    WIDGET_TYPE_UNSPECIFIED = 0

    # Custom widget type.
    CUSTOM = 1

    # Product carousel widget.
    PRODUCT_CAROUSEL = 2

    # Product details widget.
    PRODUCT_DETAILS = 3

    # Quick actions widget.
    QUICK_ACTIONS = 4

    # Product comparison widget.
    PRODUCT_COMPARISON = 5

    # Advanced product details widget.
    ADVANCED_PRODUCT_DETAILS = 6

    # Short form widget.
    SHORT_FORM = 7

    # Overall satisfaction widget.
    OVERALL_SATISFACTION = 8

    # Order summary widget.
    ORDER_SUMMARY = 9

    # Appointment details widget.
    APPOINTMENT_DETAILS = 10

    # Appointment scheduler widget.
    APPOINTMENT_SCHEDULER = 11

    # Contact form widget.
    CONTACT_FORM = 12
  end
end

#widget_type::Google::Cloud::Ces::V1beta::WidgetTool::WidgetType

Returns Optional. The type of the widget tool. If not specified, the default type will be CUSTOMIZED.

Returns:



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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 'proto_docs/google/cloud/ces/v1beta/widget_tool.rb', line 48

class WidgetTool
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configuration for mapping data from a source tool to the widget's input
  # parameters.
  # @!attribute [rw] source_tool_name
  #   @return [::String]
  #     Optional. The resource name of the tool that provides the data for the
  #     widget (e.g., a search tool or a custom function). Format:
  #     `projects/{project}/locations/{location}/agents/{agent}/tools/{tool}`
  # @!attribute [rw] field_mappings
  #   @return [::Google::Protobuf::Map{::String => ::String}]
  #     Optional. A map of widget input parameter fields to the corresponding
  #     output fields of the source tool.
  # @!attribute [rw] python_function
  #   @return [::Google::Cloud::Ces::V1beta::PythonFunction]
  #     Optional. Configuration for a Python function used to transform the
  #     source tool's output into the widget's input format.
  # @!attribute [rw] mode
  #   @return [::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping::Mode]
  #     Optional. The mode of the data mapping.
  # @!attribute [rw] python_script
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::String]
  #     Deprecated: Use `python_function` instead.
  class DataMapping
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::String]
    class FieldMappingsEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The strategy used to map data from the source tool to the widget.
    module Mode
      # Unspecified mode.
      MODE_UNSPECIFIED = 0

      # Use the `field_mappings` map for data transformation.
      FIELD_MAPPING = 1

      # Use the `python_script` for data transformation.
      PYTHON_SCRIPT = 2
    end
  end

  # All available widget types.
  # New values may be added to this enum in the future.
  module WidgetType
    # Unspecified widget type.
    WIDGET_TYPE_UNSPECIFIED = 0

    # Custom widget type.
    CUSTOM = 1

    # Product carousel widget.
    PRODUCT_CAROUSEL = 2

    # Product details widget.
    PRODUCT_DETAILS = 3

    # Quick actions widget.
    QUICK_ACTIONS = 4

    # Product comparison widget.
    PRODUCT_COMPARISON = 5

    # Advanced product details widget.
    ADVANCED_PRODUCT_DETAILS = 6

    # Short form widget.
    SHORT_FORM = 7

    # Overall satisfaction widget.
    OVERALL_SATISFACTION = 8

    # Order summary widget.
    ORDER_SUMMARY = 9

    # Appointment details widget.
    APPOINTMENT_DETAILS = 10

    # Appointment scheduler widget.
    APPOINTMENT_SCHEDULER = 11

    # Contact form widget.
    CONTACT_FORM = 12
  end
end