pub struct GetVariableResult {
pub attribute_status: GetVariableStatus,
pub component: Component,
pub variable: Variable,
pub attribute_status_info: Option<StatusInfo>,
pub attribute_type: Option<Attribute>,
pub attribute_value: Option<String>,
pub custom_data: Option<CustomData>,
}Expand description
Class to hold results of GetVariables request.
The OCPP 2.1 GetVariableResult data type.
Fields§
§attribute_status: GetVariableStatusThe attributeStatus member.
component: ComponentThe component member.
variable: VariableThe variable member.
attribute_status_info: Option<StatusInfo>The attributeStatusInfo member.
attribute_type: Option<Attribute>The attributeType member.
attribute_value: Option<String>Value of requested attribute type of component-variable. This field can only be empty when the given status is NOT accepted.
The Configuration Variable <<configkey-reporting-value-size,ReportingValueSize>> can be used to limit GetVariableResult.attributeValue, VariableAttribute.value and EventData.actualValue. The max size of these values will always remain equal.
custom_data: Option<CustomData>The customData member.
Implementations§
Source§impl GetVariableResult
impl GetVariableResult
Sourcepub fn new(
attribute_status: GetVariableStatus,
component: Component,
variable: Variable,
) -> Self
pub fn new( attribute_status: GetVariableStatus, component: Component, variable: Variable, ) -> Self
Creates a GetVariableResult from its required fields.
Sourcepub fn with_attribute_status_info(self, value: StatusInfo) -> Self
pub fn with_attribute_status_info(self, value: StatusInfo) -> Self
Sets the optional attributeStatusInfo field.
Sourcepub fn with_attribute_type(self, value: Attribute) -> Self
pub fn with_attribute_type(self, value: Attribute) -> Self
Sets the optional attributeType field.
Sourcepub fn with_attribute_value(self, value: impl Into<String>) -> Self
pub fn with_attribute_value(self, value: impl Into<String>) -> Self
Sets the optional attributeValue 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 GetVariableResult
impl Clone for GetVariableResult
Source§impl Debug for GetVariableResult
impl Debug for GetVariableResult
Source§impl<'de> Deserialize<'de> for GetVariableResult
impl<'de> Deserialize<'de> for GetVariableResult
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>,
Source§impl PartialEq for GetVariableResult
impl PartialEq for GetVariableResult
Source§impl Serialize for GetVariableResult
impl Serialize for GetVariableResult
impl StructuralPartialEq for GetVariableResult
Source§impl Validate for GetVariableResult
impl Validate for GetVariableResult
Source§fn validate_at(&self, path: &mut ValidationPath, out: &mut Violations)
fn validate_at(&self, path: &mut ValidationPath, out: &mut Violations)
out, relative to path.