#[non_exhaustive]pub struct CreateSessionRequest {
pub parent: String,
pub session: Option<Session>,
pub session_id: String,
pub request_id: String,
/* private fields */
}Expand description
A request to create a session.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parent: StringRequired. The parent resource where this session will be created.
session: Option<Session>Required. The interactive session to create.
session_id: StringRequired. The ID to use for the session, which becomes the final component of the session’s resource name.
This value must be 4-63 characters. Valid characters are /[a-z][0-9]-/.
request_id: StringOptional. A unique ID used to identify the request. If the service receives two CreateSessionRequestss with the same ID, the second request is ignored, and the first Session is created and stored in the backend.
Recommendation: Set this value to a UUID.
The value must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
Implementations§
Source§impl CreateSessionRequest
impl CreateSessionRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sets the value of parent.
Sourcepub fn set_session<T>(self, v: T) -> Self
pub fn set_session<T>(self, v: T) -> Self
Sets the value of session.
Sourcepub fn set_or_clear_session<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_session<T>(self, v: Option<T>) -> Self
Sets or clears the value of session.
Sourcepub fn set_session_id<T: Into<String>>(self, v: T) -> Self
pub fn set_session_id<T: Into<String>>(self, v: T) -> Self
Sets the value of session_id.
Sourcepub fn set_request_id<T: Into<String>>(self, v: T) -> Self
pub fn set_request_id<T: Into<String>>(self, v: T) -> Self
Sets the value of request_id.
Trait Implementations§
Source§impl Clone for CreateSessionRequest
impl Clone for CreateSessionRequest
Source§fn clone(&self) -> CreateSessionRequest
fn clone(&self) -> CreateSessionRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more