Struct CreateSession (0.5.0)

The request builder for [ConversationalSearchService::create_session][crate::client::ConversationalSearchService::create_session] calls.

Example

# use google_cloud_discoveryengine_v1::builder;
use builder::conversational_search_service::CreateSession;
# tokio_test::block_on(async {

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

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

Implementations

with_request

 fn with_request<V: Into<crate::model::CreateSessionRequest>>(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::Session>

Sends the request.

set_parent

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

Sets the value of [parent][crate::model::CreateSessionRequest::parent].

This is a required field for requests.

set_session

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

Sets the value of [session][crate::model::CreateSessionRequest::session].

This is a required field for requests.

set_or_clear_session

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

Sets or clears the value of [session][crate::model::CreateSessionRequest::session].

This is a required field for requests.