#[non_exhaustive]pub struct AssignmentProtocol {
pub assignment_type: Option<AssignmentType>,
/* private fields */
}Expand description
Assignment protocol for a license pool.
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.assignment_type: Option<AssignmentType>The type of assignment protocol.
Implementations§
Source§impl AssignmentProtocol
impl AssignmentProtocol
Sourcepub fn set_assignment_type<T: Into<Option<AssignmentType>>>(self, v: T) -> Self
pub fn set_assignment_type<T: Into<Option<AssignmentType>>>(self, v: T) -> Self
Sets the value of assignment_type.
Note that all the setters affecting assignment_type are mutually
exclusive.
§Example
ⓘ
use google_cloud_commerce_consumer_procurement_v1::model::assignment_protocol::ManualAssignmentType;
let x = AssignmentProtocol::new().set_assignment_type(Some(
google_cloud_commerce_consumer_procurement_v1::model::assignment_protocol::AssignmentType::ManualAssignmentType(ManualAssignmentType::default().into())));Sourcepub fn manual_assignment_type(&self) -> Option<&Box<ManualAssignmentType>>
pub fn manual_assignment_type(&self) -> Option<&Box<ManualAssignmentType>>
The value of assignment_type
if it holds a ManualAssignmentType, None if the field is not set or
holds a different branch.
Sourcepub fn set_manual_assignment_type<T: Into<Box<ManualAssignmentType>>>(
self,
v: T,
) -> Self
pub fn set_manual_assignment_type<T: Into<Box<ManualAssignmentType>>>( self, v: T, ) -> Self
Sets the value of assignment_type
to hold a ManualAssignmentType.
Note that all the setters affecting assignment_type are
mutually exclusive.
§Example
ⓘ
use google_cloud_commerce_consumer_procurement_v1::model::assignment_protocol::ManualAssignmentType;
let x = AssignmentProtocol::new().set_manual_assignment_type(ManualAssignmentType::default()/* use setters */);
assert!(x.manual_assignment_type().is_some());
assert!(x.auto_assignment_type().is_none());Sourcepub fn auto_assignment_type(&self) -> Option<&Box<AutoAssignmentType>>
pub fn auto_assignment_type(&self) -> Option<&Box<AutoAssignmentType>>
The value of assignment_type
if it holds a AutoAssignmentType, None if the field is not set or
holds a different branch.
Sourcepub fn set_auto_assignment_type<T: Into<Box<AutoAssignmentType>>>(
self,
v: T,
) -> Self
pub fn set_auto_assignment_type<T: Into<Box<AutoAssignmentType>>>( self, v: T, ) -> Self
Sets the value of assignment_type
to hold a AutoAssignmentType.
Note that all the setters affecting assignment_type are
mutually exclusive.
§Example
ⓘ
use google_cloud_commerce_consumer_procurement_v1::model::assignment_protocol::AutoAssignmentType;
let x = AssignmentProtocol::new().set_auto_assignment_type(AutoAssignmentType::default()/* use setters */);
assert!(x.auto_assignment_type().is_some());
assert!(x.manual_assignment_type().is_none());Trait Implementations§
Source§impl Clone for AssignmentProtocol
impl Clone for AssignmentProtocol
Source§fn clone(&self) -> AssignmentProtocol
fn clone(&self) -> AssignmentProtocol
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AssignmentProtocol
impl Debug for AssignmentProtocol
Source§impl Default for AssignmentProtocol
impl Default for AssignmentProtocol
Source§fn default() -> AssignmentProtocol
fn default() -> AssignmentProtocol
Returns the “default value” for a type. Read more
Source§impl Message for AssignmentProtocol
impl Message for AssignmentProtocol
Source§impl PartialEq for AssignmentProtocol
impl PartialEq for AssignmentProtocol
Source§fn eq(&self, other: &AssignmentProtocol) -> bool
fn eq(&self, other: &AssignmentProtocol) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AssignmentProtocol
Auto Trait Implementations§
impl Freeze for AssignmentProtocol
impl RefUnwindSafe for AssignmentProtocol
impl Send for AssignmentProtocol
impl Sync for AssignmentProtocol
impl Unpin for AssignmentProtocol
impl UnsafeUnpin for AssignmentProtocol
impl UnwindSafe for AssignmentProtocol
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