#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SafetyRating {
#[prost(enumeration = "HarmCategory", tag = "1")]
pub category: i32,
#[prost(enumeration = "safety_rating::HarmProbability", tag = "2")]
pub probability: i32,
#[prost(float, tag = "5")]
pub probability_score: f32,
#[prost(enumeration = "safety_rating::HarmSeverity", tag = "6")]
pub severity: i32,
#[prost(float, tag = "7")]
pub severity_score: f32,
#[prost(bool, tag = "3")]
pub blocked: bool,
}
pub mod safety_rating {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum HarmProbability {
Unspecified = 0,
Negligible = 1,
Low = 2,
Medium = 3,
High = 4,
}
impl HarmProbability {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "HARM_PROBABILITY_UNSPECIFIED",
Self::Negligible => "NEGLIGIBLE",
Self::Low => "LOW",
Self::Medium => "MEDIUM",
Self::High => "HIGH",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"HARM_PROBABILITY_UNSPECIFIED" => Some(Self::Unspecified),
"NEGLIGIBLE" => Some(Self::Negligible),
"LOW" => Some(Self::Low),
"MEDIUM" => Some(Self::Medium),
"HIGH" => Some(Self::High),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum HarmSeverity {
Unspecified = 0,
Negligible = 1,
Low = 2,
Medium = 3,
High = 4,
}
impl HarmSeverity {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "HARM_SEVERITY_UNSPECIFIED",
Self::Negligible => "HARM_SEVERITY_NEGLIGIBLE",
Self::Low => "HARM_SEVERITY_LOW",
Self::Medium => "HARM_SEVERITY_MEDIUM",
Self::High => "HARM_SEVERITY_HIGH",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"HARM_SEVERITY_UNSPECIFIED" => Some(Self::Unspecified),
"HARM_SEVERITY_NEGLIGIBLE" => Some(Self::Negligible),
"HARM_SEVERITY_LOW" => Some(Self::Low),
"HARM_SEVERITY_MEDIUM" => Some(Self::Medium),
"HARM_SEVERITY_HIGH" => Some(Self::High),
_ => None,
}
}
}
}
impl ::prost::Name for SafetyRating {
const NAME: &'static str = "SafetyRating";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SafetyRating".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SafetyRating".into()
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum HarmCategory {
Unspecified = 0,
HateSpeech = 1,
DangerousContent = 2,
Harassment = 3,
SexuallyExplicit = 4,
CivicIntegrity = 5,
}
impl HarmCategory {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "HARM_CATEGORY_UNSPECIFIED",
Self::HateSpeech => "HARM_CATEGORY_HATE_SPEECH",
Self::DangerousContent => "HARM_CATEGORY_DANGEROUS_CONTENT",
Self::Harassment => "HARM_CATEGORY_HARASSMENT",
Self::SexuallyExplicit => "HARM_CATEGORY_SEXUALLY_EXPLICIT",
Self::CivicIntegrity => "HARM_CATEGORY_CIVIC_INTEGRITY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"HARM_CATEGORY_UNSPECIFIED" => Some(Self::Unspecified),
"HARM_CATEGORY_HATE_SPEECH" => Some(Self::HateSpeech),
"HARM_CATEGORY_DANGEROUS_CONTENT" => Some(Self::DangerousContent),
"HARM_CATEGORY_HARASSMENT" => Some(Self::Harassment),
"HARM_CATEGORY_SEXUALLY_EXPLICIT" => Some(Self::SexuallyExplicit),
"HARM_CATEGORY_CIVIC_INTEGRITY" => Some(Self::CivicIntegrity),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Answer {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "answer::State", tag = "2")]
pub state: i32,
#[prost(string, tag = "3")]
pub answer_text: ::prost::alloc::string::String,
#[prost(double, optional, tag = "12")]
pub grounding_score: ::core::option::Option<f64>,
#[prost(message, repeated, tag = "4")]
pub citations: ::prost::alloc::vec::Vec<answer::Citation>,
#[prost(message, repeated, tag = "13")]
pub grounding_supports: ::prost::alloc::vec::Vec<answer::GroundingSupport>,
#[prost(message, repeated, tag = "5")]
pub references: ::prost::alloc::vec::Vec<answer::Reference>,
#[prost(string, repeated, tag = "6")]
pub related_questions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "7")]
pub steps: ::prost::alloc::vec::Vec<answer::Step>,
#[prost(message, optional, tag = "10")]
pub query_understanding_info: ::core::option::Option<answer::QueryUnderstandingInfo>,
#[prost(enumeration = "answer::AnswerSkippedReason", repeated, tag = "11")]
pub answer_skipped_reasons: ::prost::alloc::vec::Vec<i32>,
#[prost(message, optional, tag = "8")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "9")]
pub complete_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, repeated, tag = "14")]
pub safety_ratings: ::prost::alloc::vec::Vec<SafetyRating>,
}
pub mod answer {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Citation {
#[prost(int64, tag = "1")]
pub start_index: i64,
#[prost(int64, tag = "2")]
pub end_index: i64,
#[prost(message, repeated, tag = "3")]
pub sources: ::prost::alloc::vec::Vec<CitationSource>,
}
impl ::prost::Name for Citation {
const NAME: &'static str = "Citation";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Answer.Citation".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Answer.Citation".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CitationSource {
#[prost(string, tag = "1")]
pub reference_id: ::prost::alloc::string::String,
}
impl ::prost::Name for CitationSource {
const NAME: &'static str = "CitationSource";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Answer.CitationSource".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Answer.CitationSource"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GroundingSupport {
#[prost(int64, tag = "1")]
pub start_index: i64,
#[prost(int64, tag = "2")]
pub end_index: i64,
#[prost(double, optional, tag = "3")]
pub grounding_score: ::core::option::Option<f64>,
#[prost(bool, optional, tag = "4")]
pub grounding_check_required: ::core::option::Option<bool>,
#[prost(message, repeated, tag = "5")]
pub sources: ::prost::alloc::vec::Vec<CitationSource>,
}
impl ::prost::Name for GroundingSupport {
const NAME: &'static str = "GroundingSupport";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Answer.GroundingSupport".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Answer.GroundingSupport"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Reference {
#[prost(oneof = "reference::Content", tags = "1, 2, 3")]
pub content: ::core::option::Option<reference::Content>,
}
pub mod reference {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnstructuredDocumentInfo {
#[prost(string, tag = "1")]
pub document: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub uri: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub chunk_contents: ::prost::alloc::vec::Vec<
unstructured_document_info::ChunkContent,
>,
#[prost(message, optional, tag = "5")]
pub struct_data: ::core::option::Option<::prost_types::Struct>,
}
pub mod unstructured_document_info {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChunkContent {
#[prost(string, tag = "1")]
pub content: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub page_identifier: ::prost::alloc::string::String,
#[prost(float, optional, tag = "3")]
pub relevance_score: ::core::option::Option<f32>,
}
impl ::prost::Name for ChunkContent {
const NAME: &'static str = "ChunkContent";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Answer.Reference.UnstructuredDocumentInfo.ChunkContent"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Answer.Reference.UnstructuredDocumentInfo.ChunkContent"
.into()
}
}
}
impl ::prost::Name for UnstructuredDocumentInfo {
const NAME: &'static str = "UnstructuredDocumentInfo";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Answer.Reference.UnstructuredDocumentInfo"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Answer.Reference.UnstructuredDocumentInfo"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChunkInfo {
#[prost(string, tag = "1")]
pub chunk: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub content: ::prost::alloc::string::String,
#[prost(float, optional, tag = "3")]
pub relevance_score: ::core::option::Option<f32>,
#[prost(message, optional, tag = "4")]
pub document_metadata: ::core::option::Option<chunk_info::DocumentMetadata>,
}
pub mod chunk_info {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DocumentMetadata {
#[prost(string, tag = "1")]
pub document: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub uri: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub page_identifier: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub struct_data: ::core::option::Option<::prost_types::Struct>,
}
impl ::prost::Name for DocumentMetadata {
const NAME: &'static str = "DocumentMetadata";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Answer.Reference.ChunkInfo.DocumentMetadata"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Answer.Reference.ChunkInfo.DocumentMetadata"
.into()
}
}
}
impl ::prost::Name for ChunkInfo {
const NAME: &'static str = "ChunkInfo";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Answer.Reference.ChunkInfo".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Answer.Reference.ChunkInfo"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StructuredDocumentInfo {
#[prost(string, tag = "1")]
pub document: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub struct_data: ::core::option::Option<::prost_types::Struct>,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub uri: ::prost::alloc::string::String,
}
impl ::prost::Name for StructuredDocumentInfo {
const NAME: &'static str = "StructuredDocumentInfo";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Answer.Reference.StructuredDocumentInfo"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Answer.Reference.StructuredDocumentInfo"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Content {
#[prost(message, tag = "1")]
UnstructuredDocumentInfo(UnstructuredDocumentInfo),
#[prost(message, tag = "2")]
ChunkInfo(ChunkInfo),
#[prost(message, tag = "3")]
StructuredDocumentInfo(StructuredDocumentInfo),
}
}
impl ::prost::Name for Reference {
const NAME: &'static str = "Reference";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Answer.Reference".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Answer.Reference".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Step {
#[prost(enumeration = "step::State", tag = "1")]
pub state: i32,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub thought: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub actions: ::prost::alloc::vec::Vec<step::Action>,
}
pub mod step {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Action {
#[prost(message, optional, tag = "3")]
pub observation: ::core::option::Option<action::Observation>,
#[prost(oneof = "action::Action", tags = "2")]
pub action: ::core::option::Option<action::Action>,
}
pub mod action {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SearchAction {
#[prost(string, tag = "1")]
pub query: ::prost::alloc::string::String,
}
impl ::prost::Name for SearchAction {
const NAME: &'static str = "SearchAction";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Answer.Step.Action.SearchAction"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Answer.Step.Action.SearchAction"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Observation {
#[prost(message, repeated, tag = "2")]
pub search_results: ::prost::alloc::vec::Vec<observation::SearchResult>,
}
pub mod observation {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchResult {
#[prost(string, tag = "1")]
pub document: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub uri: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub snippet_info: ::prost::alloc::vec::Vec<
search_result::SnippetInfo,
>,
#[prost(message, repeated, tag = "5")]
pub chunk_info: ::prost::alloc::vec::Vec<search_result::ChunkInfo>,
#[prost(message, optional, tag = "6")]
pub struct_data: ::core::option::Option<::prost_types::Struct>,
}
pub mod search_result {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SnippetInfo {
#[prost(string, tag = "1")]
pub snippet: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub snippet_status: ::prost::alloc::string::String,
}
impl ::prost::Name for SnippetInfo {
const NAME: &'static str = "SnippetInfo";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.SnippetInfo"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.SnippetInfo"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChunkInfo {
#[prost(string, tag = "1")]
pub chunk: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub content: ::prost::alloc::string::String,
#[prost(float, optional, tag = "3")]
pub relevance_score: ::core::option::Option<f32>,
}
impl ::prost::Name for ChunkInfo {
const NAME: &'static str = "ChunkInfo";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.ChunkInfo"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.ChunkInfo"
.into()
}
}
}
impl ::prost::Name for SearchResult {
const NAME: &'static str = "SearchResult";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult"
.into()
}
}
}
impl ::prost::Name for Observation {
const NAME: &'static str = "Observation";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Answer.Step.Action.Observation"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Answer.Step.Action.Observation"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Action {
#[prost(message, tag = "2")]
SearchAction(SearchAction),
}
}
impl ::prost::Name for Action {
const NAME: &'static str = "Action";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Answer.Step.Action".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Answer.Step.Action"
.into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
InProgress = 1,
Failed = 2,
Succeeded = 3,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "STATE_UNSPECIFIED",
Self::InProgress => "IN_PROGRESS",
Self::Failed => "FAILED",
Self::Succeeded => "SUCCEEDED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"IN_PROGRESS" => Some(Self::InProgress),
"FAILED" => Some(Self::Failed),
"SUCCEEDED" => Some(Self::Succeeded),
_ => None,
}
}
}
}
impl ::prost::Name for Step {
const NAME: &'static str = "Step";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Answer.Step".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Answer.Step".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryUnderstandingInfo {
#[prost(message, repeated, tag = "1")]
pub query_classification_info: ::prost::alloc::vec::Vec<
query_understanding_info::QueryClassificationInfo,
>,
}
pub mod query_understanding_info {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryClassificationInfo {
#[prost(enumeration = "query_classification_info::Type", tag = "1")]
pub r#type: i32,
#[prost(bool, tag = "2")]
pub positive: bool,
}
pub mod query_classification_info {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
AdversarialQuery = 1,
NonAnswerSeekingQuery = 2,
JailBreakingQuery = 3,
NonAnswerSeekingQueryV2 = 4,
UserDefinedClassificationQuery = 5,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TYPE_UNSPECIFIED",
Self::AdversarialQuery => "ADVERSARIAL_QUERY",
Self::NonAnswerSeekingQuery => "NON_ANSWER_SEEKING_QUERY",
Self::JailBreakingQuery => "JAIL_BREAKING_QUERY",
Self::NonAnswerSeekingQueryV2 => "NON_ANSWER_SEEKING_QUERY_V2",
Self::UserDefinedClassificationQuery => {
"USER_DEFINED_CLASSIFICATION_QUERY"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"ADVERSARIAL_QUERY" => Some(Self::AdversarialQuery),
"NON_ANSWER_SEEKING_QUERY" => Some(Self::NonAnswerSeekingQuery),
"JAIL_BREAKING_QUERY" => Some(Self::JailBreakingQuery),
"NON_ANSWER_SEEKING_QUERY_V2" => {
Some(Self::NonAnswerSeekingQueryV2)
}
"USER_DEFINED_CLASSIFICATION_QUERY" => {
Some(Self::UserDefinedClassificationQuery)
}
_ => None,
}
}
}
}
impl ::prost::Name for QueryClassificationInfo {
const NAME: &'static str = "QueryClassificationInfo";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo.QueryClassificationInfo"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo.QueryClassificationInfo"
.into()
}
}
}
impl ::prost::Name for QueryUnderstandingInfo {
const NAME: &'static str = "QueryUnderstandingInfo";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo"
.into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
InProgress = 1,
Failed = 2,
Succeeded = 3,
Streaming = 4,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "STATE_UNSPECIFIED",
Self::InProgress => "IN_PROGRESS",
Self::Failed => "FAILED",
Self::Succeeded => "SUCCEEDED",
Self::Streaming => "STREAMING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"IN_PROGRESS" => Some(Self::InProgress),
"FAILED" => Some(Self::Failed),
"SUCCEEDED" => Some(Self::Succeeded),
"STREAMING" => Some(Self::Streaming),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum AnswerSkippedReason {
Unspecified = 0,
AdversarialQueryIgnored = 1,
NonAnswerSeekingQueryIgnored = 2,
OutOfDomainQueryIgnored = 3,
PotentialPolicyViolation = 4,
NoRelevantContent = 5,
JailBreakingQueryIgnored = 6,
CustomerPolicyViolation = 7,
NonAnswerSeekingQueryIgnoredV2 = 8,
LowGroundedAnswer = 9,
UserDefinedClassificationQueryIgnored = 10,
UnhelpfulAnswer = 11,
}
impl AnswerSkippedReason {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "ANSWER_SKIPPED_REASON_UNSPECIFIED",
Self::AdversarialQueryIgnored => "ADVERSARIAL_QUERY_IGNORED",
Self::NonAnswerSeekingQueryIgnored => "NON_ANSWER_SEEKING_QUERY_IGNORED",
Self::OutOfDomainQueryIgnored => "OUT_OF_DOMAIN_QUERY_IGNORED",
Self::PotentialPolicyViolation => "POTENTIAL_POLICY_VIOLATION",
Self::NoRelevantContent => "NO_RELEVANT_CONTENT",
Self::JailBreakingQueryIgnored => "JAIL_BREAKING_QUERY_IGNORED",
Self::CustomerPolicyViolation => "CUSTOMER_POLICY_VIOLATION",
Self::NonAnswerSeekingQueryIgnoredV2 => {
"NON_ANSWER_SEEKING_QUERY_IGNORED_V2"
}
Self::LowGroundedAnswer => "LOW_GROUNDED_ANSWER",
Self::UserDefinedClassificationQueryIgnored => {
"USER_DEFINED_CLASSIFICATION_QUERY_IGNORED"
}
Self::UnhelpfulAnswer => "UNHELPFUL_ANSWER",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ANSWER_SKIPPED_REASON_UNSPECIFIED" => Some(Self::Unspecified),
"ADVERSARIAL_QUERY_IGNORED" => Some(Self::AdversarialQueryIgnored),
"NON_ANSWER_SEEKING_QUERY_IGNORED" => {
Some(Self::NonAnswerSeekingQueryIgnored)
}
"OUT_OF_DOMAIN_QUERY_IGNORED" => Some(Self::OutOfDomainQueryIgnored),
"POTENTIAL_POLICY_VIOLATION" => Some(Self::PotentialPolicyViolation),
"NO_RELEVANT_CONTENT" => Some(Self::NoRelevantContent),
"JAIL_BREAKING_QUERY_IGNORED" => Some(Self::JailBreakingQueryIgnored),
"CUSTOMER_POLICY_VIOLATION" => Some(Self::CustomerPolicyViolation),
"NON_ANSWER_SEEKING_QUERY_IGNORED_V2" => {
Some(Self::NonAnswerSeekingQueryIgnoredV2)
}
"LOW_GROUNDED_ANSWER" => Some(Self::LowGroundedAnswer),
"USER_DEFINED_CLASSIFICATION_QUERY_IGNORED" => {
Some(Self::UserDefinedClassificationQueryIgnored)
}
"UNHELPFUL_ANSWER" => Some(Self::UnhelpfulAnswer),
_ => None,
}
}
}
}
impl ::prost::Name for Answer {
const NAME: &'static str = "Answer";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Answer".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Answer".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssistAnswer {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "assist_answer::State", tag = "2")]
pub state: i32,
#[prost(message, repeated, tag = "3")]
pub replies: ::prost::alloc::vec::Vec<assist_answer::Reply>,
#[prost(enumeration = "assist_answer::AssistSkippedReason", repeated, tag = "5")]
pub assist_skipped_reasons: ::prost::alloc::vec::Vec<i32>,
}
pub mod assist_answer {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Reply {
#[prost(oneof = "reply::Reply", tags = "1")]
pub reply: ::core::option::Option<reply::Reply>,
}
pub mod reply {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Reply {
#[prost(message, tag = "1")]
GroundedContent(super::super::AssistantGroundedContent),
}
}
impl ::prost::Name for Reply {
const NAME: &'static str = "Reply";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AssistAnswer.Reply".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AssistAnswer.Reply"
.into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
InProgress = 1,
Failed = 2,
Succeeded = 3,
Skipped = 4,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "STATE_UNSPECIFIED",
Self::InProgress => "IN_PROGRESS",
Self::Failed => "FAILED",
Self::Succeeded => "SUCCEEDED",
Self::Skipped => "SKIPPED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"IN_PROGRESS" => Some(Self::InProgress),
"FAILED" => Some(Self::Failed),
"SUCCEEDED" => Some(Self::Succeeded),
"SKIPPED" => Some(Self::Skipped),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum AssistSkippedReason {
Unspecified = 0,
NonAssistSeekingQueryIgnored = 1,
CustomerPolicyViolation = 2,
}
impl AssistSkippedReason {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "ASSIST_SKIPPED_REASON_UNSPECIFIED",
Self::NonAssistSeekingQueryIgnored => "NON_ASSIST_SEEKING_QUERY_IGNORED",
Self::CustomerPolicyViolation => "CUSTOMER_POLICY_VIOLATION",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ASSIST_SKIPPED_REASON_UNSPECIFIED" => Some(Self::Unspecified),
"NON_ASSIST_SEEKING_QUERY_IGNORED" => {
Some(Self::NonAssistSeekingQueryIgnored)
}
"CUSTOMER_POLICY_VIOLATION" => Some(Self::CustomerPolicyViolation),
_ => None,
}
}
}
}
impl ::prost::Name for AssistAnswer {
const NAME: &'static str = "AssistAnswer";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AssistAnswer".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AssistAnswer".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AssistantContent {
#[prost(string, tag = "1")]
pub role: ::prost::alloc::string::String,
#[prost(bool, tag = "6")]
pub thought: bool,
#[prost(oneof = "assistant_content::Data", tags = "2, 3, 4, 7, 8")]
pub data: ::core::option::Option<assistant_content::Data>,
}
pub mod assistant_content {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Blob {
#[prost(string, tag = "1")]
pub mime_type: ::prost::alloc::string::String,
#[prost(bytes = "bytes", tag = "2")]
pub data: ::prost::bytes::Bytes,
}
impl ::prost::Name for Blob {
const NAME: &'static str = "Blob";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AssistantContent.Blob".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AssistantContent.Blob"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct File {
#[prost(string, tag = "1")]
pub mime_type: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub file_id: ::prost::alloc::string::String,
}
impl ::prost::Name for File {
const NAME: &'static str = "File";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AssistantContent.File".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AssistantContent.File"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExecutableCode {
#[prost(string, tag = "2")]
pub code: ::prost::alloc::string::String,
}
impl ::prost::Name for ExecutableCode {
const NAME: &'static str = "ExecutableCode";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AssistantContent.ExecutableCode".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AssistantContent.ExecutableCode"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CodeExecutionResult {
#[prost(enumeration = "code_execution_result::Outcome", tag = "1")]
pub outcome: i32,
#[prost(string, tag = "2")]
pub output: ::prost::alloc::string::String,
}
pub mod code_execution_result {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Outcome {
Unspecified = 0,
Ok = 1,
Failed = 2,
DeadlineExceeded = 3,
}
impl Outcome {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "OUTCOME_UNSPECIFIED",
Self::Ok => "OUTCOME_OK",
Self::Failed => "OUTCOME_FAILED",
Self::DeadlineExceeded => "OUTCOME_DEADLINE_EXCEEDED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OUTCOME_UNSPECIFIED" => Some(Self::Unspecified),
"OUTCOME_OK" => Some(Self::Ok),
"OUTCOME_FAILED" => Some(Self::Failed),
"OUTCOME_DEADLINE_EXCEEDED" => Some(Self::DeadlineExceeded),
_ => None,
}
}
}
}
impl ::prost::Name for CodeExecutionResult {
const NAME: &'static str = "CodeExecutionResult";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AssistantContent.CodeExecutionResult".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AssistantContent.CodeExecutionResult"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Data {
#[prost(string, tag = "2")]
Text(::prost::alloc::string::String),
#[prost(message, tag = "3")]
InlineData(Blob),
#[prost(message, tag = "4")]
File(File),
#[prost(message, tag = "7")]
ExecutableCode(ExecutableCode),
#[prost(message, tag = "8")]
CodeExecutionResult(CodeExecutionResult),
}
}
impl ::prost::Name for AssistantContent {
const NAME: &'static str = "AssistantContent";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AssistantContent".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AssistantContent".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssistantGroundedContent {
#[prost(message, optional, tag = "1")]
pub content: ::core::option::Option<AssistantContent>,
#[prost(oneof = "assistant_grounded_content::Metadata", tags = "3")]
pub metadata: ::core::option::Option<assistant_grounded_content::Metadata>,
}
pub mod assistant_grounded_content {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextGroundingMetadata {
#[prost(message, repeated, tag = "4")]
pub segments: ::prost::alloc::vec::Vec<text_grounding_metadata::Segment>,
#[prost(message, repeated, tag = "2")]
pub references: ::prost::alloc::vec::Vec<text_grounding_metadata::Reference>,
}
pub mod text_grounding_metadata {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Segment {
#[prost(int64, tag = "1")]
pub start_index: i64,
#[prost(int64, tag = "2")]
pub end_index: i64,
#[prost(int32, repeated, tag = "4")]
pub reference_indices: ::prost::alloc::vec::Vec<i32>,
#[prost(float, tag = "5")]
pub grounding_score: f32,
#[prost(string, tag = "6")]
pub text: ::prost::alloc::string::String,
}
impl ::prost::Name for Segment {
const NAME: &'static str = "Segment";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AssistantGroundedContent.TextGroundingMetadata.Segment"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AssistantGroundedContent.TextGroundingMetadata.Segment"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Reference {
#[prost(string, tag = "1")]
pub content: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub document_metadata: ::core::option::Option<reference::DocumentMetadata>,
}
pub mod reference {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DocumentMetadata {
#[prost(string, optional, tag = "1")]
pub document: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "2")]
pub uri: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "3")]
pub title: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "4")]
pub page_identifier: ::core::option::Option<
::prost::alloc::string::String,
>,
#[prost(string, optional, tag = "5")]
pub domain: ::core::option::Option<::prost::alloc::string::String>,
}
impl ::prost::Name for DocumentMetadata {
const NAME: &'static str = "DocumentMetadata";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata"
.into()
}
}
}
impl ::prost::Name for Reference {
const NAME: &'static str = "Reference";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AssistantGroundedContent.TextGroundingMetadata.Reference"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AssistantGroundedContent.TextGroundingMetadata.Reference"
.into()
}
}
}
impl ::prost::Name for TextGroundingMetadata {
const NAME: &'static str = "TextGroundingMetadata";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AssistantGroundedContent.TextGroundingMetadata"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AssistantGroundedContent.TextGroundingMetadata"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Metadata {
#[prost(message, tag = "3")]
TextGroundingMetadata(TextGroundingMetadata),
}
}
impl ::prost::Name for AssistantGroundedContent {
const NAME: &'static str = "AssistantGroundedContent";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AssistantGroundedContent".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AssistantGroundedContent"
.into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Interval {
#[prost(oneof = "interval::Min", tags = "1, 2")]
pub min: ::core::option::Option<interval::Min>,
#[prost(oneof = "interval::Max", tags = "3, 4")]
pub max: ::core::option::Option<interval::Max>,
}
pub mod interval {
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Min {
#[prost(double, tag = "1")]
Minimum(f64),
#[prost(double, tag = "2")]
ExclusiveMinimum(f64),
}
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Max {
#[prost(double, tag = "3")]
Maximum(f64),
#[prost(double, tag = "4")]
ExclusiveMaximum(f64),
}
}
impl ::prost::Name for Interval {
const NAME: &'static str = "Interval";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Interval".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Interval".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UserInfo {
#[prost(string, tag = "1")]
pub user_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub user_agent: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub time_zone: ::prost::alloc::string::String,
}
impl ::prost::Name for UserInfo {
const NAME: &'static str = "UserInfo";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.UserInfo".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.UserInfo".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchRequest {
#[prost(string, tag = "1")]
pub serving_config: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub branch: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub query: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "63")]
pub page_categories: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "19")]
pub image_query: ::core::option::Option<search_request::ImageQuery>,
#[prost(int32, tag = "4")]
pub page_size: i32,
#[prost(string, tag = "5")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "6")]
pub offset: i32,
#[prost(int32, tag = "47")]
pub one_box_page_size: i32,
#[prost(message, repeated, tag = "32")]
pub data_store_specs: ::prost::alloc::vec::Vec<search_request::DataStoreSpec>,
#[prost(int32, tag = "65")]
pub num_results_per_data_store: i32,
#[prost(string, tag = "7")]
pub filter: ::prost::alloc::string::String,
#[prost(string, tag = "29")]
pub canonical_filter: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub order_by: ::prost::alloc::string::String,
#[prost(message, optional, tag = "21")]
pub user_info: ::core::option::Option<UserInfo>,
#[prost(string, tag = "35")]
pub language_code: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "9")]
pub facet_specs: ::prost::alloc::vec::Vec<search_request::FacetSpec>,
#[prost(message, optional, tag = "10")]
pub boost_spec: ::core::option::Option<search_request::BoostSpec>,
#[prost(map = "string, message", tag = "11")]
pub params: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost_types::Value,
>,
#[prost(message, optional, tag = "13")]
pub query_expansion_spec: ::core::option::Option<search_request::QueryExpansionSpec>,
#[prost(message, optional, tag = "14")]
pub spell_correction_spec: ::core::option::Option<
search_request::SpellCorrectionSpec,
>,
#[prost(string, tag = "15")]
pub user_pseudo_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "24")]
pub content_search_spec: ::core::option::Option<search_request::ContentSearchSpec>,
#[prost(string, tag = "26")]
pub ranking_expression: ::prost::alloc::string::String,
#[prost(enumeration = "search_request::RankingExpressionBackend", tag = "53")]
pub ranking_expression_backend: i32,
#[prost(bool, tag = "20")]
pub safe_search: bool,
#[prost(map = "string, string", tag = "22")]
pub user_labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "28")]
pub natural_language_query_understanding_spec: ::core::option::Option<
search_request::NaturalLanguageQueryUnderstandingSpec,
>,
#[prost(message, optional, tag = "31")]
pub search_as_you_type_spec: ::core::option::Option<
search_request::SearchAsYouTypeSpec,
>,
#[prost(message, optional, tag = "38")]
pub display_spec: ::core::option::Option<search_request::DisplaySpec>,
#[prost(message, repeated, tag = "40")]
pub crowding_specs: ::prost::alloc::vec::Vec<search_request::CrowdingSpec>,
#[prost(string, tag = "41")]
pub session: ::prost::alloc::string::String,
#[prost(message, optional, tag = "42")]
pub session_spec: ::core::option::Option<search_request::SessionSpec>,
#[prost(enumeration = "search_request::RelevanceThreshold", tag = "44")]
pub relevance_threshold: i32,
#[prost(message, optional, tag = "86")]
pub relevance_filter_spec: ::core::option::Option<
search_request::RelevanceFilterSpec,
>,
#[prost(message, optional, tag = "52")]
pub relevance_score_spec: ::core::option::Option<search_request::RelevanceScoreSpec>,
#[prost(message, optional, tag = "62")]
pub search_addon_spec: ::core::option::Option<search_request::SearchAddonSpec>,
#[prost(message, optional, tag = "64")]
pub custom_ranking_params: ::core::option::Option<
search_request::CustomRankingParams,
>,
#[prost(string, tag = "66")]
pub entity: ::prost::alloc::string::String,
}
pub mod search_request {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ImageQuery {
#[prost(oneof = "image_query::Image", tags = "1")]
pub image: ::core::option::Option<image_query::Image>,
}
pub mod image_query {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Image {
#[prost(string, tag = "1")]
ImageBytes(::prost::alloc::string::String),
}
}
impl ::prost::Name for ImageQuery {
const NAME: &'static str = "ImageQuery";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.ImageQuery".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.ImageQuery"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataStoreSpec {
#[prost(string, tag = "1")]
pub data_store: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub filter: ::prost::alloc::string::String,
#[prost(message, optional, tag = "6")]
pub boost_spec: ::core::option::Option<BoostSpec>,
#[prost(string, tag = "7")]
pub custom_search_operators: ::prost::alloc::string::String,
#[prost(int32, tag = "9")]
pub num_results: i32,
}
impl ::prost::Name for DataStoreSpec {
const NAME: &'static str = "DataStoreSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FacetSpec {
#[prost(message, optional, tag = "1")]
pub facet_key: ::core::option::Option<facet_spec::FacetKey>,
#[prost(int32, tag = "2")]
pub limit: i32,
#[prost(string, repeated, tag = "3")]
pub excluded_filter_keys: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(bool, tag = "4")]
pub enable_dynamic_position: bool,
}
pub mod facet_spec {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FacetKey {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub intervals: ::prost::alloc::vec::Vec<super::super::Interval>,
#[prost(string, repeated, tag = "3")]
pub restricted_values: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(string, repeated, tag = "4")]
pub prefixes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "5")]
pub contains: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag = "6")]
pub case_insensitive: bool,
#[prost(string, tag = "7")]
pub order_by: ::prost::alloc::string::String,
}
impl ::prost::Name for FacetKey {
const NAME: &'static str = "FacetKey";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.FacetSpec.FacetKey".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.FacetSpec.FacetKey"
.into()
}
}
}
impl ::prost::Name for FacetSpec {
const NAME: &'static str = "FacetSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.FacetSpec".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.FacetSpec"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BoostSpec {
#[prost(message, repeated, tag = "1")]
pub condition_boost_specs: ::prost::alloc::vec::Vec<
boost_spec::ConditionBoostSpec,
>,
}
pub mod boost_spec {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConditionBoostSpec {
#[prost(string, tag = "1")]
pub condition: ::prost::alloc::string::String,
#[prost(float, tag = "2")]
pub boost: f32,
#[prost(message, optional, tag = "3")]
pub boost_control_spec: ::core::option::Option<
condition_boost_spec::BoostControlSpec,
>,
}
pub mod condition_boost_spec {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BoostControlSpec {
#[prost(string, tag = "1")]
pub field_name: ::prost::alloc::string::String,
#[prost(enumeration = "boost_control_spec::AttributeType", tag = "2")]
pub attribute_type: i32,
#[prost(
enumeration = "boost_control_spec::InterpolationType",
tag = "3"
)]
pub interpolation_type: i32,
#[prost(message, repeated, tag = "4")]
pub control_points: ::prost::alloc::vec::Vec<
boost_control_spec::ControlPoint,
>,
}
pub mod boost_control_spec {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ControlPoint {
#[prost(string, tag = "1")]
pub attribute_value: ::prost::alloc::string::String,
#[prost(float, tag = "2")]
pub boost_amount: f32,
}
impl ::prost::Name for ControlPoint {
const NAME: &'static str = "ControlPoint";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint"
.into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum AttributeType {
Unspecified = 0,
Numerical = 1,
Freshness = 2,
}
impl AttributeType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "ATTRIBUTE_TYPE_UNSPECIFIED",
Self::Numerical => "NUMERICAL",
Self::Freshness => "FRESHNESS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ATTRIBUTE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"NUMERICAL" => Some(Self::Numerical),
"FRESHNESS" => Some(Self::Freshness),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum InterpolationType {
Unspecified = 0,
Linear = 1,
}
impl InterpolationType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "INTERPOLATION_TYPE_UNSPECIFIED",
Self::Linear => "LINEAR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INTERPOLATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"LINEAR" => Some(Self::Linear),
_ => None,
}
}
}
}
impl ::prost::Name for BoostControlSpec {
const NAME: &'static str = "BoostControlSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec"
.into()
}
}
}
impl ::prost::Name for ConditionBoostSpec {
const NAME: &'static str = "ConditionBoostSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.ConditionBoostSpec"
.into()
}
}
}
impl ::prost::Name for BoostSpec {
const NAME: &'static str = "BoostSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.BoostSpec".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.BoostSpec"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryExpansionSpec {
#[prost(enumeration = "query_expansion_spec::Condition", tag = "1")]
pub condition: i32,
#[prost(bool, tag = "2")]
pub pin_unexpanded_results: bool,
}
pub mod query_expansion_spec {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Condition {
Unspecified = 0,
Disabled = 1,
Auto = 2,
}
impl Condition {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "CONDITION_UNSPECIFIED",
Self::Disabled => "DISABLED",
Self::Auto => "AUTO",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONDITION_UNSPECIFIED" => Some(Self::Unspecified),
"DISABLED" => Some(Self::Disabled),
"AUTO" => Some(Self::Auto),
_ => None,
}
}
}
}
impl ::prost::Name for QueryExpansionSpec {
const NAME: &'static str = "QueryExpansionSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SpellCorrectionSpec {
#[prost(enumeration = "spell_correction_spec::Mode", tag = "1")]
pub mode: i32,
}
pub mod spell_correction_spec {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Mode {
Unspecified = 0,
SuggestionOnly = 1,
Auto = 2,
}
impl Mode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "MODE_UNSPECIFIED",
Self::SuggestionOnly => "SUGGESTION_ONLY",
Self::Auto => "AUTO",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MODE_UNSPECIFIED" => Some(Self::Unspecified),
"SUGGESTION_ONLY" => Some(Self::SuggestionOnly),
"AUTO" => Some(Self::Auto),
_ => None,
}
}
}
}
impl ::prost::Name for SpellCorrectionSpec {
const NAME: &'static str = "SpellCorrectionSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ContentSearchSpec {
#[prost(message, optional, tag = "1")]
pub snippet_spec: ::core::option::Option<content_search_spec::SnippetSpec>,
#[prost(message, optional, tag = "2")]
pub summary_spec: ::core::option::Option<content_search_spec::SummarySpec>,
#[prost(message, optional, tag = "3")]
pub extractive_content_spec: ::core::option::Option<
content_search_spec::ExtractiveContentSpec,
>,
#[prost(enumeration = "content_search_spec::SearchResultMode", tag = "4")]
pub search_result_mode: i32,
#[prost(message, optional, tag = "5")]
pub chunk_spec: ::core::option::Option<content_search_spec::ChunkSpec>,
}
pub mod content_search_spec {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SnippetSpec {
#[deprecated]
#[prost(int32, tag = "1")]
pub max_snippet_count: i32,
#[deprecated]
#[prost(bool, tag = "2")]
pub reference_only: bool,
#[prost(bool, tag = "3")]
pub return_snippet: bool,
}
impl ::prost::Name for SnippetSpec {
const NAME: &'static str = "SnippetSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SnippetSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SnippetSpec"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SummarySpec {
#[prost(int32, tag = "1")]
pub summary_result_count: i32,
#[prost(bool, tag = "2")]
pub include_citations: bool,
#[prost(bool, tag = "3")]
pub ignore_adversarial_query: bool,
#[prost(bool, tag = "4")]
pub ignore_non_summary_seeking_query: bool,
#[prost(bool, tag = "9")]
pub ignore_low_relevant_content: bool,
#[prost(bool, tag = "10")]
pub ignore_jail_breaking_query: bool,
#[prost(message, optional, tag = "5")]
pub model_prompt_spec: ::core::option::Option<summary_spec::ModelPromptSpec>,
#[prost(string, tag = "6")]
pub language_code: ::prost::alloc::string::String,
#[prost(message, optional, tag = "7")]
pub model_spec: ::core::option::Option<summary_spec::ModelSpec>,
#[prost(bool, tag = "8")]
pub use_semantic_chunks: bool,
}
pub mod summary_spec {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ModelPromptSpec {
#[prost(string, tag = "1")]
pub preamble: ::prost::alloc::string::String,
}
impl ::prost::Name for ModelPromptSpec {
const NAME: &'static str = "ModelPromptSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ModelSpec {
#[prost(string, tag = "1")]
pub version: ::prost::alloc::string::String,
}
impl ::prost::Name for ModelSpec {
const NAME: &'static str = "ModelSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec"
.into()
}
}
}
impl ::prost::Name for SummarySpec {
const NAME: &'static str = "SummarySpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExtractiveContentSpec {
#[prost(int32, tag = "1")]
pub max_extractive_answer_count: i32,
#[prost(int32, tag = "2")]
pub max_extractive_segment_count: i32,
#[prost(bool, tag = "3")]
pub return_extractive_segment_score: bool,
#[prost(int32, tag = "4")]
pub num_previous_segments: i32,
#[prost(int32, tag = "5")]
pub num_next_segments: i32,
}
impl ::prost::Name for ExtractiveContentSpec {
const NAME: &'static str = "ExtractiveContentSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ChunkSpec {
#[prost(int32, tag = "1")]
pub num_previous_chunks: i32,
#[prost(int32, tag = "2")]
pub num_next_chunks: i32,
}
impl ::prost::Name for ChunkSpec {
const NAME: &'static str = "ChunkSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec"
.into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SearchResultMode {
Unspecified = 0,
Documents = 1,
Chunks = 2,
}
impl SearchResultMode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SEARCH_RESULT_MODE_UNSPECIFIED",
Self::Documents => "DOCUMENTS",
Self::Chunks => "CHUNKS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SEARCH_RESULT_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"DOCUMENTS" => Some(Self::Documents),
"CHUNKS" => Some(Self::Chunks),
_ => None,
}
}
}
}
impl ::prost::Name for ContentSearchSpec {
const NAME: &'static str = "ContentSearchSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NaturalLanguageQueryUnderstandingSpec {
#[prost(
enumeration = "natural_language_query_understanding_spec::FilterExtractionCondition",
tag = "1"
)]
pub filter_extraction_condition: i32,
#[prost(string, repeated, tag = "2")]
pub geo_search_query_detection_field_names: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(
enumeration = "natural_language_query_understanding_spec::ExtractedFilterBehavior",
tag = "3"
)]
pub extracted_filter_behavior: i32,
#[prost(string, repeated, tag = "4")]
pub allowed_field_names: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
}
pub mod natural_language_query_understanding_spec {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum FilterExtractionCondition {
ConditionUnspecified = 0,
Disabled = 1,
Enabled = 2,
}
impl FilterExtractionCondition {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::ConditionUnspecified => "CONDITION_UNSPECIFIED",
Self::Disabled => "DISABLED",
Self::Enabled => "ENABLED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONDITION_UNSPECIFIED" => Some(Self::ConditionUnspecified),
"DISABLED" => Some(Self::Disabled),
"ENABLED" => Some(Self::Enabled),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ExtractedFilterBehavior {
Unspecified = 0,
HardFilter = 1,
SoftBoost = 2,
}
impl ExtractedFilterBehavior {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED",
Self::HardFilter => "HARD_FILTER",
Self::SoftBoost => "SOFT_BOOST",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED" => Some(Self::Unspecified),
"HARD_FILTER" => Some(Self::HardFilter),
"SOFT_BOOST" => Some(Self::SoftBoost),
_ => None,
}
}
}
}
impl ::prost::Name for NaturalLanguageQueryUnderstandingSpec {
const NAME: &'static str = "NaturalLanguageQueryUnderstandingSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchAsYouTypeSpec {
#[prost(enumeration = "search_as_you_type_spec::Condition", tag = "1")]
pub condition: i32,
#[prost(message, repeated, tag = "2")]
pub fields: ::prost::alloc::vec::Vec<search_as_you_type_spec::Field>,
#[prost(double, optional, tag = "3")]
pub score_threshold: ::core::option::Option<f64>,
}
pub mod search_as_you_type_spec {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Field {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(double, optional, tag = "2")]
pub weight: ::core::option::Option<f64>,
}
impl ::prost::Name for Field {
const NAME: &'static str = "Field";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Field"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Field"
.into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Condition {
Unspecified = 0,
Disabled = 1,
Enabled = 2,
Auto = 3,
}
impl Condition {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "CONDITION_UNSPECIFIED",
Self::Disabled => "DISABLED",
Self::Enabled => "ENABLED",
Self::Auto => "AUTO",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONDITION_UNSPECIFIED" => Some(Self::Unspecified),
"DISABLED" => Some(Self::Disabled),
"ENABLED" => Some(Self::Enabled),
"AUTO" => Some(Self::Auto),
_ => None,
}
}
}
}
impl ::prost::Name for SearchAsYouTypeSpec {
const NAME: &'static str = "SearchAsYouTypeSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DisplaySpec {
#[prost(enumeration = "display_spec::MatchHighlightingCondition", tag = "1")]
pub match_highlighting_condition: i32,
}
pub mod display_spec {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum MatchHighlightingCondition {
Unspecified = 0,
MatchHighlightingDisabled = 1,
MatchHighlightingEnabled = 2,
}
impl MatchHighlightingCondition {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED",
Self::MatchHighlightingDisabled => "MATCH_HIGHLIGHTING_DISABLED",
Self::MatchHighlightingEnabled => "MATCH_HIGHLIGHTING_ENABLED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED" => Some(Self::Unspecified),
"MATCH_HIGHLIGHTING_DISABLED" => {
Some(Self::MatchHighlightingDisabled)
}
"MATCH_HIGHLIGHTING_ENABLED" => Some(Self::MatchHighlightingEnabled),
_ => None,
}
}
}
}
impl ::prost::Name for DisplaySpec {
const NAME: &'static str = "DisplaySpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CrowdingSpec {
#[prost(string, tag = "1")]
pub field: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub max_count: i32,
#[prost(enumeration = "crowding_spec::Mode", tag = "3")]
pub mode: i32,
}
pub mod crowding_spec {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Mode {
Unspecified = 0,
DropCrowdedResults = 1,
DemoteCrowdedResultsToEnd = 2,
}
impl Mode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "MODE_UNSPECIFIED",
Self::DropCrowdedResults => "DROP_CROWDED_RESULTS",
Self::DemoteCrowdedResultsToEnd => "DEMOTE_CROWDED_RESULTS_TO_END",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MODE_UNSPECIFIED" => Some(Self::Unspecified),
"DROP_CROWDED_RESULTS" => Some(Self::DropCrowdedResults),
"DEMOTE_CROWDED_RESULTS_TO_END" => {
Some(Self::DemoteCrowdedResultsToEnd)
}
_ => None,
}
}
}
}
impl ::prost::Name for CrowdingSpec {
const NAME: &'static str = "CrowdingSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SessionSpec {
#[prost(string, tag = "1")]
pub query_id: ::prost::alloc::string::String,
#[prost(int32, optional, tag = "2")]
pub search_result_persistence_count: ::core::option::Option<i32>,
}
impl ::prost::Name for SessionSpec {
const NAME: &'static str = "SessionSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.SessionSpec".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.SessionSpec"
.into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RelevanceFilterSpec {
#[prost(message, optional, tag = "1")]
pub keyword_search_threshold: ::core::option::Option<
relevance_filter_spec::RelevanceThresholdSpec,
>,
#[prost(message, optional, tag = "2")]
pub semantic_search_threshold: ::core::option::Option<
relevance_filter_spec::RelevanceThresholdSpec,
>,
}
pub mod relevance_filter_spec {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RelevanceThresholdSpec {
#[prost(
oneof = "relevance_threshold_spec::RelevanceThresholdSpec",
tags = "1, 2"
)]
pub relevance_threshold_spec: ::core::option::Option<
relevance_threshold_spec::RelevanceThresholdSpec,
>,
}
pub mod relevance_threshold_spec {
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum RelevanceThresholdSpec {
#[prost(enumeration = "super::super::RelevanceThreshold", tag = "1")]
RelevanceThreshold(i32),
#[prost(float, tag = "2")]
SemanticRelevanceThreshold(f32),
}
}
impl ::prost::Name for RelevanceThresholdSpec {
const NAME: &'static str = "RelevanceThresholdSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec"
.into()
}
}
}
impl ::prost::Name for RelevanceFilterSpec {
const NAME: &'static str = "RelevanceFilterSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.RelevanceFilterSpec".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.RelevanceFilterSpec"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RelevanceScoreSpec {
#[prost(bool, tag = "1")]
pub return_relevance_score: bool,
}
impl ::prost::Name for RelevanceScoreSpec {
const NAME: &'static str = "RelevanceScoreSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SearchAddonSpec {
#[prost(bool, tag = "1")]
pub disable_semantic_add_on: bool,
#[prost(bool, tag = "2")]
pub disable_kpi_personalization_add_on: bool,
#[prost(bool, tag = "3")]
pub disable_generative_answer_add_on: bool,
}
impl ::prost::Name for SearchAddonSpec {
const NAME: &'static str = "SearchAddonSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.SearchAddonSpec".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.SearchAddonSpec"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CustomRankingParams {
#[prost(string, repeated, tag = "1")]
pub expressions_to_precompute: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
}
impl ::prost::Name for CustomRankingParams {
const NAME: &'static str = "CustomRankingParams";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest.CustomRankingParams".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest.CustomRankingParams"
.into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum RankingExpressionBackend {
Unspecified = 0,
#[deprecated]
Byoe = 1,
#[deprecated]
Clearbox = 2,
RankByEmbedding = 3,
RankByFormula = 4,
}
impl RankingExpressionBackend {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "RANKING_EXPRESSION_BACKEND_UNSPECIFIED",
#[allow(deprecated)]
Self::Byoe => "BYOE",
#[allow(deprecated)]
Self::Clearbox => "CLEARBOX",
Self::RankByEmbedding => "RANK_BY_EMBEDDING",
Self::RankByFormula => "RANK_BY_FORMULA",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RANKING_EXPRESSION_BACKEND_UNSPECIFIED" => Some(Self::Unspecified),
"BYOE" => Some(#[allow(deprecated)] Self::Byoe),
"CLEARBOX" => Some(#[allow(deprecated)] Self::Clearbox),
"RANK_BY_EMBEDDING" => Some(Self::RankByEmbedding),
"RANK_BY_FORMULA" => Some(Self::RankByFormula),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum RelevanceThreshold {
Unspecified = 0,
Lowest = 1,
Low = 2,
Medium = 3,
High = 4,
}
impl RelevanceThreshold {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "RELEVANCE_THRESHOLD_UNSPECIFIED",
Self::Lowest => "LOWEST",
Self::Low => "LOW",
Self::Medium => "MEDIUM",
Self::High => "HIGH",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RELEVANCE_THRESHOLD_UNSPECIFIED" => Some(Self::Unspecified),
"LOWEST" => Some(Self::Lowest),
"LOW" => Some(Self::Low),
"MEDIUM" => Some(Self::Medium),
"HIGH" => Some(Self::High),
_ => None,
}
}
}
}
impl ::prost::Name for SearchRequest {
const NAME: &'static str = "SearchRequest";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.SearchRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.SearchRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Session {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub display_name: ::prost::alloc::string::String,
#[prost(enumeration = "session::State", tag = "2")]
pub state: i32,
#[prost(string, tag = "3")]
pub user_pseudo_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub turns: ::prost::alloc::vec::Vec<session::Turn>,
#[prost(string, repeated, tag = "9")]
pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "6")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(bool, tag = "8")]
pub is_pinned: bool,
}
pub mod session {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Turn {
#[prost(message, optional, tag = "1")]
pub query: ::core::option::Option<super::Query>,
#[prost(string, tag = "2")]
pub answer: ::prost::alloc::string::String,
#[prost(message, optional, tag = "7")]
pub detailed_answer: ::core::option::Option<super::Answer>,
#[prost(message, optional, tag = "8")]
pub detailed_assist_answer: ::core::option::Option<super::AssistAnswer>,
#[prost(map = "string, string", tag = "16")]
pub query_config: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
impl ::prost::Name for Turn {
const NAME: &'static str = "Turn";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Session.Turn".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Session.Turn".into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
InProgress = 1,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "STATE_UNSPECIFIED",
Self::InProgress => "IN_PROGRESS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"IN_PROGRESS" => Some(Self::InProgress),
_ => None,
}
}
}
}
impl ::prost::Name for Session {
const NAME: &'static str = "Session";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Session".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Session".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Query {
#[prost(string, tag = "1")]
pub query_id: ::prost::alloc::string::String,
#[prost(oneof = "query::Content", tags = "2")]
pub content: ::core::option::Option<query::Content>,
}
pub mod query {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Content {
#[prost(string, tag = "2")]
Text(::prost::alloc::string::String),
}
}
impl ::prost::Name for Query {
const NAME: &'static str = "Query";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.Query".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.Query".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AssistUserMetadata {
#[prost(string, tag = "1")]
pub time_zone: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub preferred_language_code: ::prost::alloc::string::String,
}
impl ::prost::Name for AssistUserMetadata {
const NAME: &'static str = "AssistUserMetadata";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AssistUserMetadata".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AssistUserMetadata".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamAssistRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub query: ::core::option::Option<Query>,
#[prost(string, tag = "3")]
pub session: ::prost::alloc::string::String,
#[prost(message, optional, tag = "6")]
pub user_metadata: ::core::option::Option<AssistUserMetadata>,
#[prost(message, optional, tag = "22")]
pub agents_spec: ::core::option::Option<stream_assist_request::AgentsSpec>,
#[prost(message, optional, tag = "18")]
pub tools_spec: ::core::option::Option<stream_assist_request::ToolsSpec>,
#[prost(message, optional, tag = "19")]
pub generation_spec: ::core::option::Option<stream_assist_request::GenerationSpec>,
}
pub mod stream_assist_request {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentsSpec {
#[prost(message, repeated, tag = "1")]
pub agent_specs: ::prost::alloc::vec::Vec<agents_spec::AgentSpec>,
}
pub mod agents_spec {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AgentSpec {
#[prost(string, tag = "1")]
pub agent_id: ::prost::alloc::string::String,
}
impl ::prost::Name for AgentSpec {
const NAME: &'static str = "AgentSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.StreamAssistRequest.AgentsSpec.AgentSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.StreamAssistRequest.AgentsSpec.AgentSpec"
.into()
}
}
}
impl ::prost::Name for AgentsSpec {
const NAME: &'static str = "AgentsSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.StreamAssistRequest.AgentsSpec".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.StreamAssistRequest.AgentsSpec"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolsSpec {
#[prost(message, optional, tag = "1")]
pub vertex_ai_search_spec: ::core::option::Option<
tools_spec::VertexAiSearchSpec,
>,
#[prost(message, optional, tag = "2")]
pub web_grounding_spec: ::core::option::Option<tools_spec::WebGroundingSpec>,
#[prost(message, optional, tag = "3")]
pub image_generation_spec: ::core::option::Option<
tools_spec::ImageGenerationSpec,
>,
#[prost(message, optional, tag = "4")]
pub video_generation_spec: ::core::option::Option<
tools_spec::VideoGenerationSpec,
>,
}
pub mod tools_spec {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VertexAiSearchSpec {
#[prost(message, repeated, tag = "2")]
pub data_store_specs: ::prost::alloc::vec::Vec<
super::super::search_request::DataStoreSpec,
>,
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
}
impl ::prost::Name for VertexAiSearchSpec {
const NAME: &'static str = "VertexAiSearchSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WebGroundingSpec {}
impl ::prost::Name for WebGroundingSpec {
const NAME: &'static str = "WebGroundingSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec.WebGroundingSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec.WebGroundingSpec"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ImageGenerationSpec {}
impl ::prost::Name for ImageGenerationSpec {
const NAME: &'static str = "ImageGenerationSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec.ImageGenerationSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec.ImageGenerationSpec"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct VideoGenerationSpec {}
impl ::prost::Name for VideoGenerationSpec {
const NAME: &'static str = "VideoGenerationSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec.VideoGenerationSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec.VideoGenerationSpec"
.into()
}
}
}
impl ::prost::Name for ToolsSpec {
const NAME: &'static str = "ToolsSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.StreamAssistRequest.ToolsSpec"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GenerationSpec {
#[prost(string, tag = "1")]
pub model_id: ::prost::alloc::string::String,
}
impl ::prost::Name for GenerationSpec {
const NAME: &'static str = "GenerationSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.StreamAssistRequest.GenerationSpec".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.StreamAssistRequest.GenerationSpec"
.into()
}
}
}
impl ::prost::Name for StreamAssistRequest {
const NAME: &'static str = "StreamAssistRequest";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.StreamAssistRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.StreamAssistRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamAssistResponse {
#[prost(message, optional, tag = "1")]
pub answer: ::core::option::Option<AssistAnswer>,
#[prost(message, optional, tag = "2")]
pub session_info: ::core::option::Option<stream_assist_response::SessionInfo>,
#[prost(string, tag = "4")]
pub assist_token: ::prost::alloc::string::String,
}
pub mod stream_assist_response {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SessionInfo {
#[prost(string, tag = "1")]
pub session: ::prost::alloc::string::String,
}
impl ::prost::Name for SessionInfo {
const NAME: &'static str = "SessionInfo";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.StreamAssistResponse.SessionInfo".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.StreamAssistResponse.SessionInfo"
.into()
}
}
}
impl ::prost::Name for StreamAssistResponse {
const NAME: &'static str = "StreamAssistResponse";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.StreamAssistResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.StreamAssistResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnswerQueryRequest {
#[prost(string, tag = "1")]
pub serving_config: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub query: ::core::option::Option<Query>,
#[prost(string, tag = "3")]
pub session: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub safety_spec: ::core::option::Option<answer_query_request::SafetySpec>,
#[prost(message, optional, tag = "5")]
pub related_questions_spec: ::core::option::Option<
answer_query_request::RelatedQuestionsSpec,
>,
#[prost(message, optional, tag = "6")]
pub grounding_spec: ::core::option::Option<answer_query_request::GroundingSpec>,
#[prost(message, optional, tag = "7")]
pub answer_generation_spec: ::core::option::Option<
answer_query_request::AnswerGenerationSpec,
>,
#[prost(message, optional, tag = "8")]
pub search_spec: ::core::option::Option<answer_query_request::SearchSpec>,
#[prost(message, optional, tag = "9")]
pub query_understanding_spec: ::core::option::Option<
answer_query_request::QueryUnderstandingSpec,
>,
#[deprecated]
#[prost(bool, tag = "10")]
pub asynchronous_mode: bool,
#[prost(string, tag = "12")]
pub user_pseudo_id: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "13")]
pub user_labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "14")]
pub end_user_spec: ::core::option::Option<answer_query_request::EndUserSpec>,
}
pub mod answer_query_request {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SafetySpec {
#[prost(bool, tag = "1")]
pub enable: bool,
#[prost(message, repeated, tag = "2")]
pub safety_settings: ::prost::alloc::vec::Vec<safety_spec::SafetySetting>,
}
pub mod safety_spec {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SafetySetting {
#[prost(enumeration = "super::super::HarmCategory", tag = "1")]
pub category: i32,
#[prost(enumeration = "safety_setting::HarmBlockThreshold", tag = "2")]
pub threshold: i32,
}
pub mod safety_setting {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum HarmBlockThreshold {
Unspecified = 0,
BlockLowAndAbove = 1,
BlockMediumAndAbove = 2,
BlockOnlyHigh = 3,
BlockNone = 4,
Off = 5,
}
impl HarmBlockThreshold {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
Self::BlockLowAndAbove => "BLOCK_LOW_AND_ABOVE",
Self::BlockMediumAndAbove => "BLOCK_MEDIUM_AND_ABOVE",
Self::BlockOnlyHigh => "BLOCK_ONLY_HIGH",
Self::BlockNone => "BLOCK_NONE",
Self::Off => "OFF",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"HARM_BLOCK_THRESHOLD_UNSPECIFIED" => Some(Self::Unspecified),
"BLOCK_LOW_AND_ABOVE" => Some(Self::BlockLowAndAbove),
"BLOCK_MEDIUM_AND_ABOVE" => Some(Self::BlockMediumAndAbove),
"BLOCK_ONLY_HIGH" => Some(Self::BlockOnlyHigh),
"BLOCK_NONE" => Some(Self::BlockNone),
"OFF" => Some(Self::Off),
_ => None,
}
}
}
}
impl ::prost::Name for SafetySetting {
const NAME: &'static str = "SafetySetting";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.SafetySpec.SafetySetting"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.SafetySpec.SafetySetting"
.into()
}
}
}
impl ::prost::Name for SafetySpec {
const NAME: &'static str = "SafetySpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.SafetySpec".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.SafetySpec"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RelatedQuestionsSpec {
#[prost(bool, tag = "1")]
pub enable: bool,
}
impl ::prost::Name for RelatedQuestionsSpec {
const NAME: &'static str = "RelatedQuestionsSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.RelatedQuestionsSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.RelatedQuestionsSpec"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GroundingSpec {
#[prost(bool, tag = "2")]
pub include_grounding_supports: bool,
#[prost(enumeration = "grounding_spec::FilteringLevel", tag = "3")]
pub filtering_level: i32,
}
pub mod grounding_spec {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum FilteringLevel {
Unspecified = 0,
Low = 1,
High = 2,
}
impl FilteringLevel {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "FILTERING_LEVEL_UNSPECIFIED",
Self::Low => "FILTERING_LEVEL_LOW",
Self::High => "FILTERING_LEVEL_HIGH",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FILTERING_LEVEL_UNSPECIFIED" => Some(Self::Unspecified),
"FILTERING_LEVEL_LOW" => Some(Self::Low),
"FILTERING_LEVEL_HIGH" => Some(Self::High),
_ => None,
}
}
}
}
impl ::prost::Name for GroundingSpec {
const NAME: &'static str = "GroundingSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.GroundingSpec".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.GroundingSpec"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AnswerGenerationSpec {
#[prost(message, optional, tag = "1")]
pub model_spec: ::core::option::Option<answer_generation_spec::ModelSpec>,
#[prost(message, optional, tag = "2")]
pub prompt_spec: ::core::option::Option<answer_generation_spec::PromptSpec>,
#[prost(bool, tag = "3")]
pub include_citations: bool,
#[prost(string, tag = "4")]
pub answer_language_code: ::prost::alloc::string::String,
#[prost(bool, tag = "5")]
pub ignore_adversarial_query: bool,
#[prost(bool, tag = "6")]
pub ignore_non_answer_seeking_query: bool,
#[prost(bool, optional, tag = "7")]
pub ignore_low_relevant_content: ::core::option::Option<bool>,
#[prost(bool, tag = "8")]
pub ignore_jail_breaking_query: bool,
}
pub mod answer_generation_spec {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ModelSpec {
#[prost(string, tag = "1")]
pub model_version: ::prost::alloc::string::String,
}
impl ::prost::Name for ModelSpec {
const NAME: &'static str = "ModelSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PromptSpec {
#[prost(string, tag = "1")]
pub preamble: ::prost::alloc::string::String,
}
impl ::prost::Name for PromptSpec {
const NAME: &'static str = "PromptSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec"
.into()
}
}
}
impl ::prost::Name for AnswerGenerationSpec {
const NAME: &'static str = "AnswerGenerationSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.AnswerGenerationSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.AnswerGenerationSpec"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchSpec {
#[prost(oneof = "search_spec::Input", tags = "1, 2")]
pub input: ::core::option::Option<search_spec::Input>,
}
pub mod search_spec {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchParams {
#[prost(int32, tag = "1")]
pub max_return_results: i32,
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub boost_spec: ::core::option::Option<
super::super::search_request::BoostSpec,
>,
#[prost(string, tag = "4")]
pub order_by: ::prost::alloc::string::String,
#[prost(
enumeration = "super::super::search_request::content_search_spec::SearchResultMode",
tag = "5"
)]
pub search_result_mode: i32,
#[prost(message, repeated, tag = "7")]
pub data_store_specs: ::prost::alloc::vec::Vec<
super::super::search_request::DataStoreSpec,
>,
}
impl ::prost::Name for SearchParams {
const NAME: &'static str = "SearchParams";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchParams"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchParams"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchResultList {
#[prost(message, repeated, tag = "1")]
pub search_results: ::prost::alloc::vec::Vec<
search_result_list::SearchResult,
>,
}
pub mod search_result_list {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchResult {
#[prost(oneof = "search_result::Content", tags = "1, 2")]
pub content: ::core::option::Option<search_result::Content>,
}
pub mod search_result {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnstructuredDocumentInfo {
#[prost(string, tag = "1")]
pub document: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub uri: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub document_contexts: ::prost::alloc::vec::Vec<
unstructured_document_info::DocumentContext,
>,
#[prost(message, repeated, tag = "5")]
pub extractive_segments: ::prost::alloc::vec::Vec<
unstructured_document_info::ExtractiveSegment,
>,
#[deprecated]
#[prost(message, repeated, tag = "6")]
pub extractive_answers: ::prost::alloc::vec::Vec<
unstructured_document_info::ExtractiveAnswer,
>,
}
pub mod unstructured_document_info {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DocumentContext {
#[prost(string, tag = "1")]
pub page_identifier: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub content: ::prost::alloc::string::String,
}
impl ::prost::Name for DocumentContext {
const NAME: &'static str = "DocumentContext";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExtractiveSegment {
#[prost(string, tag = "1")]
pub page_identifier: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub content: ::prost::alloc::string::String,
}
impl ::prost::Name for ExtractiveSegment {
const NAME: &'static str = "ExtractiveSegment";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExtractiveAnswer {
#[prost(string, tag = "1")]
pub page_identifier: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub content: ::prost::alloc::string::String,
}
impl ::prost::Name for ExtractiveAnswer {
const NAME: &'static str = "ExtractiveAnswer";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer"
.into()
}
}
}
impl ::prost::Name for UnstructuredDocumentInfo {
const NAME: &'static str = "UnstructuredDocumentInfo";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ChunkInfo {
#[prost(string, tag = "1")]
pub chunk: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub content: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub document_metadata: ::core::option::Option<
chunk_info::DocumentMetadata,
>,
}
pub mod chunk_info {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DocumentMetadata {
#[prost(string, tag = "1")]
pub uri: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
}
impl ::prost::Name for DocumentMetadata {
const NAME: &'static str = "DocumentMetadata";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata"
.into()
}
}
}
impl ::prost::Name for ChunkInfo {
const NAME: &'static str = "ChunkInfo";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Content {
#[prost(message, tag = "1")]
UnstructuredDocumentInfo(UnstructuredDocumentInfo),
#[prost(message, tag = "2")]
ChunkInfo(ChunkInfo),
}
}
impl ::prost::Name for SearchResult {
const NAME: &'static str = "SearchResult";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult"
.into()
}
}
}
impl ::prost::Name for SearchResultList {
const NAME: &'static str = "SearchResultList";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Input {
#[prost(message, tag = "1")]
SearchParams(SearchParams),
#[prost(message, tag = "2")]
SearchResultList(SearchResultList),
}
}
impl ::prost::Name for SearchSpec {
const NAME: &'static str = "SearchSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryUnderstandingSpec {
#[prost(message, optional, tag = "1")]
pub query_classification_spec: ::core::option::Option<
query_understanding_spec::QueryClassificationSpec,
>,
#[prost(message, optional, tag = "2")]
pub query_rephraser_spec: ::core::option::Option<
query_understanding_spec::QueryRephraserSpec,
>,
#[prost(bool, tag = "3")]
pub disable_spell_correction: bool,
}
pub mod query_understanding_spec {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryClassificationSpec {
#[prost(
enumeration = "query_classification_spec::Type",
repeated,
tag = "1"
)]
pub types: ::prost::alloc::vec::Vec<i32>,
}
pub mod query_classification_spec {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
AdversarialQuery = 1,
NonAnswerSeekingQuery = 2,
JailBreakingQuery = 3,
NonAnswerSeekingQueryV2 = 4,
UserDefinedClassificationQuery = 5,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TYPE_UNSPECIFIED",
Self::AdversarialQuery => "ADVERSARIAL_QUERY",
Self::NonAnswerSeekingQuery => "NON_ANSWER_SEEKING_QUERY",
Self::JailBreakingQuery => "JAIL_BREAKING_QUERY",
Self::NonAnswerSeekingQueryV2 => "NON_ANSWER_SEEKING_QUERY_V2",
Self::UserDefinedClassificationQuery => {
"USER_DEFINED_CLASSIFICATION_QUERY"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"ADVERSARIAL_QUERY" => Some(Self::AdversarialQuery),
"NON_ANSWER_SEEKING_QUERY" => Some(Self::NonAnswerSeekingQuery),
"JAIL_BREAKING_QUERY" => Some(Self::JailBreakingQuery),
"NON_ANSWER_SEEKING_QUERY_V2" => {
Some(Self::NonAnswerSeekingQueryV2)
}
"USER_DEFINED_CLASSIFICATION_QUERY" => {
Some(Self::UserDefinedClassificationQuery)
}
_ => None,
}
}
}
}
impl ::prost::Name for QueryClassificationSpec {
const NAME: &'static str = "QueryClassificationSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryRephraserSpec {
#[prost(bool, tag = "1")]
pub disable: bool,
#[prost(int32, tag = "2")]
pub max_rephrase_steps: i32,
#[prost(message, optional, tag = "3")]
pub model_spec: ::core::option::Option<query_rephraser_spec::ModelSpec>,
}
pub mod query_rephraser_spec {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ModelSpec {
#[prost(enumeration = "model_spec::ModelType", tag = "1")]
pub model_type: i32,
}
pub mod model_spec {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ModelType {
Unspecified = 0,
Small = 1,
Large = 2,
}
impl ModelType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "MODEL_TYPE_UNSPECIFIED",
Self::Small => "SMALL",
Self::Large => "LARGE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MODEL_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"SMALL" => Some(Self::Small),
"LARGE" => Some(Self::Large),
_ => None,
}
}
}
}
impl ::prost::Name for ModelSpec {
const NAME: &'static str = "ModelSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec"
.into()
}
}
}
impl ::prost::Name for QueryRephraserSpec {
const NAME: &'static str = "QueryRephraserSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec"
.into()
}
}
}
impl ::prost::Name for QueryUnderstandingSpec {
const NAME: &'static str = "QueryUnderstandingSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EndUserSpec {
#[prost(message, repeated, tag = "1")]
pub end_user_metadata: ::prost::alloc::vec::Vec<end_user_spec::EndUserMetaData>,
}
pub mod end_user_spec {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EndUserMetaData {
#[prost(oneof = "end_user_meta_data::Content", tags = "1")]
pub content: ::core::option::Option<end_user_meta_data::Content>,
}
pub mod end_user_meta_data {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ChunkInfo {
#[prost(string, tag = "1")]
pub content: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub document_metadata: ::core::option::Option<
chunk_info::DocumentMetadata,
>,
}
pub mod chunk_info {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DocumentMetadata {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
}
impl ::prost::Name for DocumentMetadata {
const NAME: &'static str = "DocumentMetadata";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata"
.into()
}
}
}
impl ::prost::Name for ChunkInfo {
const NAME: &'static str = "ChunkInfo";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Content {
#[prost(message, tag = "1")]
ChunkInfo(ChunkInfo),
}
}
impl ::prost::Name for EndUserMetaData {
const NAME: &'static str = "EndUserMetaData";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.EndUserSpec.EndUserMetaData"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.EndUserSpec.EndUserMetaData"
.into()
}
}
}
impl ::prost::Name for EndUserSpec {
const NAME: &'static str = "EndUserSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest.EndUserSpec".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest.EndUserSpec"
.into()
}
}
}
impl ::prost::Name for AnswerQueryRequest {
const NAME: &'static str = "AnswerQueryRequest";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnswerQueryResponse {
#[prost(message, optional, tag = "1")]
pub answer: ::core::option::Option<Answer>,
#[prost(message, optional, tag = "2")]
pub session: ::core::option::Option<Session>,
#[prost(string, tag = "3")]
pub answer_query_token: ::prost::alloc::string::String,
}
impl ::prost::Name for AnswerQueryResponse {
const NAME: &'static str = "AnswerQueryResponse";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.AnswerQueryResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.AnswerQueryResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GroundingFact {
#[prost(string, tag = "1")]
pub fact_text: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "2")]
pub attributes: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
impl ::prost::Name for GroundingFact {
const NAME: &'static str = "GroundingFact";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GroundingFact".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GroundingFact".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FactChunk {
#[prost(string, tag = "1")]
pub chunk_text: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub source: ::prost::alloc::string::String,
#[prost(int32, tag = "4")]
pub index: i32,
#[prost(map = "string, string", tag = "3")]
pub source_metadata: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(string, tag = "5")]
pub uri: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub domain: ::prost::alloc::string::String,
}
impl ::prost::Name for FactChunk {
const NAME: &'static str = "FactChunk";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.FactChunk".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.FactChunk".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GroundedGenerationContent {
#[prost(string, tag = "1")]
pub role: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub parts: ::prost::alloc::vec::Vec<grounded_generation_content::Part>,
}
pub mod grounded_generation_content {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Part {
#[prost(oneof = "part::Data", tags = "1")]
pub data: ::core::option::Option<part::Data>,
}
pub mod part {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Data {
#[prost(string, tag = "1")]
Text(::prost::alloc::string::String),
}
}
impl ::prost::Name for Part {
const NAME: &'static str = "Part";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GroundedGenerationContent.Part".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GroundedGenerationContent.Part"
.into()
}
}
}
impl ::prost::Name for GroundedGenerationContent {
const NAME: &'static str = "GroundedGenerationContent";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GroundedGenerationContent".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GroundedGenerationContent"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateGroundedContentRequest {
#[prost(string, tag = "1")]
pub location: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub system_instruction: ::core::option::Option<GroundedGenerationContent>,
#[prost(message, repeated, tag = "2")]
pub contents: ::prost::alloc::vec::Vec<GroundedGenerationContent>,
#[prost(message, optional, tag = "3")]
pub generation_spec: ::core::option::Option<
generate_grounded_content_request::GenerationSpec,
>,
#[prost(message, optional, tag = "4")]
pub grounding_spec: ::core::option::Option<
generate_grounded_content_request::GroundingSpec,
>,
#[prost(map = "string, string", tag = "6")]
pub user_labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
pub mod generate_grounded_content_request {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerationSpec {
#[prost(string, tag = "3")]
pub model_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub language_code: ::prost::alloc::string::String,
#[prost(float, optional, tag = "4")]
pub temperature: ::core::option::Option<f32>,
#[prost(float, optional, tag = "5")]
pub top_p: ::core::option::Option<f32>,
#[prost(int32, optional, tag = "7")]
pub top_k: ::core::option::Option<i32>,
#[prost(float, optional, tag = "8")]
pub frequency_penalty: ::core::option::Option<f32>,
#[prost(int32, optional, tag = "12")]
pub seed: ::core::option::Option<i32>,
#[prost(float, optional, tag = "9")]
pub presence_penalty: ::core::option::Option<f32>,
#[prost(int32, optional, tag = "10")]
pub max_output_tokens: ::core::option::Option<i32>,
}
impl ::prost::Name for GenerationSpec {
const NAME: &'static str = "GenerationSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GenerationSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GenerationSpec"
.into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DynamicRetrievalConfiguration {
#[prost(message, optional, tag = "1")]
pub predictor: ::core::option::Option<
dynamic_retrieval_configuration::DynamicRetrievalPredictor,
>,
}
pub mod dynamic_retrieval_configuration {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DynamicRetrievalPredictor {
#[prost(enumeration = "dynamic_retrieval_predictor::Version", tag = "1")]
pub version: i32,
#[prost(float, optional, tag = "2")]
pub threshold: ::core::option::Option<f32>,
}
pub mod dynamic_retrieval_predictor {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Version {
Unspecified = 0,
V1Independent = 1,
}
impl Version {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "VERSION_UNSPECIFIED",
Self::V1Independent => "V1_INDEPENDENT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"VERSION_UNSPECIFIED" => Some(Self::Unspecified),
"V1_INDEPENDENT" => Some(Self::V1Independent),
_ => None,
}
}
}
}
impl ::prost::Name for DynamicRetrievalPredictor {
const NAME: &'static str = "DynamicRetrievalPredictor";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.DynamicRetrievalConfiguration.DynamicRetrievalPredictor"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.DynamicRetrievalConfiguration.DynamicRetrievalPredictor"
.into()
}
}
}
impl ::prost::Name for DynamicRetrievalConfiguration {
const NAME: &'static str = "DynamicRetrievalConfiguration";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.DynamicRetrievalConfiguration"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.DynamicRetrievalConfiguration"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GroundingSource {
#[prost(oneof = "grounding_source::Source", tags = "1, 2, 3, 8")]
pub source: ::core::option::Option<grounding_source::Source>,
}
pub mod grounding_source {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InlineSource {
#[prost(message, repeated, tag = "1")]
pub grounding_facts: ::prost::alloc::vec::Vec<super::super::GroundingFact>,
#[prost(map = "string, string", tag = "2")]
pub attributes: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
impl ::prost::Name for InlineSource {
const NAME: &'static str = "InlineSource";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource.InlineSource"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource.InlineSource"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SearchSource {
#[prost(string, tag = "1")]
pub serving_config: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub max_result_count: i32,
#[prost(string, tag = "3")]
pub filter: ::prost::alloc::string::String,
#[prost(bool, tag = "5")]
pub safe_search: bool,
}
impl ::prost::Name for SearchSource {
const NAME: &'static str = "SearchSource";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource.SearchSource"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource.SearchSource"
.into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GoogleSearchSource {
#[prost(message, optional, tag = "2")]
pub dynamic_retrieval_config: ::core::option::Option<
super::DynamicRetrievalConfiguration,
>,
}
impl ::prost::Name for GoogleSearchSource {
const NAME: &'static str = "GoogleSearchSource";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource.GoogleSearchSource"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource.GoogleSearchSource"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EnterpriseWebRetrievalSource {}
impl ::prost::Name for EnterpriseWebRetrievalSource {
const NAME: &'static str = "EnterpriseWebRetrievalSource";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Source {
#[prost(message, tag = "1")]
InlineSource(InlineSource),
#[prost(message, tag = "2")]
SearchSource(SearchSource),
#[prost(message, tag = "3")]
GoogleSearchSource(GoogleSearchSource),
#[prost(message, tag = "8")]
EnterpriseWebRetrievalSource(EnterpriseWebRetrievalSource),
}
}
impl ::prost::Name for GroundingSource {
const NAME: &'static str = "GroundingSource";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSource"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GroundingSpec {
#[prost(message, repeated, tag = "1")]
pub grounding_sources: ::prost::alloc::vec::Vec<GroundingSource>,
}
impl ::prost::Name for GroundingSpec {
const NAME: &'static str = "GroundingSpec";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSpec"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GroundingSpec"
.into()
}
}
}
impl ::prost::Name for GenerateGroundedContentRequest {
const NAME: &'static str = "GenerateGroundedContentRequest";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentRequest"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateGroundedContentResponse {
#[prost(message, repeated, tag = "1")]
pub candidates: ::prost::alloc::vec::Vec<
generate_grounded_content_response::Candidate,
>,
}
pub mod generate_grounded_content_response {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Candidate {
#[prost(int32, tag = "1")]
pub index: i32,
#[prost(message, optional, tag = "2")]
pub content: ::core::option::Option<super::GroundedGenerationContent>,
#[prost(float, optional, tag = "3")]
pub grounding_score: ::core::option::Option<f32>,
#[prost(message, optional, tag = "4")]
pub grounding_metadata: ::core::option::Option<candidate::GroundingMetadata>,
}
pub mod candidate {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GroundingMetadata {
#[prost(message, repeated, tag = "5")]
pub retrieval_metadata: ::prost::alloc::vec::Vec<
grounding_metadata::RetrievalMetadata,
>,
#[prost(message, repeated, tag = "1")]
pub support_chunks: ::prost::alloc::vec::Vec<super::super::FactChunk>,
#[prost(string, repeated, tag = "3")]
pub web_search_queries: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "4")]
pub search_entry_point: ::core::option::Option<
grounding_metadata::SearchEntryPoint,
>,
#[prost(message, repeated, tag = "2")]
pub grounding_support: ::prost::alloc::vec::Vec<
grounding_metadata::GroundingSupport,
>,
#[prost(message, repeated, tag = "9")]
pub images: ::prost::alloc::vec::Vec<grounding_metadata::ImageMetadata>,
}
pub mod grounding_metadata {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RetrievalMetadata {
#[prost(enumeration = "retrieval_metadata::Source", tag = "1")]
pub source: i32,
#[prost(message, optional, tag = "2")]
pub dynamic_retrieval_metadata: ::core::option::Option<
DynamicRetrievalMetadata,
>,
}
pub mod retrieval_metadata {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Source {
Unspecified = 0,
VertexAiSearch = 1,
GoogleSearch = 3,
InlineContent = 2,
GoogleMaps = 4,
}
impl Source {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SOURCE_UNSPECIFIED",
Self::VertexAiSearch => "VERTEX_AI_SEARCH",
Self::GoogleSearch => "GOOGLE_SEARCH",
Self::InlineContent => "INLINE_CONTENT",
Self::GoogleMaps => "GOOGLE_MAPS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
"VERTEX_AI_SEARCH" => Some(Self::VertexAiSearch),
"GOOGLE_SEARCH" => Some(Self::GoogleSearch),
"INLINE_CONTENT" => Some(Self::InlineContent),
"GOOGLE_MAPS" => Some(Self::GoogleMaps),
_ => None,
}
}
}
}
impl ::prost::Name for RetrievalMetadata {
const NAME: &'static str = "RetrievalMetadata";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata"
.into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DynamicRetrievalMetadata {
#[prost(message, optional, tag = "1")]
pub predictor_metadata: ::core::option::Option<
DynamicRetrievalPredictorMetadata,
>,
}
impl ::prost::Name for DynamicRetrievalMetadata {
const NAME: &'static str = "DynamicRetrievalMetadata";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.DynamicRetrievalMetadata"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.DynamicRetrievalMetadata"
.into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DynamicRetrievalPredictorMetadata {
#[prost(
enumeration = "dynamic_retrieval_predictor_metadata::Version",
tag = "1"
)]
pub version: i32,
#[prost(float, optional, tag = "2")]
pub prediction: ::core::option::Option<f32>,
}
pub mod dynamic_retrieval_predictor_metadata {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Version {
Unspecified = 0,
V1Independent = 1,
}
impl Version {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "VERSION_UNSPECIFIED",
Self::V1Independent => "V1_INDEPENDENT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"VERSION_UNSPECIFIED" => Some(Self::Unspecified),
"V1_INDEPENDENT" => Some(Self::V1Independent),
_ => None,
}
}
}
}
impl ::prost::Name for DynamicRetrievalPredictorMetadata {
const NAME: &'static str = "DynamicRetrievalPredictorMetadata";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.DynamicRetrievalPredictorMetadata"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.DynamicRetrievalPredictorMetadata"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SearchEntryPoint {
#[prost(string, tag = "1")]
pub rendered_content: ::prost::alloc::string::String,
#[prost(bytes = "bytes", tag = "2")]
pub sdk_blob: ::prost::bytes::Bytes,
}
impl ::prost::Name for SearchEntryPoint {
const NAME: &'static str = "SearchEntryPoint";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GroundingSupport {
#[prost(string, tag = "1")]
pub claim_text: ::prost::alloc::string::String,
#[prost(int32, repeated, tag = "3")]
pub support_chunk_indices: ::prost::alloc::vec::Vec<i32>,
#[prost(float, optional, tag = "2")]
pub support_score: ::core::option::Option<f32>,
}
impl ::prost::Name for GroundingSupport {
const NAME: &'static str = "GroundingSupport";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ImageMetadata {
#[prost(message, optional, tag = "1")]
pub image: ::core::option::Option<image_metadata::Image>,
#[prost(message, optional, tag = "2")]
pub thumbnail: ::core::option::Option<image_metadata::Image>,
#[prost(message, optional, tag = "3")]
pub source: ::core::option::Option<image_metadata::WebsiteInfo>,
}
pub mod image_metadata {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WebsiteInfo {
#[prost(string, tag = "1")]
pub uri: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
}
impl ::prost::Name for WebsiteInfo {
const NAME: &'static str = "WebsiteInfo";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Image {
#[prost(string, tag = "1")]
pub uri: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub width: i32,
#[prost(int32, tag = "3")]
pub height: i32,
}
impl ::prost::Name for Image {
const NAME: &'static str = "Image";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image"
.into()
}
}
}
impl ::prost::Name for ImageMetadata {
const NAME: &'static str = "ImageMetadata";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata"
.into()
}
}
}
impl ::prost::Name for GroundingMetadata {
const NAME: &'static str = "GroundingMetadata";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata"
.into()
}
}
}
impl ::prost::Name for Candidate {
const NAME: &'static str = "Candidate";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate"
.into()
}
}
}
impl ::prost::Name for GenerateGroundedContentResponse {
const NAME: &'static str = "GenerateGroundedContentResponse";
const PACKAGE: &'static str = "google.cloud.discoveryengine.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.discoveryengine.v1.GenerateGroundedContentResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.discoveryengine.v1.GenerateGroundedContentResponse"
.into()
}
}