pub struct PriceLevelSchedule {
pub price_level_schedule_entries: Vec<PriceLevelScheduleEntry>,
pub time_anchor: DateTime,
pub price_schedule_id: i32,
pub number_of_price_levels: i32,
pub price_schedule_description: Option<String>,
pub custom_data: Option<CustomData>,
}Expand description
The PriceLevelScheduleType is modeled after the same type that is defined in ISO 15118-20, such that if it is supplied by an EMSP as a signed EXI message, the conversion from EXI to JSON (in OCPP) and back to EXI (for ISO 15118-20) does not change the digest and therefore does not invalidate the signature.
The OCPP 2.1 PriceLevelSchedule data type.
Fields§
§price_level_schedule_entries: Vec<PriceLevelScheduleEntry>The priceLevelScheduleEntries member.
time_anchor: DateTimeStarting point of this price schedule.
price_schedule_id: i32Unique ID of this price schedule.
number_of_price_levels: i32Defines the overall number of distinct price level elements used across all PriceLevelSchedules.
price_schedule_description: Option<String>Description of the price schedule.
custom_data: Option<CustomData>The customData member.
Implementations§
Source§impl PriceLevelSchedule
impl PriceLevelSchedule
Sourcepub fn new(
price_level_schedule_entries: Vec<PriceLevelScheduleEntry>,
time_anchor: impl Into<DateTime>,
price_schedule_id: i32,
number_of_price_levels: i32,
) -> Self
pub fn new( price_level_schedule_entries: Vec<PriceLevelScheduleEntry>, time_anchor: impl Into<DateTime>, price_schedule_id: i32, number_of_price_levels: i32, ) -> Self
Creates a PriceLevelSchedule from its required fields.
Sourcepub fn with_price_schedule_description(self, value: impl Into<String>) -> Self
pub fn with_price_schedule_description(self, value: impl Into<String>) -> Self
Sets the optional priceScheduleDescription field.
Sourcepub fn with_custom_data(self, value: CustomData) -> Self
pub fn with_custom_data(self, value: CustomData) -> Self
Sets the optional customData field.
Trait Implementations§
Source§impl Clone for PriceLevelSchedule
impl Clone for PriceLevelSchedule
Source§impl Debug for PriceLevelSchedule
impl Debug for PriceLevelSchedule
Source§impl<'de> Deserialize<'de> for PriceLevelSchedule
impl<'de> Deserialize<'de> for PriceLevelSchedule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PriceLevelSchedule
impl PartialEq for PriceLevelSchedule
Source§impl Serialize for PriceLevelSchedule
impl Serialize for PriceLevelSchedule
impl StructuralPartialEq for PriceLevelSchedule
Source§impl Validate for PriceLevelSchedule
impl Validate for PriceLevelSchedule
Source§fn validate_at(&self, path: &mut ValidationPath, out: &mut Violations)
fn validate_at(&self, path: &mut ValidationPath, out: &mut Violations)
Appends this value’s violations to
out, relative to path.Auto Trait Implementations§
impl Forget for PriceLevelSchedule
impl Freeze for PriceLevelSchedule
impl Move for PriceLevelSchedule
impl RefUnwindSafe for PriceLevelSchedule
impl Send for PriceLevelSchedule
impl Sync for PriceLevelSchedule
impl Unpin for PriceLevelSchedule
impl UnsafeUnpin for PriceLevelSchedule
impl UnwindSafe for PriceLevelSchedule
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