#[non_exhaustive]pub struct CreateDeviceSessionRequest {
pub parent: String,
pub device_session: Option<DeviceSession>,
pub device_session_id: String,
/* private fields */
}Expand description
Request message for DirectAccessService.CreateDeviceSession.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parent: StringRequired. The Compute Engine project under which this device will be allocated. “projects/{project_id}”
device_session: Option<DeviceSession>Required. A DeviceSession to create.
device_session_id: StringOptional. The ID to use for the DeviceSession, which will become the final component of the DeviceSession’s resource name.
This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.
Implementations§
Source§impl CreateDeviceSessionRequest
impl CreateDeviceSessionRequest
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
Sourcepub fn set_device_session<T>(self, v: T) -> Selfwhere
T: Into<DeviceSession>,
pub fn set_device_session<T>(self, v: T) -> Selfwhere
T: Into<DeviceSession>,
Sets the value of device_session.
§Example
ⓘ
use google_cloud_devicestreaming_v1::model::DeviceSession;
let x = CreateDeviceSessionRequest::new().set_device_session(DeviceSession::default()/* use setters */);Sourcepub fn set_or_clear_device_session<T>(self, v: Option<T>) -> Selfwhere
T: Into<DeviceSession>,
pub fn set_or_clear_device_session<T>(self, v: Option<T>) -> Selfwhere
T: Into<DeviceSession>,
Sets or clears the value of device_session.
§Example
ⓘ
use google_cloud_devicestreaming_v1::model::DeviceSession;
let x = CreateDeviceSessionRequest::new().set_or_clear_device_session(Some(DeviceSession::default()/* use setters */));
let x = CreateDeviceSessionRequest::new().set_or_clear_device_session(None::<DeviceSession>);Sourcepub fn set_device_session_id<T: Into<String>>(self, v: T) -> Self
pub fn set_device_session_id<T: Into<String>>(self, v: T) -> Self
Sets the value of device_session_id.
§Example
ⓘ
let x = CreateDeviceSessionRequest::new().set_device_session_id("example");Trait Implementations§
Source§impl Clone for CreateDeviceSessionRequest
impl Clone for CreateDeviceSessionRequest
Source§fn clone(&self) -> CreateDeviceSessionRequest
fn clone(&self) -> CreateDeviceSessionRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateDeviceSessionRequest
impl Debug for CreateDeviceSessionRequest
Source§impl Default for CreateDeviceSessionRequest
impl Default for CreateDeviceSessionRequest
Source§fn default() -> CreateDeviceSessionRequest
fn default() -> CreateDeviceSessionRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateDeviceSessionRequest
impl Message for CreateDeviceSessionRequest
impl StructuralPartialEq for CreateDeviceSessionRequest
Auto Trait Implementations§
impl Freeze for CreateDeviceSessionRequest
impl RefUnwindSafe for CreateDeviceSessionRequest
impl Send for CreateDeviceSessionRequest
impl Sync for CreateDeviceSessionRequest
impl Unpin for CreateDeviceSessionRequest
impl UnwindSafe for CreateDeviceSessionRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more