Class: Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/dialogflow/v2/participant.rb

Overview

Represents a Knowledge Assist answer.

Defined Under Namespace

Classes: AdditionalSuggestedQueryResult, KnowledgeAnswer, SuggestedQuery

Instance Attribute Summary collapse

Instance Attribute Details

#answer_record::String

Returns The name of the answer record. Format: projects/<Project ID>/locations/<location ID>/answer Records/<Answer Record ID>.

Returns:

  • (::String)

    The name of the answer record. Format: projects/<Project ID>/locations/<location ID>/answer Records/<Answer Record ID>.



1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
# File 'proto_docs/google/cloud/dialogflow/v2/participant.rb', line 1525

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

  # Represents a suggested query.
  # @!attribute [rw] query_text
  #   @return [::String]
  #     Suggested query text.
  # @!attribute [rw] search_contexts
  #   @return [::Array<::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::SuggestedQuery::SearchContext>]
  #     Optional. The search contexts for the query.
  class SuggestedQuery
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Search context is information useful for knowledge search that helps
    # enrich the query.
    # Example:
    # search_context {
    #   key: "application name"
    #   value: "DesignApp"
    # }
    # @!attribute [rw] key
    #   @return [::String]
    #     Optional. The key of the search context, e.g. "application name".
    # @!attribute [rw] value
    #   @return [::String]
    #     Optional. The value of the search context, e.g. "DesignApp".
    class SearchContext
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Represents a single suggested query result.
  # @!attribute [r] suggested_query
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::SuggestedQuery]
  #     Output only. The suggested query based on the context.
  # @!attribute [r] answer_record
  #   @return [::String]
  #     Output only. The name of the answer record.
  #     Format: `projects/<Project ID>/locations/<Location
  #     ID>/answerRecords/<Answer Record ID>`
  class AdditionalSuggestedQueryResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Represents an answer from Knowledge. Currently supports FAQ and Generative
  # answers.
  # @!attribute [rw] answer_text
  #   @return [::String]
  #     The piece of text from the `source` that answers this suggested query.
  # @!attribute [rw] faq_source
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::FaqSource]
  #     Populated if the prediction came from FAQ.
  #
  #     Note: The following fields are mutually exclusive: `faq_source`, `generative_source`, `playbook_source`, `event_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] generative_source
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource]
  #     Populated if the prediction was Generative.
  #
  #     Note: The following fields are mutually exclusive: `generative_source`, `faq_source`, `playbook_source`, `event_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] playbook_source
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource]
  #     Populated if the prediction was from Playbook.
  #
  #     Note: The following fields are mutually exclusive: `playbook_source`, `faq_source`, `generative_source`, `event_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] event_source
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::EventSource]
  #     Populated if the prediction was from an event.
  #
  #     Note: The following fields are mutually exclusive: `event_source`, `faq_source`, `generative_source`, `playbook_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class KnowledgeAnswer
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Details about source of FAQ answer.
    # @!attribute [rw] question
    #   @return [::String]
    #     The corresponding FAQ question.
    class FaqSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Details about source of Generative answer.
    # @!attribute [rw] snippets
    #   @return [::Array<::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource::Snippet>]
    #     All snippets used for this Generative Prediction, with their source URI
    #     and data.
    class GenerativeSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Snippet Source for a Generative Prediction.
      # @!attribute [rw] uri
      #   @return [::String]
      #     URI the data is sourced from.
      # @!attribute [rw] text
      #   @return [::String]
      #     Text taken from that URI.
      # @!attribute [rw] title
      #   @return [::String]
      #     Title of the document.
      # @!attribute [rw] metadata
      #   @return [::Google::Protobuf::Struct]
      #     Metadata of the document.
      class Snippet
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Details about source of Event answer.
    # @!attribute [rw] event
    #   @return [::String]
    #     Name of the triggered event.
    # @!attribute [rw] snippets
    #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource]
    #     Sources used in event fulfillment.
    class EventSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end
end

#knowledge_assist_debug_info::Google::Cloud::Dialogflow::V2::KnowledgeAssistDebugInfo

Returns Debug information related to Knowledge Assist feature.

Returns:



1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
# File 'proto_docs/google/cloud/dialogflow/v2/participant.rb', line 1525

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

  # Represents a suggested query.
  # @!attribute [rw] query_text
  #   @return [::String]
  #     Suggested query text.
  # @!attribute [rw] search_contexts
  #   @return [::Array<::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::SuggestedQuery::SearchContext>]
  #     Optional. The search contexts for the query.
  class SuggestedQuery
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Search context is information useful for knowledge search that helps
    # enrich the query.
    # Example:
    # search_context {
    #   key: "application name"
    #   value: "DesignApp"
    # }
    # @!attribute [rw] key
    #   @return [::String]
    #     Optional. The key of the search context, e.g. "application name".
    # @!attribute [rw] value
    #   @return [::String]
    #     Optional. The value of the search context, e.g. "DesignApp".
    class SearchContext
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Represents a single suggested query result.
  # @!attribute [r] suggested_query
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::SuggestedQuery]
  #     Output only. The suggested query based on the context.
  # @!attribute [r] answer_record
  #   @return [::String]
  #     Output only. The name of the answer record.
  #     Format: `projects/<Project ID>/locations/<Location
  #     ID>/answerRecords/<Answer Record ID>`
  class AdditionalSuggestedQueryResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Represents an answer from Knowledge. Currently supports FAQ and Generative
  # answers.
  # @!attribute [rw] answer_text
  #   @return [::String]
  #     The piece of text from the `source` that answers this suggested query.
  # @!attribute [rw] faq_source
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::FaqSource]
  #     Populated if the prediction came from FAQ.
  #
  #     Note: The following fields are mutually exclusive: `faq_source`, `generative_source`, `playbook_source`, `event_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] generative_source
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource]
  #     Populated if the prediction was Generative.
  #
  #     Note: The following fields are mutually exclusive: `generative_source`, `faq_source`, `playbook_source`, `event_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] playbook_source
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource]
  #     Populated if the prediction was from Playbook.
  #
  #     Note: The following fields are mutually exclusive: `playbook_source`, `faq_source`, `generative_source`, `event_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] event_source
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::EventSource]
  #     Populated if the prediction was from an event.
  #
  #     Note: The following fields are mutually exclusive: `event_source`, `faq_source`, `generative_source`, `playbook_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class KnowledgeAnswer
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Details about source of FAQ answer.
    # @!attribute [rw] question
    #   @return [::String]
    #     The corresponding FAQ question.
    class FaqSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Details about source of Generative answer.
    # @!attribute [rw] snippets
    #   @return [::Array<::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource::Snippet>]
    #     All snippets used for this Generative Prediction, with their source URI
    #     and data.
    class GenerativeSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Snippet Source for a Generative Prediction.
      # @!attribute [rw] uri
      #   @return [::String]
      #     URI the data is sourced from.
      # @!attribute [rw] text
      #   @return [::String]
      #     Text taken from that URI.
      # @!attribute [rw] title
      #   @return [::String]
      #     Title of the document.
      # @!attribute [rw] metadata
      #   @return [::Google::Protobuf::Struct]
      #     Metadata of the document.
      class Snippet
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Details about source of Event answer.
    # @!attribute [rw] event
    #   @return [::String]
    #     Name of the triggered event.
    # @!attribute [rw] snippets
    #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource]
    #     Sources used in event fulfillment.
    class EventSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end
end

#suggested_query::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::SuggestedQuery

Returns The query suggested based on the context. Suggestion is made only if it is different from the previous suggestion.

Returns:



1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
# File 'proto_docs/google/cloud/dialogflow/v2/participant.rb', line 1525

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

  # Represents a suggested query.
  # @!attribute [rw] query_text
  #   @return [::String]
  #     Suggested query text.
  # @!attribute [rw] search_contexts
  #   @return [::Array<::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::SuggestedQuery::SearchContext>]
  #     Optional. The search contexts for the query.
  class SuggestedQuery
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Search context is information useful for knowledge search that helps
    # enrich the query.
    # Example:
    # search_context {
    #   key: "application name"
    #   value: "DesignApp"
    # }
    # @!attribute [rw] key
    #   @return [::String]
    #     Optional. The key of the search context, e.g. "application name".
    # @!attribute [rw] value
    #   @return [::String]
    #     Optional. The value of the search context, e.g. "DesignApp".
    class SearchContext
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Represents a single suggested query result.
  # @!attribute [r] suggested_query
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::SuggestedQuery]
  #     Output only. The suggested query based on the context.
  # @!attribute [r] answer_record
  #   @return [::String]
  #     Output only. The name of the answer record.
  #     Format: `projects/<Project ID>/locations/<Location
  #     ID>/answerRecords/<Answer Record ID>`
  class AdditionalSuggestedQueryResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Represents an answer from Knowledge. Currently supports FAQ and Generative
  # answers.
  # @!attribute [rw] answer_text
  #   @return [::String]
  #     The piece of text from the `source` that answers this suggested query.
  # @!attribute [rw] faq_source
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::FaqSource]
  #     Populated if the prediction came from FAQ.
  #
  #     Note: The following fields are mutually exclusive: `faq_source`, `generative_source`, `playbook_source`, `event_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] generative_source
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource]
  #     Populated if the prediction was Generative.
  #
  #     Note: The following fields are mutually exclusive: `generative_source`, `faq_source`, `playbook_source`, `event_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] playbook_source
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource]
  #     Populated if the prediction was from Playbook.
  #
  #     Note: The following fields are mutually exclusive: `playbook_source`, `faq_source`, `generative_source`, `event_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] event_source
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::EventSource]
  #     Populated if the prediction was from an event.
  #
  #     Note: The following fields are mutually exclusive: `event_source`, `faq_source`, `generative_source`, `playbook_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class KnowledgeAnswer
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Details about source of FAQ answer.
    # @!attribute [rw] question
    #   @return [::String]
    #     The corresponding FAQ question.
    class FaqSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Details about source of Generative answer.
    # @!attribute [rw] snippets
    #   @return [::Array<::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource::Snippet>]
    #     All snippets used for this Generative Prediction, with their source URI
    #     and data.
    class GenerativeSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Snippet Source for a Generative Prediction.
      # @!attribute [rw] uri
      #   @return [::String]
      #     URI the data is sourced from.
      # @!attribute [rw] text
      #   @return [::String]
      #     Text taken from that URI.
      # @!attribute [rw] title
      #   @return [::String]
      #     Title of the document.
      # @!attribute [rw] metadata
      #   @return [::Google::Protobuf::Struct]
      #     Metadata of the document.
      class Snippet
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Details about source of Event answer.
    # @!attribute [rw] event
    #   @return [::String]
    #     Name of the triggered event.
    # @!attribute [rw] snippets
    #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource]
    #     Sources used in event fulfillment.
    class EventSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end
end

#suggested_query_answer::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer

Returns The answer generated for the suggested query. Whether or not an answer is generated depends on how confident we are about the generated query.

Returns:



1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
# File 'proto_docs/google/cloud/dialogflow/v2/participant.rb', line 1525

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

  # Represents a suggested query.
  # @!attribute [rw] query_text
  #   @return [::String]
  #     Suggested query text.
  # @!attribute [rw] search_contexts
  #   @return [::Array<::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::SuggestedQuery::SearchContext>]
  #     Optional. The search contexts for the query.
  class SuggestedQuery
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Search context is information useful for knowledge search that helps
    # enrich the query.
    # Example:
    # search_context {
    #   key: "application name"
    #   value: "DesignApp"
    # }
    # @!attribute [rw] key
    #   @return [::String]
    #     Optional. The key of the search context, e.g. "application name".
    # @!attribute [rw] value
    #   @return [::String]
    #     Optional. The value of the search context, e.g. "DesignApp".
    class SearchContext
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Represents a single suggested query result.
  # @!attribute [r] suggested_query
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::SuggestedQuery]
  #     Output only. The suggested query based on the context.
  # @!attribute [r] answer_record
  #   @return [::String]
  #     Output only. The name of the answer record.
  #     Format: `projects/<Project ID>/locations/<Location
  #     ID>/answerRecords/<Answer Record ID>`
  class AdditionalSuggestedQueryResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Represents an answer from Knowledge. Currently supports FAQ and Generative
  # answers.
  # @!attribute [rw] answer_text
  #   @return [::String]
  #     The piece of text from the `source` that answers this suggested query.
  # @!attribute [rw] faq_source
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::FaqSource]
  #     Populated if the prediction came from FAQ.
  #
  #     Note: The following fields are mutually exclusive: `faq_source`, `generative_source`, `playbook_source`, `event_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] generative_source
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource]
  #     Populated if the prediction was Generative.
  #
  #     Note: The following fields are mutually exclusive: `generative_source`, `faq_source`, `playbook_source`, `event_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] playbook_source
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource]
  #     Populated if the prediction was from Playbook.
  #
  #     Note: The following fields are mutually exclusive: `playbook_source`, `faq_source`, `generative_source`, `event_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] event_source
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::EventSource]
  #     Populated if the prediction was from an event.
  #
  #     Note: The following fields are mutually exclusive: `event_source`, `faq_source`, `generative_source`, `playbook_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class KnowledgeAnswer
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Details about source of FAQ answer.
    # @!attribute [rw] question
    #   @return [::String]
    #     The corresponding FAQ question.
    class FaqSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Details about source of Generative answer.
    # @!attribute [rw] snippets
    #   @return [::Array<::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource::Snippet>]
    #     All snippets used for this Generative Prediction, with their source URI
    #     and data.
    class GenerativeSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Snippet Source for a Generative Prediction.
      # @!attribute [rw] uri
      #   @return [::String]
      #     URI the data is sourced from.
      # @!attribute [rw] text
      #   @return [::String]
      #     Text taken from that URI.
      # @!attribute [rw] title
      #   @return [::String]
      #     Title of the document.
      # @!attribute [rw] metadata
      #   @return [::Google::Protobuf::Struct]
      #     Metadata of the document.
      class Snippet
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Details about source of Event answer.
    # @!attribute [rw] event
    #   @return [::String]
    #     Name of the triggered event.
    # @!attribute [rw] snippets
    #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource]
    #     Sources used in event fulfillment.
    class EventSource
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end
end