Struct GenerateGroundedContent (0.5.0)

The request builder for [GroundedGenerationService::generate_grounded_content][crate::client::GroundedGenerationService::generate_grounded_content] calls.

Example

# use google_cloud_discoveryengine_v1::builder;
use builder::grounded_generation_service::GenerateGroundedContent;
# tokio_test::block_on(async {

let builder = prepare_request_builder();
let response = builder.send().await?;
# gax::Result::<()>::Ok(()) });

fn prepare_request_builder() -> GenerateGroundedContent {
  # panic!();
  // ... details omitted ...
}

Implementations

with_request

 fn with_request<V: Into<crate::model::GenerateGroundedContentRequest>>(self, v: V) -> Self

Sets the full request, replacing any prior values.

with_options

 fn with_options<V: Into<gax::options::RequestOptions>>(self, v: V) -> Self

Sets all the options, replacing any prior values.

send

async fn send(self) -> Result<crate::model::GenerateGroundedContentResponse>

Sends the request.

set_location

 fn set_location<T: Into<std::string::String>>(self, v: T) -> Self

Sets the value of [location][crate::model::GenerateGroundedContentRequest::location].

This is a required field for requests.

set_system_instruction

 fn set_system_instruction<T>(self, v: T) -> Self
where
    T: std::convert::Into<crate::model::GroundedGenerationContent>,

Sets the value of [system_instruction][crate::model::GenerateGroundedContentRequest::system_instruction].

set_or_clear_system_instruction

 fn set_or_clear_system_instruction<T>(self, v: std::option::Option<T>) -> Self
where
    T: std::convert::Into<crate::model::GroundedGenerationContent>,

Sets or clears the value of [system_instruction][crate::model::GenerateGroundedContentRequest::system_instruction].

set_contents

 fn set_contents<T, V>(self, v: T) -> Self
where
    T: std::iter::IntoIterator,
    V: std::convert::Into<crate::model::GroundedGenerationContent>,

Sets the value of [contents][crate::model::GenerateGroundedContentRequest::contents].

set_generation_spec

 fn set_generation_spec<T>(self, v: T) -> Self
where
    T: std::convert::Into<crate::model::generate_grounded_content_request::GenerationSpec>,

Sets the value of [generation_spec][crate::model::GenerateGroundedContentRequest::generation_spec].

set_or_clear_generation_spec

 fn set_or_clear_generation_spec<T>(self, v: std::option::Option<T>) -> Self
where
    T: std::convert::Into<crate::model::generate_grounded_content_request::GenerationSpec>,

Sets or clears the value of [generation_spec][crate::model::GenerateGroundedContentRequest::generation_spec].

set_grounding_spec

 fn set_grounding_spec<T>(self, v: T) -> Self
where
    T: std::convert::Into<crate::model::generate_grounded_content_request::GroundingSpec>,

Sets the value of [grounding_spec][crate::model::GenerateGroundedContentRequest::grounding_spec].

set_or_clear_grounding_spec

 fn set_or_clear_grounding_spec<T>(self, v: std::option::Option<T>) -> Self
where
    T: std::convert::Into<crate::model::generate_grounded_content_request::GroundingSpec>,

Sets or clears the value of [grounding_spec][crate::model::GenerateGroundedContentRequest::grounding_spec].

set_user_labels

 fn set_user_labels<T, K, V>(self, v: T) -> Self
where
    T: std::iter::IntoIterator,
    K: std::convert::Into<std::string::String>,
    V: std::convert::Into<std::string::String>,

Sets the value of [user_labels][crate::model::GenerateGroundedContentRequest::user_labels].