#[non_exhaustive]pub struct Modification {
pub line_item_id: String,
pub change_type: LineItemChangeType,
pub new_line_item_info: Option<LineItemInfo>,
pub auto_renewal_behavior: AutoRenewalBehavior,
/* private fields */
}Expand description
Modifications to make on the order.
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.line_item_id: StringRequired. ID of the existing line item to make change to. Required when change type is [LineItemChangeType.LINE_ITEM_CHANGE_TYPE_UPDATE] or [LineItemChangeType.LINE_ITEM_CHANGE_TYPE_CANCEL].
change_type: LineItemChangeTypeRequired. Type of change to make.
new_line_item_info: Option<LineItemInfo>Optional. The line item to update to. Required when change_type is [LineItemChangeType.LINE_ITEM_CHANGE_TYPE_CREATE] or [LineItemChangeType.LINE_ITEM_CHANGE_TYPE_UPDATE].
auto_renewal_behavior: AutoRenewalBehaviorOptional. Auto renewal behavior of the subscription for the update. Applied when change_type is [LineItemChangeType.LINE_ITEM_CHANGE_TYPE_UPDATE]. Follows plan default config when this field is not specified.
Implementations§
Source§impl Modification
impl Modification
Sourcepub fn set_line_item_id<T: Into<String>>(self, v: T) -> Self
pub fn set_line_item_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_change_type<T: Into<LineItemChangeType>>(self, v: T) -> Self
pub fn set_change_type<T: Into<LineItemChangeType>>(self, v: T) -> Self
Sets the value of change_type.
§Example
use google_cloud_commerce_consumer_procurement_v1::model::LineItemChangeType;
let x0 = Modification::new().set_change_type(LineItemChangeType::Create);
let x1 = Modification::new().set_change_type(LineItemChangeType::Update);
let x2 = Modification::new().set_change_type(LineItemChangeType::Cancel);Sourcepub fn set_new_line_item_info<T>(self, v: T) -> Selfwhere
T: Into<LineItemInfo>,
pub fn set_new_line_item_info<T>(self, v: T) -> Selfwhere
T: Into<LineItemInfo>,
Sets the value of new_line_item_info.
§Example
use google_cloud_commerce_consumer_procurement_v1::model::LineItemInfo;
let x = Modification::new().set_new_line_item_info(LineItemInfo::default()/* use setters */);Sourcepub fn set_or_clear_new_line_item_info<T>(self, v: Option<T>) -> Selfwhere
T: Into<LineItemInfo>,
pub fn set_or_clear_new_line_item_info<T>(self, v: Option<T>) -> Selfwhere
T: Into<LineItemInfo>,
Sets or clears the value of new_line_item_info.
§Example
use google_cloud_commerce_consumer_procurement_v1::model::LineItemInfo;
let x = Modification::new().set_or_clear_new_line_item_info(Some(LineItemInfo::default()/* use setters */));
let x = Modification::new().set_or_clear_new_line_item_info(None::<LineItemInfo>);Sourcepub fn set_auto_renewal_behavior<T: Into<AutoRenewalBehavior>>(
self,
v: T,
) -> Self
pub fn set_auto_renewal_behavior<T: Into<AutoRenewalBehavior>>( self, v: T, ) -> Self
Sets the value of auto_renewal_behavior.
§Example
use google_cloud_commerce_consumer_procurement_v1::model::AutoRenewalBehavior;
let x0 = Modification::new().set_auto_renewal_behavior(AutoRenewalBehavior::Enable);
let x1 = Modification::new().set_auto_renewal_behavior(AutoRenewalBehavior::Disable);Trait Implementations§
Source§impl Clone for Modification
impl Clone for Modification
Source§fn clone(&self) -> Modification
fn clone(&self) -> Modification
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Modification
impl Debug for Modification
Source§impl Default for Modification
impl Default for Modification
Source§fn default() -> Modification
fn default() -> Modification
Source§impl Message for Modification
impl Message for Modification
Source§impl PartialEq for Modification
impl PartialEq for Modification
Source§fn eq(&self, other: &Modification) -> bool
fn eq(&self, other: &Modification) -> bool
self and other values to be equal, and is used by ==.