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.

FieldTypeReqDescription
address1StringAddress line 1 (max 100 chars)
address2StringAddress line 2 (max 100 chars)
cityStringCity (max 100 chars)
countryStringCountry name (max 50 chars)
custom_dataCustomData
nameStringName of person/company (max 50 chars)
postal_codeStringPostal 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

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.

pub fn to_json(value: Address) -> json.Json

Encode a Address to its OCPP-J JSON object.

Search Document