ocpp/v2_1/datatype/address
OCPP 2.1 Address data type (schema AddressType).
to_json/decoder map to/from its OCPP-J JSON object; new (when
present) builds a value from the required fields only.
Types
(2.1) A generic address format.
| Field | Type | Req | Description |
|---|---|---|---|
address1 | String | ✓ | Address line 1 (max 100 chars) |
address2 | String | — | Address line 2 (max 100 chars) |
city | String | ✓ | City (max 100 chars) |
country | String | ✓ | Country name (max 50 chars) |
custom_data | CustomData | — | |
name | String | ✓ | Name of person/company (max 50 chars) |
postal_code | String | — | Postal code (max 20 chars) |
Schema: AddressType
pub type Address {
Address(
address1: String,
address2: option.Option(String),
city: String,
country: String,
custom_data: option.Option(custom_data.CustomData),
name: String,
postal_code: option.Option(String),
)
}
Constructors
-
Address( address1: String, address2: option.Option(String), city: String, country: String, custom_data: option.Option(custom_data.CustomData), name: String, postal_code: option.Option(String), )
Values
pub fn decoder() -> decode.Decoder(Address)
Decode a Address from its OCPP-J JSON object, enforcing schema constraints.
pub fn new(
address1 address1: String,
city city: String,
country country: String,
name name: String,
) -> Address
Construct a Address from its required fields, with every optional field set to None.