diff --git a/.DS_Store b/.DS_Store index a8cb97f..53ad00d 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/2.2.1/README.md b/2.2.1/README.md new file mode 100644 index 0000000..1db9468 --- /dev/null +++ b/2.2.1/README.md @@ -0,0 +1,20 @@ +## OCPI 2.2.1 + +This client is generated from OpenAPI specification that was created based on +[OCPI 2.2.1 documentation](https://evroaming.org/app/uploads/2021/11/OCPI-2.2.1.pdf) + +Specification can be found in subfolder `api/2.2.1.spec.yml` + +## Generation requirements +- [oapi-codegen](https://github.com/deepmap/oapi-codegen#overview) + +# Generation step by step +Steps to generate changes for the client + +1) Adjust the OpenAPI specification `api/2.2.1.spec.yml` +2) Make sure you are in `2.2.1` path +3) Make sure you have installed the [oapi-codegen](https://github.com/deepmap/oapi-codegen#overview) package +4) Regenerate the client using this command +```shell +oapi-codegen -package OCPI api/2.2.1.spec.yml > client.go +``` diff --git a/2.2.1/api/2.2.1.spec.yml b/2.2.1/api/2.2.1.spec.yml new file mode 100644 index 0000000..1380553 --- /dev/null +++ b/2.2.1/api/2.2.1.spec.yml @@ -0,0 +1,5042 @@ +openapi: 3.0.3 +info: + description: Specification for OCPIs modules handlers + title: OCPI modules + version: 2.2.1 +servers: +- url: / +paths: + /ocpi/cdrs: + get: + description: Fetch CDRs from the CPO's system + parameters: + - description: Return CDRs that have last_updated after or equal to this Date/Time + (inclusive). + explode: true + in: query + name: date_from + required: false + schema: + type: string + style: form + - description: "Return CDRs that have last_updated up to this Date/Time, but\ + \ not including (exclusive)." + explode: true + in: query + name: date_to + required: false + schema: + type: string + style: form + - description: The offset of the first object returned. Default is 0. + explode: true + in: query + name: offset + required: false + schema: + type: integer + style: form + - description: Maximum number of objects to GET. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/cdrsResponse' + description: cdrsResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Get CDRs + post: + description: Creates a new CDR. The POST method should contain the full and + final CDR object. Returns URL of created CDR object + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cdrBody' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/cdrResponse' + description: cdrResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Create CDR object + /ocpi/chargingprofiles/{session_id}/{duration}/{response_url}: + get: + description: Retrieves the ActiveChargingProfile as it is currently planned + for the the given session + parameters: + - description: The unique id that identifies the session in the CPO platform. + explode: false + in: path + name: session_id + required: true + schema: + type: string + style: simple + - description: Length of the requested ActiveChargingProfile in seconds Duration + in seconds. + explode: false + in: path + name: duration + required: true + schema: + type: integer + style: simple + - description: URL that the ActiveChargingProfileResult POST should be send + to. This URL might contain an unique ID to be able to distinguish between + GET ActiveChargingProfile requests. + explode: false + in: path + name: response_url + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/chargingProfilesResponse' + description: response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Get active charging profile + /ocpi/chargingprofiles/{session_id}: + put: + description: "Creates a new ChargingProfile on a session, or replaces an existing\ + \ ChargingProfile on the EVSE." + parameters: + - description: The unique id that identifies the session in the CPO platform. + explode: false + in: path + name: session_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/setChargingProfile' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/chargingProfilesResponse' + description: response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Create or update charging profile on session + /ocpi/chargingprofiles/{session_id}/{response_url}: + delete: + description: Clears the ChargingProfile set by the eMSP on the given session. + parameters: + - description: The unique id that identifies the session in the CPO platform. + explode: false + in: path + name: session_id + required: true + schema: + type: string + style: simple + - description: URL that the ClearProfileResult POST should be send to. This + URL might contain an unique ID to be able to distinguish between DELETE ChargingProfile + requests. + explode: false + in: path + name: response_url + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/chargingProfilesResponse' + description: response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Delete charging profile on the session + /ocpi/chargingprofile: + post: + description: "There are no URL segment parameters required by OCPI. As the\ + \ Sender interface is called by the Receiver (typically CPO) on the URL given\ + \ response_url in the Sender request to the Receiver interface. It is up\ + \ to the implementation of the Sender (typically SCSP) to determine what\ + \ parameters are put in the URL. The Sender sends a URL in the POST method\ + \ body to the Receiver. The Receiver is required to use this URL for the\ + \ asynchronous response by the Charge Point. It is advised to make this URL\ + \ unique for every request to differentiate simultaneous commands, for example\ + \ by adding a unique id as a URL segment." + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_ocpi_chargingprofile_post_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/genericResponse' + description: genericResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Send a result of the original request by the eMSP + /ocpi/chargingprofile/{session_id}: + put: + description: "Updates the Sender (typically SCSP) when the Receiver (typically\ + \ CPO) knows the ActiveChargingProfile has changed. The Receiver SHALL call\ + \ this interface every time it knows changes have been made that influence\ + \ the ActiveChargingProfile for an ongoing session AND the Sender has at\ + \ least once successfully called the charging profile Receiver PUT interface\ + \ for this session (SetChargingProfile). If the Receiver doesn't know the\ + \ ActiveChargingProfile has changed (EVSE does not notify the Receiver (typically\ + \ CPO) of the change) it is not required to call this interface. The Receiver\ + \ SHALL NOT call this interface for any session where the Sender has never,\ + \ successfully called the charging profile Receiver PUT interface for this\ + \ session (SetChargingProfile). The Receiver SHALL send a useful relevant\ + \ duration of ActiveChargingProfile to send to the Sender. As a guide: between\ + \ 5 and 60 minutes. If the Sender wants a longer ActiveChargingProfile the\ + \ Sender can always do a GET with a longer duration." + parameters: + - description: The unique id that identifies the session in the CPO platform. + explode: false + in: path + name: session_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/activeChargingProfile' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/genericResponse' + description: genericResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Update charging profile + /ocpi/commands/{command}: + post: + description: "Send a command to the CPO, requesting the CPO to send the command\ + \ to the Charge Point" + parameters: + - description: Type of command that is requested. + explode: false + in: path + name: command + required: true + schema: + enum: + - CANCEL_RESERVATION + - RESERVE_NOW + - START_SESSION + - STOP_SESSION + - UNLOCK_CONNECTOR + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_ocpi_commands__command__post_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/commandResponse' + description: commandResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Send a command + /ocpi/commands/{command}/{uid}: + post: + description: "It is up to the implementation of the eMSP to determine what\ + \ parameters are put in the URL. The eMSP sends a URL in the POST method\ + \ body to the CPO. The CPO is required to use this URL for the asynchronous\ + \ response by the Charge Point. It is advised to make this URL unique for\ + \ every request to differentiate simultaneous commands, for example by adding\ + \ a unique id as a URL segment." + parameters: + - description: Type of command that is requested. + explode: false + in: path + name: command + required: true + schema: + enum: + - CANCEL_RESERVATION + - RESERVE_NOW + - START_SESSION + - STOP_SESSION + - UNLOCK_CONNECTOR + type: string + style: simple + - explode: false + in: path + name: uid + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/commandResult' + description: "Result of the command request, from the Charge Point." + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/commandResponse' + description: commandResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Receive the asynchronous response from the Charge Point. + /ocpi/2.2.1/credentials: + delete: + description: "Informs the server that its credentials to access the client's\ + \ system are now invalid and can no longer be used. Both parties must end\ + \ any automated communication. This is the unregistration process. This method\ + \ MUST return a HTTP status code 405: method not allowed if the client has\ + \ not been registered before." + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/credentials' + description: credentials + "405": + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Informs that credentials are invalid + get: + description: "Retrieves the credentials object to access the server's platform.\ + \ The request body is empty, the response contains the credentials object\ + \ to access the server's platform. This credentials object also contains\ + \ extra information about the server such as its business details." + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/credentials' + description: credentials + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Get the credentials object + post: + description: "Provides the server with credentials to access the client's system.\ + \ This credentials object also contains extra information about the client\ + \ such as its business details. A POST initiates the registration process\ + \ for this endpoint's version. The server must also fetch the client's endpoints\ + \ for this version. OCPI 2.2.1 If successful, the server must generate a new\ + \ credentials token and respond with the client's new credentials to access\ + \ the server's system. The credentials object in the response also contains\ + \ extra information about the server such as its business details. This method\ + \ MUST return a HTTP status code 405: method not allowed if the client has\ + \ already been registered before." + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/credentials' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/credentials' + description: credentials + "405": + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Provides the credentials object + put: + description: "Provides the server with updated credentials to access the client's\ + \ system. This credentials object also contains extra information about the\ + \ client such as its business details. A PUT will switch to the version that\ + \ contains this credentials endpoint if it's different from the current version.\ + \ The server must fetch the client's endpoints again, even if the version\ + \ has not changed. If successful, the server must generate a new credentials\ + \ token for the client and respond with the client's updated credentials to\ + \ access the server's system. The credentials object in the response also\ + \ contains extra information about the server such as its business details.\ + \ This method MUST return a HTTP status code 405: method not allowed if the\ + \ client has not been registered yet." + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/credentials' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/credentials' + description: credentials + "405": + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Provides updated credentials object + /ocpi/clientinfo/{country_code}/{party_id}: + get: + description: "If the Hub wants to check the status of a ClientInfo object in\ + \ the connected clients system it might GET the object from the connected\ + \ clients system for validation purposes. The Hub is the owner of the objects,\ + \ so it would be illogical if the connected client system had a different\ + \ status or was missing an object." + parameters: + - description: Country code of the requested ClientInfo object. + explode: false + in: path + name: country_code + required: true + schema: + type: string + style: simple + - description: Party ID (Provider ID) of the requested ClientInfo object. + explode: false + in: path + name: party_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/clientsInfoResponse' + description: clientsInfoResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Get a ClientInfo object as it is stored in the connected clients system. + put: + description: New or updated ClientInfo objects are pushed from the Hub to a + connected client. + parameters: + - description: Country code of the eMSP sending this PUT request to the CPO + system. + explode: false + in: path + name: country_code + required: true + schema: + type: string + style: simple + - description: Party ID (Provider ID) of the eMSP sending this PUT request to + the CPO system. + explode: false + in: path + name: party_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/clientInfo' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/clientsInfoResponse' + description: response + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Create or update client info + /ocpi/hubclientinfo: + get: + description: Fetch information about clients connected to a Hub. + parameters: + - description: Return ClientInfo that have last_updated after or equal to Date/Time + (inclusive). + explode: true + in: query + name: date_from + required: false + schema: + type: string + style: form + - description: "Return ClientInfo that have last_updated up to Date/Time, but\ + \ not including (exclusive)." + explode: true + in: query + name: date_to + required: false + schema: + type: string + style: form + - description: The offset of the first object returned. Default is 0. + explode: true + in: query + name: offset + required: false + schema: + type: integer + style: form + - description: Maximum number of objects to GET. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/clientInfoResponse' + description: clientInfoResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Get hub connected clients + /ocpi/locations: + get: + description: "Depending on the URL Segments provided, the GET request can either\ + \ be used to retrieve information about a list of available Locations (with\ + \ EVSEs and Connectors) at a CPO (GET List) or it can be used to retrieve\ + \ information about one specific Location, OCPI 2.2.1 51 EVSE or Connector\ + \ (GET Object)." + parameters: + - description: Return Locations that have last_updated after or equal to this + date time (inclusive). + explode: true + in: query + name: date_from + required: false + schema: + type: string + style: form + - description: "Return Locations that have last_updated up to this date time,\ + \ but not including (exclusive)." + explode: true + in: query + name: date_to + required: false + schema: + type: string + style: form + - description: The offset of the first object returned. Default is 0. + explode: true + in: query + name: offset + required: false + schema: + type: integer + style: form + - description: Maximum number of objects to GET. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/locations' + description: locations + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Get available locations + /ocpi/locations/{location_id}: + get: + description: "Endpoint structure definition for retrieving a Location, EVSE\ + \ or Connector:" + parameters: + - description: Location.id of the Location object to retrieve. + explode: false + in: path + name: location_id + required: true + schema: + type: string + style: simple + - description: "Evse.uid, required when requesting an EVSE or Connector object." + explode: true + in: query + name: evse_uid + required: false + schema: + type: string + style: form + - description: "Connector.id, required when requesting a Connector object." + explode: true + in: query + name: connector_id + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/_ocpi_locations__location_id__get_200_response' + description: "locations, evse, connector" + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: "Get location, EVSE or connector" + /ocpi/locations/{country_code}/{party_id}/{location_id}: + get: + description: "If the CPO wants to check the status of a Location, EVSE or Connector\ + \ object in the eMSP system, it might GET the object from the eMSP system\ + \ for validation purposes. The CPO is the owner of the objects, so it would\ + \ be illogical if the eMSP system had a different status or was missing an\ + \ object. If a discrepancy is found, the CPO might push an update to the\ + \ eMSP via a PUT or PATCH call." + parameters: + - description: Country code of the CPO requesting data from the eMSP system. + explode: false + in: path + name: country_code + required: true + schema: + type: string + style: simple + - description: Party ID (Provider ID) of the CPO requesting data from the eMSP + system. + explode: false + in: path + name: party_id + required: true + schema: + type: string + style: simple + - description: Location.id of the Location object to retrieve. + explode: false + in: path + name: location_id + required: true + schema: + type: string + style: simple + - description: "Evse.uid, required when requesting an EVSE or Connector object." + explode: true + in: query + name: evse_uid + required: false + schema: + type: string + style: form + - description: "Connector.id, required when requesting a Connector object." + explode: true + in: query + name: connector_id + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/_ocpi_locations__location_id__get_200_response' + description: "locations, evse, connector" + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: "Get location, EVSE or connector" + patch: + description: "Same as the PUT method, but only the fields/objects that have\ + \ to be updated have to be present. Other fields/objects that are not specified\ + \ as part of the request are considered unchanged. Therefore, this method\ + \ is not suitable to remove information shared earlier. Any request to the\ + \ PATCH method SHALL contain the last_updated field. When the PATCH is on\ + \ a Connector Object, the Receiver SHALL also set the new last_updated value\ + \ on the parent EVSE and Location Objects. When the PATCH is on a EVSE Object,\ + \ the Receiver SHALL also set the new last_updated value on the parent Location\ + \ Object." + parameters: + - description: Country code of the CPO requesting data from the eMSP system. + explode: false + in: path + name: country_code + required: true + schema: + type: string + style: simple + - description: Party ID (Provider ID) of the CPO requesting data from the eMSP + system. + explode: false + in: path + name: party_id + required: true + schema: + type: string + style: simple + - description: Location.id of the Location object to retrieve. + explode: false + in: path + name: location_id + required: true + schema: + type: string + style: simple + - description: "Evse.uid, required when requesting an EVSE or Connector object." + explode: true + in: query + name: evse_uid + required: false + schema: + type: string + style: form + - description: "Connector.id, required when requesting a Connector object." + explode: true + in: query + name: connector_id + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/_ocpi_locations__location_id__get_200_response' + description: "locations, evse, connector" + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Sends new location object + put: + description: "The CPO pushes available Location, EVSE or Connector objects\ + \ to the eMSP. PUT can be used to send new Location objects to the eMSP but\ + \ also to replace existing Locations. When the PUT only contains a Connector\ + \ Object, the Receiver SHALL also set the new last_updated value on the parent\ + \ EVSE and Location Objects. When the PUT only contains a EVSE Object, the\ + \ Receiver SHALL also set \the new last_updated value on the parent Location\ + \ Object." + parameters: + - description: Country code of the CPO requesting data from the eMSP system. + explode: false + in: path + name: country_code + required: true + schema: + type: string + style: simple + - description: Party ID (Provider ID) of the CPO requesting data from the eMSP + system. + explode: false + in: path + name: party_id + required: true + schema: + type: string + style: simple + - description: Location.id of the Location object to retrieve. + explode: false + in: path + name: location_id + required: true + schema: + type: string + style: simple + - description: "Evse.uid, required when requesting an EVSE or Connector object." + explode: true + in: query + name: evse_uid + required: false + schema: + type: string + style: form + - description: "Connector.id, required when requesting a Connector object." + explode: true + in: query + name: connector_id + required: false + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_ocpi_locations__location_id__get_200_response' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/_ocpi_locations__location_id__get_200_response' + description: "locations, evse, connector" + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Sends new location object + /ocpi/sessions: + get: + description: "Fetch Session objects of charging sessions last updated between\ + \ the {date_from} and {date_to} (paginated)." + parameters: + - description: Return Sessions that have last_updated after or equal to this + date time (inclusive). + explode: true + in: query + name: date_from + required: false + schema: + type: string + style: form + - description: "Return Sessions that have last_updated up to this date time,\ + \ but not including (exclusive)." + explode: true + in: query + name: date_to + required: false + schema: + type: string + style: form + - description: The offset of the first object returned. Default is 0. + explode: true + in: query + name: offset + required: false + schema: + type: integer + style: form + - description: Maximum number of objects to GET. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/sessionsResponse' + description: sessionsResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Get charging sessions + /ocpi/sessions/{session_id}/charging_preferences: + put: + description: "Setting Charging Preferences of an ongoing session. If a PUT with\ + \ ChargingPreferences is received for an EVSE that does not have the capability\ + \ CHARGING_PREFERENCES_CAPABLE, the receiver should respond with an HTTP\ + \ status of 404 and an OCPI status code of 2001 in the OCPI response object." + parameters: + - description: Session.id of the Session for which the Charging Preferences + are to be set. + explode: false + in: path + name: session_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/chargingPreferences' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/chargingPreferencesResponse' + description: chargingPreferencesResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Update charging session + /ocpi/sessions/{country_code}/{party_id}/{session_id}: + get: + description: "The CPO system might request the current version of a Session\ + \ object from the eMSP's system to, for example, validate the state, or because\ + \ the CPO has received an error during a PATCH operation." + parameters: + - description: Country code of the CPO performing the GET on the eMSP's system + explode: false + in: path + name: country_code + required: true + schema: + type: string + style: simple + - description: Party ID (Provider ID) of the CPO performing the GET on the eMSP's + system. + explode: false + in: path + name: party_id + required: true + schema: + type: string + style: simple + - description: Id of the Session object to get from the eMSP's system. + explode: false + in: path + name: session_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/sessionResponse' + description: sessionResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Get session with session_id + patch: + description: "Same as the PUT method, but only the fields/objects that need\ + \ to be updated have to be present. Fields/objects which are not specified\ + \ are considered unchanged. Any request to the PATCH method SHALL contain\ + \ the last_updated field. The PATCH method of the Session Receiver interface\ + \ works on the entire Session object only. It is not allowed to use extra\ + \ URL segments to try to PATCH fields of inner objects of the Session object\ + \ directly. When a PATCH request contains the charging_periods field (inside\ + \ a Session object), this SHALL be processed as a request to add all the \ + \ ChargingPeriod objects to the existing Session object. If the request charging_periods\ + \ list is omitted (or contains an empty list), no changes SHALL be made to\ + \ the existing list of charging_periods. If existing ChargingPeriod objects\ + \ in a Session need to be replaced or removed, the Sender SHALL use the\ + \ PUT method to replace the entire Session object (including all the charging_periods)." + parameters: + - description: Country code of the CPO performing this PATCH on the eMSP's system. This + SHALL be the same value as the country_code in the Session object being + pushed. + explode: false + in: path + name: country_code + required: true + schema: + type: string + style: simple + - description: Party ID (Provider ID) of the CPO performing this PATCH on the + eMSP's system. This SHALL be the same value as the party_id in the Session + object being pushed. + explode: false + in: path + name: party_id + required: true + schema: + type: string + style: simple + - description: Id of the new or updated Session object. + explode: false + in: path + name: session_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/sessionResponse' + description: sessionResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Update session with session_id + put: + description: "" + parameters: + - description: Country code of the CPO performing this PUT on the eMSP's system. This + SHALL be the same value as the country_code in the Session object being + pushed. + explode: false + in: path + name: country_code + required: true + schema: + type: string + style: simple + - description: Party ID (Provider ID) of the CPO performing this PUT on the + eMSP's system. This SHALL be the same value as the party_id in the Session + object being pushed. + explode: false + in: path + name: party_id + required: true + schema: + type: string + style: simple + - description: Id of the new or updated Session object. + explode: false + in: path + name: session_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/session' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/sessionResponse' + description: sessionResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Update session with session_id + /ocpi/tariffs: + get: + description: Fetch tariffs from the CPO's system + parameters: + - description: Return Tariffs that have last_updated after or equal to Date/Time + (inclusive). + explode: true + in: query + name: date_from + required: false + schema: + type: string + style: form + - description: "Return Tariffs that have last_updated up to Date/Time, but not\ + \ including (exclusive)." + explode: true + in: query + name: date_to + required: false + schema: + type: string + style: form + - description: The offset of the first object returned. Default is 0. + explode: true + in: query + name: offset + required: false + schema: + type: integer + style: form + - description: Maximum number of objects to GET. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tariffsResponse' + description: tariffsResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Get tariffs + /ocpi/tariffs/{country_code}/{party_id}/{tariff_id}: + delete: + description: "Delete a Tariff object which is not used any more and will not\ + \ be used in the future. Before deleting a Tariff object, it is RECOMMENDED\ + \ to ensure that the Tariff object is not referenced by any Connector object\ + \ within the tariff_ids." + parameters: + - description: Country code of the CPO performing the PUT request on the eMSP's + system. + explode: false + in: path + name: country_code + required: true + schema: + type: string + style: simple + - description: Party ID (Provider ID) of the CPO performing the PUT request + on the eMSP's system. + explode: false + in: path + name: party_id + required: true + schema: + type: string + style: simple + - description: Tariff.id of the Tariff object to delete. + explode: false + in: path + name: tariff_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tariffDeleteResponse' + description: tariffDeleteResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Delete tariff + get: + description: "If the CPO wants to check the status of a Tariff in the eMSP's\ + \ system, it might GET the object from the eMSP's system for validation purposes.\ + \ After all, the CPO is the owner of the object, so it would be illogical\ + \ if the eMSP's system had a different status or was missing the object entirely" + parameters: + - description: Country code of the CPO performing the GET on the eMSP's system + explode: false + in: path + name: country_code + required: true + schema: + type: string + style: simple + - description: Party ID (Provider ID) of the CPO performing the GET on the eMSP's + system. + explode: false + in: path + name: party_id + required: true + schema: + type: string + style: simple + - description: Tariff.id of the Tariff object to retrieve. + explode: false + in: path + name: tariff_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tariffResponse' + description: tariffResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Get tariff with tariff_id + put: + description: New or updated Tariff objects are pushed from the CPO to the eMSP. + parameters: + - description: Country code of the CPO performing the PUT request on the eMSP's + system. This SHALL be the same value as the country_code in the Tariff + object being pushed. + explode: false + in: path + name: country_code + required: true + schema: + type: string + style: simple + - description: Party ID (Provider ID) of the CPO performing the PUT request + on the eMSP's system. This SHALL be the same value as the party_id in the + Tariff object being pushed. + explode: false + in: path + name: party_id + required: true + schema: + type: string + style: simple + - description: Tariff.id of the Tariff object to create or replace. + explode: false + in: path + name: tariff_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/tariff' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tariffResponse' + description: tariffResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Update tariff + /ocpi/tokens: + get: + description: Fetch information about Tokens known in the eMSP systems. + parameters: + - description: Return tokens that have last_updated after or equal to this Date/Time + (inclusive). + explode: true + in: query + name: date_from + required: false + schema: + type: string + style: form + - description: "Return tokens that have last_updated up to Date/Time, but not\ + \ including (exclusive)." + explode: true + in: query + name: date_to + required: false + schema: + type: string + style: form + - description: The offset of the first object returned. Default is 0. + explode: true + in: query + name: offset + required: false + schema: + type: integer + style: form + - description: Maximum number of objects to GET. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tokensResponse' + description: tokensResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Get tokens + /ocpi/{token_uid}/authorize: + post: + description: "Do a 'real-time' authorization request to the eMSP system, validating\ + \ if a Token might be used (at the optionally given Location)." + parameters: + - description: Token.uid of the Token for which authorization is requested. + explode: false + in: path + name: token_uid + required: true + schema: + type: string + style: simple + - description: "Token.type of the Token to retrieve. Default if omitted: RFID" + explode: true + in: query + name: type + required: false + schema: + enum: + - AD_HOC_USER + - APP_USER + - OTHER + - RFID + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/locationReferences' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/authorization' + description: authorization + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Authorization + /ocpi/tokens/{country_code}/{party_id}/{token_uid}: + get: + description: "If the eMSP wants to check the status of a Token in the CPO system\ + \ it might GET the object from the CPO system for validation purposes. The\ + \ eMSP is the owner of the objects, so it would be illogical if the CPO system\ + \ had a different status or was missing an object." + parameters: + - description: Country code of the eMSP requesting this GET from the CPO system. + explode: false + in: path + name: country_code + required: true + schema: + type: string + style: simple + - description: Party ID (Provider ID) of the eMSP requesting this GET from the + CPO system. + explode: false + in: path + name: party_id + required: true + schema: + type: string + style: simple + - description: Token.uid of the Token object to retrieve. + explode: false + in: path + name: token_uid + required: true + schema: + type: string + style: simple + - description: "Token.type of the Token to retrieve. Default if omitted: RFID" + explode: true + in: query + name: type + required: false + schema: + enum: + - AD_HOC_USER + - APP_USER + - OTHER + - RFID + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tokenResponse' + description: tokenResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Get the token object + patch: + description: "Same as the PUT method, but only the fields/objects that have\ + \ to be updated have to be present, other fields/objects that are not specified\ + \ are considered unchanged. Any request to the PATCH method SHALL contain\ + \ the last_updated field." + parameters: + - description: Country code of the eMSP sending this PATCH request to the CPO + system. This SHALL be the same value as the country_code in the Token object + being pushed. + explode: false + in: path + name: country_code + required: true + schema: + type: string + style: simple + - description: Party ID (Provider ID) of the eMSP sending this PATCH request + to the CPO system. This SHALL be the same value as the party_id in the + Token object being pushed. + explode: false + in: path + name: party_id + required: true + schema: + type: string + style: simple + - description: Token.uid of the Token object to retrieve. + explode: false + in: path + name: token_uid + required: true + schema: + type: string + style: simple + - description: "Token.type of the Token to retrieve. Default if omitted: RFID" + explode: true + in: query + name: type + required: false + schema: + enum: + - AD_HOC_USER + - APP_USER + - OTHER + - RFID + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tokenResponse' + description: tokenResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Update token object + put: + description: New or updated Token objects are pushed from the eMSP to the CPO. + parameters: + - description: Country code of the eMSP sending this PUT request to the CPO + system. This SHALL be the same value as the country_code in the Token object + being pushed. + explode: false + in: path + name: country_code + required: true + schema: + type: string + style: simple + - description: Party ID (Provider ID) of the eMSP sending this PUT request to + the CPO system. This SHALL be the same value as the party_id in the Token + object being pushed. + explode: false + in: path + name: party_id + required: true + schema: + type: string + style: simple + - description: Token.uid of the Token object to retrieve. + explode: false + in: path + name: token_uid + required: true + schema: + type: string + style: simple + - description: "Token.type of the Token to retrieve. Default if omitted: RFID" + explode: true + in: query + name: type + required: false + schema: + enum: + - AD_HOC_USER + - APP_USER + - OTHER + - RFID + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/token' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/tokenResponse' + description: tokenResponse + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Update token object + /ocpi/versions: + get: + description: Fetch information about the supported versions. + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/versions' + description: versions + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Get supported versions + /ocpi/2.2.1/details: + get: + description: Fetch information about the supported endpoints for version. + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/details' + description: details + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Get version supported endpoints +components: + schemas: + cdrsResponse: + example: + status_message: Success + timeStamp: 2015-06-30T21:59:59Z + status_code: 1000 + cdrs: + total_energy: 15.342 + authorization_reference: authorization_reference + total_cost: + excl_vat: 2.5 + incl_vat: 0.66 + remark: remark + cdr_token: + country_code: CZ + uid: 123abc + contract_id: NL-TST-C12345678-S + party_id: STK + type: AD_HOC_USER + end_date_time: 2015-06-29T21:39:09Z + total_parking_time: 6.027456183070403 + credit_reference_id: credit_reference_id + currency: EUR + id: "12345" + total_time: 1.973 + credit: true + total_energy_cost: + excl_vat: 2.5 + incl_vat: 0.66 + total_parking_cost: + excl_vat: 2.5 + incl_vat: 0.66 + total_reservation_cost: + excl_vat: 2.5 + incl_vat: 0.66 + tariffs: + tariff_alt_url: https://company.com/tariffs/14 + last_updated: 2015-06-29T22:39:09Z + type: AD_HOC_PAYMENT + country_code: BE + end_date_time: 2019-06-23T08:16:02Z + energy_mix: + energy_product_name: E.ON DirektStrom eco + is_green_energy: true + supplier_name: E.ON Energy Deutschland + energy_sources: + percentage: 21.7 + source: NUCLEAR + environ_impact: + amount: 372 + category: NUCLEAR_WASTE + max_price: + excl_vat: 2.5 + incl_vat: 0.66 + min_price: + excl_vat: 2.5 + incl_vat: 0.66 + tariff_alt_text: + language: en + text: 2.00 euro p/hour including VAT. + party_id: BEC + elements: + restrictions: + end_date: 2015-06-29T23:50:16Z + min_kwh: 1.0 + end_time: 1080 + min_duration: 0 + min_current: 32.0 + max_duration: 3600 + start_time: 09:00 + max_power: 32.0 + max_kwh: 1.0 + reservation: RESERVATION + max_current: 30 + start_date: 2019-06-23T08:16:02Z + min_power: 32.0 + day_of_week: MONDAY + price_components: ENERGY + currency: EUR + id: "12" + start_date_time: 2019-06-23T08:16:02Z + last_updated: 2015-06-29T22:39:09Z + charging_periods: + tariff_id: "12" + start_date_time: 2019-06-23T08:16:02Z + dimensions: + volume: 2200 + type: CURRENT + signed_data: + public_key: public_key + signed_values: + plain_data: plain_data + signed_data: signed_data + nature: nature + encoding_method: encoding_method + encoding_method_version: 0 + url: https://example.com + total_fixed_cost: + excl_vat: 2.5 + incl_vat: 0.66 + session_id: "1234" + total_time_cost: + excl_vat: 2.5 + incl_vat: 0.66 + country_code: CZ + auth_method: AUTH_REQUEST + cdr_location: + country: BEL + evse_id: BE*BEC*E041503003 + address: F.Rooseveltlaan 3A + city: Gent + coordinates: + latitude: "51.047599" + longitude: "3.729944" + name: Gent Zuid + connector_id: "1" + id: LOC1 + state: state + evse_uid: "3256" + postal_code: "9000" + connector_power_type: AC_1_PHASE + connector_standard: CHADEMO + connector_format: SOCKET + party_id: BEC + invoice_reference_id: invoice_reference_id + home_charging_compensation: true + start_date_time: 2015-06-29T21:39:09Z + meter_id: meter_id + properties: + cdrs: + $ref: '#/components/schemas/cdrBody' + status_code: + example: 1000 + type: number + status_message: + example: Success + type: string + timeStamp: + example: 2015-06-30T21:59:59Z + type: string + required: + - status_code + - timestamp + type: object + cdrResponse: + example: + status_message: Success + timeStamp: 2015-06-30T21:59:59Z + status_code: 1000 + url: https://www.server.com/ocpi/cdrs/123456 + properties: + url: + example: https://www.server.com/ocpi/cdrs/123456 + type: string + status_code: + example: 1000 + type: number + status_message: + example: Success + type: string + timeStamp: + example: 2015-06-30T21:59:59Z + type: string + required: + - status_code + - timestamp + - url + type: object + cdrBody: + example: + total_energy: 15.342 + authorization_reference: authorization_reference + total_cost: + excl_vat: 2.5 + incl_vat: 0.66 + remark: remark + cdr_token: + country_code: CZ + uid: 123abc + contract_id: NL-TST-C12345678-S + party_id: STK + type: AD_HOC_USER + end_date_time: 2015-06-29T21:39:09Z + total_parking_time: 6.027456183070403 + credit_reference_id: credit_reference_id + currency: EUR + id: "12345" + total_time: 1.973 + credit: true + total_energy_cost: + excl_vat: 2.5 + incl_vat: 0.66 + total_parking_cost: + excl_vat: 2.5 + incl_vat: 0.66 + total_reservation_cost: + excl_vat: 2.5 + incl_vat: 0.66 + tariffs: + tariff_alt_url: https://company.com/tariffs/14 + last_updated: 2015-06-29T22:39:09Z + type: AD_HOC_PAYMENT + country_code: BE + end_date_time: 2019-06-23T08:16:02Z + energy_mix: + energy_product_name: E.ON DirektStrom eco + is_green_energy: true + supplier_name: E.ON Energy Deutschland + energy_sources: + percentage: 21.7 + source: NUCLEAR + environ_impact: + amount: 372 + category: NUCLEAR_WASTE + max_price: + excl_vat: 2.5 + incl_vat: 0.66 + min_price: + excl_vat: 2.5 + incl_vat: 0.66 + tariff_alt_text: + language: en + text: 2.00 euro p/hour including VAT. + party_id: BEC + elements: + restrictions: + end_date: 2015-06-29T23:50:16Z + min_kwh: 1.0 + end_time: 1080 + min_duration: 0 + min_current: 32.0 + max_duration: 3600 + start_time: 09:00 + max_power: 32.0 + max_kwh: 1.0 + reservation: RESERVATION + max_current: 30 + start_date: 2019-06-23T08:16:02Z + min_power: 32.0 + day_of_week: MONDAY + price_components: ENERGY + currency: EUR + id: "12" + start_date_time: 2019-06-23T08:16:02Z + last_updated: 2015-06-29T22:39:09Z + charging_periods: + tariff_id: "12" + start_date_time: 2019-06-23T08:16:02Z + dimensions: + volume: 2200 + type: CURRENT + signed_data: + public_key: public_key + signed_values: + plain_data: plain_data + signed_data: signed_data + nature: nature + encoding_method: encoding_method + encoding_method_version: 0 + url: https://example.com + total_fixed_cost: + excl_vat: 2.5 + incl_vat: 0.66 + session_id: "1234" + total_time_cost: + excl_vat: 2.5 + incl_vat: 0.66 + country_code: CZ + auth_method: AUTH_REQUEST + cdr_location: + country: BEL + evse_id: BE*BEC*E041503003 + address: F.Rooseveltlaan 3A + city: Gent + coordinates: + latitude: "51.047599" + longitude: "3.729944" + name: Gent Zuid + connector_id: "1" + id: LOC1 + state: state + evse_uid: "3256" + postal_code: "9000" + connector_power_type: AC_1_PHASE + connector_standard: CHADEMO + connector_format: SOCKET + party_id: BEC + invoice_reference_id: invoice_reference_id + home_charging_compensation: true + start_date_time: 2015-06-29T21:39:09Z + meter_id: meter_id + properties: + country_code: + example: CZ + type: string + party_id: + example: BEC + type: string + id: + example: "12345" + type: string + start_date_time: + example: 2015-06-29T21:39:09Z + type: string + end_date_time: + example: 2015-06-29T21:39:09Z + type: string + session_id: + example: "1234" + type: string + cdr_token: + $ref: '#/components/schemas/cdrBody_cdr_token' + auth_method: + enum: + - AUTH_REQUEST + - COMMAND + - WHITELIST + type: string + authorization_reference: + type: string + cdr_location: + $ref: '#/components/schemas/cdrBody_cdr_location' + meter_id: + type: string + currency: + example: EUR + type: string + tariffs: + $ref: '#/components/schemas/cdrBody_tariffs' + charging_periods: + $ref: '#/components/schemas/cdrBody_charging_periods' + signed_data: + $ref: '#/components/schemas/cdrBody_signed_data' + total_cost: + $ref: '#/components/schemas/price' + total_fixed_cost: + $ref: '#/components/schemas/price' + total_energy: + example: 15.342 + type: number + total_energy_cost: + $ref: '#/components/schemas/price' + total_time: + example: 1.973 + type: number + total_time_cost: + $ref: '#/components/schemas/price' + total_parking_time: + type: number + total_parking_cost: + $ref: '#/components/schemas/price' + total_reservation_cost: + $ref: '#/components/schemas/price' + remark: + type: string + invoice_reference_id: + type: string + credit: + example: true + type: boolean + credit_reference_id: + type: string + home_charging_compensation: + example: true + type: boolean + last_updated: + example: 2015-06-29T22:39:09Z + type: string + required: + - auth_method + - cdr_location + - cdr_token + - country_code + - currency + - end_date_time + - id + - last_updated + - party_id + - start_date_time + - total_cost + - total_energy + - total_time + type: object + chargingProfilesResponse: + example: + status_message: Success + timeStamp: 2015-06-30T21:59:59Z + status_code: 1000 + chargingProfile: + result: null + timeout: 0 + properties: + chargingProfile: + $ref: '#/components/schemas/chargingProfileResponse' + status_code: + example: 1000 + type: number + status_message: + example: Success + type: string + timeStamp: + example: 2015-06-30T21:59:59Z + type: string + required: + - status_code + - timestamp + type: object + chargingProfileResponse: + example: + result: null + timeout: 0 + properties: + result: + $ref: '#/components/schemas/chargingProfileResponseType' + timeout: + example: 0 + type: integer + required: + - result + - timeout + type: object + chargingProfileResponseType: + description: Response to the ChargingProfile request from the eMSP to the CPO. + enum: + - ACCEPTED + - NOT_SUPPORTED + - REJECTED + - TOO_OFTEN + - UNKNOWN_SESSION + type: string + setChargingProfile: + properties: + charging_profile: + $ref: '#/components/schemas/chargingProfile' + response_url: + example: https://client.com/12345 + type: string + required: + - charging_profile + - response_url + type: object + chargingProfile: + properties: + start_date_time: + example: 2019-06-23T08:16:02Z + type: string + duration: + example: 900 + type: integer + charging_rate_unit: + enum: + - W + - A + type: string + min_charging_rate: + type: number + charging_profile_period: + $ref: '#/components/schemas/chargingProfile_charging_profile_period' + required: + - charging_rate_unit + type: object + activeChargingProfileResult: + properties: + result: + enum: + - ACCEPTED + - REJECTED + - UNKNOWN + type: string + profile: + $ref: '#/components/schemas/activeChargingProfileResult_profile' + required: + - result + type: object + chargingProfileResult: + properties: + result: + enum: + - ACCEPTED + - REJECTED + - UNKNOWN + type: string + required: + - result + type: object + clearProfileResult: + properties: + result: + enum: + - ACCEPTED + - REJECTED + - UNKNOWN + type: string + required: + - result + type: object + genericResponse: + example: + status_message: "Missing required field: type" + timeStamp: 2015-06-30T21:59:59Z + status_code: 2001 + properties: + status_code: + example: 2001 + type: number + status_message: + example: "Missing required field: type" + type: string + timeStamp: + example: 2015-06-30T21:59:59Z + type: string + required: + - status_code + - timeStamp + type: object + activeChargingProfile: + properties: + start_date_time: + example: 2019-06-23T08:16:02Z + type: string + charging_profile: + $ref: '#/components/schemas/chargingProfile' + required: + - charging_profile + - start_date_time + type: object + cancelReservation: + properties: + response_url: + type: string + reservation_id: + type: string + required: + - reservation_id + - response_url + type: object + reserveNow: + properties: + response_url: + type: string + token: + $ref: '#/components/schemas/token' + expiry_date: + type: string + reservation_id: + type: string + location_id: + example: "1234" + type: string + evse_uid: + example: "3256" + type: string + authorization_reference: + example: "567890" + type: string + required: + - expiry_date + - location_id + - reservation_id + - response_url + - token + type: object + startSession: + properties: + response_url: + type: string + token: + $ref: '#/components/schemas/token' + location_id: + type: string + evse_uid: + example: "3256" + type: string + connector_id: + example: "1" + type: string + authorization_reference: + example: "567890" + type: string + required: + - location_id + - response_url + - token + type: object + stopSession: + properties: + response_url: + type: string + session_id: + type: string + required: + - response_url + - sessions_id + type: object + unlockConnector: + properties: + response_url: + type: string + location_id: + type: string + evse_uid: + example: "3256" + type: string + connector_id: + example: "1" + type: string + required: + - connector_id + - evse_uid + - location_id + - response_url + type: object + commandResponse: + example: + result: NOT_SUPPORTED + message: + language: en + text: text + timeout: 0 + properties: + result: + enum: + - NOT_SUPPORTED + - REJECTED + - ACCEPTED + - UNKNOWN_SESSION + type: string + timeout: + example: 0 + type: integer + message: + $ref: '#/components/schemas/commandResponse_message' + required: + - result + - timeout + type: object + commandResult: + properties: + result: + enum: + - ACCEPTED + - CANCELED_RESERVATION + - EVSE_OCCUPIED + - EVSE_INOPERATIVE + - FAILED + - NOT_SUPPORTED + - REJECTED + - TIMEOUT + - UNKNOWN_RESERVATION + type: string + message: + $ref: '#/components/schemas/commandResponse_message' + required: + - result + type: object + credentials: + example: + status_message: Success + timeStamp: 2015-06-30T21:59:59Z + status_code: 1000 + data: + roles: + country_code: CZ + business_details: + website: http://example.com + name: Example Operator + logo: + thumbnail: https://example.com/img/logo_thumb.jpg + width: 512 + category: CHARGER + type: jpeg + url: https://example.com/img/logo.jpg + height: 512 + role: CPO + party_id: EXA + url: https://example.com/ocpi/versions/ + token: ebf3b399-779f-4497-9b9d-ac6ad3cc44d2 + properties: + data: + $ref: '#/components/schemas/credentials_data' + status_code: + example: 1000 + type: number + status_message: + example: Success + type: string + timeStamp: + example: 2015-06-30T21:59:59Z + type: string + required: + - status_code + - timestamp + type: object + clientsInfoResponse: + example: + status_message: Success + timeStamp: 2015-06-30T21:59:59Z + client_info: + country_code: DE + last_updated: 2019-06-23T08:16:02Z + role: CPO + party_id: TNM + status: CONNECTED + status_code: 1000 + properties: + client_info: + $ref: '#/components/schemas/clientInfo' + status_code: + example: 1000 + type: number + status_message: + example: Success + type: string + timeStamp: + example: 2015-06-30T21:59:59Z + type: string + required: + - client_info + - status_code + - timestamp + type: object + clientInfoResponse: + example: + status_message: Success + timeStamp: 2015-06-30T21:59:59Z + status_code: 1000 + clients_info: + country_code: DE + last_updated: 2019-06-23T08:16:02Z + role: CPO + party_id: TNM + status: CONNECTED + properties: + clients_info: + $ref: '#/components/schemas/clientInfo' + status_code: + example: 1000 + type: number + status_message: + example: Success + type: string + timeStamp: + example: 2015-06-30T21:59:59Z + type: string + required: + - status_code + - timestamp + type: object + clientInfo: + example: + country_code: DE + last_updated: 2019-06-23T08:16:02Z + role: CPO + party_id: TNM + status: CONNECTED + properties: + party_id: + example: TNM + type: string + country_code: + example: DE + type: string + role: + enum: + - CPO + - EMSP + - HUB + - NAP + - NSP + - OTHER + - SCSP + type: string + status: + enum: + - CONNECTED + - OFFLINE + - PLANNED + - SUSPENDED + type: string + last_updated: + example: 2019-06-23T08:16:02Z + type: string + required: + - country_code + - last_updated + - party_id + - role + - status + type: object + locations: + example: + status_message: Success + timeStamp: 2015-06-30T21:59:59Z + status_code: 1000 + data: + country: BEL + city: Gent + charging_when_closed: false + parking_type: ALONG_MOTORWAY + suboperator: + website: http://example.com + name: Example Operator + logo: + thumbnail: https://example.com/img/logo_thumb.jpg + width: 512 + category: CHARGER + type: jpeg + url: https://example.com/img/logo.jpg + height: 512 + operator: + website: http://example.com + name: Example Operator + logo: + thumbnail: https://example.com/img/logo_thumb.jpg + width: 512 + category: CHARGER + type: jpeg + url: https://example.com/img/logo.jpg + height: 512 + evses: + physical_reference: "1" + evse_id: BE*BEC*E041503001 + connectors: + standard: CHADEMO + max_amperage: 16 + terms_and_conditions: https://example.com/terms_and_conditions + last_updated: 2015-03-16T10:10:02Z + format: SOCKET + max_voltage: 220 + id: "1" + max_electric_power: 0 + power_type: AC_1_PHASE + tariff_ids: "11" + images: + thumbnail: https://example.com/img/logo_thumb.jpg + width: 512 + category: CHARGER + type: jpeg + url: https://example.com/img/logo.jpg + height: 512 + last_updated: 2015-03-18T08:12:01Z + capabilities: CHARGING_PROFILE_CAPABLE + status_schedule: + period_begin: 07:00 + period_end: 1080 + status: AVAILABLE + coordinates: + latitude: "51.047599" + longitude: "3.729944" + uid: "3256" + directions: + language: en + text: 2.00 euro p/hour including VAT. + parking_restrictions: EV_ONLY + floor_level: "-1" + status: AVAILABLE + id: LOC1 + state: Slovenia + owner: + website: http://example.com + name: Example Operator + logo: + thumbnail: https://example.com/img/logo_thumb.jpg + width: 512 + category: CHARGER + type: jpeg + url: https://example.com/img/logo.jpg + height: 512 + images: + thumbnail: https://example.com/img/logo_thumb.jpg + width: 512 + category: CHARGER + type: jpeg + url: https://example.com/img/logo.jpg + height: 512 + last_updated: 2015-06-29T20:39:09Z + address: F.Rooseveltlaan 3A + coordinates: + latitude: "51.047599" + longitude: "3.729944" + opening_times: + twentyfourseven: true + regular_hours: + period_begin: 07:00 + period_end: 1080 + weekday: 1 + exceptional_closings: + period_begin: 07:00 + period_end: 1080 + exceptional_openings: + period_begin: 07:00 + period_end: 1080 + publish_allowed_to: + uid: "012345678" + group_id: DF000-2001-8999 + type: AD_HOC_USER + visual_number: DF000-2001-8999 + issuer: TheNewMotion + time_zone: Europe/Brussels + country_code: CZ + related_locations: + latitude: "51.047599" + name: + language: en + text: 2.00 euro p/hour including VAT. + longitude: "3.729944" + energy_mix: + energy_product_name: E.ON DirektStrom eco + is_green_energy: true + supplier_name: E.ON Energy Deutschland + energy_sources: + percentage: 21.7 + source: NUCLEAR + environ_impact: + amount: 372 + category: NUCLEAR_WASTE + directions: + language: en + text: 2.00 euro p/hour including VAT. + party_id: BEC + publish: true + name: Gent Zuid + postal_code: "9000" + facilities: HOTEL + properties: + data: + $ref: '#/components/schemas/locations_data' + status_code: + example: 1000 + type: number + status_message: + example: Success + type: string + timeStamp: + example: 2015-06-30T21:59:59Z + type: string + required: + - status_code + - timestamp + type: object + image: + example: + thumbnail: https://example.com/img/logo_thumb.jpg + width: 512 + category: CHARGER + type: jpeg + url: https://example.com/img/logo.jpg + height: 512 + properties: + url: + example: https://example.com/img/logo.jpg + type: string + thumbnail: + example: https://example.com/img/logo_thumb.jpg + type: string + category: + enum: + - CHARGER + - ENTRANCE + - LOCATION + - NETWORK + - OPERATOR + - OTHER + - OWNER + type: string + type: + example: jpeg + type: string + width: + example: 512 + type: number + height: + example: 512 + type: number + required: + - category + - type + - url + type: object + evse: + example: + physical_reference: "1" + evse_id: BE*BEC*E041503001 + connectors: + standard: CHADEMO + max_amperage: 16 + terms_and_conditions: https://example.com/terms_and_conditions + last_updated: 2015-03-16T10:10:02Z + format: SOCKET + max_voltage: 220 + id: "1" + max_electric_power: 0 + power_type: AC_1_PHASE + tariff_ids: "11" + images: + thumbnail: https://example.com/img/logo_thumb.jpg + width: 512 + category: CHARGER + type: jpeg + url: https://example.com/img/logo.jpg + height: 512 + last_updated: 2015-03-18T08:12:01Z + capabilities: CHARGING_PROFILE_CAPABLE + status_schedule: + period_begin: 07:00 + period_end: 1080 + status: AVAILABLE + coordinates: + latitude: "51.047599" + longitude: "3.729944" + uid: "3256" + directions: + language: en + text: 2.00 euro p/hour including VAT. + parking_restrictions: EV_ONLY + floor_level: "-1" + status: AVAILABLE + properties: + uid: + example: "3256" + type: string + evse_id: + example: BE*BEC*E041503001 + type: string + status: + enum: + - AVAILABLE + - BLOCKED + - CHARGING + - INOPERATIVE + - OUTOFORDER + - PLANNED + - REMOVED + - RESERVED + - UNKNOWN + type: string + status_schedule: + $ref: '#/components/schemas/evse_status_schedule' + capabilities: + enum: + - CHARGING_PROFILE_CAPABLE + - CHARGING_PREFERENCES_CAPABLE + - CHIP_CARD_SUPPORT + - CONTACTLESS_CARD_SUPPORT + - CREDIT_CARD_PAYABLE + - DEBIT_CARD_PAYABLE + - PED_TERMINAL + - REMOTE_START_STOP_CAPABLE + - RESERVABLE + - RFID_READER + - START_SESSION_CONNECTOR_REQUIRED + - TOKEN_GROUP_CAPABLE + - UNLOCK_CAPABLE + type: string + connectors: + $ref: '#/components/schemas/connector' + floor_level: + example: "-1" + type: string + coordinates: + $ref: '#/components/schemas/cdrBody_cdr_location_coordinates' + physical_reference: + example: "1" + type: string + directions: + $ref: '#/components/schemas/cdrBody_tariffs_tariff_alt_text' + parking_restrictions: + enum: + - EV_ONLY + - PLUGGED + - DISABLED + - CUSTOMERS + - MOTORCYCLES + type: string + images: + $ref: '#/components/schemas/image' + last_updated: + example: 2015-03-18T08:12:01Z + type: string + required: + - last_updated + - status + - uid + type: object + connector: + example: + standard: CHADEMO + max_amperage: 16 + terms_and_conditions: https://example.com/terms_and_conditions + last_updated: 2015-03-16T10:10:02Z + format: SOCKET + max_voltage: 220 + id: "1" + max_electric_power: 0 + power_type: AC_1_PHASE + tariff_ids: "11" + properties: + id: + example: "1" + type: string + standard: + enum: + - CHADEMO + - CHAOJI + - DOMESTIC_A + - DOMESTIC_B + - DOMESTIC_C + - DOMESTIC_D + - DOMESTIC_E + - DOMESTIC_F + - DOMESTIC_G + - DOMESTIC_H + - DOMESTIC_J + - DOMESTIC_K + - DOMESTIC_L + - DOMESTIC_M + - DOMESTIC_N + - DOMESTIC_O + - GBT_AC + - GBT_DC + - IEC_60309_2_single_16 + - IEC_60309_2_three_16 + - IEC_60309_2_three_32 + - IEC_60309_2_three_64 + - IEC_62196_T1 + - IEC_62196_T1_COMBO + - IEC_62196_T2 + - IEC_62196_T2_COMBO + - IEC_62196_T3A + - IEC_62196_T3C + - NEMA_5_20 + - NEMA_6_30 + - NEMA_6_50 + - NEMA_10_30 + - NEMA_10_50 + - NEMA_14_30 + - NEMA_14_50 + - PANTOGRAPH_BOTTOM_UP + - PANTOGRAPH_TOP_DOWN + - TESLA_R + - TESLA_S + type: string + format: + enum: + - SOCKET + - CABLE + type: string + power_type: + enum: + - AC_1_PHASE + - AC_2_PHASE + - AC_2_PHASE_SPLIT + - AC_3_PHASE + - DC + type: string + max_voltage: + example: 220 + type: integer + max_amperage: + example: 16 + type: integer + max_electric_power: + example: 0 + type: integer + tariff_ids: + example: "11" + type: string + terms_and_conditions: + example: https://example.com/terms_and_conditions + type: string + last_updated: + example: 2015-03-16T10:10:02Z + type: string + required: + - format + - id + - last_updated + - max_amperage + - max_voltage + - power_type + - standard + type: object + businessDetails: + example: + website: http://example.com + name: Example Operator + logo: + thumbnail: https://example.com/img/logo_thumb.jpg + width: 512 + category: CHARGER + type: jpeg + url: https://example.com/img/logo.jpg + height: 512 + properties: + name: + example: Example Operator + type: string + website: + example: http://example.com + type: string + logo: + $ref: '#/components/schemas/credentials_data_roles_business_details_logo' + required: + - name + type: object + sessionsResponse: + example: + status_message: Success + timeStamp: 2015-06-30T21:59:59Z + sessions: + last_updated: 2019-06-24T12:39:09Z + authorization_reference: "" + charging_periods: + tariff_id: "12" + start_date_time: 2019-06-23T08:16:02Z + dimensions: + volume: 120 + type: AUTH_REQUEST + cdr_token: + country_code: CZ + uid: 123abc + contract_id: NL-TST-C12345678-S + party_id: STK + type: AD_HOC_USER + location_id: LOC1 + country_code: CZ + end_date_time: 2020-04-09T10:17:09Z + auth_method: AUTH_REQUEST + party_id: STK + connector_id: "1" + total_costs: + excl_vat: 2.5 + incl_vat: 0.66 + currency: EUR + id: "101" + evse_uid: "3256" + start_date_time: 2020-03-09T10:17:09Z + kwh: 0.0 + meter_id: meter_id + status: ACTIVE + status_code: 1000 + properties: + sessions: + $ref: '#/components/schemas/session' + status_code: + example: 1000 + type: number + status_message: + example: Success + type: string + timeStamp: + example: 2015-06-30T21:59:59Z + type: string + required: + - status_code + - timestamp + type: object + sessionResponse: + example: + status_message: Success + timeStamp: 2015-06-30T21:59:59Z + status_code: 1000 + session: + last_updated: 2019-06-24T12:39:09Z + authorization_reference: "" + charging_periods: + tariff_id: "12" + start_date_time: 2019-06-23T08:16:02Z + dimensions: + volume: 120 + type: AUTH_REQUEST + cdr_token: + country_code: CZ + uid: 123abc + contract_id: NL-TST-C12345678-S + party_id: STK + type: AD_HOC_USER + location_id: LOC1 + country_code: CZ + end_date_time: 2020-04-09T10:17:09Z + auth_method: AUTH_REQUEST + party_id: STK + connector_id: "1" + total_costs: + excl_vat: 2.5 + incl_vat: 0.66 + currency: EUR + id: "101" + evse_uid: "3256" + start_date_time: 2020-03-09T10:17:09Z + kwh: 0.0 + meter_id: meter_id + status: ACTIVE + properties: + session: + $ref: '#/components/schemas/session' + status_code: + example: 1000 + type: number + status_message: + example: Success + type: string + timeStamp: + example: 2015-06-30T21:59:59Z + type: string + required: + - session + - status_code + - timestamp + type: object + session: + example: + last_updated: 2019-06-24T12:39:09Z + authorization_reference: "" + charging_periods: + tariff_id: "12" + start_date_time: 2019-06-23T08:16:02Z + dimensions: + volume: 120 + type: AUTH_REQUEST + cdr_token: + country_code: CZ + uid: 123abc + contract_id: NL-TST-C12345678-S + party_id: STK + type: AD_HOC_USER + location_id: LOC1 + country_code: CZ + end_date_time: 2020-04-09T10:17:09Z + auth_method: AUTH_REQUEST + party_id: STK + connector_id: "1" + total_costs: + excl_vat: 2.5 + incl_vat: 0.66 + currency: EUR + id: "101" + evse_uid: "3256" + start_date_time: 2020-03-09T10:17:09Z + kwh: 0.0 + meter_id: meter_id + status: ACTIVE + properties: + country_code: + example: CZ + type: string + party_id: + example: STK + type: string + id: + example: "101" + type: string + start_date_time: + example: 2020-03-09T10:17:09Z + type: string + end_date_time: + example: 2020-04-09T10:17:09Z + type: string + kwh: + example: 0.0 + type: number + cdr_token: + $ref: '#/components/schemas/cdrBody_cdr_token' + auth_method: + enum: + - AUTH_REQUEST + - COMMAND + - WHITELIST + type: string + authorization_reference: + example: "" + type: string + location_id: + example: LOC1 + type: string + evse_uid: + example: "3256" + type: string + connector_id: + example: "1" + type: string + meter_id: + type: string + currency: + example: EUR + type: string + charging_periods: + $ref: '#/components/schemas/session_charging_periods' + total_costs: + $ref: '#/components/schemas/session_total_costs' + status: + enum: + - ACTIVE + - COMPLETED + - INVALID + - PENDING + - RESERVATION + type: string + last_updated: + example: 2019-06-24T12:39:09Z + type: string + required: + - auth_method + - cdr_token + - connector_id + - country_code + - currency + - evse_uid + - id + - kwh + - last_updated + - location_id + - party_id + - start_date_time + - status + type: object + chargingPreferences: + properties: + profile_type: + enum: + - CHEAP + - FAST + - GREEN + - REGULAR + type: string + departure_time: + example: 2015-06-30T21:59:59Z"" + type: string + energy_need: + example: 1 + type: number + required: + - profile_type + type: object + chargingPreferencesResponse: + example: + status_message: Success + timeStamp: 2015-06-30T21:59:59Z + status_code: 1000 + charging_preferences: ACCEPTED + properties: + charging_preferences: + enum: + - ACCEPTED + - DEPARTURE_REQUIRED + - ENERGY_NEED_REQUIRED + - NOT_POSSIBLE + - PROFILE_TYPE_NOT_SUPPORTED + type: string + status_code: + example: 1000 + type: number + status_message: + example: Success + type: string + timeStamp: + example: 2015-06-30T21:59:59Z + type: string + required: + - charging_preferences + - status_code + - timestamp + type: object + tariffsResponse: + example: + status_message: Success + timeStamp: 2015-06-30T21:59:59Z + status_code: 1000 + tariffs: + tariff_alt_url: https://company.com/tariffs/14 + last_updated: 2015-06-29T22:39:09Z + type: AD_HOC_PAYMENT + country_code: BE + end_date_time: 2019-06-23T08:16:02Z + energy_mix: + energy_product_name: E.ON DirektStrom eco + is_green_energy: true + supplier_name: E.ON Energy Deutschland + energy_sources: + percentage: 21.7 + source: NUCLEAR + environ_impact: + amount: 372 + category: null + max_price: + excl_vat: 2.5 + incl_vat: 0.66 + min_price: + excl_vat: 2.5 + incl_vat: 0.66 + tariff_alt_text: + language: en + text: 2.00 euro p/hour including VAT. + party_id: BEC + elements: + restrictions: + end_date: 2015-06-29T23:50:16Z + min_kwh: 1.0 + end_time: 1080 + min_duration: 0 + min_current: 32.0 + max_duration: 3600 + start_time: 09:00 + max_power: 32.0 + max_kwh: 1.0 + reservation: null + max_current: 30 + start_date: 2019-06-23T08:16:02Z + min_power: 32.0 + day_of_week: MONDAY + price_components: ENERGY + currency: EUR + id: "12" + start_date_time: 2019-06-23T08:16:02Z + properties: + tariffs: + $ref: '#/components/schemas/tariff' + status_code: + example: 1000 + type: number + status_message: + example: Success + type: string + timeStamp: + example: 2015-06-30T21:59:59Z + type: string + required: + - status_code + - timestamp + type: object + tariffResponse: + example: + status_message: Success + timeStamp: 2015-06-30T21:59:59Z + status_code: 1000 + tariff: + tariff_alt_url: https://company.com/tariffs/14 + last_updated: 2015-06-29T22:39:09Z + type: AD_HOC_PAYMENT + country_code: BE + end_date_time: 2019-06-23T08:16:02Z + energy_mix: + energy_product_name: E.ON DirektStrom eco + is_green_energy: true + supplier_name: E.ON Energy Deutschland + energy_sources: + percentage: 21.7 + source: NUCLEAR + environ_impact: + amount: 372 + category: null + max_price: + excl_vat: 2.5 + incl_vat: 0.66 + min_price: + excl_vat: 2.5 + incl_vat: 0.66 + tariff_alt_text: + language: en + text: 2.00 euro p/hour including VAT. + party_id: BEC + elements: + restrictions: + end_date: 2015-06-29T23:50:16Z + min_kwh: 1.0 + end_time: 1080 + min_duration: 0 + min_current: 32.0 + max_duration: 3600 + start_time: 09:00 + max_power: 32.0 + max_kwh: 1.0 + reservation: null + max_current: 30 + start_date: 2019-06-23T08:16:02Z + min_power: 32.0 + day_of_week: MONDAY + price_components: ENERGY + currency: EUR + id: "12" + start_date_time: 2019-06-23T08:16:02Z + properties: + tariff: + $ref: '#/components/schemas/tariff' + status_code: + example: 1000 + type: number + status_message: + example: Success + type: string + timeStamp: + example: 2015-06-30T21:59:59Z + type: string + required: + - status_code + - tariff + - timestamp + type: object + tariff: + example: + tariff_alt_url: https://company.com/tariffs/14 + last_updated: 2015-06-29T22:39:09Z + type: AD_HOC_PAYMENT + country_code: BE + end_date_time: 2019-06-23T08:16:02Z + energy_mix: + energy_product_name: E.ON DirektStrom eco + is_green_energy: true + supplier_name: E.ON Energy Deutschland + energy_sources: + percentage: 21.7 + source: NUCLEAR + environ_impact: + amount: 372 + category: null + max_price: + excl_vat: 2.5 + incl_vat: 0.66 + min_price: + excl_vat: 2.5 + incl_vat: 0.66 + tariff_alt_text: + language: en + text: 2.00 euro p/hour including VAT. + party_id: BEC + elements: + restrictions: + end_date: 2015-06-29T23:50:16Z + min_kwh: 1.0 + end_time: 1080 + min_duration: 0 + min_current: 32.0 + max_duration: 3600 + start_time: 09:00 + max_power: 32.0 + max_kwh: 1.0 + reservation: null + max_current: 30 + start_date: 2019-06-23T08:16:02Z + min_power: 32.0 + day_of_week: MONDAY + price_components: ENERGY + currency: EUR + id: "12" + start_date_time: 2019-06-23T08:16:02Z + properties: + country_code: + example: BE + type: string + party_id: + example: BEC + type: string + id: + example: "12" + type: string + currency: + example: EUR + type: string + type: + enum: + - AD_HOC_PAYMENT + - PROFILE_CHEAP + - PROFILE_FAST + - PROFILE_GREEN + - REGULAR + type: string + tariff_alt_text: + $ref: '#/components/schemas/cdrBody_tariffs_tariff_alt_text' + tariff_alt_url: + example: https://company.com/tariffs/14 + type: string + min_price: + $ref: '#/components/schemas/price' + max_price: + $ref: '#/components/schemas/price' + elements: + $ref: '#/components/schemas/tariff_elements' + start_date_time: + example: 2019-06-23T08:16:02Z + type: string + end_date_time: + example: 2019-06-23T08:16:02Z + type: string + energy_mix: + $ref: '#/components/schemas/tariff_energy_mix' + last_updated: + example: 2015-06-29T22:39:09Z + type: string + required: + - country_code + - currency + - id + - last_updated + - party_id + type: object + price: + example: + excl_vat: 2.5 + incl_vat: 0.66 + properties: + excl_vat: + example: 2.5 + type: number + incl_vat: + example: 0.66 + type: number + required: + - excl_vat + type: object + reservationRestrictionType: + enum: + - RESERVATION + - RESERVATION_EXPIRES + type: string + environmentalImpactCategoryType: + description: Categories of environmental impact values + enum: + - NUCLEAR_WASTE + - CARBON_DIOXIDE + type: string + tariffDeleteResponse: + example: + status_message: Success + timeStamp: 2015-06-30T21:59:59Z + status_code: 1000 + properties: + status_code: + example: 1000 + type: number + status_message: + example: Success + type: string + timeStamp: + example: 2015-06-30T21:59:59Z + type: string + required: + - status_code + - timeStamp + type: object + tokensResponse: + example: + status_message: Success + timeStamp: 2015-06-30T21:59:59Z + status_code: 1000 + tokens: + last_updated: 2018-12-10T17:25:10Z + contract_id: DE8ACC12E46L89 + language: en + whitelist: ALWAYS + type: AD_HOC_USER + visual_number: DF000-2001-8999-1 + issuer: TheNewMotion + valid: true + country_code: DE + uid: bdf21bce-fc97-11e8-8eb2-f2801f1b9fd1 + default_profile_type: CHEAP + group_id: DF000-2001-8999 + energy_contract: + contract_id: "0123456789" + supplier_name: Greenpeace Energy eG + party_id: TNM + properties: + tokens: + $ref: '#/components/schemas/token' + status_code: + example: 1000 + type: number + status_message: + example: Success + type: string + timeStamp: + example: 2015-06-30T21:59:59Z + type: string + required: + - status_code + - timestamp + type: object + tokenResponse: + example: + status_message: Success + timeStamp: 2015-06-30T21:59:59Z + status_code: 1000 + token: + last_updated: 2018-12-10T17:25:10Z + contract_id: DE8ACC12E46L89 + language: en + whitelist: ALWAYS + type: AD_HOC_USER + visual_number: DF000-2001-8999-1 + issuer: TheNewMotion + valid: true + country_code: DE + uid: bdf21bce-fc97-11e8-8eb2-f2801f1b9fd1 + default_profile_type: CHEAP + group_id: DF000-2001-8999 + energy_contract: + contract_id: "0123456789" + supplier_name: Greenpeace Energy eG + party_id: TNM + properties: + token: + $ref: '#/components/schemas/token' + status_code: + example: 1000 + type: number + status_message: + example: Success + type: string + timeStamp: + example: 2015-06-30T21:59:59Z + type: string + required: + - status_code + - timestamp + - token + type: object + token: + example: + last_updated: 2018-12-10T17:25:10Z + contract_id: DE8ACC12E46L89 + language: en + whitelist: ALWAYS + type: AD_HOC_USER + visual_number: DF000-2001-8999-1 + issuer: TheNewMotion + valid: true + country_code: DE + uid: bdf21bce-fc97-11e8-8eb2-f2801f1b9fd1 + default_profile_type: CHEAP + group_id: DF000-2001-8999 + energy_contract: + contract_id: "0123456789" + supplier_name: Greenpeace Energy eG + party_id: TNM + properties: + country_code: + example: DE + type: string + party_id: + example: TNM + type: string + uid: + example: bdf21bce-fc97-11e8-8eb2-f2801f1b9fd1 + type: string + type: + enum: + - AD_HOC_USER + - APP_USER + - OTHER + - RFID + type: string + contract_id: + example: DE8ACC12E46L89 + type: string + visual_number: + example: DF000-2001-8999-1 + type: string + issuer: + example: TheNewMotion + type: string + group_id: + example: DF000-2001-8999 + type: string + valid: + example: true + type: boolean + whitelist: + enum: + - ALWAYS + - ALLOWED + - ALLOWED_OFFLINE + - NEVER + type: string + language: + example: en + type: string + default_profile_type: + enum: + - CHEAP + - FAST + - GREEN + - REGULAR + type: string + energy_contract: + $ref: '#/components/schemas/token_energy_contract' + last_updated: + example: 2018-12-10T17:25:10Z + type: string + required: + - contract_id + - country_code + - issuer + - last_updated + - party_id + - type + - uid + - valid + - whitelist + type: object + locationReferences: + example: + evse_uids: evse_uids + location_id: LOC1 + properties: + location_id: + example: LOC1 + type: string + evse_uids: + type: string + required: + - location_id + type: object + authorization: + description: Changed name of the object from official docs due to colliding + naming of info property + example: + authorization_reference: "567890" + allowed: ALLOWED + location: + evse_uids: evse_uids + location_id: LOC1 + token: + last_updated: 2018-12-10T17:25:10Z + contract_id: DE8ACC12E46L89 + language: en + whitelist: ALWAYS + type: AD_HOC_USER + visual_number: DF000-2001-8999-1 + issuer: TheNewMotion + valid: true + country_code: DE + uid: bdf21bce-fc97-11e8-8eb2-f2801f1b9fd1 + default_profile_type: CHEAP + group_id: DF000-2001-8999 + energy_contract: + contract_id: "0123456789" + supplier_name: Greenpeace Energy eG + party_id: TNM + info: + language: en + text: text + properties: + allowed: + enum: + - ALLOWED + - BLOCKED + - EXPIRED + - NO_CREDIT + - NOT_ALLOWED + type: string + token: + $ref: '#/components/schemas/token' + location: + $ref: '#/components/schemas/locationReferences' + authorization_reference: + example: "567890" + type: string + info: + $ref: '#/components/schemas/commandResponse_message' + required: + - allowed + - token + type: object + versions: + example: + status_message: Success + timeStamp: 2015-06-30T21:59:59Z + status_code: 1000 + data: + version: "2.0" + url: https://www.server.com/ocpi/2.2.1/ + properties: + data: + $ref: '#/components/schemas/versions_data' + status_code: + example: 1000 + type: number + status_message: + example: Success + type: string + timeStamp: + example: 2015-06-30T21:59:59Z + type: string + required: + - status_code + - timestamp + type: object + details: + example: + status_message: Success + timeStamp: 2015-06-30T21:59:59Z + status_code: 1000 + data: + endpoints: + identifier: null + role: null + url: https://example.com/ocpi/2.2.1/cdrs/ + version: "2.0" + properties: + data: + $ref: '#/components/schemas/details_data' + status_code: + example: 1000 + type: number + status_message: + example: Success + type: string + timeStamp: + example: 2015-06-30T21:59:59Z + type: string + required: + - status_code + - timestamp + type: object + moduleIDType: + description: OCPI 2.2.1 modules + enum: + - cdrs + - chargingprofiles + - commands + - credentials + - hubclientinfo + - locations + - sessions + - tariffs + - tokens + type: string + interfaceRoleType: + description: Interface role endpoint implements. + enum: + - SENDER + - RECEIVER + type: string + genericError: + properties: + status_code: + example: 2001 + type: number + status_message: + example: "Missing required field: type" + type: string + timeStamp: + example: 2015-06-30T21:59:59Z + type: string + required: + - status_code + - timeStamp + type: object + _ocpi_chargingprofile_post_request: + oneOf: + - $ref: '#/components/schemas/activeChargingProfileResult' + - $ref: '#/components/schemas/chargingProfileResult' + - $ref: '#/components/schemas/clearProfileResult' + _ocpi_commands__command__post_request: + oneOf: + - $ref: '#/components/schemas/cancelReservation' + - $ref: '#/components/schemas/reserveNow' + - $ref: '#/components/schemas/startSession' + - $ref: '#/components/schemas/stopSession' + - $ref: '#/components/schemas/unlockConnector' + _ocpi_locations__location_id__get_200_response: + oneOf: + - $ref: '#/components/schemas/locations' + - $ref: '#/components/schemas/evse' + - $ref: '#/components/schemas/connector' + cdrBody_cdr_token: + example: + country_code: CZ + uid: 123abc + contract_id: NL-TST-C12345678-S + party_id: STK + type: AD_HOC_USER + properties: + country_code: + example: CZ + type: string + party_id: + example: STK + type: string + uid: + example: 123abc + type: string + type: + enum: + - AD_HOC_USER + - APP_USER + - OTHER + - RFID + type: string + contract_id: + example: NL-TST-C12345678-S + type: string + required: + - contract_id + - country_code + - party_id + - type + - uid + type: object + cdrBody_cdr_location_coordinates: + example: + latitude: "51.047599" + longitude: "3.729944" + properties: + latitude: + example: "51.047599" + type: string + longitude: + example: "3.729944" + type: string + required: + - latitude + - longitude + type: object + cdrBody_cdr_location: + example: + country: BEL + evse_id: BE*BEC*E041503003 + address: F.Rooseveltlaan 3A + city: Gent + coordinates: + latitude: "51.047599" + longitude: "3.729944" + name: Gent Zuid + connector_id: "1" + id: LOC1 + state: state + evse_uid: "3256" + postal_code: "9000" + connector_power_type: AC_1_PHASE + connector_standard: CHADEMO + connector_format: SOCKET + properties: + id: + example: LOC1 + type: string + name: + example: Gent Zuid + type: string + address: + example: F.Rooseveltlaan 3A + type: string + city: + example: Gent + type: string + postal_code: + example: "9000" + type: string + state: + type: string + country: + example: BEL + type: string + coordinates: + $ref: '#/components/schemas/cdrBody_cdr_location_coordinates' + evse_uid: + example: "3256" + type: string + evse_id: + example: BE*BEC*E041503003 + type: string + connector_id: + example: "1" + type: string + connector_standard: + enum: + - CHADEMO + - CHAOJI + - DOMESTIC_A + - DOMESTIC_B + - DOMESTIC_C + - DOMESTIC_D + - DOMESTIC_E + - DOMESTIC_F + - DOMESTIC_G + - DOMESTIC_H + - DOMESTIC_J + - DOMESTIC_K + - DOMESTIC_L + - DOMESTIC_M + - DOMESTIC_N + - DOMESTIC_O + - GBT_AC + - GBT_DC + - IEC_60309_2_single_16 + - IEC_60309_2_three_16 + - IEC_60309_2_three_32 + - IEC_60309_2_three_64 + - IEC_62196_T1 + - IEC_62196_T1_COMBO + - IEC_62196_T2 + - IEC_62196_T2_COMBO + - IEC_62196_T3A + - IEC_62196_T3C + - NEMA_5_20 + - NEMA_6_30 + - NEMA_6_50 + - NEMA_10_30 + - NEMA_10_50 + - NEMA_14_30 + - NEMA_14_50 + - PANTOGRAPH_BOTTOM_UP + - PANTOGRAPH_TOP_DOWN + - TESLA_R + - TESLA_S + type: string + connector_format: + enum: + - SOCKET + - CABLE + type: string + connector_power_type: + enum: + - AC_1_PHASE + - AC_2_PHASE + - AC_2_PHASE_SPLIT + - AC_3_PHASE + - DC + type: string + type: object + cdrBody_tariffs_tariff_alt_text: + example: + language: en + text: 2.00 euro p/hour including VAT. + properties: + language: + example: en + type: string + text: + example: 2.00 euro p/hour including VAT. + type: string + required: + - language + - text + type: object + cdrBody_tariffs_elements_restrictions: + example: + end_date: 2015-06-29T23:50:16Z + min_kwh: 1.0 + end_time: 1080 + min_duration: 0 + min_current: 32.0 + max_duration: 3600 + start_time: 09:00 + max_power: 32.0 + max_kwh: 1.0 + reservation: RESERVATION + max_current: 30 + start_date: 2019-06-23T08:16:02Z + min_power: 32.0 + day_of_week: MONDAY + properties: + start_time: + example: 09:00 + type: string + end_time: + example: "1080" + type: string + start_date: + example: 2019-06-23T08:16:02Z + type: string + end_date: + example: 2015-06-29T23:50:16Z + type: string + min_kwh: + example: 1.0 + type: number + max_kwh: + example: 1.0 + type: number + min_current: + example: 32.0 + type: number + max_current: + example: 30 + type: number + min_power: + example: 32.0 + type: number + max_power: + example: 32.0 + type: number + min_duration: + example: 0 + type: integer + max_duration: + example: 3600 + type: integer + day_of_week: + enum: + - MONDAY + - TUESDAY + - WEDNESDAY + - THURSDAY + - FRIDAY + - SATURDAY + - SUNDAY + type: string + reservation: + enum: + - RESERVATION + - RESERVATION_EXPIRES + type: string + type: object + cdrBody_tariffs_elements: + example: + restrictions: + end_date: 2015-06-29T23:50:16Z + min_kwh: 1.0 + end_time: 1080 + min_duration: 0 + min_current: 32.0 + max_duration: 3600 + start_time: 09:00 + max_power: 32.0 + max_kwh: 1.0 + reservation: RESERVATION + max_current: 30 + start_date: 2019-06-23T08:16:02Z + min_power: 32.0 + day_of_week: MONDAY + price_components: ENERGY + properties: + price_components: + enum: + - ENERGY + - FLAT + - PARKING_TIME + - TIME + type: string + restrictions: + $ref: '#/components/schemas/cdrBody_tariffs_elements_restrictions' + type: object + cdrBody_tariffs_energy_mix_energy_sources: + example: + percentage: 21.7 + source: NUCLEAR + properties: + source: + enum: + - NUCLEAR + - GENERAL_FOSSIL + - COAL + - GAS + - GENERAL_GREEN + - SOLAR + - WIND + - WATER + type: string + percentage: + example: 21.7 + type: number + required: + - percentage + - source + type: object + cdrBody_tariffs_energy_mix_environ_impact: + example: + amount: 372 + category: NUCLEAR_WASTE + properties: + category: + enum: + - NUCLEAR_WASTE + - CARBON_DIOXIDE + type: string + amount: + example: 372 + type: number + required: + - amount + - category + type: object + cdrBody_tariffs_energy_mix: + example: + energy_product_name: E.ON DirektStrom eco + is_green_energy: true + supplier_name: E.ON Energy Deutschland + energy_sources: + percentage: 21.7 + source: NUCLEAR + environ_impact: + amount: 372 + category: NUCLEAR_WASTE + properties: + is_green_energy: + example: true + type: boolean + energy_sources: + $ref: '#/components/schemas/cdrBody_tariffs_energy_mix_energy_sources' + environ_impact: + $ref: '#/components/schemas/cdrBody_tariffs_energy_mix_environ_impact' + supplier_name: + example: E.ON Energy Deutschland + type: string + energy_product_name: + example: E.ON DirektStrom eco + type: string + required: + - is_green_energy + type: object + cdrBody_tariffs: + example: + tariff_alt_url: https://company.com/tariffs/14 + last_updated: 2015-06-29T22:39:09Z + type: AD_HOC_PAYMENT + country_code: BE + end_date_time: 2019-06-23T08:16:02Z + energy_mix: + energy_product_name: E.ON DirektStrom eco + is_green_energy: true + supplier_name: E.ON Energy Deutschland + energy_sources: + percentage: 21.7 + source: NUCLEAR + environ_impact: + amount: 372 + category: NUCLEAR_WASTE + max_price: + excl_vat: 2.5 + incl_vat: 0.66 + min_price: + excl_vat: 2.5 + incl_vat: 0.66 + tariff_alt_text: + language: en + text: 2.00 euro p/hour including VAT. + party_id: BEC + elements: + restrictions: + end_date: 2015-06-29T23:50:16Z + min_kwh: 1.0 + end_time: 1080 + min_duration: 0 + min_current: 32.0 + max_duration: 3600 + start_time: 09:00 + max_power: 32.0 + max_kwh: 1.0 + reservation: RESERVATION + max_current: 30 + start_date: 2019-06-23T08:16:02Z + min_power: 32.0 + day_of_week: MONDAY + price_components: ENERGY + currency: EUR + id: "12" + start_date_time: 2019-06-23T08:16:02Z + properties: + country_code: + example: BE + type: string + party_id: + example: BEC + type: string + id: + example: "12" + type: string + currency: + example: EUR + type: string + type: + enum: + - AD_HOC_PAYMENT + - PROFILE_CHEAP + - PROFILE_FAST + - PROFILE_GREEN + - REGULAR + type: string + tariff_alt_text: + $ref: '#/components/schemas/cdrBody_tariffs_tariff_alt_text' + tariff_alt_url: + example: https://company.com/tariffs/14 + type: string + min_price: + $ref: '#/components/schemas/price' + max_price: + $ref: '#/components/schemas/price' + elements: + $ref: '#/components/schemas/cdrBody_tariffs_elements' + start_date_time: + example: 2019-06-23T08:16:02Z + type: string + end_date_time: + example: 2019-06-23T08:16:02Z + type: string + energy_mix: + $ref: '#/components/schemas/cdrBody_tariffs_energy_mix' + last_updated: + example: 2015-06-29T22:39:09Z + type: string + required: + - country_code + - currency + - id + - last_updated + - party_id + type: object + cdrBody_charging_periods_dimensions: + example: + volume: 2200 + type: CURRENT + properties: + type: + enum: + - CURRENT + - ENERGY + - ENERGY_EXPORT + - ENERGY_IMPORT + - MAX_CURRENT + - MIN_CURRENT + - MAX_POWER + - MIN_POWER + - PARKING_TIME + - POWER + - RESERVATION_TIME + - STATE_OF_CHARGE + - TIME + type: string + volume: + example: 2200 + type: number + required: + - type + - volume + type: object + cdrBody_charging_periods: + example: + tariff_id: "12" + start_date_time: 2019-06-23T08:16:02Z + dimensions: + volume: 2200 + type: CURRENT + properties: + start_date_time: + example: 2019-06-23T08:16:02Z + type: string + dimensions: + $ref: '#/components/schemas/cdrBody_charging_periods_dimensions' + tariff_id: + example: "12" + type: string + required: + - start_date_time + type: object + cdrBody_signed_data_signed_values: + example: + plain_data: plain_data + signed_data: signed_data + nature: nature + properties: + nature: + type: string + plain_data: + type: string + signed_data: + type: string + required: + - nature + - plain_data + - signed_data + type: object + cdrBody_signed_data: + example: + public_key: public_key + signed_values: + plain_data: plain_data + signed_data: signed_data + nature: nature + encoding_method: encoding_method + encoding_method_version: 0 + url: https://example.com + properties: + encoding_method: + type: string + encoding_method_version: + type: integer + public_key: + type: string + signed_values: + $ref: '#/components/schemas/cdrBody_signed_data_signed_values' + url: + example: https://example.com + type: string + required: + - encoding_method + type: object + chargingProfile_charging_profile_period: + properties: + start_period: + type: integer + limit: + type: number + required: + - limit + - start_period + type: object + activeChargingProfileResult_profile: + properties: + start_date_time: + example: 2019-06-23T08:16:02Z + type: string + charging_profile: + $ref: '#/components/schemas/chargingProfile' + required: + - charging_profile + - start_date_time + type: object + commandResponse_message: + example: + language: en + text: text + properties: + language: + example: en + type: string + text: + type: string + required: + - language + - text + type: object + credentials_data_roles_business_details_logo: + example: + thumbnail: https://example.com/img/logo_thumb.jpg + width: 512 + category: CHARGER + type: jpeg + url: https://example.com/img/logo.jpg + height: 512 + properties: + url: + example: https://example.com/img/logo.jpg + type: string + thumbnail: + example: https://example.com/img/logo_thumb.jpg + type: string + category: + enum: + - CHARGER + - ENTRANCE + - LOCATION + - NETWORK + - OPERATOR + - OTHER + - OWNER + type: string + type: + example: jpeg + type: string + width: + example: 512 + type: number + height: + example: 512 + type: number + required: + - category + - type + - url + type: object + credentials_data_roles_business_details: + example: + website: http://example.com + name: Example Operator + logo: + thumbnail: https://example.com/img/logo_thumb.jpg + width: 512 + category: CHARGER + type: jpeg + url: https://example.com/img/logo.jpg + height: 512 + properties: + name: + example: Example Operator + type: string + website: + example: http://example.com + type: string + logo: + $ref: '#/components/schemas/credentials_data_roles_business_details_logo' + required: + - name + type: object + credentials_data_roles: + example: + country_code: CZ + business_details: + website: http://example.com + name: Example Operator + logo: + thumbnail: https://example.com/img/logo_thumb.jpg + width: 512 + category: CHARGER + type: jpeg + url: https://example.com/img/logo.jpg + height: 512 + role: CPO + party_id: EXA + properties: + role: + enum: + - CPO + - EMSP + - HUB + - NAP + - NSP + - OTHER + - SCSP + type: string + business_details: + $ref: '#/components/schemas/credentials_data_roles_business_details' + party_id: + example: EXA + type: string + country_code: + example: CZ + type: string + required: + - business_details + - country_code + - party_id + - role + type: object + credentials_data: + example: + roles: + country_code: CZ + business_details: + website: http://example.com + name: Example Operator + logo: + thumbnail: https://example.com/img/logo_thumb.jpg + width: 512 + category: CHARGER + type: jpeg + url: https://example.com/img/logo.jpg + height: 512 + role: CPO + party_id: EXA + url: https://example.com/ocpi/versions/ + token: ebf3b399-779f-4497-9b9d-ac6ad3cc44d2 + properties: + token: + example: ebf3b399-779f-4497-9b9d-ac6ad3cc44d2 + type: string + url: + example: https://example.com/ocpi/versions/ + type: string + roles: + $ref: '#/components/schemas/credentials_data_roles' + required: + - token + - url + type: object + locations_data_publish_allowed_to: + example: + uid: "012345678" + group_id: DF000-2001-8999 + type: AD_HOC_USER + visual_number: DF000-2001-8999 + issuer: TheNewMotion + properties: + uid: + example: "012345678" + type: string + type: + enum: + - AD_HOC_USER + - APP_USER + - OTHER + - RFID + type: string + visual_number: + example: DF000-2001-8999 + type: string + issuer: + example: TheNewMotion + type: string + group_id: + example: DF000-2001-8999 + type: string + type: object + locations_data_related_locations: + example: + latitude: "51.047599" + name: + language: en + text: 2.00 euro p/hour including VAT. + longitude: "3.729944" + properties: + latitude: + example: "51.047599" + type: string + longitude: + example: "3.729944" + type: string + name: + $ref: '#/components/schemas/cdrBody_tariffs_tariff_alt_text' + required: + - latitude + - longitude + type: object + locations_data_opening_times_regular_hours: + example: + period_begin: 07:00 + period_end: 1080 + weekday: 1 + properties: + weekday: + example: 1 + type: integer + period_begin: + example: 07:00 + type: string + period_end: + example: "1080" + type: string + required: + - period_begin + - period_end + - weekday + type: object + locations_data_opening_times_exceptional_openings: + example: + period_begin: 07:00 + period_end: 1080 + properties: + period_begin: + example: 07:00 + type: string + period_end: + example: "1080" + type: string + required: + - period_begin + - period_end + type: object + locations_data_opening_times: + example: + twentyfourseven: true + regular_hours: + period_begin: 07:00 + period_end: 1080 + weekday: 1 + exceptional_closings: + period_begin: 07:00 + period_end: 1080 + exceptional_openings: + period_begin: 07:00 + period_end: 1080 + properties: + twentyfourseven: + example: true + type: boolean + regular_hours: + $ref: '#/components/schemas/locations_data_opening_times_regular_hours' + exceptional_openings: + $ref: '#/components/schemas/locations_data_opening_times_exceptional_openings' + exceptional_closings: + $ref: '#/components/schemas/locations_data_opening_times_exceptional_openings' + required: + - twentyfourseven + type: object + locations_data: + example: + country: BEL + city: Gent + charging_when_closed: false + parking_type: ALONG_MOTORWAY + suboperator: + website: http://example.com + name: Example Operator + logo: + thumbnail: https://example.com/img/logo_thumb.jpg + width: 512 + category: CHARGER + type: jpeg + url: https://example.com/img/logo.jpg + height: 512 + operator: + website: http://example.com + name: Example Operator + logo: + thumbnail: https://example.com/img/logo_thumb.jpg + width: 512 + category: CHARGER + type: jpeg + url: https://example.com/img/logo.jpg + height: 512 + evses: + physical_reference: "1" + evse_id: BE*BEC*E041503001 + connectors: + standard: CHADEMO + max_amperage: 16 + terms_and_conditions: https://example.com/terms_and_conditions + last_updated: 2015-03-16T10:10:02Z + format: SOCKET + max_voltage: 220 + id: "1" + max_electric_power: 0 + power_type: AC_1_PHASE + tariff_ids: "11" + images: + thumbnail: https://example.com/img/logo_thumb.jpg + width: 512 + category: CHARGER + type: jpeg + url: https://example.com/img/logo.jpg + height: 512 + last_updated: 2015-03-18T08:12:01Z + capabilities: CHARGING_PROFILE_CAPABLE + status_schedule: + period_begin: 07:00 + period_end: 1080 + status: AVAILABLE + coordinates: + latitude: "51.047599" + longitude: "3.729944" + uid: "3256" + directions: + language: en + text: 2.00 euro p/hour including VAT. + parking_restrictions: EV_ONLY + floor_level: "-1" + status: AVAILABLE + id: LOC1 + state: Slovenia + owner: + website: http://example.com + name: Example Operator + logo: + thumbnail: https://example.com/img/logo_thumb.jpg + width: 512 + category: CHARGER + type: jpeg + url: https://example.com/img/logo.jpg + height: 512 + images: + thumbnail: https://example.com/img/logo_thumb.jpg + width: 512 + category: CHARGER + type: jpeg + url: https://example.com/img/logo.jpg + height: 512 + last_updated: 2015-06-29T20:39:09Z + address: F.Rooseveltlaan 3A + coordinates: + latitude: "51.047599" + longitude: "3.729944" + opening_times: + twentyfourseven: true + regular_hours: + period_begin: 07:00 + period_end: 1080 + weekday: 1 + exceptional_closings: + period_begin: 07:00 + period_end: 1080 + exceptional_openings: + period_begin: 07:00 + period_end: 1080 + publish_allowed_to: + uid: "012345678" + group_id: DF000-2001-8999 + type: AD_HOC_USER + visual_number: DF000-2001-8999 + issuer: TheNewMotion + time_zone: Europe/Brussels + country_code: CZ + related_locations: + latitude: "51.047599" + name: + language: en + text: 2.00 euro p/hour including VAT. + longitude: "3.729944" + energy_mix: + energy_product_name: E.ON DirektStrom eco + is_green_energy: true + supplier_name: E.ON Energy Deutschland + energy_sources: + percentage: 21.7 + source: NUCLEAR + environ_impact: + amount: 372 + category: NUCLEAR_WASTE + directions: + language: en + text: 2.00 euro p/hour including VAT. + party_id: BEC + publish: true + name: Gent Zuid + postal_code: "9000" + facilities: HOTEL + properties: + country_code: + example: CZ + type: string + party_id: + example: BEC + type: string + id: + example: LOC1 + type: string + publish: + example: true + type: boolean + publish_allowed_to: + $ref: '#/components/schemas/locations_data_publish_allowed_to' + name: + example: Gent Zuid + type: string + address: + example: F.Rooseveltlaan 3A + type: string + city: + example: Gent + type: string + postal_code: + example: "9000" + type: string + state: + example: Slovenia + type: string + country: + example: BEL + type: string + coordinates: + $ref: '#/components/schemas/cdrBody_cdr_location_coordinates' + related_locations: + $ref: '#/components/schemas/locations_data_related_locations' + parking_type: + enum: + - ALONG_MOTORWAY + - PARKING_GARAGE + - PARKING_LOT + - ON_DRIVEWAY + - ON_STREET + - UNDERGROUND_GARAGE + type: string + evses: + $ref: '#/components/schemas/evse' + directions: + $ref: '#/components/schemas/cdrBody_tariffs_tariff_alt_text' + operator: + $ref: '#/components/schemas/businessDetails' + suboperator: + $ref: '#/components/schemas/businessDetails' + owner: + $ref: '#/components/schemas/businessDetails' + facilities: + enum: + - HOTEL + - RESTAURANT + - CAFE + - MALL + - SUPERMARKET + - SPORT + - RECREATION_AREA + - NATURE + - MUSEUM + - BIKE_SHARING + - BUS_STOP + - TAXI_STAND + - TRAM_STOP + - METRO_STATION + - TRAIN_STATION + - AIRPORT + - PARKING_LOT + - CARPOOL_PARKING + - FUEL_STATION + - WIFI + type: string + time_zone: + example: Europe/Brussels + type: string + opening_times: + $ref: '#/components/schemas/locations_data_opening_times' + charging_when_closed: + example: false + type: boolean + images: + $ref: '#/components/schemas/image' + energy_mix: + $ref: '#/components/schemas/cdrBody_tariffs_energy_mix' + last_updated: + example: 2015-06-29T20:39:09Z + type: string + required: + - address + - city + - coordinates + - country + - last_updated + - time_zone + type: object + evse_status_schedule: + example: + period_begin: 07:00 + period_end: 1080 + status: AVAILABLE + properties: + period_begin: + example: 07:00 + type: string + period_end: + example: "1080" + type: string + status: + enum: + - AVAILABLE + - BLOCKED + - CHARGING + - INOPERATIVE + - OUTOFORDER + - PLANNED + - REMOVED + - RESERVED + - UNKNOWN + type: string + required: + - period_begin + - status + type: object + session_charging_periods_dimensions: + example: + volume: 120 + type: AUTH_REQUEST + properties: + type: + enum: + - AUTH_REQUEST + - COMMAND + - WHITELIST + type: string + volume: + example: 120 + type: number + required: + - type + - volume + type: object + session_charging_periods: + example: + tariff_id: "12" + start_date_time: 2019-06-23T08:16:02Z + dimensions: + volume: 120 + type: AUTH_REQUEST + properties: + start_date_time: + example: 2019-06-23T08:16:02Z + type: string + dimensions: + $ref: '#/components/schemas/session_charging_periods_dimensions' + tariff_id: + example: "12" + type: string + required: + - start_date_time + type: object + session_total_costs: + example: + excl_vat: 2.5 + incl_vat: 0.66 + properties: + excl_vat: + example: 2.5 + type: number + incl_vat: + example: 0.66 + type: number + required: + - excl_vat + type: object + tariff_elements_restrictions: + example: + end_date: 2015-06-29T23:50:16Z + min_kwh: 1.0 + end_time: 1080 + min_duration: 0 + min_current: 32.0 + max_duration: 3600 + start_time: 09:00 + max_power: 32.0 + max_kwh: 1.0 + reservation: null + max_current: 30 + start_date: 2019-06-23T08:16:02Z + min_power: 32.0 + day_of_week: MONDAY + properties: + start_time: + example: 09:00 + type: string + end_time: + example: "1080" + type: string + start_date: + example: 2019-06-23T08:16:02Z + type: string + end_date: + example: 2015-06-29T23:50:16Z + type: string + min_kwh: + example: 1.0 + type: number + max_kwh: + example: 1.0 + type: number + min_current: + example: 32.0 + type: number + max_current: + example: 30 + type: number + min_power: + example: 32.0 + type: number + max_power: + example: 32.0 + type: number + min_duration: + example: 0 + type: integer + max_duration: + example: 3600 + type: integer + day_of_week: + enum: + - MONDAY + - TUESDAY + - WEDNESDAY + - THURSDAY + - FRIDAY + - SATURDAY + - SUNDAY + type: string + reservation: + $ref: '#/components/schemas/reservationRestrictionType' + type: object + tariff_elements: + example: + restrictions: + end_date: 2015-06-29T23:50:16Z + min_kwh: 1.0 + end_time: 1080 + min_duration: 0 + min_current: 32.0 + max_duration: 3600 + start_time: 09:00 + max_power: 32.0 + max_kwh: 1.0 + reservation: null + max_current: 30 + start_date: 2019-06-23T08:16:02Z + min_power: 32.0 + day_of_week: MONDAY + price_components: ENERGY + properties: + price_components: + enum: + - ENERGY + - FLAT + - PARKING_TIME + - TIME + type: string + restrictions: + $ref: '#/components/schemas/tariff_elements_restrictions' + type: object + tariff_energy_mix_environ_impact: + example: + amount: 372 + category: null + properties: + category: + $ref: '#/components/schemas/environmentalImpactCategoryType' + amount: + example: 372 + type: number + required: + - amount + - category + type: object + tariff_energy_mix: + example: + energy_product_name: E.ON DirektStrom eco + is_green_energy: true + supplier_name: E.ON Energy Deutschland + energy_sources: + percentage: 21.7 + source: NUCLEAR + environ_impact: + amount: 372 + category: null + properties: + is_green_energy: + example: true + type: boolean + energy_sources: + $ref: '#/components/schemas/cdrBody_tariffs_energy_mix_energy_sources' + environ_impact: + $ref: '#/components/schemas/tariff_energy_mix_environ_impact' + supplier_name: + example: E.ON Energy Deutschland + type: string + energy_product_name: + example: E.ON DirektStrom eco + type: string + required: + - is_green_energy + type: object + token_energy_contract: + example: + contract_id: "0123456789" + supplier_name: Greenpeace Energy eG + properties: + supplier_name: + example: Greenpeace Energy eG + type: string + contract_id: + example: "0123456789" + type: string + required: + - supplier_name + type: object + versions_data: + example: + version: "2.0" + url: https://www.server.com/ocpi/2.2.1/ + properties: + version: + enum: + - "2.0" + - "2.1" + - "2.1.1" + - "2.2" + - "2.2.1" + type: string + url: + example: https://www.server.com/ocpi/2.2.1/ + type: string + required: + - url + - version + type: object + details_data_endpoints: + example: + identifier: null + role: null + url: https://example.com/ocpi/2.2.1/cdrs/ + properties: + identifier: + $ref: '#/components/schemas/moduleIDType' + role: + $ref: '#/components/schemas/interfaceRoleType' + url: + description: URL to the endpoint. + example: https://example.com/ocpi/2.2.1/cdrs/ + type: string + required: + - identifier + - role + - url + type: object + details_data: + example: + endpoints: + identifier: null + role: null + url: https://example.com/ocpi/2.2.1/cdrs/ + version: "2.0" + properties: + version: + enum: + - "2.0" + - "2.1" + - 2.1.1 + - "2.2" + - 2.2.1 + type: string + endpoints: + $ref: '#/components/schemas/details_data_endpoints' + required: + - version + type: object diff --git a/2.2.1/client.go b/2.2.1/client.go new file mode 100644 index 0000000..16fc2a1 --- /dev/null +++ b/2.2.1/client.go @@ -0,0 +1,9372 @@ +// Package OCPI provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT. +package OCPI + +import ( + "bytes" + "compress/gzip" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "path" + "strings" + + "github.com/deepmap/oapi-codegen/pkg/runtime" + "github.com/getkin/kin-openapi/openapi3" + "github.com/labstack/echo/v4" +) + +// Defines values for ActiveChargingProfileResultResult. +const ( + ActiveChargingProfileResultResultACCEPTED ActiveChargingProfileResultResult = "ACCEPTED" + ActiveChargingProfileResultResultREJECTED ActiveChargingProfileResultResult = "REJECTED" + ActiveChargingProfileResultResultUNKNOWN ActiveChargingProfileResultResult = "UNKNOWN" +) + +// Defines values for AuthorizationAllowed. +const ( + AuthorizationAllowedALLOWED AuthorizationAllowed = "ALLOWED" + AuthorizationAllowedBLOCKED AuthorizationAllowed = "BLOCKED" + AuthorizationAllowedEXPIRED AuthorizationAllowed = "EXPIRED" + AuthorizationAllowedNOCREDIT AuthorizationAllowed = "NO_CREDIT" + AuthorizationAllowedNOTALLOWED AuthorizationAllowed = "NOT_ALLOWED" +) + +// Defines values for CdrBodyAuthMethod. +const ( + CdrBodyAuthMethodAUTHREQUEST CdrBodyAuthMethod = "AUTH_REQUEST" + CdrBodyAuthMethodCOMMAND CdrBodyAuthMethod = "COMMAND" + CdrBodyAuthMethodWHITELIST CdrBodyAuthMethod = "WHITELIST" +) + +// Defines values for CdrBodyCdrLocationConnectorFormat. +const ( + CdrBodyCdrLocationConnectorFormatCABLE CdrBodyCdrLocationConnectorFormat = "CABLE" + CdrBodyCdrLocationConnectorFormatSOCKET CdrBodyCdrLocationConnectorFormat = "SOCKET" +) + +// Defines values for CdrBodyCdrLocationConnectorPowerType. +const ( + CdrBodyCdrLocationConnectorPowerTypeAC1PHASE CdrBodyCdrLocationConnectorPowerType = "AC_1_PHASE" + CdrBodyCdrLocationConnectorPowerTypeAC2PHASE CdrBodyCdrLocationConnectorPowerType = "AC_2_PHASE" + CdrBodyCdrLocationConnectorPowerTypeAC2PHASESPLIT CdrBodyCdrLocationConnectorPowerType = "AC_2_PHASE_SPLIT" + CdrBodyCdrLocationConnectorPowerTypeAC3PHASE CdrBodyCdrLocationConnectorPowerType = "AC_3_PHASE" + CdrBodyCdrLocationConnectorPowerTypeDC CdrBodyCdrLocationConnectorPowerType = "DC" +) + +// Defines values for CdrBodyCdrLocationConnectorStandard. +const ( + CdrBodyCdrLocationConnectorStandardCHADEMO CdrBodyCdrLocationConnectorStandard = "CHADEMO" + CdrBodyCdrLocationConnectorStandardCHAOJI CdrBodyCdrLocationConnectorStandard = "CHAOJI" + CdrBodyCdrLocationConnectorStandardDOMESTICA CdrBodyCdrLocationConnectorStandard = "DOMESTIC_A" + CdrBodyCdrLocationConnectorStandardDOMESTICB CdrBodyCdrLocationConnectorStandard = "DOMESTIC_B" + CdrBodyCdrLocationConnectorStandardDOMESTICC CdrBodyCdrLocationConnectorStandard = "DOMESTIC_C" + CdrBodyCdrLocationConnectorStandardDOMESTICD CdrBodyCdrLocationConnectorStandard = "DOMESTIC_D" + CdrBodyCdrLocationConnectorStandardDOMESTICE CdrBodyCdrLocationConnectorStandard = "DOMESTIC_E" + CdrBodyCdrLocationConnectorStandardDOMESTICF CdrBodyCdrLocationConnectorStandard = "DOMESTIC_F" + CdrBodyCdrLocationConnectorStandardDOMESTICG CdrBodyCdrLocationConnectorStandard = "DOMESTIC_G" + CdrBodyCdrLocationConnectorStandardDOMESTICH CdrBodyCdrLocationConnectorStandard = "DOMESTIC_H" + CdrBodyCdrLocationConnectorStandardDOMESTICJ CdrBodyCdrLocationConnectorStandard = "DOMESTIC_J" + CdrBodyCdrLocationConnectorStandardDOMESTICK CdrBodyCdrLocationConnectorStandard = "DOMESTIC_K" + CdrBodyCdrLocationConnectorStandardDOMESTICL CdrBodyCdrLocationConnectorStandard = "DOMESTIC_L" + CdrBodyCdrLocationConnectorStandardDOMESTICM CdrBodyCdrLocationConnectorStandard = "DOMESTIC_M" + CdrBodyCdrLocationConnectorStandardDOMESTICN CdrBodyCdrLocationConnectorStandard = "DOMESTIC_N" + CdrBodyCdrLocationConnectorStandardDOMESTICO CdrBodyCdrLocationConnectorStandard = "DOMESTIC_O" + CdrBodyCdrLocationConnectorStandardGBTAC CdrBodyCdrLocationConnectorStandard = "GBT_AC" + CdrBodyCdrLocationConnectorStandardGBTDC CdrBodyCdrLocationConnectorStandard = "GBT_DC" + CdrBodyCdrLocationConnectorStandardIEC603092Single16 CdrBodyCdrLocationConnectorStandard = "IEC_60309_2_single_16" + CdrBodyCdrLocationConnectorStandardIEC603092Three16 CdrBodyCdrLocationConnectorStandard = "IEC_60309_2_three_16" + CdrBodyCdrLocationConnectorStandardIEC603092Three32 CdrBodyCdrLocationConnectorStandard = "IEC_60309_2_three_32" + CdrBodyCdrLocationConnectorStandardIEC603092Three64 CdrBodyCdrLocationConnectorStandard = "IEC_60309_2_three_64" + CdrBodyCdrLocationConnectorStandardIEC62196T1 CdrBodyCdrLocationConnectorStandard = "IEC_62196_T1" + CdrBodyCdrLocationConnectorStandardIEC62196T1COMBO CdrBodyCdrLocationConnectorStandard = "IEC_62196_T1_COMBO" + CdrBodyCdrLocationConnectorStandardIEC62196T2 CdrBodyCdrLocationConnectorStandard = "IEC_62196_T2" + CdrBodyCdrLocationConnectorStandardIEC62196T2COMBO CdrBodyCdrLocationConnectorStandard = "IEC_62196_T2_COMBO" + CdrBodyCdrLocationConnectorStandardIEC62196T3A CdrBodyCdrLocationConnectorStandard = "IEC_62196_T3A" + CdrBodyCdrLocationConnectorStandardIEC62196T3C CdrBodyCdrLocationConnectorStandard = "IEC_62196_T3C" + CdrBodyCdrLocationConnectorStandardNEMA1030 CdrBodyCdrLocationConnectorStandard = "NEMA_10_30" + CdrBodyCdrLocationConnectorStandardNEMA1050 CdrBodyCdrLocationConnectorStandard = "NEMA_10_50" + CdrBodyCdrLocationConnectorStandardNEMA1430 CdrBodyCdrLocationConnectorStandard = "NEMA_14_30" + CdrBodyCdrLocationConnectorStandardNEMA1450 CdrBodyCdrLocationConnectorStandard = "NEMA_14_50" + CdrBodyCdrLocationConnectorStandardNEMA520 CdrBodyCdrLocationConnectorStandard = "NEMA_5_20" + CdrBodyCdrLocationConnectorStandardNEMA630 CdrBodyCdrLocationConnectorStandard = "NEMA_6_30" + CdrBodyCdrLocationConnectorStandardNEMA650 CdrBodyCdrLocationConnectorStandard = "NEMA_6_50" + CdrBodyCdrLocationConnectorStandardPANTOGRAPHBOTTOMUP CdrBodyCdrLocationConnectorStandard = "PANTOGRAPH_BOTTOM_UP" + CdrBodyCdrLocationConnectorStandardPANTOGRAPHTOPDOWN CdrBodyCdrLocationConnectorStandard = "PANTOGRAPH_TOP_DOWN" + CdrBodyCdrLocationConnectorStandardTESLAR CdrBodyCdrLocationConnectorStandard = "TESLA_R" + CdrBodyCdrLocationConnectorStandardTESLAS CdrBodyCdrLocationConnectorStandard = "TESLA_S" +) + +// Defines values for CdrBodyCdrTokenType. +const ( + CdrBodyCdrTokenTypeADHOCUSER CdrBodyCdrTokenType = "AD_HOC_USER" + CdrBodyCdrTokenTypeAPPUSER CdrBodyCdrTokenType = "APP_USER" + CdrBodyCdrTokenTypeOTHER CdrBodyCdrTokenType = "OTHER" + CdrBodyCdrTokenTypeRFID CdrBodyCdrTokenType = "RFID" +) + +// Defines values for CdrBodyChargingPeriodsDimensionsType. +const ( + CdrBodyChargingPeriodsDimensionsTypeCURRENT CdrBodyChargingPeriodsDimensionsType = "CURRENT" + CdrBodyChargingPeriodsDimensionsTypeENERGY CdrBodyChargingPeriodsDimensionsType = "ENERGY" + CdrBodyChargingPeriodsDimensionsTypeENERGYEXPORT CdrBodyChargingPeriodsDimensionsType = "ENERGY_EXPORT" + CdrBodyChargingPeriodsDimensionsTypeENERGYIMPORT CdrBodyChargingPeriodsDimensionsType = "ENERGY_IMPORT" + CdrBodyChargingPeriodsDimensionsTypeMAXCURRENT CdrBodyChargingPeriodsDimensionsType = "MAX_CURRENT" + CdrBodyChargingPeriodsDimensionsTypeMAXPOWER CdrBodyChargingPeriodsDimensionsType = "MAX_POWER" + CdrBodyChargingPeriodsDimensionsTypeMINCURRENT CdrBodyChargingPeriodsDimensionsType = "MIN_CURRENT" + CdrBodyChargingPeriodsDimensionsTypeMINPOWER CdrBodyChargingPeriodsDimensionsType = "MIN_POWER" + CdrBodyChargingPeriodsDimensionsTypePARKINGTIME CdrBodyChargingPeriodsDimensionsType = "PARKING_TIME" + CdrBodyChargingPeriodsDimensionsTypePOWER CdrBodyChargingPeriodsDimensionsType = "POWER" + CdrBodyChargingPeriodsDimensionsTypeRESERVATIONTIME CdrBodyChargingPeriodsDimensionsType = "RESERVATION_TIME" + CdrBodyChargingPeriodsDimensionsTypeSTATEOFCHARGE CdrBodyChargingPeriodsDimensionsType = "STATE_OF_CHARGE" + CdrBodyChargingPeriodsDimensionsTypeTIME CdrBodyChargingPeriodsDimensionsType = "TIME" +) + +// Defines values for CdrBodyTariffsType. +const ( + CdrBodyTariffsTypeADHOCPAYMENT CdrBodyTariffsType = "AD_HOC_PAYMENT" + CdrBodyTariffsTypePROFILECHEAP CdrBodyTariffsType = "PROFILE_CHEAP" + CdrBodyTariffsTypePROFILEFAST CdrBodyTariffsType = "PROFILE_FAST" + CdrBodyTariffsTypePROFILEGREEN CdrBodyTariffsType = "PROFILE_GREEN" + CdrBodyTariffsTypeREGULAR CdrBodyTariffsType = "REGULAR" +) + +// Defines values for CdrBodyTariffsElementsPriceComponents. +const ( + CdrBodyTariffsElementsPriceComponentsENERGY CdrBodyTariffsElementsPriceComponents = "ENERGY" + CdrBodyTariffsElementsPriceComponentsFLAT CdrBodyTariffsElementsPriceComponents = "FLAT" + CdrBodyTariffsElementsPriceComponentsPARKINGTIME CdrBodyTariffsElementsPriceComponents = "PARKING_TIME" + CdrBodyTariffsElementsPriceComponentsTIME CdrBodyTariffsElementsPriceComponents = "TIME" +) + +// Defines values for CdrBodyTariffsElementsRestrictionsDayOfWeek. +const ( + CdrBodyTariffsElementsRestrictionsDayOfWeekFRIDAY CdrBodyTariffsElementsRestrictionsDayOfWeek = "FRIDAY" + CdrBodyTariffsElementsRestrictionsDayOfWeekMONDAY CdrBodyTariffsElementsRestrictionsDayOfWeek = "MONDAY" + CdrBodyTariffsElementsRestrictionsDayOfWeekSATURDAY CdrBodyTariffsElementsRestrictionsDayOfWeek = "SATURDAY" + CdrBodyTariffsElementsRestrictionsDayOfWeekSUNDAY CdrBodyTariffsElementsRestrictionsDayOfWeek = "SUNDAY" + CdrBodyTariffsElementsRestrictionsDayOfWeekTHURSDAY CdrBodyTariffsElementsRestrictionsDayOfWeek = "THURSDAY" + CdrBodyTariffsElementsRestrictionsDayOfWeekTUESDAY CdrBodyTariffsElementsRestrictionsDayOfWeek = "TUESDAY" + CdrBodyTariffsElementsRestrictionsDayOfWeekWEDNESDAY CdrBodyTariffsElementsRestrictionsDayOfWeek = "WEDNESDAY" +) + +// Defines values for CdrBodyTariffsElementsRestrictionsReservation. +const ( + CdrBodyTariffsElementsRestrictionsReservationRESERVATION CdrBodyTariffsElementsRestrictionsReservation = "RESERVATION" + CdrBodyTariffsElementsRestrictionsReservationRESERVATIONEXPIRES CdrBodyTariffsElementsRestrictionsReservation = "RESERVATION_EXPIRES" +) + +// Defines values for CdrBodyTariffsEnergyMixEnergySourcesSource. +const ( + COAL CdrBodyTariffsEnergyMixEnergySourcesSource = "COAL" + GAS CdrBodyTariffsEnergyMixEnergySourcesSource = "GAS" + GENERALFOSSIL CdrBodyTariffsEnergyMixEnergySourcesSource = "GENERAL_FOSSIL" + GENERALGREEN CdrBodyTariffsEnergyMixEnergySourcesSource = "GENERAL_GREEN" + NUCLEAR CdrBodyTariffsEnergyMixEnergySourcesSource = "NUCLEAR" + SOLAR CdrBodyTariffsEnergyMixEnergySourcesSource = "SOLAR" + WATER CdrBodyTariffsEnergyMixEnergySourcesSource = "WATER" + WIND CdrBodyTariffsEnergyMixEnergySourcesSource = "WIND" +) + +// Defines values for CdrBodyTariffsEnergyMixEnvironImpactCategory. +const ( + CdrBodyTariffsEnergyMixEnvironImpactCategoryCARBONDIOXIDE CdrBodyTariffsEnergyMixEnvironImpactCategory = "CARBON_DIOXIDE" + CdrBodyTariffsEnergyMixEnvironImpactCategoryNUCLEARWASTE CdrBodyTariffsEnergyMixEnvironImpactCategory = "NUCLEAR_WASTE" +) + +// Defines values for ChargingPreferencesProfileType. +const ( + ChargingPreferencesProfileTypeCHEAP ChargingPreferencesProfileType = "CHEAP" + ChargingPreferencesProfileTypeFAST ChargingPreferencesProfileType = "FAST" + ChargingPreferencesProfileTypeGREEN ChargingPreferencesProfileType = "GREEN" + ChargingPreferencesProfileTypeREGULAR ChargingPreferencesProfileType = "REGULAR" +) + +// Defines values for ChargingPreferencesResponseChargingPreferences. +const ( + ChargingPreferencesResponseChargingPreferencesACCEPTED ChargingPreferencesResponseChargingPreferences = "ACCEPTED" + ChargingPreferencesResponseChargingPreferencesDEPARTUREREQUIRED ChargingPreferencesResponseChargingPreferences = "DEPARTURE_REQUIRED" + ChargingPreferencesResponseChargingPreferencesENERGYNEEDREQUIRED ChargingPreferencesResponseChargingPreferences = "ENERGY_NEED_REQUIRED" + ChargingPreferencesResponseChargingPreferencesNOTPOSSIBLE ChargingPreferencesResponseChargingPreferences = "NOT_POSSIBLE" + ChargingPreferencesResponseChargingPreferencesPROFILETYPENOTSUPPORTED ChargingPreferencesResponseChargingPreferences = "PROFILE_TYPE_NOT_SUPPORTED" +) + +// Defines values for ChargingProfileChargingRateUnit. +const ( + A ChargingProfileChargingRateUnit = "A" + W ChargingProfileChargingRateUnit = "W" +) + +// Defines values for ChargingProfileResponseType. +const ( + ChargingProfileResponseTypeACCEPTED ChargingProfileResponseType = "ACCEPTED" + ChargingProfileResponseTypeNOTSUPPORTED ChargingProfileResponseType = "NOT_SUPPORTED" + ChargingProfileResponseTypeREJECTED ChargingProfileResponseType = "REJECTED" + ChargingProfileResponseTypeTOOOFTEN ChargingProfileResponseType = "TOO_OFTEN" + ChargingProfileResponseTypeUNKNOWNSESSION ChargingProfileResponseType = "UNKNOWN_SESSION" +) + +// Defines values for ChargingProfileResultResult. +const ( + ChargingProfileResultResultACCEPTED ChargingProfileResultResult = "ACCEPTED" + ChargingProfileResultResultREJECTED ChargingProfileResultResult = "REJECTED" + ChargingProfileResultResultUNKNOWN ChargingProfileResultResult = "UNKNOWN" +) + +// Defines values for ClearProfileResultResult. +const ( + ClearProfileResultResultACCEPTED ClearProfileResultResult = "ACCEPTED" + ClearProfileResultResultREJECTED ClearProfileResultResult = "REJECTED" + ClearProfileResultResultUNKNOWN ClearProfileResultResult = "UNKNOWN" +) + +// Defines values for ClientInfoRole. +const ( + ClientInfoRoleCPO ClientInfoRole = "CPO" + ClientInfoRoleEMSP ClientInfoRole = "EMSP" + ClientInfoRoleHUB ClientInfoRole = "HUB" + ClientInfoRoleNAP ClientInfoRole = "NAP" + ClientInfoRoleNSP ClientInfoRole = "NSP" + ClientInfoRoleOTHER ClientInfoRole = "OTHER" + ClientInfoRoleSCSP ClientInfoRole = "SCSP" +) + +// Defines values for ClientInfoStatus. +const ( + ClientInfoStatusCONNECTED ClientInfoStatus = "CONNECTED" + ClientInfoStatusOFFLINE ClientInfoStatus = "OFFLINE" + ClientInfoStatusPLANNED ClientInfoStatus = "PLANNED" + ClientInfoStatusSUSPENDED ClientInfoStatus = "SUSPENDED" +) + +// Defines values for CommandResponseResult. +const ( + CommandResponseResultACCEPTED CommandResponseResult = "ACCEPTED" + CommandResponseResultNOTSUPPORTED CommandResponseResult = "NOT_SUPPORTED" + CommandResponseResultREJECTED CommandResponseResult = "REJECTED" + CommandResponseResultUNKNOWNSESSION CommandResponseResult = "UNKNOWN_SESSION" +) + +// Defines values for CommandResultResult. +const ( + ACCEPTED CommandResultResult = "ACCEPTED" + CANCELEDRESERVATION CommandResultResult = "CANCELED_RESERVATION" + EVSEINOPERATIVE CommandResultResult = "EVSE_INOPERATIVE" + EVSEOCCUPIED CommandResultResult = "EVSE_OCCUPIED" + FAILED CommandResultResult = "FAILED" + NOTSUPPORTED CommandResultResult = "NOT_SUPPORTED" + REJECTED CommandResultResult = "REJECTED" + TIMEOUT CommandResultResult = "TIMEOUT" + UNKNOWNRESERVATION CommandResultResult = "UNKNOWN_RESERVATION" +) + +// Defines values for ConnectorFormat. +const ( + ConnectorFormatCABLE ConnectorFormat = "CABLE" + ConnectorFormatSOCKET ConnectorFormat = "SOCKET" +) + +// Defines values for ConnectorPowerType. +const ( + ConnectorPowerTypeAC1PHASE ConnectorPowerType = "AC_1_PHASE" + ConnectorPowerTypeAC2PHASE ConnectorPowerType = "AC_2_PHASE" + ConnectorPowerTypeAC2PHASESPLIT ConnectorPowerType = "AC_2_PHASE_SPLIT" + ConnectorPowerTypeAC3PHASE ConnectorPowerType = "AC_3_PHASE" + ConnectorPowerTypeDC ConnectorPowerType = "DC" +) + +// Defines values for ConnectorStandard. +const ( + ConnectorStandardCHADEMO ConnectorStandard = "CHADEMO" + ConnectorStandardCHAOJI ConnectorStandard = "CHAOJI" + ConnectorStandardDOMESTICA ConnectorStandard = "DOMESTIC_A" + ConnectorStandardDOMESTICB ConnectorStandard = "DOMESTIC_B" + ConnectorStandardDOMESTICC ConnectorStandard = "DOMESTIC_C" + ConnectorStandardDOMESTICD ConnectorStandard = "DOMESTIC_D" + ConnectorStandardDOMESTICE ConnectorStandard = "DOMESTIC_E" + ConnectorStandardDOMESTICF ConnectorStandard = "DOMESTIC_F" + ConnectorStandardDOMESTICG ConnectorStandard = "DOMESTIC_G" + ConnectorStandardDOMESTICH ConnectorStandard = "DOMESTIC_H" + ConnectorStandardDOMESTICJ ConnectorStandard = "DOMESTIC_J" + ConnectorStandardDOMESTICK ConnectorStandard = "DOMESTIC_K" + ConnectorStandardDOMESTICL ConnectorStandard = "DOMESTIC_L" + ConnectorStandardDOMESTICM ConnectorStandard = "DOMESTIC_M" + ConnectorStandardDOMESTICN ConnectorStandard = "DOMESTIC_N" + ConnectorStandardDOMESTICO ConnectorStandard = "DOMESTIC_O" + ConnectorStandardGBTAC ConnectorStandard = "GBT_AC" + ConnectorStandardGBTDC ConnectorStandard = "GBT_DC" + ConnectorStandardIEC603092Single16 ConnectorStandard = "IEC_60309_2_single_16" + ConnectorStandardIEC603092Three16 ConnectorStandard = "IEC_60309_2_three_16" + ConnectorStandardIEC603092Three32 ConnectorStandard = "IEC_60309_2_three_32" + ConnectorStandardIEC603092Three64 ConnectorStandard = "IEC_60309_2_three_64" + ConnectorStandardIEC62196T1 ConnectorStandard = "IEC_62196_T1" + ConnectorStandardIEC62196T1COMBO ConnectorStandard = "IEC_62196_T1_COMBO" + ConnectorStandardIEC62196T2 ConnectorStandard = "IEC_62196_T2" + ConnectorStandardIEC62196T2COMBO ConnectorStandard = "IEC_62196_T2_COMBO" + ConnectorStandardIEC62196T3A ConnectorStandard = "IEC_62196_T3A" + ConnectorStandardIEC62196T3C ConnectorStandard = "IEC_62196_T3C" + ConnectorStandardNEMA1030 ConnectorStandard = "NEMA_10_30" + ConnectorStandardNEMA1050 ConnectorStandard = "NEMA_10_50" + ConnectorStandardNEMA1430 ConnectorStandard = "NEMA_14_30" + ConnectorStandardNEMA1450 ConnectorStandard = "NEMA_14_50" + ConnectorStandardNEMA520 ConnectorStandard = "NEMA_5_20" + ConnectorStandardNEMA630 ConnectorStandard = "NEMA_6_30" + ConnectorStandardNEMA650 ConnectorStandard = "NEMA_6_50" + ConnectorStandardPANTOGRAPHBOTTOMUP ConnectorStandard = "PANTOGRAPH_BOTTOM_UP" + ConnectorStandardPANTOGRAPHTOPDOWN ConnectorStandard = "PANTOGRAPH_TOP_DOWN" + ConnectorStandardTESLAR ConnectorStandard = "TESLA_R" + ConnectorStandardTESLAS ConnectorStandard = "TESLA_S" +) + +// Defines values for CredentialsDataRolesRole. +const ( + CredentialsDataRolesRoleCPO CredentialsDataRolesRole = "CPO" + CredentialsDataRolesRoleEMSP CredentialsDataRolesRole = "EMSP" + CredentialsDataRolesRoleHUB CredentialsDataRolesRole = "HUB" + CredentialsDataRolesRoleNAP CredentialsDataRolesRole = "NAP" + CredentialsDataRolesRoleNSP CredentialsDataRolesRole = "NSP" + CredentialsDataRolesRoleOTHER CredentialsDataRolesRole = "OTHER" + CredentialsDataRolesRoleSCSP CredentialsDataRolesRole = "SCSP" +) + +// Defines values for CredentialsDataRolesBusinessDetailsLogoCategory. +const ( + CredentialsDataRolesBusinessDetailsLogoCategoryCHARGER CredentialsDataRolesBusinessDetailsLogoCategory = "CHARGER" + CredentialsDataRolesBusinessDetailsLogoCategoryENTRANCE CredentialsDataRolesBusinessDetailsLogoCategory = "ENTRANCE" + CredentialsDataRolesBusinessDetailsLogoCategoryLOCATION CredentialsDataRolesBusinessDetailsLogoCategory = "LOCATION" + CredentialsDataRolesBusinessDetailsLogoCategoryNETWORK CredentialsDataRolesBusinessDetailsLogoCategory = "NETWORK" + CredentialsDataRolesBusinessDetailsLogoCategoryOPERATOR CredentialsDataRolesBusinessDetailsLogoCategory = "OPERATOR" + CredentialsDataRolesBusinessDetailsLogoCategoryOTHER CredentialsDataRolesBusinessDetailsLogoCategory = "OTHER" + CredentialsDataRolesBusinessDetailsLogoCategoryOWNER CredentialsDataRolesBusinessDetailsLogoCategory = "OWNER" +) + +// Defines values for DetailsDataVersion. +const ( + DetailsDataVersionN20 DetailsDataVersion = "2.0" + DetailsDataVersionN21 DetailsDataVersion = "2.1" + DetailsDataVersionN211 DetailsDataVersion = "2.1.1" + DetailsDataVersionN22 DetailsDataVersion = "2.2" + DetailsDataVersionN221 DetailsDataVersion = "2.2.1" +) + +// Defines values for EnvironmentalImpactCategoryType. +const ( + EnvironmentalImpactCategoryTypeCARBONDIOXIDE EnvironmentalImpactCategoryType = "CARBON_DIOXIDE" + EnvironmentalImpactCategoryTypeNUCLEARWASTE EnvironmentalImpactCategoryType = "NUCLEAR_WASTE" +) + +// Defines values for EvseCapabilities. +const ( + CHARGINGPREFERENCESCAPABLE EvseCapabilities = "CHARGING_PREFERENCES_CAPABLE" + CHARGINGPROFILECAPABLE EvseCapabilities = "CHARGING_PROFILE_CAPABLE" + CHIPCARDSUPPORT EvseCapabilities = "CHIP_CARD_SUPPORT" + CONTACTLESSCARDSUPPORT EvseCapabilities = "CONTACTLESS_CARD_SUPPORT" + CREDITCARDPAYABLE EvseCapabilities = "CREDIT_CARD_PAYABLE" + DEBITCARDPAYABLE EvseCapabilities = "DEBIT_CARD_PAYABLE" + PEDTERMINAL EvseCapabilities = "PED_TERMINAL" + REMOTESTARTSTOPCAPABLE EvseCapabilities = "REMOTE_START_STOP_CAPABLE" + RESERVABLE EvseCapabilities = "RESERVABLE" + RFIDREADER EvseCapabilities = "RFID_READER" + STARTSESSIONCONNECTORREQUIRED EvseCapabilities = "START_SESSION_CONNECTOR_REQUIRED" + TOKENGROUPCAPABLE EvseCapabilities = "TOKEN_GROUP_CAPABLE" + UNLOCKCAPABLE EvseCapabilities = "UNLOCK_CAPABLE" +) + +// Defines values for EvseParkingRestrictions. +const ( + CUSTOMERS EvseParkingRestrictions = "CUSTOMERS" + DISABLED EvseParkingRestrictions = "DISABLED" + EVONLY EvseParkingRestrictions = "EV_ONLY" + MOTORCYCLES EvseParkingRestrictions = "MOTORCYCLES" + PLUGGED EvseParkingRestrictions = "PLUGGED" +) + +// Defines values for EvseStatus. +const ( + EvseStatusAVAILABLE EvseStatus = "AVAILABLE" + EvseStatusBLOCKED EvseStatus = "BLOCKED" + EvseStatusCHARGING EvseStatus = "CHARGING" + EvseStatusINOPERATIVE EvseStatus = "INOPERATIVE" + EvseStatusOUTOFORDER EvseStatus = "OUTOFORDER" + EvseStatusPLANNED EvseStatus = "PLANNED" + EvseStatusREMOVED EvseStatus = "REMOVED" + EvseStatusRESERVED EvseStatus = "RESERVED" + EvseStatusUNKNOWN EvseStatus = "UNKNOWN" +) + +// Defines values for EvseStatusScheduleStatus. +const ( + EvseStatusScheduleStatusAVAILABLE EvseStatusScheduleStatus = "AVAILABLE" + EvseStatusScheduleStatusBLOCKED EvseStatusScheduleStatus = "BLOCKED" + EvseStatusScheduleStatusCHARGING EvseStatusScheduleStatus = "CHARGING" + EvseStatusScheduleStatusINOPERATIVE EvseStatusScheduleStatus = "INOPERATIVE" + EvseStatusScheduleStatusOUTOFORDER EvseStatusScheduleStatus = "OUTOFORDER" + EvseStatusScheduleStatusPLANNED EvseStatusScheduleStatus = "PLANNED" + EvseStatusScheduleStatusREMOVED EvseStatusScheduleStatus = "REMOVED" + EvseStatusScheduleStatusRESERVED EvseStatusScheduleStatus = "RESERVED" + EvseStatusScheduleStatusUNKNOWN EvseStatusScheduleStatus = "UNKNOWN" +) + +// Defines values for ImageCategory. +const ( + ImageCategoryCHARGER ImageCategory = "CHARGER" + ImageCategoryENTRANCE ImageCategory = "ENTRANCE" + ImageCategoryLOCATION ImageCategory = "LOCATION" + ImageCategoryNETWORK ImageCategory = "NETWORK" + ImageCategoryOPERATOR ImageCategory = "OPERATOR" + ImageCategoryOTHER ImageCategory = "OTHER" + ImageCategoryOWNER ImageCategory = "OWNER" +) + +// Defines values for InterfaceRoleType. +const ( + RECEIVER InterfaceRoleType = "RECEIVER" + SENDER InterfaceRoleType = "SENDER" +) + +// Defines values for LocationsDataFacilities. +const ( + LocationsDataFacilitiesAIRPORT LocationsDataFacilities = "AIRPORT" + LocationsDataFacilitiesBIKESHARING LocationsDataFacilities = "BIKE_SHARING" + LocationsDataFacilitiesBUSSTOP LocationsDataFacilities = "BUS_STOP" + LocationsDataFacilitiesCAFE LocationsDataFacilities = "CAFE" + LocationsDataFacilitiesCARPOOLPARKING LocationsDataFacilities = "CARPOOL_PARKING" + LocationsDataFacilitiesFUELSTATION LocationsDataFacilities = "FUEL_STATION" + LocationsDataFacilitiesHOTEL LocationsDataFacilities = "HOTEL" + LocationsDataFacilitiesMALL LocationsDataFacilities = "MALL" + LocationsDataFacilitiesMETROSTATION LocationsDataFacilities = "METRO_STATION" + LocationsDataFacilitiesMUSEUM LocationsDataFacilities = "MUSEUM" + LocationsDataFacilitiesNATURE LocationsDataFacilities = "NATURE" + LocationsDataFacilitiesPARKINGLOT LocationsDataFacilities = "PARKING_LOT" + LocationsDataFacilitiesRECREATIONAREA LocationsDataFacilities = "RECREATION_AREA" + LocationsDataFacilitiesRESTAURANT LocationsDataFacilities = "RESTAURANT" + LocationsDataFacilitiesSPORT LocationsDataFacilities = "SPORT" + LocationsDataFacilitiesSUPERMARKET LocationsDataFacilities = "SUPERMARKET" + LocationsDataFacilitiesTAXISTAND LocationsDataFacilities = "TAXI_STAND" + LocationsDataFacilitiesTRAINSTATION LocationsDataFacilities = "TRAIN_STATION" + LocationsDataFacilitiesTRAMSTOP LocationsDataFacilities = "TRAM_STOP" + LocationsDataFacilitiesWIFI LocationsDataFacilities = "WIFI" +) + +// Defines values for LocationsDataParkingType. +const ( + LocationsDataParkingTypeALONGMOTORWAY LocationsDataParkingType = "ALONG_MOTORWAY" + LocationsDataParkingTypeONDRIVEWAY LocationsDataParkingType = "ON_DRIVEWAY" + LocationsDataParkingTypeONSTREET LocationsDataParkingType = "ON_STREET" + LocationsDataParkingTypePARKINGGARAGE LocationsDataParkingType = "PARKING_GARAGE" + LocationsDataParkingTypePARKINGLOT LocationsDataParkingType = "PARKING_LOT" + LocationsDataParkingTypeUNDERGROUNDGARAGE LocationsDataParkingType = "UNDERGROUND_GARAGE" +) + +// Defines values for LocationsDataPublishAllowedToType. +const ( + LocationsDataPublishAllowedToTypeADHOCUSER LocationsDataPublishAllowedToType = "AD_HOC_USER" + LocationsDataPublishAllowedToTypeAPPUSER LocationsDataPublishAllowedToType = "APP_USER" + LocationsDataPublishAllowedToTypeOTHER LocationsDataPublishAllowedToType = "OTHER" + LocationsDataPublishAllowedToTypeRFID LocationsDataPublishAllowedToType = "RFID" +) + +// Defines values for ModuleIDType. +const ( + ModuleIDTypeCdrs ModuleIDType = "cdrs" + ModuleIDTypeChargingprofiles ModuleIDType = "chargingprofiles" + ModuleIDTypeCommands ModuleIDType = "commands" + ModuleIDTypeCredentials ModuleIDType = "credentials" + ModuleIDTypeHubclientinfo ModuleIDType = "hubclientinfo" + ModuleIDTypeLocations ModuleIDType = "locations" + ModuleIDTypeSessions ModuleIDType = "sessions" + ModuleIDTypeTariffs ModuleIDType = "tariffs" + ModuleIDTypeTokens ModuleIDType = "tokens" +) + +// Defines values for ReservationRestrictionType. +const ( + ReservationRestrictionTypeRESERVATION ReservationRestrictionType = "RESERVATION" + ReservationRestrictionTypeRESERVATIONEXPIRES ReservationRestrictionType = "RESERVATION_EXPIRES" +) + +// Defines values for SessionAuthMethod. +const ( + SessionAuthMethodAUTHREQUEST SessionAuthMethod = "AUTH_REQUEST" + SessionAuthMethodCOMMAND SessionAuthMethod = "COMMAND" + SessionAuthMethodWHITELIST SessionAuthMethod = "WHITELIST" +) + +// Defines values for SessionStatus. +const ( + ACTIVE SessionStatus = "ACTIVE" + COMPLETED SessionStatus = "COMPLETED" + INVALID SessionStatus = "INVALID" + PENDING SessionStatus = "PENDING" + RESERVATION SessionStatus = "RESERVATION" +) + +// Defines values for SessionChargingPeriodsDimensionsType. +const ( + AUTHREQUEST SessionChargingPeriodsDimensionsType = "AUTH_REQUEST" + COMMAND SessionChargingPeriodsDimensionsType = "COMMAND" + WHITELIST SessionChargingPeriodsDimensionsType = "WHITELIST" +) + +// Defines values for TariffType. +const ( + TariffTypeADHOCPAYMENT TariffType = "AD_HOC_PAYMENT" + TariffTypePROFILECHEAP TariffType = "PROFILE_CHEAP" + TariffTypePROFILEFAST TariffType = "PROFILE_FAST" + TariffTypePROFILEGREEN TariffType = "PROFILE_GREEN" + TariffTypeREGULAR TariffType = "REGULAR" +) + +// Defines values for TariffElementsPriceComponents. +const ( + ENERGY TariffElementsPriceComponents = "ENERGY" + FLAT TariffElementsPriceComponents = "FLAT" + PARKINGTIME TariffElementsPriceComponents = "PARKING_TIME" + TIME TariffElementsPriceComponents = "TIME" +) + +// Defines values for TariffElementsRestrictionsDayOfWeek. +const ( + TariffElementsRestrictionsDayOfWeekFRIDAY TariffElementsRestrictionsDayOfWeek = "FRIDAY" + TariffElementsRestrictionsDayOfWeekMONDAY TariffElementsRestrictionsDayOfWeek = "MONDAY" + TariffElementsRestrictionsDayOfWeekSATURDAY TariffElementsRestrictionsDayOfWeek = "SATURDAY" + TariffElementsRestrictionsDayOfWeekSUNDAY TariffElementsRestrictionsDayOfWeek = "SUNDAY" + TariffElementsRestrictionsDayOfWeekTHURSDAY TariffElementsRestrictionsDayOfWeek = "THURSDAY" + TariffElementsRestrictionsDayOfWeekTUESDAY TariffElementsRestrictionsDayOfWeek = "TUESDAY" + TariffElementsRestrictionsDayOfWeekWEDNESDAY TariffElementsRestrictionsDayOfWeek = "WEDNESDAY" +) + +// Defines values for TokenDefaultProfileType. +const ( + TokenDefaultProfileTypeCHEAP TokenDefaultProfileType = "CHEAP" + TokenDefaultProfileTypeFAST TokenDefaultProfileType = "FAST" + TokenDefaultProfileTypeGREEN TokenDefaultProfileType = "GREEN" + TokenDefaultProfileTypeREGULAR TokenDefaultProfileType = "REGULAR" +) + +// Defines values for TokenType. +const ( + TokenTypeADHOCUSER TokenType = "AD_HOC_USER" + TokenTypeAPPUSER TokenType = "APP_USER" + TokenTypeOTHER TokenType = "OTHER" + TokenTypeRFID TokenType = "RFID" +) + +// Defines values for TokenWhitelist. +const ( + ALLOWED TokenWhitelist = "ALLOWED" + ALLOWEDOFFLINE TokenWhitelist = "ALLOWED_OFFLINE" + ALWAYS TokenWhitelist = "ALWAYS" + NEVER TokenWhitelist = "NEVER" +) + +// Defines values for VersionsDataVersion. +const ( + VersionsDataVersionN20 VersionsDataVersion = "2.0" + VersionsDataVersionN21 VersionsDataVersion = "2.1" + VersionsDataVersionN211 VersionsDataVersion = "2.1.1" + VersionsDataVersionN22 VersionsDataVersion = "2.2" + VersionsDataVersionN221 VersionsDataVersion = "2.2.1" +) + +// Defines values for PostOcpiCommandsCommandParamsCommand. +const ( + PostOcpiCommandsCommandParamsCommandCANCELRESERVATION PostOcpiCommandsCommandParamsCommand = "CANCEL_RESERVATION" + PostOcpiCommandsCommandParamsCommandRESERVENOW PostOcpiCommandsCommandParamsCommand = "RESERVE_NOW" + PostOcpiCommandsCommandParamsCommandSTARTSESSION PostOcpiCommandsCommandParamsCommand = "START_SESSION" + PostOcpiCommandsCommandParamsCommandSTOPSESSION PostOcpiCommandsCommandParamsCommand = "STOP_SESSION" + PostOcpiCommandsCommandParamsCommandUNLOCKCONNECTOR PostOcpiCommandsCommandParamsCommand = "UNLOCK_CONNECTOR" +) + +// Defines values for PostOcpiCommandsCommandUidParamsCommand. +const ( + PostOcpiCommandsCommandUidParamsCommandCANCELRESERVATION PostOcpiCommandsCommandUidParamsCommand = "CANCEL_RESERVATION" + PostOcpiCommandsCommandUidParamsCommandRESERVENOW PostOcpiCommandsCommandUidParamsCommand = "RESERVE_NOW" + PostOcpiCommandsCommandUidParamsCommandSTARTSESSION PostOcpiCommandsCommandUidParamsCommand = "START_SESSION" + PostOcpiCommandsCommandUidParamsCommandSTOPSESSION PostOcpiCommandsCommandUidParamsCommand = "STOP_SESSION" + PostOcpiCommandsCommandUidParamsCommandUNLOCKCONNECTOR PostOcpiCommandsCommandUidParamsCommand = "UNLOCK_CONNECTOR" +) + +// Defines values for GetOcpiTokensCountryCodePartyIdTokenUidParamsType. +const ( + GetOcpiTokensCountryCodePartyIdTokenUidParamsTypeADHOCUSER GetOcpiTokensCountryCodePartyIdTokenUidParamsType = "AD_HOC_USER" + GetOcpiTokensCountryCodePartyIdTokenUidParamsTypeAPPUSER GetOcpiTokensCountryCodePartyIdTokenUidParamsType = "APP_USER" + GetOcpiTokensCountryCodePartyIdTokenUidParamsTypeOTHER GetOcpiTokensCountryCodePartyIdTokenUidParamsType = "OTHER" + GetOcpiTokensCountryCodePartyIdTokenUidParamsTypeRFID GetOcpiTokensCountryCodePartyIdTokenUidParamsType = "RFID" +) + +// Defines values for PatchOcpiTokensCountryCodePartyIdTokenUidParamsType. +const ( + PatchOcpiTokensCountryCodePartyIdTokenUidParamsTypeADHOCUSER PatchOcpiTokensCountryCodePartyIdTokenUidParamsType = "AD_HOC_USER" + PatchOcpiTokensCountryCodePartyIdTokenUidParamsTypeAPPUSER PatchOcpiTokensCountryCodePartyIdTokenUidParamsType = "APP_USER" + PatchOcpiTokensCountryCodePartyIdTokenUidParamsTypeOTHER PatchOcpiTokensCountryCodePartyIdTokenUidParamsType = "OTHER" + PatchOcpiTokensCountryCodePartyIdTokenUidParamsTypeRFID PatchOcpiTokensCountryCodePartyIdTokenUidParamsType = "RFID" +) + +// Defines values for PutOcpiTokensCountryCodePartyIdTokenUidParamsType. +const ( + PutOcpiTokensCountryCodePartyIdTokenUidParamsTypeADHOCUSER PutOcpiTokensCountryCodePartyIdTokenUidParamsType = "AD_HOC_USER" + PutOcpiTokensCountryCodePartyIdTokenUidParamsTypeAPPUSER PutOcpiTokensCountryCodePartyIdTokenUidParamsType = "APP_USER" + PutOcpiTokensCountryCodePartyIdTokenUidParamsTypeOTHER PutOcpiTokensCountryCodePartyIdTokenUidParamsType = "OTHER" + PutOcpiTokensCountryCodePartyIdTokenUidParamsTypeRFID PutOcpiTokensCountryCodePartyIdTokenUidParamsType = "RFID" +) + +// Defines values for PostOcpiTokenUidAuthorizeParamsType. +const ( + ADHOCUSER PostOcpiTokenUidAuthorizeParamsType = "AD_HOC_USER" + APPUSER PostOcpiTokenUidAuthorizeParamsType = "APP_USER" + OTHER PostOcpiTokenUidAuthorizeParamsType = "OTHER" + RFID PostOcpiTokenUidAuthorizeParamsType = "RFID" +) + +// OcpiChargingprofilePostRequest defines model for _ocpi_chargingprofile_post_request. +type OcpiChargingprofilePostRequest struct { + union json.RawMessage +} + +// OcpiCommandsCommandPostRequest defines model for _ocpi_commands__command__post_request. +type OcpiCommandsCommandPostRequest struct { + union json.RawMessage +} + +// OcpiLocationsLocationIdGet200Response defines model for _ocpi_locations__location_id__get_200_response. +type OcpiLocationsLocationIdGet200Response struct { + union json.RawMessage +} + +// ActiveChargingProfile defines model for activeChargingProfile. +type ActiveChargingProfile struct { + ChargingProfile ChargingProfile `json:"charging_profile"` + StartDateTime string `json:"start_date_time"` +} + +// ActiveChargingProfileResult defines model for activeChargingProfileResult. +type ActiveChargingProfileResult struct { + Profile *ActiveChargingProfileResultProfile `json:"profile,omitempty"` + Result ActiveChargingProfileResultResult `json:"result"` +} + +// ActiveChargingProfileResultResult defines model for ActiveChargingProfileResult.Result. +type ActiveChargingProfileResultResult string + +// ActiveChargingProfileResultProfile defines model for activeChargingProfileResult_profile. +type ActiveChargingProfileResultProfile struct { + ChargingProfile ChargingProfile `json:"charging_profile"` + StartDateTime string `json:"start_date_time"` +} + +// Authorization Changed name of the object from official docs due to colliding naming of info property +type Authorization struct { + Allowed AuthorizationAllowed `json:"allowed"` + AuthorizationReference *string `json:"authorization_reference,omitempty"` + Info *CommandResponseMessage `json:"info,omitempty"` + Location *LocationReferences `json:"location,omitempty"` + Token Token `json:"token"` +} + +// AuthorizationAllowed defines model for Authorization.Allowed. +type AuthorizationAllowed string + +// BusinessDetails defines model for businessDetails. +type BusinessDetails struct { + Logo *CredentialsDataRolesBusinessDetailsLogo `json:"logo,omitempty"` + Name string `json:"name"` + Website *string `json:"website,omitempty"` +} + +// CancelReservation defines model for cancelReservation. +type CancelReservation struct { + ReservationId string `json:"reservation_id"` + ResponseUrl string `json:"response_url"` +} + +// CdrBody defines model for cdrBody. +type CdrBody struct { + AuthMethod CdrBodyAuthMethod `json:"auth_method"` + AuthorizationReference *string `json:"authorization_reference,omitempty"` + CdrLocation CdrBodyCdrLocation `json:"cdr_location"` + CdrToken CdrBodyCdrToken `json:"cdr_token"` + ChargingPeriods *CdrBodyChargingPeriods `json:"charging_periods,omitempty"` + CountryCode string `json:"country_code"` + Credit *bool `json:"credit,omitempty"` + CreditReferenceId *string `json:"credit_reference_id,omitempty"` + Currency string `json:"currency"` + EndDateTime string `json:"end_date_time"` + HomeChargingCompensation *bool `json:"home_charging_compensation,omitempty"` + Id string `json:"id"` + InvoiceReferenceId *string `json:"invoice_reference_id,omitempty"` + LastUpdated string `json:"last_updated"` + MeterId *string `json:"meter_id,omitempty"` + PartyId string `json:"party_id"` + Remark *string `json:"remark,omitempty"` + SessionId *string `json:"session_id,omitempty"` + SignedData *CdrBodySignedData `json:"signed_data,omitempty"` + StartDateTime string `json:"start_date_time"` + Tariffs *CdrBodyTariffs `json:"tariffs,omitempty"` + TotalCost Price `json:"total_cost"` + TotalEnergy float32 `json:"total_energy"` + TotalEnergyCost *Price `json:"total_energy_cost,omitempty"` + TotalFixedCost *Price `json:"total_fixed_cost,omitempty"` + TotalParkingCost *Price `json:"total_parking_cost,omitempty"` + TotalParkingTime *float32 `json:"total_parking_time,omitempty"` + TotalReservationCost *Price `json:"total_reservation_cost,omitempty"` + TotalTime float32 `json:"total_time"` + TotalTimeCost *Price `json:"total_time_cost,omitempty"` +} + +// CdrBodyAuthMethod defines model for CdrBody.AuthMethod. +type CdrBodyAuthMethod string + +// CdrBodyCdrLocation defines model for cdrBody_cdr_location. +type CdrBodyCdrLocation struct { + Address *string `json:"address,omitempty"` + City *string `json:"city,omitempty"` + ConnectorFormat *CdrBodyCdrLocationConnectorFormat `json:"connector_format,omitempty"` + ConnectorId *string `json:"connector_id,omitempty"` + ConnectorPowerType *CdrBodyCdrLocationConnectorPowerType `json:"connector_power_type,omitempty"` + ConnectorStandard *CdrBodyCdrLocationConnectorStandard `json:"connector_standard,omitempty"` + Coordinates *CdrBodyCdrLocationCoordinates `json:"coordinates,omitempty"` + Country *string `json:"country,omitempty"` + EvseId *string `json:"evse_id,omitempty"` + EvseUid *string `json:"evse_uid,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + PostalCode *string `json:"postal_code,omitempty"` + State *string `json:"state,omitempty"` +} + +// CdrBodyCdrLocationConnectorFormat defines model for CdrBodyCdrLocation.ConnectorFormat. +type CdrBodyCdrLocationConnectorFormat string + +// CdrBodyCdrLocationConnectorPowerType defines model for CdrBodyCdrLocation.ConnectorPowerType. +type CdrBodyCdrLocationConnectorPowerType string + +// CdrBodyCdrLocationConnectorStandard defines model for CdrBodyCdrLocation.ConnectorStandard. +type CdrBodyCdrLocationConnectorStandard string + +// CdrBodyCdrLocationCoordinates defines model for cdrBody_cdr_location_coordinates. +type CdrBodyCdrLocationCoordinates struct { + Latitude string `json:"latitude"` + Longitude string `json:"longitude"` +} + +// CdrBodyCdrToken defines model for cdrBody_cdr_token. +type CdrBodyCdrToken struct { + ContractId string `json:"contract_id"` + CountryCode string `json:"country_code"` + PartyId string `json:"party_id"` + Type CdrBodyCdrTokenType `json:"type"` + Uid string `json:"uid"` +} + +// CdrBodyCdrTokenType defines model for CdrBodyCdrToken.Type. +type CdrBodyCdrTokenType string + +// CdrBodyChargingPeriods defines model for cdrBody_charging_periods. +type CdrBodyChargingPeriods struct { + Dimensions *CdrBodyChargingPeriodsDimensions `json:"dimensions,omitempty"` + StartDateTime string `json:"start_date_time"` + TariffId *string `json:"tariff_id,omitempty"` +} + +// CdrBodyChargingPeriodsDimensions defines model for cdrBody_charging_periods_dimensions. +type CdrBodyChargingPeriodsDimensions struct { + Type CdrBodyChargingPeriodsDimensionsType `json:"type"` + Volume float32 `json:"volume"` +} + +// CdrBodyChargingPeriodsDimensionsType defines model for CdrBodyChargingPeriodsDimensions.Type. +type CdrBodyChargingPeriodsDimensionsType string + +// CdrBodySignedData defines model for cdrBody_signed_data. +type CdrBodySignedData struct { + EncodingMethod string `json:"encoding_method"` + EncodingMethodVersion *int `json:"encoding_method_version,omitempty"` + PublicKey *string `json:"public_key,omitempty"` + SignedValues *CdrBodySignedDataSignedValues `json:"signed_values,omitempty"` + Url *string `json:"url,omitempty"` +} + +// CdrBodySignedDataSignedValues defines model for cdrBody_signed_data_signed_values. +type CdrBodySignedDataSignedValues struct { + Nature string `json:"nature"` + PlainData string `json:"plain_data"` + SignedData string `json:"signed_data"` +} + +// CdrBodyTariffs defines model for cdrBody_tariffs. +type CdrBodyTariffs struct { + CountryCode string `json:"country_code"` + Currency string `json:"currency"` + Elements *CdrBodyTariffsElements `json:"elements,omitempty"` + EndDateTime *string `json:"end_date_time,omitempty"` + EnergyMix *CdrBodyTariffsEnergyMix `json:"energy_mix,omitempty"` + Id string `json:"id"` + LastUpdated string `json:"last_updated"` + MaxPrice *Price `json:"max_price,omitempty"` + MinPrice *Price `json:"min_price,omitempty"` + PartyId string `json:"party_id"` + StartDateTime *string `json:"start_date_time,omitempty"` + TariffAltText *CdrBodyTariffsTariffAltText `json:"tariff_alt_text,omitempty"` + TariffAltUrl *string `json:"tariff_alt_url,omitempty"` + Type *CdrBodyTariffsType `json:"type,omitempty"` +} + +// CdrBodyTariffsType defines model for CdrBodyTariffs.Type. +type CdrBodyTariffsType string + +// CdrBodyTariffsElements defines model for cdrBody_tariffs_elements. +type CdrBodyTariffsElements struct { + PriceComponents *CdrBodyTariffsElementsPriceComponents `json:"price_components,omitempty"` + Restrictions *CdrBodyTariffsElementsRestrictions `json:"restrictions,omitempty"` +} + +// CdrBodyTariffsElementsPriceComponents defines model for CdrBodyTariffsElements.PriceComponents. +type CdrBodyTariffsElementsPriceComponents string + +// CdrBodyTariffsElementsRestrictions defines model for cdrBody_tariffs_elements_restrictions. +type CdrBodyTariffsElementsRestrictions struct { + DayOfWeek *CdrBodyTariffsElementsRestrictionsDayOfWeek `json:"day_of_week,omitempty"` + EndDate *string `json:"end_date,omitempty"` + EndTime *string `json:"end_time,omitempty"` + MaxCurrent *float32 `json:"max_current,omitempty"` + MaxDuration *int `json:"max_duration,omitempty"` + MaxKwh *float32 `json:"max_kwh,omitempty"` + MaxPower *float32 `json:"max_power,omitempty"` + MinCurrent *float32 `json:"min_current,omitempty"` + MinDuration *int `json:"min_duration,omitempty"` + MinKwh *float32 `json:"min_kwh,omitempty"` + MinPower *float32 `json:"min_power,omitempty"` + Reservation *CdrBodyTariffsElementsRestrictionsReservation `json:"reservation,omitempty"` + StartDate *string `json:"start_date,omitempty"` + StartTime *string `json:"start_time,omitempty"` +} + +// CdrBodyTariffsElementsRestrictionsDayOfWeek defines model for CdrBodyTariffsElementsRestrictions.DayOfWeek. +type CdrBodyTariffsElementsRestrictionsDayOfWeek string + +// CdrBodyTariffsElementsRestrictionsReservation defines model for CdrBodyTariffsElementsRestrictions.Reservation. +type CdrBodyTariffsElementsRestrictionsReservation string + +// CdrBodyTariffsEnergyMix defines model for cdrBody_tariffs_energy_mix. +type CdrBodyTariffsEnergyMix struct { + EnergyProductName *string `json:"energy_product_name,omitempty"` + EnergySources *CdrBodyTariffsEnergyMixEnergySources `json:"energy_sources,omitempty"` + EnvironImpact *CdrBodyTariffsEnergyMixEnvironImpact `json:"environ_impact,omitempty"` + IsGreenEnergy bool `json:"is_green_energy"` + SupplierName *string `json:"supplier_name,omitempty"` +} + +// CdrBodyTariffsEnergyMixEnergySources defines model for cdrBody_tariffs_energy_mix_energy_sources. +type CdrBodyTariffsEnergyMixEnergySources struct { + Percentage float32 `json:"percentage"` + Source CdrBodyTariffsEnergyMixEnergySourcesSource `json:"source"` +} + +// CdrBodyTariffsEnergyMixEnergySourcesSource defines model for CdrBodyTariffsEnergyMixEnergySources.Source. +type CdrBodyTariffsEnergyMixEnergySourcesSource string + +// CdrBodyTariffsEnergyMixEnvironImpact defines model for cdrBody_tariffs_energy_mix_environ_impact. +type CdrBodyTariffsEnergyMixEnvironImpact struct { + Amount float32 `json:"amount"` + Category CdrBodyTariffsEnergyMixEnvironImpactCategory `json:"category"` +} + +// CdrBodyTariffsEnergyMixEnvironImpactCategory defines model for CdrBodyTariffsEnergyMixEnvironImpact.Category. +type CdrBodyTariffsEnergyMixEnvironImpactCategory string + +// CdrBodyTariffsTariffAltText defines model for cdrBody_tariffs_tariff_alt_text. +type CdrBodyTariffsTariffAltText struct { + Language string `json:"language"` + Text string `json:"text"` +} + +// CdrResponse defines model for cdrResponse. +type CdrResponse struct { + StatusCode float32 `json:"status_code"` + StatusMessage *string `json:"status_message,omitempty"` + TimeStamp *string `json:"timeStamp,omitempty"` + Url string `json:"url"` +} + +// CdrsResponse defines model for cdrsResponse. +type CdrsResponse struct { + Cdrs *CdrBody `json:"cdrs,omitempty"` + StatusCode float32 `json:"status_code"` + StatusMessage *string `json:"status_message,omitempty"` + TimeStamp *string `json:"timeStamp,omitempty"` +} + +// ChargingPreferences defines model for chargingPreferences. +type ChargingPreferences struct { + DepartureTime *string `json:"departure_time,omitempty"` + EnergyNeed *float32 `json:"energy_need,omitempty"` + ProfileType ChargingPreferencesProfileType `json:"profile_type"` +} + +// ChargingPreferencesProfileType defines model for ChargingPreferences.ProfileType. +type ChargingPreferencesProfileType string + +// ChargingPreferencesResponse defines model for chargingPreferencesResponse. +type ChargingPreferencesResponse struct { + ChargingPreferences ChargingPreferencesResponseChargingPreferences `json:"charging_preferences"` + StatusCode float32 `json:"status_code"` + StatusMessage *string `json:"status_message,omitempty"` + TimeStamp *string `json:"timeStamp,omitempty"` +} + +// ChargingPreferencesResponseChargingPreferences defines model for ChargingPreferencesResponse.ChargingPreferences. +type ChargingPreferencesResponseChargingPreferences string + +// ChargingProfile defines model for chargingProfile. +type ChargingProfile struct { + ChargingProfilePeriod *ChargingProfileChargingProfilePeriod `json:"charging_profile_period,omitempty"` + ChargingRateUnit ChargingProfileChargingRateUnit `json:"charging_rate_unit"` + Duration *int `json:"duration,omitempty"` + MinChargingRate *float32 `json:"min_charging_rate,omitempty"` + StartDateTime *string `json:"start_date_time,omitempty"` +} + +// ChargingProfileChargingRateUnit defines model for ChargingProfile.ChargingRateUnit. +type ChargingProfileChargingRateUnit string + +// ChargingProfileResponse defines model for chargingProfileResponse. +type ChargingProfileResponse struct { + // Result Response to the ChargingProfile request from the eMSP to the CPO. + Result ChargingProfileResponseType `json:"result"` + Timeout int `json:"timeout"` +} + +// ChargingProfileResponseType Response to the ChargingProfile request from the eMSP to the CPO. +type ChargingProfileResponseType string + +// ChargingProfileResult defines model for chargingProfileResult. +type ChargingProfileResult struct { + Result ChargingProfileResultResult `json:"result"` +} + +// ChargingProfileResultResult defines model for ChargingProfileResult.Result. +type ChargingProfileResultResult string + +// ChargingProfileChargingProfilePeriod defines model for chargingProfile_charging_profile_period. +type ChargingProfileChargingProfilePeriod struct { + Limit float32 `json:"limit"` + StartPeriod int `json:"start_period"` +} + +// ChargingProfilesResponse defines model for chargingProfilesResponse. +type ChargingProfilesResponse struct { + ChargingProfile *ChargingProfileResponse `json:"chargingProfile,omitempty"` + StatusCode float32 `json:"status_code"` + StatusMessage *string `json:"status_message,omitempty"` + TimeStamp *string `json:"timeStamp,omitempty"` +} + +// ClearProfileResult defines model for clearProfileResult. +type ClearProfileResult struct { + Result ClearProfileResultResult `json:"result"` +} + +// ClearProfileResultResult defines model for ClearProfileResult.Result. +type ClearProfileResultResult string + +// ClientInfo defines model for clientInfo. +type ClientInfo struct { + CountryCode string `json:"country_code"` + LastUpdated string `json:"last_updated"` + PartyId string `json:"party_id"` + Role ClientInfoRole `json:"role"` + Status ClientInfoStatus `json:"status"` +} + +// ClientInfoRole defines model for ClientInfo.Role. +type ClientInfoRole string + +// ClientInfoStatus defines model for ClientInfo.Status. +type ClientInfoStatus string + +// ClientInfoResponse defines model for clientInfoResponse. +type ClientInfoResponse struct { + ClientsInfo *ClientInfo `json:"clients_info,omitempty"` + StatusCode float32 `json:"status_code"` + StatusMessage *string `json:"status_message,omitempty"` + TimeStamp *string `json:"timeStamp,omitempty"` +} + +// ClientsInfoResponse defines model for clientsInfoResponse. +type ClientsInfoResponse struct { + ClientInfo ClientInfo `json:"client_info"` + StatusCode float32 `json:"status_code"` + StatusMessage *string `json:"status_message,omitempty"` + TimeStamp *string `json:"timeStamp,omitempty"` +} + +// CommandResponse defines model for commandResponse. +type CommandResponse struct { + Message *CommandResponseMessage `json:"message,omitempty"` + Result CommandResponseResult `json:"result"` + Timeout int `json:"timeout"` +} + +// CommandResponseResult defines model for CommandResponse.Result. +type CommandResponseResult string + +// CommandResponseMessage defines model for commandResponse_message. +type CommandResponseMessage struct { + Language string `json:"language"` + Text string `json:"text"` +} + +// CommandResult defines model for commandResult. +type CommandResult struct { + Message *CommandResponseMessage `json:"message,omitempty"` + Result CommandResultResult `json:"result"` +} + +// CommandResultResult defines model for CommandResult.Result. +type CommandResultResult string + +// Connector defines model for connector. +type Connector struct { + Format ConnectorFormat `json:"format"` + Id string `json:"id"` + LastUpdated string `json:"last_updated"` + MaxAmperage int `json:"max_amperage"` + MaxElectricPower *int `json:"max_electric_power,omitempty"` + MaxVoltage int `json:"max_voltage"` + PowerType ConnectorPowerType `json:"power_type"` + Standard ConnectorStandard `json:"standard"` + TariffIds *string `json:"tariff_ids,omitempty"` + TermsAndConditions *string `json:"terms_and_conditions,omitempty"` +} + +// ConnectorFormat defines model for Connector.Format. +type ConnectorFormat string + +// ConnectorPowerType defines model for Connector.PowerType. +type ConnectorPowerType string + +// ConnectorStandard defines model for Connector.Standard. +type ConnectorStandard string + +// Credentials defines model for credentials. +type Credentials struct { + Data *CredentialsData `json:"data,omitempty"` + StatusCode float32 `json:"status_code"` + StatusMessage *string `json:"status_message,omitempty"` + TimeStamp *string `json:"timeStamp,omitempty"` +} + +// CredentialsData defines model for credentials_data. +type CredentialsData struct { + Roles *CredentialsDataRoles `json:"roles,omitempty"` + Token string `json:"token"` + Url string `json:"url"` +} + +// CredentialsDataRoles defines model for credentials_data_roles. +type CredentialsDataRoles struct { + BusinessDetails CredentialsDataRolesBusinessDetails `json:"business_details"` + CountryCode string `json:"country_code"` + PartyId string `json:"party_id"` + Role CredentialsDataRolesRole `json:"role"` +} + +// CredentialsDataRolesRole defines model for CredentialsDataRoles.Role. +type CredentialsDataRolesRole string + +// CredentialsDataRolesBusinessDetails defines model for credentials_data_roles_business_details. +type CredentialsDataRolesBusinessDetails struct { + Logo *CredentialsDataRolesBusinessDetailsLogo `json:"logo,omitempty"` + Name string `json:"name"` + Website *string `json:"website,omitempty"` +} + +// CredentialsDataRolesBusinessDetailsLogo defines model for credentials_data_roles_business_details_logo. +type CredentialsDataRolesBusinessDetailsLogo struct { + Category CredentialsDataRolesBusinessDetailsLogoCategory `json:"category"` + Height *float32 `json:"height,omitempty"` + Thumbnail *string `json:"thumbnail,omitempty"` + Type string `json:"type"` + Url string `json:"url"` + Width *float32 `json:"width,omitempty"` +} + +// CredentialsDataRolesBusinessDetailsLogoCategory defines model for CredentialsDataRolesBusinessDetailsLogo.Category. +type CredentialsDataRolesBusinessDetailsLogoCategory string + +// Details defines model for details. +type Details struct { + Data *DetailsData `json:"data,omitempty"` + StatusCode float32 `json:"status_code"` + StatusMessage *string `json:"status_message,omitempty"` + TimeStamp *string `json:"timeStamp,omitempty"` +} + +// DetailsData defines model for details_data. +type DetailsData struct { + Endpoints *DetailsDataEndpoints `json:"endpoints,omitempty"` + Version DetailsDataVersion `json:"version"` +} + +// DetailsDataVersion defines model for DetailsData.Version. +type DetailsDataVersion string + +// DetailsDataEndpoints defines model for details_data_endpoints. +type DetailsDataEndpoints struct { + // Identifier OCPI 2.2.1 modules + Identifier ModuleIDType `json:"identifier"` + + // Role Interface role endpoint implements. + Role InterfaceRoleType `json:"role"` + + // Url URL to the endpoint. + Url string `json:"url"` +} + +// EnvironmentalImpactCategoryType Categories of environmental impact values +type EnvironmentalImpactCategoryType string + +// Evse defines model for evse. +type Evse struct { + Capabilities *EvseCapabilities `json:"capabilities,omitempty"` + Connectors *Connector `json:"connectors,omitempty"` + Coordinates *CdrBodyCdrLocationCoordinates `json:"coordinates,omitempty"` + Directions *CdrBodyTariffsTariffAltText `json:"directions,omitempty"` + EvseId *string `json:"evse_id,omitempty"` + FloorLevel *string `json:"floor_level,omitempty"` + Images *Image `json:"images,omitempty"` + LastUpdated string `json:"last_updated"` + ParkingRestrictions *EvseParkingRestrictions `json:"parking_restrictions,omitempty"` + PhysicalReference *string `json:"physical_reference,omitempty"` + Status EvseStatus `json:"status"` + StatusSchedule *EvseStatusSchedule `json:"status_schedule,omitempty"` + Uid string `json:"uid"` +} + +// EvseCapabilities defines model for Evse.Capabilities. +type EvseCapabilities string + +// EvseParkingRestrictions defines model for Evse.ParkingRestrictions. +type EvseParkingRestrictions string + +// EvseStatus defines model for Evse.Status. +type EvseStatus string + +// EvseStatusSchedule defines model for evse_status_schedule. +type EvseStatusSchedule struct { + PeriodBegin string `json:"period_begin"` + PeriodEnd *string `json:"period_end,omitempty"` + Status EvseStatusScheduleStatus `json:"status"` +} + +// EvseStatusScheduleStatus defines model for EvseStatusSchedule.Status. +type EvseStatusScheduleStatus string + +// GenericError defines model for genericError. +type GenericError struct { + StatusCode float32 `json:"status_code"` + StatusMessage *string `json:"status_message,omitempty"` + TimeStamp string `json:"timeStamp"` +} + +// GenericResponse defines model for genericResponse. +type GenericResponse struct { + StatusCode float32 `json:"status_code"` + StatusMessage *string `json:"status_message,omitempty"` + TimeStamp string `json:"timeStamp"` +} + +// Image defines model for image. +type Image struct { + Category ImageCategory `json:"category"` + Height *float32 `json:"height,omitempty"` + Thumbnail *string `json:"thumbnail,omitempty"` + Type string `json:"type"` + Url string `json:"url"` + Width *float32 `json:"width,omitempty"` +} + +// ImageCategory defines model for Image.Category. +type ImageCategory string + +// InterfaceRoleType Interface role endpoint implements. +type InterfaceRoleType string + +// LocationReferences defines model for locationReferences. +type LocationReferences struct { + EvseUids *string `json:"evse_uids,omitempty"` + LocationId string `json:"location_id"` +} + +// Locations defines model for locations. +type Locations struct { + Data *LocationsData `json:"data,omitempty"` + StatusCode float32 `json:"status_code"` + StatusMessage *string `json:"status_message,omitempty"` + TimeStamp *string `json:"timeStamp,omitempty"` +} + +// LocationsData defines model for locations_data. +type LocationsData struct { + Address string `json:"address"` + ChargingWhenClosed *bool `json:"charging_when_closed,omitempty"` + City string `json:"city"` + Coordinates CdrBodyCdrLocationCoordinates `json:"coordinates"` + Country string `json:"country"` + CountryCode *string `json:"country_code,omitempty"` + Directions *CdrBodyTariffsTariffAltText `json:"directions,omitempty"` + EnergyMix *CdrBodyTariffsEnergyMix `json:"energy_mix,omitempty"` + Evses *Evse `json:"evses,omitempty"` + Facilities *LocationsDataFacilities `json:"facilities,omitempty"` + Id *string `json:"id,omitempty"` + Images *Image `json:"images,omitempty"` + LastUpdated string `json:"last_updated"` + Name *string `json:"name,omitempty"` + OpeningTimes *LocationsDataOpeningTimes `json:"opening_times,omitempty"` + Operator *BusinessDetails `json:"operator,omitempty"` + Owner *BusinessDetails `json:"owner,omitempty"` + ParkingType *LocationsDataParkingType `json:"parking_type,omitempty"` + PartyId *string `json:"party_id,omitempty"` + PostalCode *string `json:"postal_code,omitempty"` + Publish *bool `json:"publish,omitempty"` + PublishAllowedTo *LocationsDataPublishAllowedTo `json:"publish_allowed_to,omitempty"` + RelatedLocations *LocationsDataRelatedLocations `json:"related_locations,omitempty"` + State *string `json:"state,omitempty"` + Suboperator *BusinessDetails `json:"suboperator,omitempty"` + TimeZone string `json:"time_zone"` +} + +// LocationsDataFacilities defines model for LocationsData.Facilities. +type LocationsDataFacilities string + +// LocationsDataParkingType defines model for LocationsData.ParkingType. +type LocationsDataParkingType string + +// LocationsDataOpeningTimes defines model for locations_data_opening_times. +type LocationsDataOpeningTimes struct { + ExceptionalClosings *LocationsDataOpeningTimesExceptionalOpenings `json:"exceptional_closings,omitempty"` + ExceptionalOpenings *LocationsDataOpeningTimesExceptionalOpenings `json:"exceptional_openings,omitempty"` + RegularHours *LocationsDataOpeningTimesRegularHours `json:"regular_hours,omitempty"` + Twentyfourseven bool `json:"twentyfourseven"` +} + +// LocationsDataOpeningTimesExceptionalOpenings defines model for locations_data_opening_times_exceptional_openings. +type LocationsDataOpeningTimesExceptionalOpenings struct { + PeriodBegin string `json:"period_begin"` + PeriodEnd string `json:"period_end"` +} + +// LocationsDataOpeningTimesRegularHours defines model for locations_data_opening_times_regular_hours. +type LocationsDataOpeningTimesRegularHours struct { + PeriodBegin string `json:"period_begin"` + PeriodEnd string `json:"period_end"` + Weekday int `json:"weekday"` +} + +// LocationsDataPublishAllowedTo defines model for locations_data_publish_allowed_to. +type LocationsDataPublishAllowedTo struct { + GroupId *string `json:"group_id,omitempty"` + Issuer *string `json:"issuer,omitempty"` + Type *LocationsDataPublishAllowedToType `json:"type,omitempty"` + Uid *string `json:"uid,omitempty"` + VisualNumber *string `json:"visual_number,omitempty"` +} + +// LocationsDataPublishAllowedToType defines model for LocationsDataPublishAllowedTo.Type. +type LocationsDataPublishAllowedToType string + +// LocationsDataRelatedLocations defines model for locations_data_related_locations. +type LocationsDataRelatedLocations struct { + Latitude string `json:"latitude"` + Longitude string `json:"longitude"` + Name *CdrBodyTariffsTariffAltText `json:"name,omitempty"` +} + +// ModuleIDType OCPI 2.2.1 modules +type ModuleIDType string + +// Price defines model for price. +type Price struct { + ExclVat float32 `json:"excl_vat"` + InclVat *float32 `json:"incl_vat,omitempty"` +} + +// ReservationRestrictionType defines model for reservationRestrictionType. +type ReservationRestrictionType string + +// ReserveNow defines model for reserveNow. +type ReserveNow struct { + AuthorizationReference *string `json:"authorization_reference,omitempty"` + EvseUid *string `json:"evse_uid,omitempty"` + ExpiryDate string `json:"expiry_date"` + LocationId string `json:"location_id"` + ReservationId string `json:"reservation_id"` + ResponseUrl string `json:"response_url"` + Token Token `json:"token"` +} + +// Session defines model for session. +type Session struct { + AuthMethod SessionAuthMethod `json:"auth_method"` + AuthorizationReference *string `json:"authorization_reference,omitempty"` + CdrToken CdrBodyCdrToken `json:"cdr_token"` + ChargingPeriods *SessionChargingPeriods `json:"charging_periods,omitempty"` + ConnectorId string `json:"connector_id"` + CountryCode string `json:"country_code"` + Currency string `json:"currency"` + EndDateTime *string `json:"end_date_time,omitempty"` + EvseUid string `json:"evse_uid"` + Id string `json:"id"` + Kwh float32 `json:"kwh"` + LastUpdated string `json:"last_updated"` + LocationId string `json:"location_id"` + MeterId *string `json:"meter_id,omitempty"` + PartyId string `json:"party_id"` + StartDateTime string `json:"start_date_time"` + Status SessionStatus `json:"status"` + TotalCosts *SessionTotalCosts `json:"total_costs,omitempty"` +} + +// SessionAuthMethod defines model for Session.AuthMethod. +type SessionAuthMethod string + +// SessionStatus defines model for Session.Status. +type SessionStatus string + +// SessionResponse defines model for sessionResponse. +type SessionResponse struct { + Session Session `json:"session"` + StatusCode float32 `json:"status_code"` + StatusMessage *string `json:"status_message,omitempty"` + TimeStamp *string `json:"timeStamp,omitempty"` +} + +// SessionChargingPeriods defines model for session_charging_periods. +type SessionChargingPeriods struct { + Dimensions *SessionChargingPeriodsDimensions `json:"dimensions,omitempty"` + StartDateTime string `json:"start_date_time"` + TariffId *string `json:"tariff_id,omitempty"` +} + +// SessionChargingPeriodsDimensions defines model for session_charging_periods_dimensions. +type SessionChargingPeriodsDimensions struct { + Type SessionChargingPeriodsDimensionsType `json:"type"` + Volume float32 `json:"volume"` +} + +// SessionChargingPeriodsDimensionsType defines model for SessionChargingPeriodsDimensions.Type. +type SessionChargingPeriodsDimensionsType string + +// SessionTotalCosts defines model for session_total_costs. +type SessionTotalCosts struct { + ExclVat float32 `json:"excl_vat"` + InclVat *float32 `json:"incl_vat,omitempty"` +} + +// SessionsResponse defines model for sessionsResponse. +type SessionsResponse struct { + Sessions *Session `json:"sessions,omitempty"` + StatusCode float32 `json:"status_code"` + StatusMessage *string `json:"status_message,omitempty"` + TimeStamp *string `json:"timeStamp,omitempty"` +} + +// SetChargingProfile defines model for setChargingProfile. +type SetChargingProfile struct { + ChargingProfile ChargingProfile `json:"charging_profile"` + ResponseUrl string `json:"response_url"` +} + +// StartSession defines model for startSession. +type StartSession struct { + AuthorizationReference *string `json:"authorization_reference,omitempty"` + ConnectorId *string `json:"connector_id,omitempty"` + EvseUid *string `json:"evse_uid,omitempty"` + LocationId string `json:"location_id"` + ResponseUrl string `json:"response_url"` + Token Token `json:"token"` +} + +// StopSession defines model for stopSession. +type StopSession struct { + ResponseUrl string `json:"response_url"` + SessionId *string `json:"session_id,omitempty"` +} + +// Tariff defines model for tariff. +type Tariff struct { + CountryCode string `json:"country_code"` + Currency string `json:"currency"` + Elements *TariffElements `json:"elements,omitempty"` + EndDateTime *string `json:"end_date_time,omitempty"` + EnergyMix *TariffEnergyMix `json:"energy_mix,omitempty"` + Id string `json:"id"` + LastUpdated string `json:"last_updated"` + MaxPrice *Price `json:"max_price,omitempty"` + MinPrice *Price `json:"min_price,omitempty"` + PartyId string `json:"party_id"` + StartDateTime *string `json:"start_date_time,omitempty"` + TariffAltText *CdrBodyTariffsTariffAltText `json:"tariff_alt_text,omitempty"` + TariffAltUrl *string `json:"tariff_alt_url,omitempty"` + Type *TariffType `json:"type,omitempty"` +} + +// TariffType defines model for Tariff.Type. +type TariffType string + +// TariffDeleteResponse defines model for tariffDeleteResponse. +type TariffDeleteResponse struct { + StatusCode float32 `json:"status_code"` + StatusMessage *string `json:"status_message,omitempty"` + TimeStamp string `json:"timeStamp"` +} + +// TariffResponse defines model for tariffResponse. +type TariffResponse struct { + StatusCode float32 `json:"status_code"` + StatusMessage *string `json:"status_message,omitempty"` + Tariff Tariff `json:"tariff"` + TimeStamp *string `json:"timeStamp,omitempty"` +} + +// TariffElements defines model for tariff_elements. +type TariffElements struct { + PriceComponents *TariffElementsPriceComponents `json:"price_components,omitempty"` + Restrictions *TariffElementsRestrictions `json:"restrictions,omitempty"` +} + +// TariffElementsPriceComponents defines model for TariffElements.PriceComponents. +type TariffElementsPriceComponents string + +// TariffElementsRestrictions defines model for tariff_elements_restrictions. +type TariffElementsRestrictions struct { + DayOfWeek *TariffElementsRestrictionsDayOfWeek `json:"day_of_week,omitempty"` + EndDate *string `json:"end_date,omitempty"` + EndTime *string `json:"end_time,omitempty"` + MaxCurrent *float32 `json:"max_current,omitempty"` + MaxDuration *int `json:"max_duration,omitempty"` + MaxKwh *float32 `json:"max_kwh,omitempty"` + MaxPower *float32 `json:"max_power,omitempty"` + MinCurrent *float32 `json:"min_current,omitempty"` + MinDuration *int `json:"min_duration,omitempty"` + MinKwh *float32 `json:"min_kwh,omitempty"` + MinPower *float32 `json:"min_power,omitempty"` + Reservation *ReservationRestrictionType `json:"reservation,omitempty"` + StartDate *string `json:"start_date,omitempty"` + StartTime *string `json:"start_time,omitempty"` +} + +// TariffElementsRestrictionsDayOfWeek defines model for TariffElementsRestrictions.DayOfWeek. +type TariffElementsRestrictionsDayOfWeek string + +// TariffEnergyMix defines model for tariff_energy_mix. +type TariffEnergyMix struct { + EnergyProductName *string `json:"energy_product_name,omitempty"` + EnergySources *CdrBodyTariffsEnergyMixEnergySources `json:"energy_sources,omitempty"` + EnvironImpact *TariffEnergyMixEnvironImpact `json:"environ_impact,omitempty"` + IsGreenEnergy bool `json:"is_green_energy"` + SupplierName *string `json:"supplier_name,omitempty"` +} + +// TariffEnergyMixEnvironImpact defines model for tariff_energy_mix_environ_impact. +type TariffEnergyMixEnvironImpact struct { + Amount float32 `json:"amount"` + + // Category Categories of environmental impact values + Category EnvironmentalImpactCategoryType `json:"category"` +} + +// TariffsResponse defines model for tariffsResponse. +type TariffsResponse struct { + StatusCode float32 `json:"status_code"` + StatusMessage *string `json:"status_message,omitempty"` + Tariffs *Tariff `json:"tariffs,omitempty"` + TimeStamp *string `json:"timeStamp,omitempty"` +} + +// Token defines model for token. +type Token struct { + ContractId string `json:"contract_id"` + CountryCode string `json:"country_code"` + DefaultProfileType *TokenDefaultProfileType `json:"default_profile_type,omitempty"` + EnergyContract *TokenEnergyContract `json:"energy_contract,omitempty"` + GroupId *string `json:"group_id,omitempty"` + Issuer string `json:"issuer"` + Language *string `json:"language,omitempty"` + LastUpdated string `json:"last_updated"` + PartyId string `json:"party_id"` + Type TokenType `json:"type"` + Uid string `json:"uid"` + Valid bool `json:"valid"` + VisualNumber *string `json:"visual_number,omitempty"` + Whitelist TokenWhitelist `json:"whitelist"` +} + +// TokenDefaultProfileType defines model for Token.DefaultProfileType. +type TokenDefaultProfileType string + +// TokenType defines model for Token.Type. +type TokenType string + +// TokenWhitelist defines model for Token.Whitelist. +type TokenWhitelist string + +// TokenResponse defines model for tokenResponse. +type TokenResponse struct { + StatusCode float32 `json:"status_code"` + StatusMessage *string `json:"status_message,omitempty"` + TimeStamp *string `json:"timeStamp,omitempty"` + Token Token `json:"token"` +} + +// TokenEnergyContract defines model for token_energy_contract. +type TokenEnergyContract struct { + ContractId *string `json:"contract_id,omitempty"` + SupplierName string `json:"supplier_name"` +} + +// TokensResponse defines model for tokensResponse. +type TokensResponse struct { + StatusCode float32 `json:"status_code"` + StatusMessage *string `json:"status_message,omitempty"` + TimeStamp *string `json:"timeStamp,omitempty"` + Tokens *Token `json:"tokens,omitempty"` +} + +// UnlockConnector defines model for unlockConnector. +type UnlockConnector struct { + ConnectorId string `json:"connector_id"` + EvseUid string `json:"evse_uid"` + LocationId string `json:"location_id"` + ResponseUrl string `json:"response_url"` +} + +// Versions defines model for versions. +type Versions struct { + Data *VersionsData `json:"data,omitempty"` + StatusCode float32 `json:"status_code"` + StatusMessage *string `json:"status_message,omitempty"` + TimeStamp *string `json:"timeStamp,omitempty"` +} + +// VersionsData defines model for versions_data. +type VersionsData struct { + Url string `json:"url"` + Version VersionsDataVersion `json:"version"` +} + +// VersionsDataVersion defines model for VersionsData.Version. +type VersionsDataVersion string + +// GetOcpiCdrsParams defines parameters for GetOcpiCdrs. +type GetOcpiCdrsParams struct { + // DateFrom Return CDRs that have last_updated after or equal to this Date/Time (inclusive). + DateFrom *string `form:"date_from,omitempty" json:"date_from,omitempty"` + + // DateTo Return CDRs that have last_updated up to this Date/Time, but not including (exclusive). + DateTo *string `form:"date_to,omitempty" json:"date_to,omitempty"` + + // Offset The offset of the first object returned. Default is 0. + Offset *int `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Maximum number of objects to GET. + Limit *int `form:"limit,omitempty" json:"limit,omitempty"` +} + +// PostOcpiCommandsCommandParamsCommand defines parameters for PostOcpiCommandsCommand. +type PostOcpiCommandsCommandParamsCommand string + +// PostOcpiCommandsCommandUidParamsCommand defines parameters for PostOcpiCommandsCommandUid. +type PostOcpiCommandsCommandUidParamsCommand string + +// GetOcpiHubclientinfoParams defines parameters for GetOcpiHubclientinfo. +type GetOcpiHubclientinfoParams struct { + // DateFrom Return ClientInfo that have last_updated after or equal to Date/Time (inclusive). + DateFrom *string `form:"date_from,omitempty" json:"date_from,omitempty"` + + // DateTo Return ClientInfo that have last_updated up to Date/Time, but not including (exclusive). + DateTo *string `form:"date_to,omitempty" json:"date_to,omitempty"` + + // Offset The offset of the first object returned. Default is 0. + Offset *int `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Maximum number of objects to GET. + Limit *int `form:"limit,omitempty" json:"limit,omitempty"` +} + +// GetOcpiLocationsParams defines parameters for GetOcpiLocations. +type GetOcpiLocationsParams struct { + // DateFrom Return Locations that have last_updated after or equal to this date time (inclusive). + DateFrom *string `form:"date_from,omitempty" json:"date_from,omitempty"` + + // DateTo Return Locations that have last_updated up to this date time, but not including (exclusive). + DateTo *string `form:"date_to,omitempty" json:"date_to,omitempty"` + + // Offset The offset of the first object returned. Default is 0. + Offset *int `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Maximum number of objects to GET. + Limit *int `form:"limit,omitempty" json:"limit,omitempty"` +} + +// GetOcpiLocationsCountryCodePartyIdLocationIdParams defines parameters for GetOcpiLocationsCountryCodePartyIdLocationId. +type GetOcpiLocationsCountryCodePartyIdLocationIdParams struct { + // EvseUid Evse.uid, required when requesting an EVSE or Connector object. + EvseUid *string `form:"evse_uid,omitempty" json:"evse_uid,omitempty"` + + // ConnectorId Connector.id, required when requesting a Connector object. + ConnectorId *string `form:"connector_id,omitempty" json:"connector_id,omitempty"` +} + +// PatchOcpiLocationsCountryCodePartyIdLocationIdParams defines parameters for PatchOcpiLocationsCountryCodePartyIdLocationId. +type PatchOcpiLocationsCountryCodePartyIdLocationIdParams struct { + // EvseUid Evse.uid, required when requesting an EVSE or Connector object. + EvseUid *string `form:"evse_uid,omitempty" json:"evse_uid,omitempty"` + + // ConnectorId Connector.id, required when requesting a Connector object. + ConnectorId *string `form:"connector_id,omitempty" json:"connector_id,omitempty"` +} + +// PutOcpiLocationsCountryCodePartyIdLocationIdParams defines parameters for PutOcpiLocationsCountryCodePartyIdLocationId. +type PutOcpiLocationsCountryCodePartyIdLocationIdParams struct { + // EvseUid Evse.uid, required when requesting an EVSE or Connector object. + EvseUid *string `form:"evse_uid,omitempty" json:"evse_uid,omitempty"` + + // ConnectorId Connector.id, required when requesting a Connector object. + ConnectorId *string `form:"connector_id,omitempty" json:"connector_id,omitempty"` +} + +// GetOcpiLocationsLocationIdParams defines parameters for GetOcpiLocationsLocationId. +type GetOcpiLocationsLocationIdParams struct { + // EvseUid Evse.uid, required when requesting an EVSE or Connector object. + EvseUid *string `form:"evse_uid,omitempty" json:"evse_uid,omitempty"` + + // ConnectorId Connector.id, required when requesting a Connector object. + ConnectorId *string `form:"connector_id,omitempty" json:"connector_id,omitempty"` +} + +// GetOcpiSessionsParams defines parameters for GetOcpiSessions. +type GetOcpiSessionsParams struct { + // DateFrom Return Sessions that have last_updated after or equal to this date time (inclusive). + DateFrom *string `form:"date_from,omitempty" json:"date_from,omitempty"` + + // DateTo Return Sessions that have last_updated up to this date time, but not including (exclusive). + DateTo *string `form:"date_to,omitempty" json:"date_to,omitempty"` + + // Offset The offset of the first object returned. Default is 0. + Offset *int `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Maximum number of objects to GET. + Limit *int `form:"limit,omitempty" json:"limit,omitempty"` +} + +// GetOcpiTariffsParams defines parameters for GetOcpiTariffs. +type GetOcpiTariffsParams struct { + // DateFrom Return Tariffs that have last_updated after or equal to Date/Time (inclusive). + DateFrom *string `form:"date_from,omitempty" json:"date_from,omitempty"` + + // DateTo Return Tariffs that have last_updated up to Date/Time, but not including (exclusive). + DateTo *string `form:"date_to,omitempty" json:"date_to,omitempty"` + + // Offset The offset of the first object returned. Default is 0. + Offset *int `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Maximum number of objects to GET. + Limit *int `form:"limit,omitempty" json:"limit,omitempty"` +} + +// GetOcpiTokensParams defines parameters for GetOcpiTokens. +type GetOcpiTokensParams struct { + // DateFrom Return tokens that have last_updated after or equal to this Date/Time (inclusive). + DateFrom *string `form:"date_from,omitempty" json:"date_from,omitempty"` + + // DateTo Return tokens that have last_updated up to Date/Time, but not including (exclusive). + DateTo *string `form:"date_to,omitempty" json:"date_to,omitempty"` + + // Offset The offset of the first object returned. Default is 0. + Offset *int `form:"offset,omitempty" json:"offset,omitempty"` + + // Limit Maximum number of objects to GET. + Limit *int `form:"limit,omitempty" json:"limit,omitempty"` +} + +// GetOcpiTokensCountryCodePartyIdTokenUidParams defines parameters for GetOcpiTokensCountryCodePartyIdTokenUid. +type GetOcpiTokensCountryCodePartyIdTokenUidParams struct { + // Type Token.type of the Token to retrieve. Default if omitted: RFID + Type *GetOcpiTokensCountryCodePartyIdTokenUidParamsType `form:"type,omitempty" json:"type,omitempty"` +} + +// GetOcpiTokensCountryCodePartyIdTokenUidParamsType defines parameters for GetOcpiTokensCountryCodePartyIdTokenUid. +type GetOcpiTokensCountryCodePartyIdTokenUidParamsType string + +// PatchOcpiTokensCountryCodePartyIdTokenUidParams defines parameters for PatchOcpiTokensCountryCodePartyIdTokenUid. +type PatchOcpiTokensCountryCodePartyIdTokenUidParams struct { + // Type Token.type of the Token to retrieve. Default if omitted: RFID + Type *PatchOcpiTokensCountryCodePartyIdTokenUidParamsType `form:"type,omitempty" json:"type,omitempty"` +} + +// PatchOcpiTokensCountryCodePartyIdTokenUidParamsType defines parameters for PatchOcpiTokensCountryCodePartyIdTokenUid. +type PatchOcpiTokensCountryCodePartyIdTokenUidParamsType string + +// PutOcpiTokensCountryCodePartyIdTokenUidParams defines parameters for PutOcpiTokensCountryCodePartyIdTokenUid. +type PutOcpiTokensCountryCodePartyIdTokenUidParams struct { + // Type Token.type of the Token to retrieve. Default if omitted: RFID + Type *PutOcpiTokensCountryCodePartyIdTokenUidParamsType `form:"type,omitempty" json:"type,omitempty"` +} + +// PutOcpiTokensCountryCodePartyIdTokenUidParamsType defines parameters for PutOcpiTokensCountryCodePartyIdTokenUid. +type PutOcpiTokensCountryCodePartyIdTokenUidParamsType string + +// PostOcpiTokenUidAuthorizeParams defines parameters for PostOcpiTokenUidAuthorize. +type PostOcpiTokenUidAuthorizeParams struct { + // Type Token.type of the Token to retrieve. Default if omitted: RFID + Type *PostOcpiTokenUidAuthorizeParamsType `form:"type,omitempty" json:"type,omitempty"` +} + +// PostOcpiTokenUidAuthorizeParamsType defines parameters for PostOcpiTokenUidAuthorize. +type PostOcpiTokenUidAuthorizeParamsType string + +// PostOcpi221CredentialsJSONRequestBody defines body for PostOcpi221Credentials for application/json ContentType. +type PostOcpi221CredentialsJSONRequestBody = Credentials + +// PutOcpi221CredentialsJSONRequestBody defines body for PutOcpi221Credentials for application/json ContentType. +type PutOcpi221CredentialsJSONRequestBody = Credentials + +// PostOcpiCdrsJSONRequestBody defines body for PostOcpiCdrs for application/json ContentType. +type PostOcpiCdrsJSONRequestBody = CdrBody + +// PostOcpiChargingprofileJSONRequestBody defines body for PostOcpiChargingprofile for application/json ContentType. +type PostOcpiChargingprofileJSONRequestBody = OcpiChargingprofilePostRequest + +// PutOcpiChargingprofileSessionIdJSONRequestBody defines body for PutOcpiChargingprofileSessionId for application/json ContentType. +type PutOcpiChargingprofileSessionIdJSONRequestBody = ActiveChargingProfile + +// PutOcpiChargingprofilesSessionIdJSONRequestBody defines body for PutOcpiChargingprofilesSessionId for application/json ContentType. +type PutOcpiChargingprofilesSessionIdJSONRequestBody = SetChargingProfile + +// PutOcpiClientinfoCountryCodePartyIdJSONRequestBody defines body for PutOcpiClientinfoCountryCodePartyId for application/json ContentType. +type PutOcpiClientinfoCountryCodePartyIdJSONRequestBody = ClientInfo + +// PostOcpiCommandsCommandJSONRequestBody defines body for PostOcpiCommandsCommand for application/json ContentType. +type PostOcpiCommandsCommandJSONRequestBody = OcpiCommandsCommandPostRequest + +// PostOcpiCommandsCommandUidJSONRequestBody defines body for PostOcpiCommandsCommandUid for application/json ContentType. +type PostOcpiCommandsCommandUidJSONRequestBody = CommandResult + +// PutOcpiLocationsCountryCodePartyIdLocationIdJSONRequestBody defines body for PutOcpiLocationsCountryCodePartyIdLocationId for application/json ContentType. +type PutOcpiLocationsCountryCodePartyIdLocationIdJSONRequestBody = OcpiLocationsLocationIdGet200Response + +// PutOcpiSessionsCountryCodePartyIdSessionIdJSONRequestBody defines body for PutOcpiSessionsCountryCodePartyIdSessionId for application/json ContentType. +type PutOcpiSessionsCountryCodePartyIdSessionIdJSONRequestBody = Session + +// PutOcpiSessionsSessionIdChargingPreferencesJSONRequestBody defines body for PutOcpiSessionsSessionIdChargingPreferences for application/json ContentType. +type PutOcpiSessionsSessionIdChargingPreferencesJSONRequestBody = ChargingPreferences + +// PutOcpiTariffsCountryCodePartyIdTariffIdJSONRequestBody defines body for PutOcpiTariffsCountryCodePartyIdTariffId for application/json ContentType. +type PutOcpiTariffsCountryCodePartyIdTariffIdJSONRequestBody = Tariff + +// PutOcpiTokensCountryCodePartyIdTokenUidJSONRequestBody defines body for PutOcpiTokensCountryCodePartyIdTokenUid for application/json ContentType. +type PutOcpiTokensCountryCodePartyIdTokenUidJSONRequestBody = Token + +// PostOcpiTokenUidAuthorizeJSONRequestBody defines body for PostOcpiTokenUidAuthorize for application/json ContentType. +type PostOcpiTokenUidAuthorizeJSONRequestBody = LocationReferences + +// AsActiveChargingProfileResult returns the union data inside the OcpiChargingprofilePostRequest as a ActiveChargingProfileResult +func (t OcpiChargingprofilePostRequest) AsActiveChargingProfileResult() (ActiveChargingProfileResult, error) { + var body ActiveChargingProfileResult + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromActiveChargingProfileResult overwrites any union data inside the OcpiChargingprofilePostRequest as the provided ActiveChargingProfileResult +func (t *OcpiChargingprofilePostRequest) FromActiveChargingProfileResult(v ActiveChargingProfileResult) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeActiveChargingProfileResult performs a merge with any union data inside the OcpiChargingprofilePostRequest, using the provided ActiveChargingProfileResult +func (t *OcpiChargingprofilePostRequest) MergeActiveChargingProfileResult(v ActiveChargingProfileResult) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsChargingProfileResult returns the union data inside the OcpiChargingprofilePostRequest as a ChargingProfileResult +func (t OcpiChargingprofilePostRequest) AsChargingProfileResult() (ChargingProfileResult, error) { + var body ChargingProfileResult + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromChargingProfileResult overwrites any union data inside the OcpiChargingprofilePostRequest as the provided ChargingProfileResult +func (t *OcpiChargingprofilePostRequest) FromChargingProfileResult(v ChargingProfileResult) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeChargingProfileResult performs a merge with any union data inside the OcpiChargingprofilePostRequest, using the provided ChargingProfileResult +func (t *OcpiChargingprofilePostRequest) MergeChargingProfileResult(v ChargingProfileResult) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsClearProfileResult returns the union data inside the OcpiChargingprofilePostRequest as a ClearProfileResult +func (t OcpiChargingprofilePostRequest) AsClearProfileResult() (ClearProfileResult, error) { + var body ClearProfileResult + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromClearProfileResult overwrites any union data inside the OcpiChargingprofilePostRequest as the provided ClearProfileResult +func (t *OcpiChargingprofilePostRequest) FromClearProfileResult(v ClearProfileResult) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeClearProfileResult performs a merge with any union data inside the OcpiChargingprofilePostRequest, using the provided ClearProfileResult +func (t *OcpiChargingprofilePostRequest) MergeClearProfileResult(v ClearProfileResult) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +func (t OcpiChargingprofilePostRequest) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OcpiChargingprofilePostRequest) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsCancelReservation returns the union data inside the OcpiCommandsCommandPostRequest as a CancelReservation +func (t OcpiCommandsCommandPostRequest) AsCancelReservation() (CancelReservation, error) { + var body CancelReservation + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCancelReservation overwrites any union data inside the OcpiCommandsCommandPostRequest as the provided CancelReservation +func (t *OcpiCommandsCommandPostRequest) FromCancelReservation(v CancelReservation) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCancelReservation performs a merge with any union data inside the OcpiCommandsCommandPostRequest, using the provided CancelReservation +func (t *OcpiCommandsCommandPostRequest) MergeCancelReservation(v CancelReservation) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsReserveNow returns the union data inside the OcpiCommandsCommandPostRequest as a ReserveNow +func (t OcpiCommandsCommandPostRequest) AsReserveNow() (ReserveNow, error) { + var body ReserveNow + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromReserveNow overwrites any union data inside the OcpiCommandsCommandPostRequest as the provided ReserveNow +func (t *OcpiCommandsCommandPostRequest) FromReserveNow(v ReserveNow) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeReserveNow performs a merge with any union data inside the OcpiCommandsCommandPostRequest, using the provided ReserveNow +func (t *OcpiCommandsCommandPostRequest) MergeReserveNow(v ReserveNow) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsStartSession returns the union data inside the OcpiCommandsCommandPostRequest as a StartSession +func (t OcpiCommandsCommandPostRequest) AsStartSession() (StartSession, error) { + var body StartSession + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromStartSession overwrites any union data inside the OcpiCommandsCommandPostRequest as the provided StartSession +func (t *OcpiCommandsCommandPostRequest) FromStartSession(v StartSession) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeStartSession performs a merge with any union data inside the OcpiCommandsCommandPostRequest, using the provided StartSession +func (t *OcpiCommandsCommandPostRequest) MergeStartSession(v StartSession) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsStopSession returns the union data inside the OcpiCommandsCommandPostRequest as a StopSession +func (t OcpiCommandsCommandPostRequest) AsStopSession() (StopSession, error) { + var body StopSession + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromStopSession overwrites any union data inside the OcpiCommandsCommandPostRequest as the provided StopSession +func (t *OcpiCommandsCommandPostRequest) FromStopSession(v StopSession) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeStopSession performs a merge with any union data inside the OcpiCommandsCommandPostRequest, using the provided StopSession +func (t *OcpiCommandsCommandPostRequest) MergeStopSession(v StopSession) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsUnlockConnector returns the union data inside the OcpiCommandsCommandPostRequest as a UnlockConnector +func (t OcpiCommandsCommandPostRequest) AsUnlockConnector() (UnlockConnector, error) { + var body UnlockConnector + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromUnlockConnector overwrites any union data inside the OcpiCommandsCommandPostRequest as the provided UnlockConnector +func (t *OcpiCommandsCommandPostRequest) FromUnlockConnector(v UnlockConnector) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeUnlockConnector performs a merge with any union data inside the OcpiCommandsCommandPostRequest, using the provided UnlockConnector +func (t *OcpiCommandsCommandPostRequest) MergeUnlockConnector(v UnlockConnector) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +func (t OcpiCommandsCommandPostRequest) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OcpiCommandsCommandPostRequest) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsLocations returns the union data inside the OcpiLocationsLocationIdGet200Response as a Locations +func (t OcpiLocationsLocationIdGet200Response) AsLocations() (Locations, error) { + var body Locations + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromLocations overwrites any union data inside the OcpiLocationsLocationIdGet200Response as the provided Locations +func (t *OcpiLocationsLocationIdGet200Response) FromLocations(v Locations) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeLocations performs a merge with any union data inside the OcpiLocationsLocationIdGet200Response, using the provided Locations +func (t *OcpiLocationsLocationIdGet200Response) MergeLocations(v Locations) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsEvse returns the union data inside the OcpiLocationsLocationIdGet200Response as a Evse +func (t OcpiLocationsLocationIdGet200Response) AsEvse() (Evse, error) { + var body Evse + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromEvse overwrites any union data inside the OcpiLocationsLocationIdGet200Response as the provided Evse +func (t *OcpiLocationsLocationIdGet200Response) FromEvse(v Evse) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeEvse performs a merge with any union data inside the OcpiLocationsLocationIdGet200Response, using the provided Evse +func (t *OcpiLocationsLocationIdGet200Response) MergeEvse(v Evse) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsConnector returns the union data inside the OcpiLocationsLocationIdGet200Response as a Connector +func (t OcpiLocationsLocationIdGet200Response) AsConnector() (Connector, error) { + var body Connector + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromConnector overwrites any union data inside the OcpiLocationsLocationIdGet200Response as the provided Connector +func (t *OcpiLocationsLocationIdGet200Response) FromConnector(v Connector) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeConnector performs a merge with any union data inside the OcpiLocationsLocationIdGet200Response, using the provided Connector +func (t *OcpiLocationsLocationIdGet200Response) MergeConnector(v Connector) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +func (t OcpiLocationsLocationIdGet200Response) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OcpiLocationsLocationIdGet200Response) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// RequestEditorFn is the function signature for the RequestEditor callback function +type RequestEditorFn func(ctx context.Context, req *http.Request) error + +// Doer performs HTTP requests. +// +// The standard http.Client implements this interface. +type HttpRequestDoer interface { + Do(req *http.Request) (*http.Response, error) +} + +// Client which conforms to the OpenAPI3 specification for this service. +type Client struct { + // The endpoint of the server conforming to this interface, with scheme, + // https://api.deepmap.com for example. This can contain a path relative + // to the server, such as https://api.deepmap.com/dev-test, and all the + // paths in the swagger spec will be appended to the server. + Server string + + // Doer for performing requests, typically a *http.Client with any + // customized settings, such as certificate chains. + Client HttpRequestDoer + + // A list of callbacks for modifying requests which are generated before sending over + // the network. + RequestEditors []RequestEditorFn +} + +// ClientOption allows setting custom parameters during construction +type ClientOption func(*Client) error + +// Creates a new Client, with reasonable defaults +func NewClient(server string, opts ...ClientOption) (*Client, error) { + // create a client with sane default values + client := Client{ + Server: server, + } + // mutate client and add all optional params + for _, o := range opts { + if err := o(&client); err != nil { + return nil, err + } + } + // ensure the server URL always has a trailing slash + if !strings.HasSuffix(client.Server, "/") { + client.Server += "/" + } + // create httpClient, if not already present + if client.Client == nil { + client.Client = &http.Client{} + } + return &client, nil +} + +// WithHTTPClient allows overriding the default Doer, which is +// automatically created using http.Client. This is useful for tests. +func WithHTTPClient(doer HttpRequestDoer) ClientOption { + return func(c *Client) error { + c.Client = doer + return nil + } +} + +// WithRequestEditorFn allows setting up a callback function, which will be +// called right before sending the request. This can be used to mutate the request. +func WithRequestEditorFn(fn RequestEditorFn) ClientOption { + return func(c *Client) error { + c.RequestEditors = append(c.RequestEditors, fn) + return nil + } +} + +// The interface specification for the client above. +type ClientInterface interface { + // DeleteOcpi221Credentials request + DeleteOcpi221Credentials(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOcpi221Credentials request + GetOcpi221Credentials(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOcpi221Credentials request with any body + PostOcpi221CredentialsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOcpi221Credentials(ctx context.Context, body PostOcpi221CredentialsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutOcpi221Credentials request with any body + PutOcpi221CredentialsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutOcpi221Credentials(ctx context.Context, body PutOcpi221CredentialsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOcpi221Details request + GetOcpi221Details(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOcpiCdrs request + GetOcpiCdrs(ctx context.Context, params *GetOcpiCdrsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOcpiCdrs request with any body + PostOcpiCdrsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOcpiCdrs(ctx context.Context, body PostOcpiCdrsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOcpiChargingprofile request with any body + PostOcpiChargingprofileWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOcpiChargingprofile(ctx context.Context, body PostOcpiChargingprofileJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutOcpiChargingprofileSessionId request with any body + PutOcpiChargingprofileSessionIdWithBody(ctx context.Context, sessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutOcpiChargingprofileSessionId(ctx context.Context, sessionId string, body PutOcpiChargingprofileSessionIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutOcpiChargingprofilesSessionId request with any body + PutOcpiChargingprofilesSessionIdWithBody(ctx context.Context, sessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutOcpiChargingprofilesSessionId(ctx context.Context, sessionId string, body PutOcpiChargingprofilesSessionIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOcpiChargingprofilesSessionIdDurationResponseUrl request + GetOcpiChargingprofilesSessionIdDurationResponseUrl(ctx context.Context, sessionId string, duration int, responseUrl string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteOcpiChargingprofilesSessionIdResponseUrl request + DeleteOcpiChargingprofilesSessionIdResponseUrl(ctx context.Context, sessionId string, responseUrl string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOcpiClientinfoCountryCodePartyId request + GetOcpiClientinfoCountryCodePartyId(ctx context.Context, countryCode string, partyId string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutOcpiClientinfoCountryCodePartyId request with any body + PutOcpiClientinfoCountryCodePartyIdWithBody(ctx context.Context, countryCode string, partyId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutOcpiClientinfoCountryCodePartyId(ctx context.Context, countryCode string, partyId string, body PutOcpiClientinfoCountryCodePartyIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOcpiCommandsCommand request with any body + PostOcpiCommandsCommandWithBody(ctx context.Context, command PostOcpiCommandsCommandParamsCommand, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOcpiCommandsCommand(ctx context.Context, command PostOcpiCommandsCommandParamsCommand, body PostOcpiCommandsCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOcpiCommandsCommandUid request with any body + PostOcpiCommandsCommandUidWithBody(ctx context.Context, command PostOcpiCommandsCommandUidParamsCommand, uid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOcpiCommandsCommandUid(ctx context.Context, command PostOcpiCommandsCommandUidParamsCommand, uid string, body PostOcpiCommandsCommandUidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOcpiHubclientinfo request + GetOcpiHubclientinfo(ctx context.Context, params *GetOcpiHubclientinfoParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOcpiLocations request + GetOcpiLocations(ctx context.Context, params *GetOcpiLocationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOcpiLocationsCountryCodePartyIdLocationId request + GetOcpiLocationsCountryCodePartyIdLocationId(ctx context.Context, countryCode string, partyId string, locationId string, params *GetOcpiLocationsCountryCodePartyIdLocationIdParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchOcpiLocationsCountryCodePartyIdLocationId request + PatchOcpiLocationsCountryCodePartyIdLocationId(ctx context.Context, countryCode string, partyId string, locationId string, params *PatchOcpiLocationsCountryCodePartyIdLocationIdParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutOcpiLocationsCountryCodePartyIdLocationId request with any body + PutOcpiLocationsCountryCodePartyIdLocationIdWithBody(ctx context.Context, countryCode string, partyId string, locationId string, params *PutOcpiLocationsCountryCodePartyIdLocationIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutOcpiLocationsCountryCodePartyIdLocationId(ctx context.Context, countryCode string, partyId string, locationId string, params *PutOcpiLocationsCountryCodePartyIdLocationIdParams, body PutOcpiLocationsCountryCodePartyIdLocationIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOcpiLocationsLocationId request + GetOcpiLocationsLocationId(ctx context.Context, locationId string, params *GetOcpiLocationsLocationIdParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOcpiSessions request + GetOcpiSessions(ctx context.Context, params *GetOcpiSessionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOcpiSessionsCountryCodePartyIdSessionId request + GetOcpiSessionsCountryCodePartyIdSessionId(ctx context.Context, countryCode string, partyId string, sessionId string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchOcpiSessionsCountryCodePartyIdSessionId request + PatchOcpiSessionsCountryCodePartyIdSessionId(ctx context.Context, countryCode string, partyId string, sessionId string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutOcpiSessionsCountryCodePartyIdSessionId request with any body + PutOcpiSessionsCountryCodePartyIdSessionIdWithBody(ctx context.Context, countryCode string, partyId string, sessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutOcpiSessionsCountryCodePartyIdSessionId(ctx context.Context, countryCode string, partyId string, sessionId string, body PutOcpiSessionsCountryCodePartyIdSessionIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutOcpiSessionsSessionIdChargingPreferences request with any body + PutOcpiSessionsSessionIdChargingPreferencesWithBody(ctx context.Context, sessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutOcpiSessionsSessionIdChargingPreferences(ctx context.Context, sessionId string, body PutOcpiSessionsSessionIdChargingPreferencesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOcpiTariffs request + GetOcpiTariffs(ctx context.Context, params *GetOcpiTariffsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteOcpiTariffsCountryCodePartyIdTariffId request + DeleteOcpiTariffsCountryCodePartyIdTariffId(ctx context.Context, countryCode string, partyId string, tariffId string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOcpiTariffsCountryCodePartyIdTariffId request + GetOcpiTariffsCountryCodePartyIdTariffId(ctx context.Context, countryCode string, partyId string, tariffId string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutOcpiTariffsCountryCodePartyIdTariffId request with any body + PutOcpiTariffsCountryCodePartyIdTariffIdWithBody(ctx context.Context, countryCode string, partyId string, tariffId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutOcpiTariffsCountryCodePartyIdTariffId(ctx context.Context, countryCode string, partyId string, tariffId string, body PutOcpiTariffsCountryCodePartyIdTariffIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOcpiTokens request + GetOcpiTokens(ctx context.Context, params *GetOcpiTokensParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOcpiTokensCountryCodePartyIdTokenUid request + GetOcpiTokensCountryCodePartyIdTokenUid(ctx context.Context, countryCode string, partyId string, tokenUid string, params *GetOcpiTokensCountryCodePartyIdTokenUidParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchOcpiTokensCountryCodePartyIdTokenUid request + PatchOcpiTokensCountryCodePartyIdTokenUid(ctx context.Context, countryCode string, partyId string, tokenUid string, params *PatchOcpiTokensCountryCodePartyIdTokenUidParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutOcpiTokensCountryCodePartyIdTokenUid request with any body + PutOcpiTokensCountryCodePartyIdTokenUidWithBody(ctx context.Context, countryCode string, partyId string, tokenUid string, params *PutOcpiTokensCountryCodePartyIdTokenUidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutOcpiTokensCountryCodePartyIdTokenUid(ctx context.Context, countryCode string, partyId string, tokenUid string, params *PutOcpiTokensCountryCodePartyIdTokenUidParams, body PutOcpiTokensCountryCodePartyIdTokenUidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOcpiVersions request + GetOcpiVersions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOcpiTokenUidAuthorize request with any body + PostOcpiTokenUidAuthorizeWithBody(ctx context.Context, tokenUid string, params *PostOcpiTokenUidAuthorizeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOcpiTokenUidAuthorize(ctx context.Context, tokenUid string, params *PostOcpiTokenUidAuthorizeParams, body PostOcpiTokenUidAuthorizeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +} + +func (c *Client) DeleteOcpi221Credentials(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteOcpi221CredentialsRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOcpi221Credentials(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOcpi221CredentialsRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOcpi221CredentialsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOcpi221CredentialsRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOcpi221Credentials(ctx context.Context, body PostOcpi221CredentialsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOcpi221CredentialsRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutOcpi221CredentialsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutOcpi221CredentialsRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutOcpi221Credentials(ctx context.Context, body PutOcpi221CredentialsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutOcpi221CredentialsRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOcpi221Details(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOcpi221DetailsRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOcpiCdrs(ctx context.Context, params *GetOcpiCdrsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOcpiCdrsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOcpiCdrsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOcpiCdrsRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOcpiCdrs(ctx context.Context, body PostOcpiCdrsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOcpiCdrsRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOcpiChargingprofileWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOcpiChargingprofileRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOcpiChargingprofile(ctx context.Context, body PostOcpiChargingprofileJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOcpiChargingprofileRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutOcpiChargingprofileSessionIdWithBody(ctx context.Context, sessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutOcpiChargingprofileSessionIdRequestWithBody(c.Server, sessionId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutOcpiChargingprofileSessionId(ctx context.Context, sessionId string, body PutOcpiChargingprofileSessionIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutOcpiChargingprofileSessionIdRequest(c.Server, sessionId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutOcpiChargingprofilesSessionIdWithBody(ctx context.Context, sessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutOcpiChargingprofilesSessionIdRequestWithBody(c.Server, sessionId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutOcpiChargingprofilesSessionId(ctx context.Context, sessionId string, body PutOcpiChargingprofilesSessionIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutOcpiChargingprofilesSessionIdRequest(c.Server, sessionId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOcpiChargingprofilesSessionIdDurationResponseUrl(ctx context.Context, sessionId string, duration int, responseUrl string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOcpiChargingprofilesSessionIdDurationResponseUrlRequest(c.Server, sessionId, duration, responseUrl) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteOcpiChargingprofilesSessionIdResponseUrl(ctx context.Context, sessionId string, responseUrl string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteOcpiChargingprofilesSessionIdResponseUrlRequest(c.Server, sessionId, responseUrl) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOcpiClientinfoCountryCodePartyId(ctx context.Context, countryCode string, partyId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOcpiClientinfoCountryCodePartyIdRequest(c.Server, countryCode, partyId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutOcpiClientinfoCountryCodePartyIdWithBody(ctx context.Context, countryCode string, partyId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutOcpiClientinfoCountryCodePartyIdRequestWithBody(c.Server, countryCode, partyId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutOcpiClientinfoCountryCodePartyId(ctx context.Context, countryCode string, partyId string, body PutOcpiClientinfoCountryCodePartyIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutOcpiClientinfoCountryCodePartyIdRequest(c.Server, countryCode, partyId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOcpiCommandsCommandWithBody(ctx context.Context, command PostOcpiCommandsCommandParamsCommand, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOcpiCommandsCommandRequestWithBody(c.Server, command, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOcpiCommandsCommand(ctx context.Context, command PostOcpiCommandsCommandParamsCommand, body PostOcpiCommandsCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOcpiCommandsCommandRequest(c.Server, command, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOcpiCommandsCommandUidWithBody(ctx context.Context, command PostOcpiCommandsCommandUidParamsCommand, uid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOcpiCommandsCommandUidRequestWithBody(c.Server, command, uid, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOcpiCommandsCommandUid(ctx context.Context, command PostOcpiCommandsCommandUidParamsCommand, uid string, body PostOcpiCommandsCommandUidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOcpiCommandsCommandUidRequest(c.Server, command, uid, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOcpiHubclientinfo(ctx context.Context, params *GetOcpiHubclientinfoParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOcpiHubclientinfoRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOcpiLocations(ctx context.Context, params *GetOcpiLocationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOcpiLocationsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOcpiLocationsCountryCodePartyIdLocationId(ctx context.Context, countryCode string, partyId string, locationId string, params *GetOcpiLocationsCountryCodePartyIdLocationIdParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOcpiLocationsCountryCodePartyIdLocationIdRequest(c.Server, countryCode, partyId, locationId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchOcpiLocationsCountryCodePartyIdLocationId(ctx context.Context, countryCode string, partyId string, locationId string, params *PatchOcpiLocationsCountryCodePartyIdLocationIdParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchOcpiLocationsCountryCodePartyIdLocationIdRequest(c.Server, countryCode, partyId, locationId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutOcpiLocationsCountryCodePartyIdLocationIdWithBody(ctx context.Context, countryCode string, partyId string, locationId string, params *PutOcpiLocationsCountryCodePartyIdLocationIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutOcpiLocationsCountryCodePartyIdLocationIdRequestWithBody(c.Server, countryCode, partyId, locationId, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutOcpiLocationsCountryCodePartyIdLocationId(ctx context.Context, countryCode string, partyId string, locationId string, params *PutOcpiLocationsCountryCodePartyIdLocationIdParams, body PutOcpiLocationsCountryCodePartyIdLocationIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutOcpiLocationsCountryCodePartyIdLocationIdRequest(c.Server, countryCode, partyId, locationId, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOcpiLocationsLocationId(ctx context.Context, locationId string, params *GetOcpiLocationsLocationIdParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOcpiLocationsLocationIdRequest(c.Server, locationId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOcpiSessions(ctx context.Context, params *GetOcpiSessionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOcpiSessionsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOcpiSessionsCountryCodePartyIdSessionId(ctx context.Context, countryCode string, partyId string, sessionId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOcpiSessionsCountryCodePartyIdSessionIdRequest(c.Server, countryCode, partyId, sessionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchOcpiSessionsCountryCodePartyIdSessionId(ctx context.Context, countryCode string, partyId string, sessionId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchOcpiSessionsCountryCodePartyIdSessionIdRequest(c.Server, countryCode, partyId, sessionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutOcpiSessionsCountryCodePartyIdSessionIdWithBody(ctx context.Context, countryCode string, partyId string, sessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutOcpiSessionsCountryCodePartyIdSessionIdRequestWithBody(c.Server, countryCode, partyId, sessionId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutOcpiSessionsCountryCodePartyIdSessionId(ctx context.Context, countryCode string, partyId string, sessionId string, body PutOcpiSessionsCountryCodePartyIdSessionIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutOcpiSessionsCountryCodePartyIdSessionIdRequest(c.Server, countryCode, partyId, sessionId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutOcpiSessionsSessionIdChargingPreferencesWithBody(ctx context.Context, sessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutOcpiSessionsSessionIdChargingPreferencesRequestWithBody(c.Server, sessionId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutOcpiSessionsSessionIdChargingPreferences(ctx context.Context, sessionId string, body PutOcpiSessionsSessionIdChargingPreferencesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutOcpiSessionsSessionIdChargingPreferencesRequest(c.Server, sessionId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOcpiTariffs(ctx context.Context, params *GetOcpiTariffsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOcpiTariffsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteOcpiTariffsCountryCodePartyIdTariffId(ctx context.Context, countryCode string, partyId string, tariffId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteOcpiTariffsCountryCodePartyIdTariffIdRequest(c.Server, countryCode, partyId, tariffId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOcpiTariffsCountryCodePartyIdTariffId(ctx context.Context, countryCode string, partyId string, tariffId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOcpiTariffsCountryCodePartyIdTariffIdRequest(c.Server, countryCode, partyId, tariffId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutOcpiTariffsCountryCodePartyIdTariffIdWithBody(ctx context.Context, countryCode string, partyId string, tariffId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutOcpiTariffsCountryCodePartyIdTariffIdRequestWithBody(c.Server, countryCode, partyId, tariffId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutOcpiTariffsCountryCodePartyIdTariffId(ctx context.Context, countryCode string, partyId string, tariffId string, body PutOcpiTariffsCountryCodePartyIdTariffIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutOcpiTariffsCountryCodePartyIdTariffIdRequest(c.Server, countryCode, partyId, tariffId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOcpiTokens(ctx context.Context, params *GetOcpiTokensParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOcpiTokensRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOcpiTokensCountryCodePartyIdTokenUid(ctx context.Context, countryCode string, partyId string, tokenUid string, params *GetOcpiTokensCountryCodePartyIdTokenUidParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOcpiTokensCountryCodePartyIdTokenUidRequest(c.Server, countryCode, partyId, tokenUid, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchOcpiTokensCountryCodePartyIdTokenUid(ctx context.Context, countryCode string, partyId string, tokenUid string, params *PatchOcpiTokensCountryCodePartyIdTokenUidParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchOcpiTokensCountryCodePartyIdTokenUidRequest(c.Server, countryCode, partyId, tokenUid, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutOcpiTokensCountryCodePartyIdTokenUidWithBody(ctx context.Context, countryCode string, partyId string, tokenUid string, params *PutOcpiTokensCountryCodePartyIdTokenUidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutOcpiTokensCountryCodePartyIdTokenUidRequestWithBody(c.Server, countryCode, partyId, tokenUid, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutOcpiTokensCountryCodePartyIdTokenUid(ctx context.Context, countryCode string, partyId string, tokenUid string, params *PutOcpiTokensCountryCodePartyIdTokenUidParams, body PutOcpiTokensCountryCodePartyIdTokenUidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutOcpiTokensCountryCodePartyIdTokenUidRequest(c.Server, countryCode, partyId, tokenUid, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOcpiVersions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOcpiVersionsRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOcpiTokenUidAuthorizeWithBody(ctx context.Context, tokenUid string, params *PostOcpiTokenUidAuthorizeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOcpiTokenUidAuthorizeRequestWithBody(c.Server, tokenUid, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOcpiTokenUidAuthorize(ctx context.Context, tokenUid string, params *PostOcpiTokenUidAuthorizeParams, body PostOcpiTokenUidAuthorizeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOcpiTokenUidAuthorizeRequest(c.Server, tokenUid, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewDeleteOcpi221CredentialsRequest generates requests for DeleteOcpi221Credentials +func NewDeleteOcpi221CredentialsRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/2.2.1/credentials") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOcpi221CredentialsRequest generates requests for GetOcpi221Credentials +func NewGetOcpi221CredentialsRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/2.2.1/credentials") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostOcpi221CredentialsRequest calls the generic PostOcpi221Credentials builder with application/json body +func NewPostOcpi221CredentialsRequest(server string, body PostOcpi221CredentialsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOcpi221CredentialsRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostOcpi221CredentialsRequestWithBody generates requests for PostOcpi221Credentials with any type of body +func NewPostOcpi221CredentialsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/2.2.1/credentials") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPutOcpi221CredentialsRequest calls the generic PutOcpi221Credentials builder with application/json body +func NewPutOcpi221CredentialsRequest(server string, body PutOcpi221CredentialsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutOcpi221CredentialsRequestWithBody(server, "application/json", bodyReader) +} + +// NewPutOcpi221CredentialsRequestWithBody generates requests for PutOcpi221Credentials with any type of body +func NewPutOcpi221CredentialsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/2.2.1/credentials") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetOcpi221DetailsRequest generates requests for GetOcpi221Details +func NewGetOcpi221DetailsRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/2.2.1/details") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOcpiCdrsRequest generates requests for GetOcpiCdrs +func NewGetOcpiCdrsRequest(server string, params *GetOcpiCdrsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/cdrs") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.DateFrom != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "date_from", runtime.ParamLocationQuery, *params.DateFrom); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DateTo != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "date_to", runtime.ParamLocationQuery, *params.DateTo); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostOcpiCdrsRequest calls the generic PostOcpiCdrs builder with application/json body +func NewPostOcpiCdrsRequest(server string, body PostOcpiCdrsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOcpiCdrsRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostOcpiCdrsRequestWithBody generates requests for PostOcpiCdrs with any type of body +func NewPostOcpiCdrsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/cdrs") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPostOcpiChargingprofileRequest calls the generic PostOcpiChargingprofile builder with application/json body +func NewPostOcpiChargingprofileRequest(server string, body PostOcpiChargingprofileJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOcpiChargingprofileRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostOcpiChargingprofileRequestWithBody generates requests for PostOcpiChargingprofile with any type of body +func NewPostOcpiChargingprofileRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/chargingprofile") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPutOcpiChargingprofileSessionIdRequest calls the generic PutOcpiChargingprofileSessionId builder with application/json body +func NewPutOcpiChargingprofileSessionIdRequest(server string, sessionId string, body PutOcpiChargingprofileSessionIdJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutOcpiChargingprofileSessionIdRequestWithBody(server, sessionId, "application/json", bodyReader) +} + +// NewPutOcpiChargingprofileSessionIdRequestWithBody generates requests for PutOcpiChargingprofileSessionId with any type of body +func NewPutOcpiChargingprofileSessionIdRequestWithBody(server string, sessionId string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "session_id", runtime.ParamLocationPath, sessionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/chargingprofile/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPutOcpiChargingprofilesSessionIdRequest calls the generic PutOcpiChargingprofilesSessionId builder with application/json body +func NewPutOcpiChargingprofilesSessionIdRequest(server string, sessionId string, body PutOcpiChargingprofilesSessionIdJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutOcpiChargingprofilesSessionIdRequestWithBody(server, sessionId, "application/json", bodyReader) +} + +// NewPutOcpiChargingprofilesSessionIdRequestWithBody generates requests for PutOcpiChargingprofilesSessionId with any type of body +func NewPutOcpiChargingprofilesSessionIdRequestWithBody(server string, sessionId string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "session_id", runtime.ParamLocationPath, sessionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/chargingprofiles/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetOcpiChargingprofilesSessionIdDurationResponseUrlRequest generates requests for GetOcpiChargingprofilesSessionIdDurationResponseUrl +func NewGetOcpiChargingprofilesSessionIdDurationResponseUrlRequest(server string, sessionId string, duration int, responseUrl string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "session_id", runtime.ParamLocationPath, sessionId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "duration", runtime.ParamLocationPath, duration) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "response_url", runtime.ParamLocationPath, responseUrl) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/chargingprofiles/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteOcpiChargingprofilesSessionIdResponseUrlRequest generates requests for DeleteOcpiChargingprofilesSessionIdResponseUrl +func NewDeleteOcpiChargingprofilesSessionIdResponseUrlRequest(server string, sessionId string, responseUrl string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "session_id", runtime.ParamLocationPath, sessionId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "response_url", runtime.ParamLocationPath, responseUrl) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/chargingprofiles/%s/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOcpiClientinfoCountryCodePartyIdRequest generates requests for GetOcpiClientinfoCountryCodePartyId +func NewGetOcpiClientinfoCountryCodePartyIdRequest(server string, countryCode string, partyId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "country_code", runtime.ParamLocationPath, countryCode) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "party_id", runtime.ParamLocationPath, partyId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/clientinfo/%s/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPutOcpiClientinfoCountryCodePartyIdRequest calls the generic PutOcpiClientinfoCountryCodePartyId builder with application/json body +func NewPutOcpiClientinfoCountryCodePartyIdRequest(server string, countryCode string, partyId string, body PutOcpiClientinfoCountryCodePartyIdJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutOcpiClientinfoCountryCodePartyIdRequestWithBody(server, countryCode, partyId, "application/json", bodyReader) +} + +// NewPutOcpiClientinfoCountryCodePartyIdRequestWithBody generates requests for PutOcpiClientinfoCountryCodePartyId with any type of body +func NewPutOcpiClientinfoCountryCodePartyIdRequestWithBody(server string, countryCode string, partyId string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "country_code", runtime.ParamLocationPath, countryCode) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "party_id", runtime.ParamLocationPath, partyId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/clientinfo/%s/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPostOcpiCommandsCommandRequest calls the generic PostOcpiCommandsCommand builder with application/json body +func NewPostOcpiCommandsCommandRequest(server string, command PostOcpiCommandsCommandParamsCommand, body PostOcpiCommandsCommandJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOcpiCommandsCommandRequestWithBody(server, command, "application/json", bodyReader) +} + +// NewPostOcpiCommandsCommandRequestWithBody generates requests for PostOcpiCommandsCommand with any type of body +func NewPostOcpiCommandsCommandRequestWithBody(server string, command PostOcpiCommandsCommandParamsCommand, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "command", runtime.ParamLocationPath, command) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/commands/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPostOcpiCommandsCommandUidRequest calls the generic PostOcpiCommandsCommandUid builder with application/json body +func NewPostOcpiCommandsCommandUidRequest(server string, command PostOcpiCommandsCommandUidParamsCommand, uid string, body PostOcpiCommandsCommandUidJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOcpiCommandsCommandUidRequestWithBody(server, command, uid, "application/json", bodyReader) +} + +// NewPostOcpiCommandsCommandUidRequestWithBody generates requests for PostOcpiCommandsCommandUid with any type of body +func NewPostOcpiCommandsCommandUidRequestWithBody(server string, command PostOcpiCommandsCommandUidParamsCommand, uid string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "command", runtime.ParamLocationPath, command) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "uid", runtime.ParamLocationPath, uid) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/commands/%s/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetOcpiHubclientinfoRequest generates requests for GetOcpiHubclientinfo +func NewGetOcpiHubclientinfoRequest(server string, params *GetOcpiHubclientinfoParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/hubclientinfo") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.DateFrom != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "date_from", runtime.ParamLocationQuery, *params.DateFrom); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DateTo != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "date_to", runtime.ParamLocationQuery, *params.DateTo); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOcpiLocationsRequest generates requests for GetOcpiLocations +func NewGetOcpiLocationsRequest(server string, params *GetOcpiLocationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/locations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.DateFrom != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "date_from", runtime.ParamLocationQuery, *params.DateFrom); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DateTo != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "date_to", runtime.ParamLocationQuery, *params.DateTo); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOcpiLocationsCountryCodePartyIdLocationIdRequest generates requests for GetOcpiLocationsCountryCodePartyIdLocationId +func NewGetOcpiLocationsCountryCodePartyIdLocationIdRequest(server string, countryCode string, partyId string, locationId string, params *GetOcpiLocationsCountryCodePartyIdLocationIdParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "country_code", runtime.ParamLocationPath, countryCode) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "party_id", runtime.ParamLocationPath, partyId) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "location_id", runtime.ParamLocationPath, locationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/locations/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.EvseUid != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "evse_uid", runtime.ParamLocationQuery, *params.EvseUid); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ConnectorId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "connector_id", runtime.ParamLocationQuery, *params.ConnectorId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchOcpiLocationsCountryCodePartyIdLocationIdRequest generates requests for PatchOcpiLocationsCountryCodePartyIdLocationId +func NewPatchOcpiLocationsCountryCodePartyIdLocationIdRequest(server string, countryCode string, partyId string, locationId string, params *PatchOcpiLocationsCountryCodePartyIdLocationIdParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "country_code", runtime.ParamLocationPath, countryCode) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "party_id", runtime.ParamLocationPath, partyId) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "location_id", runtime.ParamLocationPath, locationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/locations/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.EvseUid != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "evse_uid", runtime.ParamLocationQuery, *params.EvseUid); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ConnectorId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "connector_id", runtime.ParamLocationQuery, *params.ConnectorId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("PATCH", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPutOcpiLocationsCountryCodePartyIdLocationIdRequest calls the generic PutOcpiLocationsCountryCodePartyIdLocationId builder with application/json body +func NewPutOcpiLocationsCountryCodePartyIdLocationIdRequest(server string, countryCode string, partyId string, locationId string, params *PutOcpiLocationsCountryCodePartyIdLocationIdParams, body PutOcpiLocationsCountryCodePartyIdLocationIdJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutOcpiLocationsCountryCodePartyIdLocationIdRequestWithBody(server, countryCode, partyId, locationId, params, "application/json", bodyReader) +} + +// NewPutOcpiLocationsCountryCodePartyIdLocationIdRequestWithBody generates requests for PutOcpiLocationsCountryCodePartyIdLocationId with any type of body +func NewPutOcpiLocationsCountryCodePartyIdLocationIdRequestWithBody(server string, countryCode string, partyId string, locationId string, params *PutOcpiLocationsCountryCodePartyIdLocationIdParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "country_code", runtime.ParamLocationPath, countryCode) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "party_id", runtime.ParamLocationPath, partyId) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "location_id", runtime.ParamLocationPath, locationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/locations/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.EvseUid != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "evse_uid", runtime.ParamLocationQuery, *params.EvseUid); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ConnectorId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "connector_id", runtime.ParamLocationQuery, *params.ConnectorId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetOcpiLocationsLocationIdRequest generates requests for GetOcpiLocationsLocationId +func NewGetOcpiLocationsLocationIdRequest(server string, locationId string, params *GetOcpiLocationsLocationIdParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "location_id", runtime.ParamLocationPath, locationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/locations/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.EvseUid != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "evse_uid", runtime.ParamLocationQuery, *params.EvseUid); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ConnectorId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "connector_id", runtime.ParamLocationQuery, *params.ConnectorId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOcpiSessionsRequest generates requests for GetOcpiSessions +func NewGetOcpiSessionsRequest(server string, params *GetOcpiSessionsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/sessions") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.DateFrom != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "date_from", runtime.ParamLocationQuery, *params.DateFrom); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DateTo != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "date_to", runtime.ParamLocationQuery, *params.DateTo); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOcpiSessionsCountryCodePartyIdSessionIdRequest generates requests for GetOcpiSessionsCountryCodePartyIdSessionId +func NewGetOcpiSessionsCountryCodePartyIdSessionIdRequest(server string, countryCode string, partyId string, sessionId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "country_code", runtime.ParamLocationPath, countryCode) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "party_id", runtime.ParamLocationPath, partyId) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "session_id", runtime.ParamLocationPath, sessionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/sessions/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchOcpiSessionsCountryCodePartyIdSessionIdRequest generates requests for PatchOcpiSessionsCountryCodePartyIdSessionId +func NewPatchOcpiSessionsCountryCodePartyIdSessionIdRequest(server string, countryCode string, partyId string, sessionId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "country_code", runtime.ParamLocationPath, countryCode) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "party_id", runtime.ParamLocationPath, partyId) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "session_id", runtime.ParamLocationPath, sessionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/sessions/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPutOcpiSessionsCountryCodePartyIdSessionIdRequest calls the generic PutOcpiSessionsCountryCodePartyIdSessionId builder with application/json body +func NewPutOcpiSessionsCountryCodePartyIdSessionIdRequest(server string, countryCode string, partyId string, sessionId string, body PutOcpiSessionsCountryCodePartyIdSessionIdJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutOcpiSessionsCountryCodePartyIdSessionIdRequestWithBody(server, countryCode, partyId, sessionId, "application/json", bodyReader) +} + +// NewPutOcpiSessionsCountryCodePartyIdSessionIdRequestWithBody generates requests for PutOcpiSessionsCountryCodePartyIdSessionId with any type of body +func NewPutOcpiSessionsCountryCodePartyIdSessionIdRequestWithBody(server string, countryCode string, partyId string, sessionId string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "country_code", runtime.ParamLocationPath, countryCode) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "party_id", runtime.ParamLocationPath, partyId) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "session_id", runtime.ParamLocationPath, sessionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/sessions/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPutOcpiSessionsSessionIdChargingPreferencesRequest calls the generic PutOcpiSessionsSessionIdChargingPreferences builder with application/json body +func NewPutOcpiSessionsSessionIdChargingPreferencesRequest(server string, sessionId string, body PutOcpiSessionsSessionIdChargingPreferencesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutOcpiSessionsSessionIdChargingPreferencesRequestWithBody(server, sessionId, "application/json", bodyReader) +} + +// NewPutOcpiSessionsSessionIdChargingPreferencesRequestWithBody generates requests for PutOcpiSessionsSessionIdChargingPreferences with any type of body +func NewPutOcpiSessionsSessionIdChargingPreferencesRequestWithBody(server string, sessionId string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "session_id", runtime.ParamLocationPath, sessionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/sessions/%s/charging_preferences", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetOcpiTariffsRequest generates requests for GetOcpiTariffs +func NewGetOcpiTariffsRequest(server string, params *GetOcpiTariffsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/tariffs") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.DateFrom != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "date_from", runtime.ParamLocationQuery, *params.DateFrom); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DateTo != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "date_to", runtime.ParamLocationQuery, *params.DateTo); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteOcpiTariffsCountryCodePartyIdTariffIdRequest generates requests for DeleteOcpiTariffsCountryCodePartyIdTariffId +func NewDeleteOcpiTariffsCountryCodePartyIdTariffIdRequest(server string, countryCode string, partyId string, tariffId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "country_code", runtime.ParamLocationPath, countryCode) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "party_id", runtime.ParamLocationPath, partyId) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "tariff_id", runtime.ParamLocationPath, tariffId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/tariffs/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOcpiTariffsCountryCodePartyIdTariffIdRequest generates requests for GetOcpiTariffsCountryCodePartyIdTariffId +func NewGetOcpiTariffsCountryCodePartyIdTariffIdRequest(server string, countryCode string, partyId string, tariffId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "country_code", runtime.ParamLocationPath, countryCode) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "party_id", runtime.ParamLocationPath, partyId) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "tariff_id", runtime.ParamLocationPath, tariffId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/tariffs/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPutOcpiTariffsCountryCodePartyIdTariffIdRequest calls the generic PutOcpiTariffsCountryCodePartyIdTariffId builder with application/json body +func NewPutOcpiTariffsCountryCodePartyIdTariffIdRequest(server string, countryCode string, partyId string, tariffId string, body PutOcpiTariffsCountryCodePartyIdTariffIdJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutOcpiTariffsCountryCodePartyIdTariffIdRequestWithBody(server, countryCode, partyId, tariffId, "application/json", bodyReader) +} + +// NewPutOcpiTariffsCountryCodePartyIdTariffIdRequestWithBody generates requests for PutOcpiTariffsCountryCodePartyIdTariffId with any type of body +func NewPutOcpiTariffsCountryCodePartyIdTariffIdRequestWithBody(server string, countryCode string, partyId string, tariffId string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "country_code", runtime.ParamLocationPath, countryCode) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "party_id", runtime.ParamLocationPath, partyId) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "tariff_id", runtime.ParamLocationPath, tariffId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/tariffs/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetOcpiTokensRequest generates requests for GetOcpiTokens +func NewGetOcpiTokensRequest(server string, params *GetOcpiTokensParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/tokens") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.DateFrom != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "date_from", runtime.ParamLocationQuery, *params.DateFrom); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DateTo != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "date_to", runtime.ParamLocationQuery, *params.DateTo); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOcpiTokensCountryCodePartyIdTokenUidRequest generates requests for GetOcpiTokensCountryCodePartyIdTokenUid +func NewGetOcpiTokensCountryCodePartyIdTokenUidRequest(server string, countryCode string, partyId string, tokenUid string, params *GetOcpiTokensCountryCodePartyIdTokenUidParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "country_code", runtime.ParamLocationPath, countryCode) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "party_id", runtime.ParamLocationPath, partyId) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "token_uid", runtime.ParamLocationPath, tokenUid) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/tokens/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.Type != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "type", runtime.ParamLocationQuery, *params.Type); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchOcpiTokensCountryCodePartyIdTokenUidRequest generates requests for PatchOcpiTokensCountryCodePartyIdTokenUid +func NewPatchOcpiTokensCountryCodePartyIdTokenUidRequest(server string, countryCode string, partyId string, tokenUid string, params *PatchOcpiTokensCountryCodePartyIdTokenUidParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "country_code", runtime.ParamLocationPath, countryCode) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "party_id", runtime.ParamLocationPath, partyId) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "token_uid", runtime.ParamLocationPath, tokenUid) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/tokens/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.Type != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "type", runtime.ParamLocationQuery, *params.Type); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("PATCH", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPutOcpiTokensCountryCodePartyIdTokenUidRequest calls the generic PutOcpiTokensCountryCodePartyIdTokenUid builder with application/json body +func NewPutOcpiTokensCountryCodePartyIdTokenUidRequest(server string, countryCode string, partyId string, tokenUid string, params *PutOcpiTokensCountryCodePartyIdTokenUidParams, body PutOcpiTokensCountryCodePartyIdTokenUidJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutOcpiTokensCountryCodePartyIdTokenUidRequestWithBody(server, countryCode, partyId, tokenUid, params, "application/json", bodyReader) +} + +// NewPutOcpiTokensCountryCodePartyIdTokenUidRequestWithBody generates requests for PutOcpiTokensCountryCodePartyIdTokenUid with any type of body +func NewPutOcpiTokensCountryCodePartyIdTokenUidRequestWithBody(server string, countryCode string, partyId string, tokenUid string, params *PutOcpiTokensCountryCodePartyIdTokenUidParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "country_code", runtime.ParamLocationPath, countryCode) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "party_id", runtime.ParamLocationPath, partyId) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "token_uid", runtime.ParamLocationPath, tokenUid) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/tokens/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.Type != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "type", runtime.ParamLocationQuery, *params.Type); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetOcpiVersionsRequest generates requests for GetOcpiVersions +func NewGetOcpiVersionsRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/versions") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostOcpiTokenUidAuthorizeRequest calls the generic PostOcpiTokenUidAuthorize builder with application/json body +func NewPostOcpiTokenUidAuthorizeRequest(server string, tokenUid string, params *PostOcpiTokenUidAuthorizeParams, body PostOcpiTokenUidAuthorizeJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOcpiTokenUidAuthorizeRequestWithBody(server, tokenUid, params, "application/json", bodyReader) +} + +// NewPostOcpiTokenUidAuthorizeRequestWithBody generates requests for PostOcpiTokenUidAuthorize with any type of body +func NewPostOcpiTokenUidAuthorizeRequestWithBody(server string, tokenUid string, params *PostOcpiTokenUidAuthorizeParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "token_uid", runtime.ParamLocationPath, tokenUid) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ocpi/%s/authorize", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.Type != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "type", runtime.ParamLocationQuery, *params.Type); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // DeleteOcpi221Credentials request + DeleteOcpi221CredentialsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DeleteOcpi221CredentialsResponse, error) + + // GetOcpi221Credentials request + GetOcpi221CredentialsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOcpi221CredentialsResponse, error) + + // PostOcpi221Credentials request with any body + PostOcpi221CredentialsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOcpi221CredentialsResponse, error) + + PostOcpi221CredentialsWithResponse(ctx context.Context, body PostOcpi221CredentialsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOcpi221CredentialsResponse, error) + + // PutOcpi221Credentials request with any body + PutOcpi221CredentialsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutOcpi221CredentialsResponse, error) + + PutOcpi221CredentialsWithResponse(ctx context.Context, body PutOcpi221CredentialsJSONRequestBody, reqEditors ...RequestEditorFn) (*PutOcpi221CredentialsResponse, error) + + // GetOcpi221Details request + GetOcpi221DetailsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOcpi221DetailsResponse, error) + + // GetOcpiCdrs request + GetOcpiCdrsWithResponse(ctx context.Context, params *GetOcpiCdrsParams, reqEditors ...RequestEditorFn) (*GetOcpiCdrsResponse, error) + + // PostOcpiCdrs request with any body + PostOcpiCdrsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOcpiCdrsResponse, error) + + PostOcpiCdrsWithResponse(ctx context.Context, body PostOcpiCdrsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOcpiCdrsResponse, error) + + // PostOcpiChargingprofile request with any body + PostOcpiChargingprofileWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOcpiChargingprofileResponse, error) + + PostOcpiChargingprofileWithResponse(ctx context.Context, body PostOcpiChargingprofileJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOcpiChargingprofileResponse, error) + + // PutOcpiChargingprofileSessionId request with any body + PutOcpiChargingprofileSessionIdWithBodyWithResponse(ctx context.Context, sessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutOcpiChargingprofileSessionIdResponse, error) + + PutOcpiChargingprofileSessionIdWithResponse(ctx context.Context, sessionId string, body PutOcpiChargingprofileSessionIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutOcpiChargingprofileSessionIdResponse, error) + + // PutOcpiChargingprofilesSessionId request with any body + PutOcpiChargingprofilesSessionIdWithBodyWithResponse(ctx context.Context, sessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutOcpiChargingprofilesSessionIdResponse, error) + + PutOcpiChargingprofilesSessionIdWithResponse(ctx context.Context, sessionId string, body PutOcpiChargingprofilesSessionIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutOcpiChargingprofilesSessionIdResponse, error) + + // GetOcpiChargingprofilesSessionIdDurationResponseUrl request + GetOcpiChargingprofilesSessionIdDurationResponseUrlWithResponse(ctx context.Context, sessionId string, duration int, responseUrl string, reqEditors ...RequestEditorFn) (*GetOcpiChargingprofilesSessionIdDurationResponseUrlResponse, error) + + // DeleteOcpiChargingprofilesSessionIdResponseUrl request + DeleteOcpiChargingprofilesSessionIdResponseUrlWithResponse(ctx context.Context, sessionId string, responseUrl string, reqEditors ...RequestEditorFn) (*DeleteOcpiChargingprofilesSessionIdResponseUrlResponse, error) + + // GetOcpiClientinfoCountryCodePartyId request + GetOcpiClientinfoCountryCodePartyIdWithResponse(ctx context.Context, countryCode string, partyId string, reqEditors ...RequestEditorFn) (*GetOcpiClientinfoCountryCodePartyIdResponse, error) + + // PutOcpiClientinfoCountryCodePartyId request with any body + PutOcpiClientinfoCountryCodePartyIdWithBodyWithResponse(ctx context.Context, countryCode string, partyId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutOcpiClientinfoCountryCodePartyIdResponse, error) + + PutOcpiClientinfoCountryCodePartyIdWithResponse(ctx context.Context, countryCode string, partyId string, body PutOcpiClientinfoCountryCodePartyIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutOcpiClientinfoCountryCodePartyIdResponse, error) + + // PostOcpiCommandsCommand request with any body + PostOcpiCommandsCommandWithBodyWithResponse(ctx context.Context, command PostOcpiCommandsCommandParamsCommand, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOcpiCommandsCommandResponse, error) + + PostOcpiCommandsCommandWithResponse(ctx context.Context, command PostOcpiCommandsCommandParamsCommand, body PostOcpiCommandsCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOcpiCommandsCommandResponse, error) + + // PostOcpiCommandsCommandUid request with any body + PostOcpiCommandsCommandUidWithBodyWithResponse(ctx context.Context, command PostOcpiCommandsCommandUidParamsCommand, uid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOcpiCommandsCommandUidResponse, error) + + PostOcpiCommandsCommandUidWithResponse(ctx context.Context, command PostOcpiCommandsCommandUidParamsCommand, uid string, body PostOcpiCommandsCommandUidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOcpiCommandsCommandUidResponse, error) + + // GetOcpiHubclientinfo request + GetOcpiHubclientinfoWithResponse(ctx context.Context, params *GetOcpiHubclientinfoParams, reqEditors ...RequestEditorFn) (*GetOcpiHubclientinfoResponse, error) + + // GetOcpiLocations request + GetOcpiLocationsWithResponse(ctx context.Context, params *GetOcpiLocationsParams, reqEditors ...RequestEditorFn) (*GetOcpiLocationsResponse, error) + + // GetOcpiLocationsCountryCodePartyIdLocationId request + GetOcpiLocationsCountryCodePartyIdLocationIdWithResponse(ctx context.Context, countryCode string, partyId string, locationId string, params *GetOcpiLocationsCountryCodePartyIdLocationIdParams, reqEditors ...RequestEditorFn) (*GetOcpiLocationsCountryCodePartyIdLocationIdResponse, error) + + // PatchOcpiLocationsCountryCodePartyIdLocationId request + PatchOcpiLocationsCountryCodePartyIdLocationIdWithResponse(ctx context.Context, countryCode string, partyId string, locationId string, params *PatchOcpiLocationsCountryCodePartyIdLocationIdParams, reqEditors ...RequestEditorFn) (*PatchOcpiLocationsCountryCodePartyIdLocationIdResponse, error) + + // PutOcpiLocationsCountryCodePartyIdLocationId request with any body + PutOcpiLocationsCountryCodePartyIdLocationIdWithBodyWithResponse(ctx context.Context, countryCode string, partyId string, locationId string, params *PutOcpiLocationsCountryCodePartyIdLocationIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutOcpiLocationsCountryCodePartyIdLocationIdResponse, error) + + PutOcpiLocationsCountryCodePartyIdLocationIdWithResponse(ctx context.Context, countryCode string, partyId string, locationId string, params *PutOcpiLocationsCountryCodePartyIdLocationIdParams, body PutOcpiLocationsCountryCodePartyIdLocationIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutOcpiLocationsCountryCodePartyIdLocationIdResponse, error) + + // GetOcpiLocationsLocationId request + GetOcpiLocationsLocationIdWithResponse(ctx context.Context, locationId string, params *GetOcpiLocationsLocationIdParams, reqEditors ...RequestEditorFn) (*GetOcpiLocationsLocationIdResponse, error) + + // GetOcpiSessions request + GetOcpiSessionsWithResponse(ctx context.Context, params *GetOcpiSessionsParams, reqEditors ...RequestEditorFn) (*GetOcpiSessionsResponse, error) + + // GetOcpiSessionsCountryCodePartyIdSessionId request + GetOcpiSessionsCountryCodePartyIdSessionIdWithResponse(ctx context.Context, countryCode string, partyId string, sessionId string, reqEditors ...RequestEditorFn) (*GetOcpiSessionsCountryCodePartyIdSessionIdResponse, error) + + // PatchOcpiSessionsCountryCodePartyIdSessionId request + PatchOcpiSessionsCountryCodePartyIdSessionIdWithResponse(ctx context.Context, countryCode string, partyId string, sessionId string, reqEditors ...RequestEditorFn) (*PatchOcpiSessionsCountryCodePartyIdSessionIdResponse, error) + + // PutOcpiSessionsCountryCodePartyIdSessionId request with any body + PutOcpiSessionsCountryCodePartyIdSessionIdWithBodyWithResponse(ctx context.Context, countryCode string, partyId string, sessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutOcpiSessionsCountryCodePartyIdSessionIdResponse, error) + + PutOcpiSessionsCountryCodePartyIdSessionIdWithResponse(ctx context.Context, countryCode string, partyId string, sessionId string, body PutOcpiSessionsCountryCodePartyIdSessionIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutOcpiSessionsCountryCodePartyIdSessionIdResponse, error) + + // PutOcpiSessionsSessionIdChargingPreferences request with any body + PutOcpiSessionsSessionIdChargingPreferencesWithBodyWithResponse(ctx context.Context, sessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutOcpiSessionsSessionIdChargingPreferencesResponse, error) + + PutOcpiSessionsSessionIdChargingPreferencesWithResponse(ctx context.Context, sessionId string, body PutOcpiSessionsSessionIdChargingPreferencesJSONRequestBody, reqEditors ...RequestEditorFn) (*PutOcpiSessionsSessionIdChargingPreferencesResponse, error) + + // GetOcpiTariffs request + GetOcpiTariffsWithResponse(ctx context.Context, params *GetOcpiTariffsParams, reqEditors ...RequestEditorFn) (*GetOcpiTariffsResponse, error) + + // DeleteOcpiTariffsCountryCodePartyIdTariffId request + DeleteOcpiTariffsCountryCodePartyIdTariffIdWithResponse(ctx context.Context, countryCode string, partyId string, tariffId string, reqEditors ...RequestEditorFn) (*DeleteOcpiTariffsCountryCodePartyIdTariffIdResponse, error) + + // GetOcpiTariffsCountryCodePartyIdTariffId request + GetOcpiTariffsCountryCodePartyIdTariffIdWithResponse(ctx context.Context, countryCode string, partyId string, tariffId string, reqEditors ...RequestEditorFn) (*GetOcpiTariffsCountryCodePartyIdTariffIdResponse, error) + + // PutOcpiTariffsCountryCodePartyIdTariffId request with any body + PutOcpiTariffsCountryCodePartyIdTariffIdWithBodyWithResponse(ctx context.Context, countryCode string, partyId string, tariffId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutOcpiTariffsCountryCodePartyIdTariffIdResponse, error) + + PutOcpiTariffsCountryCodePartyIdTariffIdWithResponse(ctx context.Context, countryCode string, partyId string, tariffId string, body PutOcpiTariffsCountryCodePartyIdTariffIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutOcpiTariffsCountryCodePartyIdTariffIdResponse, error) + + // GetOcpiTokens request + GetOcpiTokensWithResponse(ctx context.Context, params *GetOcpiTokensParams, reqEditors ...RequestEditorFn) (*GetOcpiTokensResponse, error) + + // GetOcpiTokensCountryCodePartyIdTokenUid request + GetOcpiTokensCountryCodePartyIdTokenUidWithResponse(ctx context.Context, countryCode string, partyId string, tokenUid string, params *GetOcpiTokensCountryCodePartyIdTokenUidParams, reqEditors ...RequestEditorFn) (*GetOcpiTokensCountryCodePartyIdTokenUidResponse, error) + + // PatchOcpiTokensCountryCodePartyIdTokenUid request + PatchOcpiTokensCountryCodePartyIdTokenUidWithResponse(ctx context.Context, countryCode string, partyId string, tokenUid string, params *PatchOcpiTokensCountryCodePartyIdTokenUidParams, reqEditors ...RequestEditorFn) (*PatchOcpiTokensCountryCodePartyIdTokenUidResponse, error) + + // PutOcpiTokensCountryCodePartyIdTokenUid request with any body + PutOcpiTokensCountryCodePartyIdTokenUidWithBodyWithResponse(ctx context.Context, countryCode string, partyId string, tokenUid string, params *PutOcpiTokensCountryCodePartyIdTokenUidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutOcpiTokensCountryCodePartyIdTokenUidResponse, error) + + PutOcpiTokensCountryCodePartyIdTokenUidWithResponse(ctx context.Context, countryCode string, partyId string, tokenUid string, params *PutOcpiTokensCountryCodePartyIdTokenUidParams, body PutOcpiTokensCountryCodePartyIdTokenUidJSONRequestBody, reqEditors ...RequestEditorFn) (*PutOcpiTokensCountryCodePartyIdTokenUidResponse, error) + + // GetOcpiVersions request + GetOcpiVersionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOcpiVersionsResponse, error) + + // PostOcpiTokenUidAuthorize request with any body + PostOcpiTokenUidAuthorizeWithBodyWithResponse(ctx context.Context, tokenUid string, params *PostOcpiTokenUidAuthorizeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOcpiTokenUidAuthorizeResponse, error) + + PostOcpiTokenUidAuthorizeWithResponse(ctx context.Context, tokenUid string, params *PostOcpiTokenUidAuthorizeParams, body PostOcpiTokenUidAuthorizeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOcpiTokenUidAuthorizeResponse, error) +} + +type DeleteOcpi221CredentialsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Credentials + JSON405 *GenericError + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r DeleteOcpi221CredentialsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteOcpi221CredentialsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOcpi221CredentialsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Credentials + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r GetOcpi221CredentialsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOcpi221CredentialsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOcpi221CredentialsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Credentials + JSON405 *GenericError + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r PostOcpi221CredentialsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOcpi221CredentialsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutOcpi221CredentialsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Credentials + JSON405 *GenericError + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r PutOcpi221CredentialsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutOcpi221CredentialsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOcpi221DetailsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Details + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r GetOcpi221DetailsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOcpi221DetailsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOcpiCdrsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CdrsResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r GetOcpiCdrsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOcpiCdrsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOcpiCdrsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CdrResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r PostOcpiCdrsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOcpiCdrsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOcpiChargingprofileResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *GenericResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r PostOcpiChargingprofileResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOcpiChargingprofileResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutOcpiChargingprofileSessionIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *GenericResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r PutOcpiChargingprofileSessionIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutOcpiChargingprofileSessionIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutOcpiChargingprofilesSessionIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ChargingProfilesResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r PutOcpiChargingprofilesSessionIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutOcpiChargingprofilesSessionIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOcpiChargingprofilesSessionIdDurationResponseUrlResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ChargingProfilesResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r GetOcpiChargingprofilesSessionIdDurationResponseUrlResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOcpiChargingprofilesSessionIdDurationResponseUrlResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteOcpiChargingprofilesSessionIdResponseUrlResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ChargingProfilesResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r DeleteOcpiChargingprofilesSessionIdResponseUrlResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteOcpiChargingprofilesSessionIdResponseUrlResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOcpiClientinfoCountryCodePartyIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ClientsInfoResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r GetOcpiClientinfoCountryCodePartyIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOcpiClientinfoCountryCodePartyIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutOcpiClientinfoCountryCodePartyIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ClientsInfoResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r PutOcpiClientinfoCountryCodePartyIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutOcpiClientinfoCountryCodePartyIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOcpiCommandsCommandResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CommandResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r PostOcpiCommandsCommandResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOcpiCommandsCommandResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOcpiCommandsCommandUidResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CommandResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r PostOcpiCommandsCommandUidResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOcpiCommandsCommandUidResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOcpiHubclientinfoResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ClientInfoResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r GetOcpiHubclientinfoResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOcpiHubclientinfoResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOcpiLocationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Locations + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r GetOcpiLocationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOcpiLocationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOcpiLocationsCountryCodePartyIdLocationIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *OcpiLocationsLocationIdGet200Response + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r GetOcpiLocationsCountryCodePartyIdLocationIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOcpiLocationsCountryCodePartyIdLocationIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchOcpiLocationsCountryCodePartyIdLocationIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *OcpiLocationsLocationIdGet200Response + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r PatchOcpiLocationsCountryCodePartyIdLocationIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchOcpiLocationsCountryCodePartyIdLocationIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutOcpiLocationsCountryCodePartyIdLocationIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *OcpiLocationsLocationIdGet200Response + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r PutOcpiLocationsCountryCodePartyIdLocationIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutOcpiLocationsCountryCodePartyIdLocationIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOcpiLocationsLocationIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *OcpiLocationsLocationIdGet200Response + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r GetOcpiLocationsLocationIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOcpiLocationsLocationIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOcpiSessionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SessionsResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r GetOcpiSessionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOcpiSessionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOcpiSessionsCountryCodePartyIdSessionIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SessionResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r GetOcpiSessionsCountryCodePartyIdSessionIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOcpiSessionsCountryCodePartyIdSessionIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchOcpiSessionsCountryCodePartyIdSessionIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SessionResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r PatchOcpiSessionsCountryCodePartyIdSessionIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchOcpiSessionsCountryCodePartyIdSessionIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutOcpiSessionsCountryCodePartyIdSessionIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SessionResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r PutOcpiSessionsCountryCodePartyIdSessionIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutOcpiSessionsCountryCodePartyIdSessionIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutOcpiSessionsSessionIdChargingPreferencesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ChargingPreferencesResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r PutOcpiSessionsSessionIdChargingPreferencesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutOcpiSessionsSessionIdChargingPreferencesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOcpiTariffsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TariffsResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r GetOcpiTariffsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOcpiTariffsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteOcpiTariffsCountryCodePartyIdTariffIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TariffDeleteResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r DeleteOcpiTariffsCountryCodePartyIdTariffIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteOcpiTariffsCountryCodePartyIdTariffIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOcpiTariffsCountryCodePartyIdTariffIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TariffResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r GetOcpiTariffsCountryCodePartyIdTariffIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOcpiTariffsCountryCodePartyIdTariffIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutOcpiTariffsCountryCodePartyIdTariffIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TariffResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r PutOcpiTariffsCountryCodePartyIdTariffIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutOcpiTariffsCountryCodePartyIdTariffIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOcpiTokensResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TokensResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r GetOcpiTokensResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOcpiTokensResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOcpiTokensCountryCodePartyIdTokenUidResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TokenResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r GetOcpiTokensCountryCodePartyIdTokenUidResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOcpiTokensCountryCodePartyIdTokenUidResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchOcpiTokensCountryCodePartyIdTokenUidResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TokenResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r PatchOcpiTokensCountryCodePartyIdTokenUidResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchOcpiTokensCountryCodePartyIdTokenUidResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutOcpiTokensCountryCodePartyIdTokenUidResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TokenResponse + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r PutOcpiTokensCountryCodePartyIdTokenUidResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutOcpiTokensCountryCodePartyIdTokenUidResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOcpiVersionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Versions + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r GetOcpiVersionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOcpiVersionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOcpiTokenUidAuthorizeResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Authorization + JSONDefault *GenericError +} + +// Status returns HTTPResponse.Status +func (r PostOcpiTokenUidAuthorizeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOcpiTokenUidAuthorizeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// DeleteOcpi221CredentialsWithResponse request returning *DeleteOcpi221CredentialsResponse +func (c *ClientWithResponses) DeleteOcpi221CredentialsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DeleteOcpi221CredentialsResponse, error) { + rsp, err := c.DeleteOcpi221Credentials(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteOcpi221CredentialsResponse(rsp) +} + +// GetOcpi221CredentialsWithResponse request returning *GetOcpi221CredentialsResponse +func (c *ClientWithResponses) GetOcpi221CredentialsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOcpi221CredentialsResponse, error) { + rsp, err := c.GetOcpi221Credentials(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOcpi221CredentialsResponse(rsp) +} + +// PostOcpi221CredentialsWithBodyWithResponse request with arbitrary body returning *PostOcpi221CredentialsResponse +func (c *ClientWithResponses) PostOcpi221CredentialsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOcpi221CredentialsResponse, error) { + rsp, err := c.PostOcpi221CredentialsWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOcpi221CredentialsResponse(rsp) +} + +func (c *ClientWithResponses) PostOcpi221CredentialsWithResponse(ctx context.Context, body PostOcpi221CredentialsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOcpi221CredentialsResponse, error) { + rsp, err := c.PostOcpi221Credentials(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOcpi221CredentialsResponse(rsp) +} + +// PutOcpi221CredentialsWithBodyWithResponse request with arbitrary body returning *PutOcpi221CredentialsResponse +func (c *ClientWithResponses) PutOcpi221CredentialsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutOcpi221CredentialsResponse, error) { + rsp, err := c.PutOcpi221CredentialsWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutOcpi221CredentialsResponse(rsp) +} + +func (c *ClientWithResponses) PutOcpi221CredentialsWithResponse(ctx context.Context, body PutOcpi221CredentialsJSONRequestBody, reqEditors ...RequestEditorFn) (*PutOcpi221CredentialsResponse, error) { + rsp, err := c.PutOcpi221Credentials(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutOcpi221CredentialsResponse(rsp) +} + +// GetOcpi221DetailsWithResponse request returning *GetOcpi221DetailsResponse +func (c *ClientWithResponses) GetOcpi221DetailsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOcpi221DetailsResponse, error) { + rsp, err := c.GetOcpi221Details(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOcpi221DetailsResponse(rsp) +} + +// GetOcpiCdrsWithResponse request returning *GetOcpiCdrsResponse +func (c *ClientWithResponses) GetOcpiCdrsWithResponse(ctx context.Context, params *GetOcpiCdrsParams, reqEditors ...RequestEditorFn) (*GetOcpiCdrsResponse, error) { + rsp, err := c.GetOcpiCdrs(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOcpiCdrsResponse(rsp) +} + +// PostOcpiCdrsWithBodyWithResponse request with arbitrary body returning *PostOcpiCdrsResponse +func (c *ClientWithResponses) PostOcpiCdrsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOcpiCdrsResponse, error) { + rsp, err := c.PostOcpiCdrsWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOcpiCdrsResponse(rsp) +} + +func (c *ClientWithResponses) PostOcpiCdrsWithResponse(ctx context.Context, body PostOcpiCdrsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOcpiCdrsResponse, error) { + rsp, err := c.PostOcpiCdrs(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOcpiCdrsResponse(rsp) +} + +// PostOcpiChargingprofileWithBodyWithResponse request with arbitrary body returning *PostOcpiChargingprofileResponse +func (c *ClientWithResponses) PostOcpiChargingprofileWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOcpiChargingprofileResponse, error) { + rsp, err := c.PostOcpiChargingprofileWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOcpiChargingprofileResponse(rsp) +} + +func (c *ClientWithResponses) PostOcpiChargingprofileWithResponse(ctx context.Context, body PostOcpiChargingprofileJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOcpiChargingprofileResponse, error) { + rsp, err := c.PostOcpiChargingprofile(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOcpiChargingprofileResponse(rsp) +} + +// PutOcpiChargingprofileSessionIdWithBodyWithResponse request with arbitrary body returning *PutOcpiChargingprofileSessionIdResponse +func (c *ClientWithResponses) PutOcpiChargingprofileSessionIdWithBodyWithResponse(ctx context.Context, sessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutOcpiChargingprofileSessionIdResponse, error) { + rsp, err := c.PutOcpiChargingprofileSessionIdWithBody(ctx, sessionId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutOcpiChargingprofileSessionIdResponse(rsp) +} + +func (c *ClientWithResponses) PutOcpiChargingprofileSessionIdWithResponse(ctx context.Context, sessionId string, body PutOcpiChargingprofileSessionIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutOcpiChargingprofileSessionIdResponse, error) { + rsp, err := c.PutOcpiChargingprofileSessionId(ctx, sessionId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutOcpiChargingprofileSessionIdResponse(rsp) +} + +// PutOcpiChargingprofilesSessionIdWithBodyWithResponse request with arbitrary body returning *PutOcpiChargingprofilesSessionIdResponse +func (c *ClientWithResponses) PutOcpiChargingprofilesSessionIdWithBodyWithResponse(ctx context.Context, sessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutOcpiChargingprofilesSessionIdResponse, error) { + rsp, err := c.PutOcpiChargingprofilesSessionIdWithBody(ctx, sessionId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutOcpiChargingprofilesSessionIdResponse(rsp) +} + +func (c *ClientWithResponses) PutOcpiChargingprofilesSessionIdWithResponse(ctx context.Context, sessionId string, body PutOcpiChargingprofilesSessionIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutOcpiChargingprofilesSessionIdResponse, error) { + rsp, err := c.PutOcpiChargingprofilesSessionId(ctx, sessionId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutOcpiChargingprofilesSessionIdResponse(rsp) +} + +// GetOcpiChargingprofilesSessionIdDurationResponseUrlWithResponse request returning *GetOcpiChargingprofilesSessionIdDurationResponseUrlResponse +func (c *ClientWithResponses) GetOcpiChargingprofilesSessionIdDurationResponseUrlWithResponse(ctx context.Context, sessionId string, duration int, responseUrl string, reqEditors ...RequestEditorFn) (*GetOcpiChargingprofilesSessionIdDurationResponseUrlResponse, error) { + rsp, err := c.GetOcpiChargingprofilesSessionIdDurationResponseUrl(ctx, sessionId, duration, responseUrl, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOcpiChargingprofilesSessionIdDurationResponseUrlResponse(rsp) +} + +// DeleteOcpiChargingprofilesSessionIdResponseUrlWithResponse request returning *DeleteOcpiChargingprofilesSessionIdResponseUrlResponse +func (c *ClientWithResponses) DeleteOcpiChargingprofilesSessionIdResponseUrlWithResponse(ctx context.Context, sessionId string, responseUrl string, reqEditors ...RequestEditorFn) (*DeleteOcpiChargingprofilesSessionIdResponseUrlResponse, error) { + rsp, err := c.DeleteOcpiChargingprofilesSessionIdResponseUrl(ctx, sessionId, responseUrl, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteOcpiChargingprofilesSessionIdResponseUrlResponse(rsp) +} + +// GetOcpiClientinfoCountryCodePartyIdWithResponse request returning *GetOcpiClientinfoCountryCodePartyIdResponse +func (c *ClientWithResponses) GetOcpiClientinfoCountryCodePartyIdWithResponse(ctx context.Context, countryCode string, partyId string, reqEditors ...RequestEditorFn) (*GetOcpiClientinfoCountryCodePartyIdResponse, error) { + rsp, err := c.GetOcpiClientinfoCountryCodePartyId(ctx, countryCode, partyId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOcpiClientinfoCountryCodePartyIdResponse(rsp) +} + +// PutOcpiClientinfoCountryCodePartyIdWithBodyWithResponse request with arbitrary body returning *PutOcpiClientinfoCountryCodePartyIdResponse +func (c *ClientWithResponses) PutOcpiClientinfoCountryCodePartyIdWithBodyWithResponse(ctx context.Context, countryCode string, partyId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutOcpiClientinfoCountryCodePartyIdResponse, error) { + rsp, err := c.PutOcpiClientinfoCountryCodePartyIdWithBody(ctx, countryCode, partyId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutOcpiClientinfoCountryCodePartyIdResponse(rsp) +} + +func (c *ClientWithResponses) PutOcpiClientinfoCountryCodePartyIdWithResponse(ctx context.Context, countryCode string, partyId string, body PutOcpiClientinfoCountryCodePartyIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutOcpiClientinfoCountryCodePartyIdResponse, error) { + rsp, err := c.PutOcpiClientinfoCountryCodePartyId(ctx, countryCode, partyId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutOcpiClientinfoCountryCodePartyIdResponse(rsp) +} + +// PostOcpiCommandsCommandWithBodyWithResponse request with arbitrary body returning *PostOcpiCommandsCommandResponse +func (c *ClientWithResponses) PostOcpiCommandsCommandWithBodyWithResponse(ctx context.Context, command PostOcpiCommandsCommandParamsCommand, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOcpiCommandsCommandResponse, error) { + rsp, err := c.PostOcpiCommandsCommandWithBody(ctx, command, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOcpiCommandsCommandResponse(rsp) +} + +func (c *ClientWithResponses) PostOcpiCommandsCommandWithResponse(ctx context.Context, command PostOcpiCommandsCommandParamsCommand, body PostOcpiCommandsCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOcpiCommandsCommandResponse, error) { + rsp, err := c.PostOcpiCommandsCommand(ctx, command, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOcpiCommandsCommandResponse(rsp) +} + +// PostOcpiCommandsCommandUidWithBodyWithResponse request with arbitrary body returning *PostOcpiCommandsCommandUidResponse +func (c *ClientWithResponses) PostOcpiCommandsCommandUidWithBodyWithResponse(ctx context.Context, command PostOcpiCommandsCommandUidParamsCommand, uid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOcpiCommandsCommandUidResponse, error) { + rsp, err := c.PostOcpiCommandsCommandUidWithBody(ctx, command, uid, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOcpiCommandsCommandUidResponse(rsp) +} + +func (c *ClientWithResponses) PostOcpiCommandsCommandUidWithResponse(ctx context.Context, command PostOcpiCommandsCommandUidParamsCommand, uid string, body PostOcpiCommandsCommandUidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOcpiCommandsCommandUidResponse, error) { + rsp, err := c.PostOcpiCommandsCommandUid(ctx, command, uid, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOcpiCommandsCommandUidResponse(rsp) +} + +// GetOcpiHubclientinfoWithResponse request returning *GetOcpiHubclientinfoResponse +func (c *ClientWithResponses) GetOcpiHubclientinfoWithResponse(ctx context.Context, params *GetOcpiHubclientinfoParams, reqEditors ...RequestEditorFn) (*GetOcpiHubclientinfoResponse, error) { + rsp, err := c.GetOcpiHubclientinfo(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOcpiHubclientinfoResponse(rsp) +} + +// GetOcpiLocationsWithResponse request returning *GetOcpiLocationsResponse +func (c *ClientWithResponses) GetOcpiLocationsWithResponse(ctx context.Context, params *GetOcpiLocationsParams, reqEditors ...RequestEditorFn) (*GetOcpiLocationsResponse, error) { + rsp, err := c.GetOcpiLocations(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOcpiLocationsResponse(rsp) +} + +// GetOcpiLocationsCountryCodePartyIdLocationIdWithResponse request returning *GetOcpiLocationsCountryCodePartyIdLocationIdResponse +func (c *ClientWithResponses) GetOcpiLocationsCountryCodePartyIdLocationIdWithResponse(ctx context.Context, countryCode string, partyId string, locationId string, params *GetOcpiLocationsCountryCodePartyIdLocationIdParams, reqEditors ...RequestEditorFn) (*GetOcpiLocationsCountryCodePartyIdLocationIdResponse, error) { + rsp, err := c.GetOcpiLocationsCountryCodePartyIdLocationId(ctx, countryCode, partyId, locationId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOcpiLocationsCountryCodePartyIdLocationIdResponse(rsp) +} + +// PatchOcpiLocationsCountryCodePartyIdLocationIdWithResponse request returning *PatchOcpiLocationsCountryCodePartyIdLocationIdResponse +func (c *ClientWithResponses) PatchOcpiLocationsCountryCodePartyIdLocationIdWithResponse(ctx context.Context, countryCode string, partyId string, locationId string, params *PatchOcpiLocationsCountryCodePartyIdLocationIdParams, reqEditors ...RequestEditorFn) (*PatchOcpiLocationsCountryCodePartyIdLocationIdResponse, error) { + rsp, err := c.PatchOcpiLocationsCountryCodePartyIdLocationId(ctx, countryCode, partyId, locationId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchOcpiLocationsCountryCodePartyIdLocationIdResponse(rsp) +} + +// PutOcpiLocationsCountryCodePartyIdLocationIdWithBodyWithResponse request with arbitrary body returning *PutOcpiLocationsCountryCodePartyIdLocationIdResponse +func (c *ClientWithResponses) PutOcpiLocationsCountryCodePartyIdLocationIdWithBodyWithResponse(ctx context.Context, countryCode string, partyId string, locationId string, params *PutOcpiLocationsCountryCodePartyIdLocationIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutOcpiLocationsCountryCodePartyIdLocationIdResponse, error) { + rsp, err := c.PutOcpiLocationsCountryCodePartyIdLocationIdWithBody(ctx, countryCode, partyId, locationId, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutOcpiLocationsCountryCodePartyIdLocationIdResponse(rsp) +} + +func (c *ClientWithResponses) PutOcpiLocationsCountryCodePartyIdLocationIdWithResponse(ctx context.Context, countryCode string, partyId string, locationId string, params *PutOcpiLocationsCountryCodePartyIdLocationIdParams, body PutOcpiLocationsCountryCodePartyIdLocationIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutOcpiLocationsCountryCodePartyIdLocationIdResponse, error) { + rsp, err := c.PutOcpiLocationsCountryCodePartyIdLocationId(ctx, countryCode, partyId, locationId, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutOcpiLocationsCountryCodePartyIdLocationIdResponse(rsp) +} + +// GetOcpiLocationsLocationIdWithResponse request returning *GetOcpiLocationsLocationIdResponse +func (c *ClientWithResponses) GetOcpiLocationsLocationIdWithResponse(ctx context.Context, locationId string, params *GetOcpiLocationsLocationIdParams, reqEditors ...RequestEditorFn) (*GetOcpiLocationsLocationIdResponse, error) { + rsp, err := c.GetOcpiLocationsLocationId(ctx, locationId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOcpiLocationsLocationIdResponse(rsp) +} + +// GetOcpiSessionsWithResponse request returning *GetOcpiSessionsResponse +func (c *ClientWithResponses) GetOcpiSessionsWithResponse(ctx context.Context, params *GetOcpiSessionsParams, reqEditors ...RequestEditorFn) (*GetOcpiSessionsResponse, error) { + rsp, err := c.GetOcpiSessions(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOcpiSessionsResponse(rsp) +} + +// GetOcpiSessionsCountryCodePartyIdSessionIdWithResponse request returning *GetOcpiSessionsCountryCodePartyIdSessionIdResponse +func (c *ClientWithResponses) GetOcpiSessionsCountryCodePartyIdSessionIdWithResponse(ctx context.Context, countryCode string, partyId string, sessionId string, reqEditors ...RequestEditorFn) (*GetOcpiSessionsCountryCodePartyIdSessionIdResponse, error) { + rsp, err := c.GetOcpiSessionsCountryCodePartyIdSessionId(ctx, countryCode, partyId, sessionId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOcpiSessionsCountryCodePartyIdSessionIdResponse(rsp) +} + +// PatchOcpiSessionsCountryCodePartyIdSessionIdWithResponse request returning *PatchOcpiSessionsCountryCodePartyIdSessionIdResponse +func (c *ClientWithResponses) PatchOcpiSessionsCountryCodePartyIdSessionIdWithResponse(ctx context.Context, countryCode string, partyId string, sessionId string, reqEditors ...RequestEditorFn) (*PatchOcpiSessionsCountryCodePartyIdSessionIdResponse, error) { + rsp, err := c.PatchOcpiSessionsCountryCodePartyIdSessionId(ctx, countryCode, partyId, sessionId, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchOcpiSessionsCountryCodePartyIdSessionIdResponse(rsp) +} + +// PutOcpiSessionsCountryCodePartyIdSessionIdWithBodyWithResponse request with arbitrary body returning *PutOcpiSessionsCountryCodePartyIdSessionIdResponse +func (c *ClientWithResponses) PutOcpiSessionsCountryCodePartyIdSessionIdWithBodyWithResponse(ctx context.Context, countryCode string, partyId string, sessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutOcpiSessionsCountryCodePartyIdSessionIdResponse, error) { + rsp, err := c.PutOcpiSessionsCountryCodePartyIdSessionIdWithBody(ctx, countryCode, partyId, sessionId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutOcpiSessionsCountryCodePartyIdSessionIdResponse(rsp) +} + +func (c *ClientWithResponses) PutOcpiSessionsCountryCodePartyIdSessionIdWithResponse(ctx context.Context, countryCode string, partyId string, sessionId string, body PutOcpiSessionsCountryCodePartyIdSessionIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutOcpiSessionsCountryCodePartyIdSessionIdResponse, error) { + rsp, err := c.PutOcpiSessionsCountryCodePartyIdSessionId(ctx, countryCode, partyId, sessionId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutOcpiSessionsCountryCodePartyIdSessionIdResponse(rsp) +} + +// PutOcpiSessionsSessionIdChargingPreferencesWithBodyWithResponse request with arbitrary body returning *PutOcpiSessionsSessionIdChargingPreferencesResponse +func (c *ClientWithResponses) PutOcpiSessionsSessionIdChargingPreferencesWithBodyWithResponse(ctx context.Context, sessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutOcpiSessionsSessionIdChargingPreferencesResponse, error) { + rsp, err := c.PutOcpiSessionsSessionIdChargingPreferencesWithBody(ctx, sessionId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutOcpiSessionsSessionIdChargingPreferencesResponse(rsp) +} + +func (c *ClientWithResponses) PutOcpiSessionsSessionIdChargingPreferencesWithResponse(ctx context.Context, sessionId string, body PutOcpiSessionsSessionIdChargingPreferencesJSONRequestBody, reqEditors ...RequestEditorFn) (*PutOcpiSessionsSessionIdChargingPreferencesResponse, error) { + rsp, err := c.PutOcpiSessionsSessionIdChargingPreferences(ctx, sessionId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutOcpiSessionsSessionIdChargingPreferencesResponse(rsp) +} + +// GetOcpiTariffsWithResponse request returning *GetOcpiTariffsResponse +func (c *ClientWithResponses) GetOcpiTariffsWithResponse(ctx context.Context, params *GetOcpiTariffsParams, reqEditors ...RequestEditorFn) (*GetOcpiTariffsResponse, error) { + rsp, err := c.GetOcpiTariffs(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOcpiTariffsResponse(rsp) +} + +// DeleteOcpiTariffsCountryCodePartyIdTariffIdWithResponse request returning *DeleteOcpiTariffsCountryCodePartyIdTariffIdResponse +func (c *ClientWithResponses) DeleteOcpiTariffsCountryCodePartyIdTariffIdWithResponse(ctx context.Context, countryCode string, partyId string, tariffId string, reqEditors ...RequestEditorFn) (*DeleteOcpiTariffsCountryCodePartyIdTariffIdResponse, error) { + rsp, err := c.DeleteOcpiTariffsCountryCodePartyIdTariffId(ctx, countryCode, partyId, tariffId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteOcpiTariffsCountryCodePartyIdTariffIdResponse(rsp) +} + +// GetOcpiTariffsCountryCodePartyIdTariffIdWithResponse request returning *GetOcpiTariffsCountryCodePartyIdTariffIdResponse +func (c *ClientWithResponses) GetOcpiTariffsCountryCodePartyIdTariffIdWithResponse(ctx context.Context, countryCode string, partyId string, tariffId string, reqEditors ...RequestEditorFn) (*GetOcpiTariffsCountryCodePartyIdTariffIdResponse, error) { + rsp, err := c.GetOcpiTariffsCountryCodePartyIdTariffId(ctx, countryCode, partyId, tariffId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOcpiTariffsCountryCodePartyIdTariffIdResponse(rsp) +} + +// PutOcpiTariffsCountryCodePartyIdTariffIdWithBodyWithResponse request with arbitrary body returning *PutOcpiTariffsCountryCodePartyIdTariffIdResponse +func (c *ClientWithResponses) PutOcpiTariffsCountryCodePartyIdTariffIdWithBodyWithResponse(ctx context.Context, countryCode string, partyId string, tariffId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutOcpiTariffsCountryCodePartyIdTariffIdResponse, error) { + rsp, err := c.PutOcpiTariffsCountryCodePartyIdTariffIdWithBody(ctx, countryCode, partyId, tariffId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutOcpiTariffsCountryCodePartyIdTariffIdResponse(rsp) +} + +func (c *ClientWithResponses) PutOcpiTariffsCountryCodePartyIdTariffIdWithResponse(ctx context.Context, countryCode string, partyId string, tariffId string, body PutOcpiTariffsCountryCodePartyIdTariffIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutOcpiTariffsCountryCodePartyIdTariffIdResponse, error) { + rsp, err := c.PutOcpiTariffsCountryCodePartyIdTariffId(ctx, countryCode, partyId, tariffId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutOcpiTariffsCountryCodePartyIdTariffIdResponse(rsp) +} + +// GetOcpiTokensWithResponse request returning *GetOcpiTokensResponse +func (c *ClientWithResponses) GetOcpiTokensWithResponse(ctx context.Context, params *GetOcpiTokensParams, reqEditors ...RequestEditorFn) (*GetOcpiTokensResponse, error) { + rsp, err := c.GetOcpiTokens(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOcpiTokensResponse(rsp) +} + +// GetOcpiTokensCountryCodePartyIdTokenUidWithResponse request returning *GetOcpiTokensCountryCodePartyIdTokenUidResponse +func (c *ClientWithResponses) GetOcpiTokensCountryCodePartyIdTokenUidWithResponse(ctx context.Context, countryCode string, partyId string, tokenUid string, params *GetOcpiTokensCountryCodePartyIdTokenUidParams, reqEditors ...RequestEditorFn) (*GetOcpiTokensCountryCodePartyIdTokenUidResponse, error) { + rsp, err := c.GetOcpiTokensCountryCodePartyIdTokenUid(ctx, countryCode, partyId, tokenUid, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOcpiTokensCountryCodePartyIdTokenUidResponse(rsp) +} + +// PatchOcpiTokensCountryCodePartyIdTokenUidWithResponse request returning *PatchOcpiTokensCountryCodePartyIdTokenUidResponse +func (c *ClientWithResponses) PatchOcpiTokensCountryCodePartyIdTokenUidWithResponse(ctx context.Context, countryCode string, partyId string, tokenUid string, params *PatchOcpiTokensCountryCodePartyIdTokenUidParams, reqEditors ...RequestEditorFn) (*PatchOcpiTokensCountryCodePartyIdTokenUidResponse, error) { + rsp, err := c.PatchOcpiTokensCountryCodePartyIdTokenUid(ctx, countryCode, partyId, tokenUid, params, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchOcpiTokensCountryCodePartyIdTokenUidResponse(rsp) +} + +// PutOcpiTokensCountryCodePartyIdTokenUidWithBodyWithResponse request with arbitrary body returning *PutOcpiTokensCountryCodePartyIdTokenUidResponse +func (c *ClientWithResponses) PutOcpiTokensCountryCodePartyIdTokenUidWithBodyWithResponse(ctx context.Context, countryCode string, partyId string, tokenUid string, params *PutOcpiTokensCountryCodePartyIdTokenUidParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutOcpiTokensCountryCodePartyIdTokenUidResponse, error) { + rsp, err := c.PutOcpiTokensCountryCodePartyIdTokenUidWithBody(ctx, countryCode, partyId, tokenUid, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutOcpiTokensCountryCodePartyIdTokenUidResponse(rsp) +} + +func (c *ClientWithResponses) PutOcpiTokensCountryCodePartyIdTokenUidWithResponse(ctx context.Context, countryCode string, partyId string, tokenUid string, params *PutOcpiTokensCountryCodePartyIdTokenUidParams, body PutOcpiTokensCountryCodePartyIdTokenUidJSONRequestBody, reqEditors ...RequestEditorFn) (*PutOcpiTokensCountryCodePartyIdTokenUidResponse, error) { + rsp, err := c.PutOcpiTokensCountryCodePartyIdTokenUid(ctx, countryCode, partyId, tokenUid, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutOcpiTokensCountryCodePartyIdTokenUidResponse(rsp) +} + +// GetOcpiVersionsWithResponse request returning *GetOcpiVersionsResponse +func (c *ClientWithResponses) GetOcpiVersionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOcpiVersionsResponse, error) { + rsp, err := c.GetOcpiVersions(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOcpiVersionsResponse(rsp) +} + +// PostOcpiTokenUidAuthorizeWithBodyWithResponse request with arbitrary body returning *PostOcpiTokenUidAuthorizeResponse +func (c *ClientWithResponses) PostOcpiTokenUidAuthorizeWithBodyWithResponse(ctx context.Context, tokenUid string, params *PostOcpiTokenUidAuthorizeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOcpiTokenUidAuthorizeResponse, error) { + rsp, err := c.PostOcpiTokenUidAuthorizeWithBody(ctx, tokenUid, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOcpiTokenUidAuthorizeResponse(rsp) +} + +func (c *ClientWithResponses) PostOcpiTokenUidAuthorizeWithResponse(ctx context.Context, tokenUid string, params *PostOcpiTokenUidAuthorizeParams, body PostOcpiTokenUidAuthorizeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOcpiTokenUidAuthorizeResponse, error) { + rsp, err := c.PostOcpiTokenUidAuthorize(ctx, tokenUid, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOcpiTokenUidAuthorizeResponse(rsp) +} + +// ParseDeleteOcpi221CredentialsResponse parses an HTTP response from a DeleteOcpi221CredentialsWithResponse call +func ParseDeleteOcpi221CredentialsResponse(rsp *http.Response) (*DeleteOcpi221CredentialsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteOcpi221CredentialsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Credentials + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetOcpi221CredentialsResponse parses an HTTP response from a GetOcpi221CredentialsWithResponse call +func ParseGetOcpi221CredentialsResponse(rsp *http.Response) (*GetOcpi221CredentialsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOcpi221CredentialsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Credentials + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePostOcpi221CredentialsResponse parses an HTTP response from a PostOcpi221CredentialsWithResponse call +func ParsePostOcpi221CredentialsResponse(rsp *http.Response) (*PostOcpi221CredentialsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOcpi221CredentialsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Credentials + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePutOcpi221CredentialsResponse parses an HTTP response from a PutOcpi221CredentialsWithResponse call +func ParsePutOcpi221CredentialsResponse(rsp *http.Response) (*PutOcpi221CredentialsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutOcpi221CredentialsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Credentials + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetOcpi221DetailsResponse parses an HTTP response from a GetOcpi221DetailsWithResponse call +func ParseGetOcpi221DetailsResponse(rsp *http.Response) (*GetOcpi221DetailsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOcpi221DetailsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Details + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetOcpiCdrsResponse parses an HTTP response from a GetOcpiCdrsWithResponse call +func ParseGetOcpiCdrsResponse(rsp *http.Response) (*GetOcpiCdrsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOcpiCdrsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CdrsResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePostOcpiCdrsResponse parses an HTTP response from a PostOcpiCdrsWithResponse call +func ParsePostOcpiCdrsResponse(rsp *http.Response) (*PostOcpiCdrsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOcpiCdrsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CdrResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePostOcpiChargingprofileResponse parses an HTTP response from a PostOcpiChargingprofileWithResponse call +func ParsePostOcpiChargingprofileResponse(rsp *http.Response) (*PostOcpiChargingprofileResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOcpiChargingprofileResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest GenericResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePutOcpiChargingprofileSessionIdResponse parses an HTTP response from a PutOcpiChargingprofileSessionIdWithResponse call +func ParsePutOcpiChargingprofileSessionIdResponse(rsp *http.Response) (*PutOcpiChargingprofileSessionIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutOcpiChargingprofileSessionIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest GenericResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePutOcpiChargingprofilesSessionIdResponse parses an HTTP response from a PutOcpiChargingprofilesSessionIdWithResponse call +func ParsePutOcpiChargingprofilesSessionIdResponse(rsp *http.Response) (*PutOcpiChargingprofilesSessionIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutOcpiChargingprofilesSessionIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ChargingProfilesResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetOcpiChargingprofilesSessionIdDurationResponseUrlResponse parses an HTTP response from a GetOcpiChargingprofilesSessionIdDurationResponseUrlWithResponse call +func ParseGetOcpiChargingprofilesSessionIdDurationResponseUrlResponse(rsp *http.Response) (*GetOcpiChargingprofilesSessionIdDurationResponseUrlResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOcpiChargingprofilesSessionIdDurationResponseUrlResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ChargingProfilesResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseDeleteOcpiChargingprofilesSessionIdResponseUrlResponse parses an HTTP response from a DeleteOcpiChargingprofilesSessionIdResponseUrlWithResponse call +func ParseDeleteOcpiChargingprofilesSessionIdResponseUrlResponse(rsp *http.Response) (*DeleteOcpiChargingprofilesSessionIdResponseUrlResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteOcpiChargingprofilesSessionIdResponseUrlResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ChargingProfilesResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetOcpiClientinfoCountryCodePartyIdResponse parses an HTTP response from a GetOcpiClientinfoCountryCodePartyIdWithResponse call +func ParseGetOcpiClientinfoCountryCodePartyIdResponse(rsp *http.Response) (*GetOcpiClientinfoCountryCodePartyIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOcpiClientinfoCountryCodePartyIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ClientsInfoResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePutOcpiClientinfoCountryCodePartyIdResponse parses an HTTP response from a PutOcpiClientinfoCountryCodePartyIdWithResponse call +func ParsePutOcpiClientinfoCountryCodePartyIdResponse(rsp *http.Response) (*PutOcpiClientinfoCountryCodePartyIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutOcpiClientinfoCountryCodePartyIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ClientsInfoResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePostOcpiCommandsCommandResponse parses an HTTP response from a PostOcpiCommandsCommandWithResponse call +func ParsePostOcpiCommandsCommandResponse(rsp *http.Response) (*PostOcpiCommandsCommandResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOcpiCommandsCommandResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CommandResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePostOcpiCommandsCommandUidResponse parses an HTTP response from a PostOcpiCommandsCommandUidWithResponse call +func ParsePostOcpiCommandsCommandUidResponse(rsp *http.Response) (*PostOcpiCommandsCommandUidResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOcpiCommandsCommandUidResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CommandResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetOcpiHubclientinfoResponse parses an HTTP response from a GetOcpiHubclientinfoWithResponse call +func ParseGetOcpiHubclientinfoResponse(rsp *http.Response) (*GetOcpiHubclientinfoResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOcpiHubclientinfoResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ClientInfoResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetOcpiLocationsResponse parses an HTTP response from a GetOcpiLocationsWithResponse call +func ParseGetOcpiLocationsResponse(rsp *http.Response) (*GetOcpiLocationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOcpiLocationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Locations + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetOcpiLocationsCountryCodePartyIdLocationIdResponse parses an HTTP response from a GetOcpiLocationsCountryCodePartyIdLocationIdWithResponse call +func ParseGetOcpiLocationsCountryCodePartyIdLocationIdResponse(rsp *http.Response) (*GetOcpiLocationsCountryCodePartyIdLocationIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOcpiLocationsCountryCodePartyIdLocationIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest OcpiLocationsLocationIdGet200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePatchOcpiLocationsCountryCodePartyIdLocationIdResponse parses an HTTP response from a PatchOcpiLocationsCountryCodePartyIdLocationIdWithResponse call +func ParsePatchOcpiLocationsCountryCodePartyIdLocationIdResponse(rsp *http.Response) (*PatchOcpiLocationsCountryCodePartyIdLocationIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchOcpiLocationsCountryCodePartyIdLocationIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest OcpiLocationsLocationIdGet200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePutOcpiLocationsCountryCodePartyIdLocationIdResponse parses an HTTP response from a PutOcpiLocationsCountryCodePartyIdLocationIdWithResponse call +func ParsePutOcpiLocationsCountryCodePartyIdLocationIdResponse(rsp *http.Response) (*PutOcpiLocationsCountryCodePartyIdLocationIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutOcpiLocationsCountryCodePartyIdLocationIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest OcpiLocationsLocationIdGet200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetOcpiLocationsLocationIdResponse parses an HTTP response from a GetOcpiLocationsLocationIdWithResponse call +func ParseGetOcpiLocationsLocationIdResponse(rsp *http.Response) (*GetOcpiLocationsLocationIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOcpiLocationsLocationIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest OcpiLocationsLocationIdGet200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetOcpiSessionsResponse parses an HTTP response from a GetOcpiSessionsWithResponse call +func ParseGetOcpiSessionsResponse(rsp *http.Response) (*GetOcpiSessionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOcpiSessionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SessionsResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetOcpiSessionsCountryCodePartyIdSessionIdResponse parses an HTTP response from a GetOcpiSessionsCountryCodePartyIdSessionIdWithResponse call +func ParseGetOcpiSessionsCountryCodePartyIdSessionIdResponse(rsp *http.Response) (*GetOcpiSessionsCountryCodePartyIdSessionIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOcpiSessionsCountryCodePartyIdSessionIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SessionResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePatchOcpiSessionsCountryCodePartyIdSessionIdResponse parses an HTTP response from a PatchOcpiSessionsCountryCodePartyIdSessionIdWithResponse call +func ParsePatchOcpiSessionsCountryCodePartyIdSessionIdResponse(rsp *http.Response) (*PatchOcpiSessionsCountryCodePartyIdSessionIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchOcpiSessionsCountryCodePartyIdSessionIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SessionResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePutOcpiSessionsCountryCodePartyIdSessionIdResponse parses an HTTP response from a PutOcpiSessionsCountryCodePartyIdSessionIdWithResponse call +func ParsePutOcpiSessionsCountryCodePartyIdSessionIdResponse(rsp *http.Response) (*PutOcpiSessionsCountryCodePartyIdSessionIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutOcpiSessionsCountryCodePartyIdSessionIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SessionResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePutOcpiSessionsSessionIdChargingPreferencesResponse parses an HTTP response from a PutOcpiSessionsSessionIdChargingPreferencesWithResponse call +func ParsePutOcpiSessionsSessionIdChargingPreferencesResponse(rsp *http.Response) (*PutOcpiSessionsSessionIdChargingPreferencesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutOcpiSessionsSessionIdChargingPreferencesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ChargingPreferencesResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetOcpiTariffsResponse parses an HTTP response from a GetOcpiTariffsWithResponse call +func ParseGetOcpiTariffsResponse(rsp *http.Response) (*GetOcpiTariffsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOcpiTariffsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TariffsResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseDeleteOcpiTariffsCountryCodePartyIdTariffIdResponse parses an HTTP response from a DeleteOcpiTariffsCountryCodePartyIdTariffIdWithResponse call +func ParseDeleteOcpiTariffsCountryCodePartyIdTariffIdResponse(rsp *http.Response) (*DeleteOcpiTariffsCountryCodePartyIdTariffIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteOcpiTariffsCountryCodePartyIdTariffIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TariffDeleteResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetOcpiTariffsCountryCodePartyIdTariffIdResponse parses an HTTP response from a GetOcpiTariffsCountryCodePartyIdTariffIdWithResponse call +func ParseGetOcpiTariffsCountryCodePartyIdTariffIdResponse(rsp *http.Response) (*GetOcpiTariffsCountryCodePartyIdTariffIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOcpiTariffsCountryCodePartyIdTariffIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TariffResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePutOcpiTariffsCountryCodePartyIdTariffIdResponse parses an HTTP response from a PutOcpiTariffsCountryCodePartyIdTariffIdWithResponse call +func ParsePutOcpiTariffsCountryCodePartyIdTariffIdResponse(rsp *http.Response) (*PutOcpiTariffsCountryCodePartyIdTariffIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutOcpiTariffsCountryCodePartyIdTariffIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TariffResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetOcpiTokensResponse parses an HTTP response from a GetOcpiTokensWithResponse call +func ParseGetOcpiTokensResponse(rsp *http.Response) (*GetOcpiTokensResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOcpiTokensResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TokensResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetOcpiTokensCountryCodePartyIdTokenUidResponse parses an HTTP response from a GetOcpiTokensCountryCodePartyIdTokenUidWithResponse call +func ParseGetOcpiTokensCountryCodePartyIdTokenUidResponse(rsp *http.Response) (*GetOcpiTokensCountryCodePartyIdTokenUidResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOcpiTokensCountryCodePartyIdTokenUidResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TokenResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePatchOcpiTokensCountryCodePartyIdTokenUidResponse parses an HTTP response from a PatchOcpiTokensCountryCodePartyIdTokenUidWithResponse call +func ParsePatchOcpiTokensCountryCodePartyIdTokenUidResponse(rsp *http.Response) (*PatchOcpiTokensCountryCodePartyIdTokenUidResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchOcpiTokensCountryCodePartyIdTokenUidResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TokenResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePutOcpiTokensCountryCodePartyIdTokenUidResponse parses an HTTP response from a PutOcpiTokensCountryCodePartyIdTokenUidWithResponse call +func ParsePutOcpiTokensCountryCodePartyIdTokenUidResponse(rsp *http.Response) (*PutOcpiTokensCountryCodePartyIdTokenUidResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutOcpiTokensCountryCodePartyIdTokenUidResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TokenResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseGetOcpiVersionsResponse parses an HTTP response from a GetOcpiVersionsWithResponse call +func ParseGetOcpiVersionsResponse(rsp *http.Response) (*GetOcpiVersionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOcpiVersionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Versions + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParsePostOcpiTokenUidAuthorizeResponse parses an HTTP response from a PostOcpiTokenUidAuthorizeWithResponse call +func ParsePostOcpiTokenUidAuthorizeResponse(rsp *http.Response) (*PostOcpiTokenUidAuthorizeResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOcpiTokenUidAuthorizeResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Authorization + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest GenericError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ServerInterface represents all server handlers. +type ServerInterface interface { + // Informs that credentials are invalid + // (DELETE /ocpi/2.2.1/credentials) + DeleteOcpi221Credentials(ctx echo.Context) error + // Get the credentials object + // (GET /ocpi/2.2.1/credentials) + GetOcpi221Credentials(ctx echo.Context) error + // Provides the credentials object + // (POST /ocpi/2.2.1/credentials) + PostOcpi221Credentials(ctx echo.Context) error + // Provides updated credentials object + // (PUT /ocpi/2.2.1/credentials) + PutOcpi221Credentials(ctx echo.Context) error + // Get version supported endpoints + // (GET /ocpi/2.2.1/details) + GetOcpi221Details(ctx echo.Context) error + // Get CDRs + // (GET /ocpi/cdrs) + GetOcpiCdrs(ctx echo.Context, params GetOcpiCdrsParams) error + // Create CDR object + // (POST /ocpi/cdrs) + PostOcpiCdrs(ctx echo.Context) error + // Send a result of the original request by the eMSP + // (POST /ocpi/chargingprofile) + PostOcpiChargingprofile(ctx echo.Context) error + // Update charging profile + // (PUT /ocpi/chargingprofile/{session_id}) + PutOcpiChargingprofileSessionId(ctx echo.Context, sessionId string) error + // Create or update charging profile on session + // (PUT /ocpi/chargingprofiles/{session_id}) + PutOcpiChargingprofilesSessionId(ctx echo.Context, sessionId string) error + // Get active charging profile + // (GET /ocpi/chargingprofiles/{session_id}/{duration}/{response_url}) + GetOcpiChargingprofilesSessionIdDurationResponseUrl(ctx echo.Context, sessionId string, duration int, responseUrl string) error + // Delete charging profile on the session + // (DELETE /ocpi/chargingprofiles/{session_id}/{response_url}) + DeleteOcpiChargingprofilesSessionIdResponseUrl(ctx echo.Context, sessionId string, responseUrl string) error + // Get a ClientInfo object as it is stored in the connected clients system. + // (GET /ocpi/clientinfo/{country_code}/{party_id}) + GetOcpiClientinfoCountryCodePartyId(ctx echo.Context, countryCode string, partyId string) error + // Create or update client info + // (PUT /ocpi/clientinfo/{country_code}/{party_id}) + PutOcpiClientinfoCountryCodePartyId(ctx echo.Context, countryCode string, partyId string) error + // Send a command + // (POST /ocpi/commands/{command}) + PostOcpiCommandsCommand(ctx echo.Context, command PostOcpiCommandsCommandParamsCommand) error + // Receive the asynchronous response from the Charge Point. + // (POST /ocpi/commands/{command}/{uid}) + PostOcpiCommandsCommandUid(ctx echo.Context, command PostOcpiCommandsCommandUidParamsCommand, uid string) error + // Get hub connected clients + // (GET /ocpi/hubclientinfo) + GetOcpiHubclientinfo(ctx echo.Context, params GetOcpiHubclientinfoParams) error + // Get available locations + // (GET /ocpi/locations) + GetOcpiLocations(ctx echo.Context, params GetOcpiLocationsParams) error + // Get location, EVSE or connector + // (GET /ocpi/locations/{country_code}/{party_id}/{location_id}) + GetOcpiLocationsCountryCodePartyIdLocationId(ctx echo.Context, countryCode string, partyId string, locationId string, params GetOcpiLocationsCountryCodePartyIdLocationIdParams) error + // Sends new location object + // (PATCH /ocpi/locations/{country_code}/{party_id}/{location_id}) + PatchOcpiLocationsCountryCodePartyIdLocationId(ctx echo.Context, countryCode string, partyId string, locationId string, params PatchOcpiLocationsCountryCodePartyIdLocationIdParams) error + // Sends new location object + // (PUT /ocpi/locations/{country_code}/{party_id}/{location_id}) + PutOcpiLocationsCountryCodePartyIdLocationId(ctx echo.Context, countryCode string, partyId string, locationId string, params PutOcpiLocationsCountryCodePartyIdLocationIdParams) error + // Get location, EVSE or connector + // (GET /ocpi/locations/{location_id}) + GetOcpiLocationsLocationId(ctx echo.Context, locationId string, params GetOcpiLocationsLocationIdParams) error + // Get charging sessions + // (GET /ocpi/sessions) + GetOcpiSessions(ctx echo.Context, params GetOcpiSessionsParams) error + // Get session with session_id + // (GET /ocpi/sessions/{country_code}/{party_id}/{session_id}) + GetOcpiSessionsCountryCodePartyIdSessionId(ctx echo.Context, countryCode string, partyId string, sessionId string) error + // Update session with session_id + // (PATCH /ocpi/sessions/{country_code}/{party_id}/{session_id}) + PatchOcpiSessionsCountryCodePartyIdSessionId(ctx echo.Context, countryCode string, partyId string, sessionId string) error + // Update session with session_id + // (PUT /ocpi/sessions/{country_code}/{party_id}/{session_id}) + PutOcpiSessionsCountryCodePartyIdSessionId(ctx echo.Context, countryCode string, partyId string, sessionId string) error + // Update charging session + // (PUT /ocpi/sessions/{session_id}/charging_preferences) + PutOcpiSessionsSessionIdChargingPreferences(ctx echo.Context, sessionId string) error + // Get tariffs + // (GET /ocpi/tariffs) + GetOcpiTariffs(ctx echo.Context, params GetOcpiTariffsParams) error + // Delete tariff + // (DELETE /ocpi/tariffs/{country_code}/{party_id}/{tariff_id}) + DeleteOcpiTariffsCountryCodePartyIdTariffId(ctx echo.Context, countryCode string, partyId string, tariffId string) error + // Get tariff with tariff_id + // (GET /ocpi/tariffs/{country_code}/{party_id}/{tariff_id}) + GetOcpiTariffsCountryCodePartyIdTariffId(ctx echo.Context, countryCode string, partyId string, tariffId string) error + // Update tariff + // (PUT /ocpi/tariffs/{country_code}/{party_id}/{tariff_id}) + PutOcpiTariffsCountryCodePartyIdTariffId(ctx echo.Context, countryCode string, partyId string, tariffId string) error + // Get tokens + // (GET /ocpi/tokens) + GetOcpiTokens(ctx echo.Context, params GetOcpiTokensParams) error + // Get the token object + // (GET /ocpi/tokens/{country_code}/{party_id}/{token_uid}) + GetOcpiTokensCountryCodePartyIdTokenUid(ctx echo.Context, countryCode string, partyId string, tokenUid string, params GetOcpiTokensCountryCodePartyIdTokenUidParams) error + // Update token object + // (PATCH /ocpi/tokens/{country_code}/{party_id}/{token_uid}) + PatchOcpiTokensCountryCodePartyIdTokenUid(ctx echo.Context, countryCode string, partyId string, tokenUid string, params PatchOcpiTokensCountryCodePartyIdTokenUidParams) error + // Update token object + // (PUT /ocpi/tokens/{country_code}/{party_id}/{token_uid}) + PutOcpiTokensCountryCodePartyIdTokenUid(ctx echo.Context, countryCode string, partyId string, tokenUid string, params PutOcpiTokensCountryCodePartyIdTokenUidParams) error + // Get supported versions + // (GET /ocpi/versions) + GetOcpiVersions(ctx echo.Context) error + // Authorization + // (POST /ocpi/{token_uid}/authorize) + PostOcpiTokenUidAuthorize(ctx echo.Context, tokenUid string, params PostOcpiTokenUidAuthorizeParams) error +} + +// ServerInterfaceWrapper converts echo contexts to parameters. +type ServerInterfaceWrapper struct { + Handler ServerInterface +} + +// DeleteOcpi221Credentials converts echo context to params. +func (w *ServerInterfaceWrapper) DeleteOcpi221Credentials(ctx echo.Context) error { + var err error + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.DeleteOcpi221Credentials(ctx) + return err +} + +// GetOcpi221Credentials converts echo context to params. +func (w *ServerInterfaceWrapper) GetOcpi221Credentials(ctx echo.Context) error { + var err error + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.GetOcpi221Credentials(ctx) + return err +} + +// PostOcpi221Credentials converts echo context to params. +func (w *ServerInterfaceWrapper) PostOcpi221Credentials(ctx echo.Context) error { + var err error + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.PostOcpi221Credentials(ctx) + return err +} + +// PutOcpi221Credentials converts echo context to params. +func (w *ServerInterfaceWrapper) PutOcpi221Credentials(ctx echo.Context) error { + var err error + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.PutOcpi221Credentials(ctx) + return err +} + +// GetOcpi221Details converts echo context to params. +func (w *ServerInterfaceWrapper) GetOcpi221Details(ctx echo.Context) error { + var err error + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.GetOcpi221Details(ctx) + return err +} + +// GetOcpiCdrs converts echo context to params. +func (w *ServerInterfaceWrapper) GetOcpiCdrs(ctx echo.Context) error { + var err error + + // Parameter object where we will unmarshal all parameters from the context + var params GetOcpiCdrsParams + // ------------- Optional query parameter "date_from" ------------- + + err = runtime.BindQueryParameter("form", true, false, "date_from", ctx.QueryParams(), ¶ms.DateFrom) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter date_from: %s", err)) + } + + // ------------- Optional query parameter "date_to" ------------- + + err = runtime.BindQueryParameter("form", true, false, "date_to", ctx.QueryParams(), ¶ms.DateTo) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter date_to: %s", err)) + } + + // ------------- Optional query parameter "offset" ------------- + + err = runtime.BindQueryParameter("form", true, false, "offset", ctx.QueryParams(), ¶ms.Offset) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter offset: %s", err)) + } + + // ------------- Optional query parameter "limit" ------------- + + err = runtime.BindQueryParameter("form", true, false, "limit", ctx.QueryParams(), ¶ms.Limit) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter limit: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.GetOcpiCdrs(ctx, params) + return err +} + +// PostOcpiCdrs converts echo context to params. +func (w *ServerInterfaceWrapper) PostOcpiCdrs(ctx echo.Context) error { + var err error + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.PostOcpiCdrs(ctx) + return err +} + +// PostOcpiChargingprofile converts echo context to params. +func (w *ServerInterfaceWrapper) PostOcpiChargingprofile(ctx echo.Context) error { + var err error + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.PostOcpiChargingprofile(ctx) + return err +} + +// PutOcpiChargingprofileSessionId converts echo context to params. +func (w *ServerInterfaceWrapper) PutOcpiChargingprofileSessionId(ctx echo.Context) error { + var err error + // ------------- Path parameter "session_id" ------------- + var sessionId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "session_id", runtime.ParamLocationPath, ctx.Param("session_id"), &sessionId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter session_id: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.PutOcpiChargingprofileSessionId(ctx, sessionId) + return err +} + +// PutOcpiChargingprofilesSessionId converts echo context to params. +func (w *ServerInterfaceWrapper) PutOcpiChargingprofilesSessionId(ctx echo.Context) error { + var err error + // ------------- Path parameter "session_id" ------------- + var sessionId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "session_id", runtime.ParamLocationPath, ctx.Param("session_id"), &sessionId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter session_id: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.PutOcpiChargingprofilesSessionId(ctx, sessionId) + return err +} + +// GetOcpiChargingprofilesSessionIdDurationResponseUrl converts echo context to params. +func (w *ServerInterfaceWrapper) GetOcpiChargingprofilesSessionIdDurationResponseUrl(ctx echo.Context) error { + var err error + // ------------- Path parameter "session_id" ------------- + var sessionId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "session_id", runtime.ParamLocationPath, ctx.Param("session_id"), &sessionId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter session_id: %s", err)) + } + + // ------------- Path parameter "duration" ------------- + var duration int + + err = runtime.BindStyledParameterWithLocation("simple", false, "duration", runtime.ParamLocationPath, ctx.Param("duration"), &duration) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter duration: %s", err)) + } + + // ------------- Path parameter "response_url" ------------- + var responseUrl string + + err = runtime.BindStyledParameterWithLocation("simple", false, "response_url", runtime.ParamLocationPath, ctx.Param("response_url"), &responseUrl) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter response_url: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.GetOcpiChargingprofilesSessionIdDurationResponseUrl(ctx, sessionId, duration, responseUrl) + return err +} + +// DeleteOcpiChargingprofilesSessionIdResponseUrl converts echo context to params. +func (w *ServerInterfaceWrapper) DeleteOcpiChargingprofilesSessionIdResponseUrl(ctx echo.Context) error { + var err error + // ------------- Path parameter "session_id" ------------- + var sessionId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "session_id", runtime.ParamLocationPath, ctx.Param("session_id"), &sessionId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter session_id: %s", err)) + } + + // ------------- Path parameter "response_url" ------------- + var responseUrl string + + err = runtime.BindStyledParameterWithLocation("simple", false, "response_url", runtime.ParamLocationPath, ctx.Param("response_url"), &responseUrl) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter response_url: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.DeleteOcpiChargingprofilesSessionIdResponseUrl(ctx, sessionId, responseUrl) + return err +} + +// GetOcpiClientinfoCountryCodePartyId converts echo context to params. +func (w *ServerInterfaceWrapper) GetOcpiClientinfoCountryCodePartyId(ctx echo.Context) error { + var err error + // ------------- Path parameter "country_code" ------------- + var countryCode string + + err = runtime.BindStyledParameterWithLocation("simple", false, "country_code", runtime.ParamLocationPath, ctx.Param("country_code"), &countryCode) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter country_code: %s", err)) + } + + // ------------- Path parameter "party_id" ------------- + var partyId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "party_id", runtime.ParamLocationPath, ctx.Param("party_id"), &partyId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter party_id: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.GetOcpiClientinfoCountryCodePartyId(ctx, countryCode, partyId) + return err +} + +// PutOcpiClientinfoCountryCodePartyId converts echo context to params. +func (w *ServerInterfaceWrapper) PutOcpiClientinfoCountryCodePartyId(ctx echo.Context) error { + var err error + // ------------- Path parameter "country_code" ------------- + var countryCode string + + err = runtime.BindStyledParameterWithLocation("simple", false, "country_code", runtime.ParamLocationPath, ctx.Param("country_code"), &countryCode) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter country_code: %s", err)) + } + + // ------------- Path parameter "party_id" ------------- + var partyId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "party_id", runtime.ParamLocationPath, ctx.Param("party_id"), &partyId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter party_id: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.PutOcpiClientinfoCountryCodePartyId(ctx, countryCode, partyId) + return err +} + +// PostOcpiCommandsCommand converts echo context to params. +func (w *ServerInterfaceWrapper) PostOcpiCommandsCommand(ctx echo.Context) error { + var err error + // ------------- Path parameter "command" ------------- + var command PostOcpiCommandsCommandParamsCommand + + err = runtime.BindStyledParameterWithLocation("simple", false, "command", runtime.ParamLocationPath, ctx.Param("command"), &command) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter command: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.PostOcpiCommandsCommand(ctx, command) + return err +} + +// PostOcpiCommandsCommandUid converts echo context to params. +func (w *ServerInterfaceWrapper) PostOcpiCommandsCommandUid(ctx echo.Context) error { + var err error + // ------------- Path parameter "command" ------------- + var command PostOcpiCommandsCommandUidParamsCommand + + err = runtime.BindStyledParameterWithLocation("simple", false, "command", runtime.ParamLocationPath, ctx.Param("command"), &command) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter command: %s", err)) + } + + // ------------- Path parameter "uid" ------------- + var uid string + + err = runtime.BindStyledParameterWithLocation("simple", false, "uid", runtime.ParamLocationPath, ctx.Param("uid"), &uid) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter uid: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.PostOcpiCommandsCommandUid(ctx, command, uid) + return err +} + +// GetOcpiHubclientinfo converts echo context to params. +func (w *ServerInterfaceWrapper) GetOcpiHubclientinfo(ctx echo.Context) error { + var err error + + // Parameter object where we will unmarshal all parameters from the context + var params GetOcpiHubclientinfoParams + // ------------- Optional query parameter "date_from" ------------- + + err = runtime.BindQueryParameter("form", true, false, "date_from", ctx.QueryParams(), ¶ms.DateFrom) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter date_from: %s", err)) + } + + // ------------- Optional query parameter "date_to" ------------- + + err = runtime.BindQueryParameter("form", true, false, "date_to", ctx.QueryParams(), ¶ms.DateTo) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter date_to: %s", err)) + } + + // ------------- Optional query parameter "offset" ------------- + + err = runtime.BindQueryParameter("form", true, false, "offset", ctx.QueryParams(), ¶ms.Offset) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter offset: %s", err)) + } + + // ------------- Optional query parameter "limit" ------------- + + err = runtime.BindQueryParameter("form", true, false, "limit", ctx.QueryParams(), ¶ms.Limit) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter limit: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.GetOcpiHubclientinfo(ctx, params) + return err +} + +// GetOcpiLocations converts echo context to params. +func (w *ServerInterfaceWrapper) GetOcpiLocations(ctx echo.Context) error { + var err error + + // Parameter object where we will unmarshal all parameters from the context + var params GetOcpiLocationsParams + // ------------- Optional query parameter "date_from" ------------- + + err = runtime.BindQueryParameter("form", true, false, "date_from", ctx.QueryParams(), ¶ms.DateFrom) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter date_from: %s", err)) + } + + // ------------- Optional query parameter "date_to" ------------- + + err = runtime.BindQueryParameter("form", true, false, "date_to", ctx.QueryParams(), ¶ms.DateTo) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter date_to: %s", err)) + } + + // ------------- Optional query parameter "offset" ------------- + + err = runtime.BindQueryParameter("form", true, false, "offset", ctx.QueryParams(), ¶ms.Offset) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter offset: %s", err)) + } + + // ------------- Optional query parameter "limit" ------------- + + err = runtime.BindQueryParameter("form", true, false, "limit", ctx.QueryParams(), ¶ms.Limit) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter limit: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.GetOcpiLocations(ctx, params) + return err +} + +// GetOcpiLocationsCountryCodePartyIdLocationId converts echo context to params. +func (w *ServerInterfaceWrapper) GetOcpiLocationsCountryCodePartyIdLocationId(ctx echo.Context) error { + var err error + // ------------- Path parameter "country_code" ------------- + var countryCode string + + err = runtime.BindStyledParameterWithLocation("simple", false, "country_code", runtime.ParamLocationPath, ctx.Param("country_code"), &countryCode) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter country_code: %s", err)) + } + + // ------------- Path parameter "party_id" ------------- + var partyId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "party_id", runtime.ParamLocationPath, ctx.Param("party_id"), &partyId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter party_id: %s", err)) + } + + // ------------- Path parameter "location_id" ------------- + var locationId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "location_id", runtime.ParamLocationPath, ctx.Param("location_id"), &locationId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter location_id: %s", err)) + } + + // Parameter object where we will unmarshal all parameters from the context + var params GetOcpiLocationsCountryCodePartyIdLocationIdParams + // ------------- Optional query parameter "evse_uid" ------------- + + err = runtime.BindQueryParameter("form", true, false, "evse_uid", ctx.QueryParams(), ¶ms.EvseUid) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter evse_uid: %s", err)) + } + + // ------------- Optional query parameter "connector_id" ------------- + + err = runtime.BindQueryParameter("form", true, false, "connector_id", ctx.QueryParams(), ¶ms.ConnectorId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter connector_id: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.GetOcpiLocationsCountryCodePartyIdLocationId(ctx, countryCode, partyId, locationId, params) + return err +} + +// PatchOcpiLocationsCountryCodePartyIdLocationId converts echo context to params. +func (w *ServerInterfaceWrapper) PatchOcpiLocationsCountryCodePartyIdLocationId(ctx echo.Context) error { + var err error + // ------------- Path parameter "country_code" ------------- + var countryCode string + + err = runtime.BindStyledParameterWithLocation("simple", false, "country_code", runtime.ParamLocationPath, ctx.Param("country_code"), &countryCode) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter country_code: %s", err)) + } + + // ------------- Path parameter "party_id" ------------- + var partyId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "party_id", runtime.ParamLocationPath, ctx.Param("party_id"), &partyId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter party_id: %s", err)) + } + + // ------------- Path parameter "location_id" ------------- + var locationId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "location_id", runtime.ParamLocationPath, ctx.Param("location_id"), &locationId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter location_id: %s", err)) + } + + // Parameter object where we will unmarshal all parameters from the context + var params PatchOcpiLocationsCountryCodePartyIdLocationIdParams + // ------------- Optional query parameter "evse_uid" ------------- + + err = runtime.BindQueryParameter("form", true, false, "evse_uid", ctx.QueryParams(), ¶ms.EvseUid) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter evse_uid: %s", err)) + } + + // ------------- Optional query parameter "connector_id" ------------- + + err = runtime.BindQueryParameter("form", true, false, "connector_id", ctx.QueryParams(), ¶ms.ConnectorId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter connector_id: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.PatchOcpiLocationsCountryCodePartyIdLocationId(ctx, countryCode, partyId, locationId, params) + return err +} + +// PutOcpiLocationsCountryCodePartyIdLocationId converts echo context to params. +func (w *ServerInterfaceWrapper) PutOcpiLocationsCountryCodePartyIdLocationId(ctx echo.Context) error { + var err error + // ------------- Path parameter "country_code" ------------- + var countryCode string + + err = runtime.BindStyledParameterWithLocation("simple", false, "country_code", runtime.ParamLocationPath, ctx.Param("country_code"), &countryCode) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter country_code: %s", err)) + } + + // ------------- Path parameter "party_id" ------------- + var partyId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "party_id", runtime.ParamLocationPath, ctx.Param("party_id"), &partyId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter party_id: %s", err)) + } + + // ------------- Path parameter "location_id" ------------- + var locationId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "location_id", runtime.ParamLocationPath, ctx.Param("location_id"), &locationId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter location_id: %s", err)) + } + + // Parameter object where we will unmarshal all parameters from the context + var params PutOcpiLocationsCountryCodePartyIdLocationIdParams + // ------------- Optional query parameter "evse_uid" ------------- + + err = runtime.BindQueryParameter("form", true, false, "evse_uid", ctx.QueryParams(), ¶ms.EvseUid) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter evse_uid: %s", err)) + } + + // ------------- Optional query parameter "connector_id" ------------- + + err = runtime.BindQueryParameter("form", true, false, "connector_id", ctx.QueryParams(), ¶ms.ConnectorId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter connector_id: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.PutOcpiLocationsCountryCodePartyIdLocationId(ctx, countryCode, partyId, locationId, params) + return err +} + +// GetOcpiLocationsLocationId converts echo context to params. +func (w *ServerInterfaceWrapper) GetOcpiLocationsLocationId(ctx echo.Context) error { + var err error + // ------------- Path parameter "location_id" ------------- + var locationId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "location_id", runtime.ParamLocationPath, ctx.Param("location_id"), &locationId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter location_id: %s", err)) + } + + // Parameter object where we will unmarshal all parameters from the context + var params GetOcpiLocationsLocationIdParams + // ------------- Optional query parameter "evse_uid" ------------- + + err = runtime.BindQueryParameter("form", true, false, "evse_uid", ctx.QueryParams(), ¶ms.EvseUid) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter evse_uid: %s", err)) + } + + // ------------- Optional query parameter "connector_id" ------------- + + err = runtime.BindQueryParameter("form", true, false, "connector_id", ctx.QueryParams(), ¶ms.ConnectorId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter connector_id: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.GetOcpiLocationsLocationId(ctx, locationId, params) + return err +} + +// GetOcpiSessions converts echo context to params. +func (w *ServerInterfaceWrapper) GetOcpiSessions(ctx echo.Context) error { + var err error + + // Parameter object where we will unmarshal all parameters from the context + var params GetOcpiSessionsParams + // ------------- Optional query parameter "date_from" ------------- + + err = runtime.BindQueryParameter("form", true, false, "date_from", ctx.QueryParams(), ¶ms.DateFrom) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter date_from: %s", err)) + } + + // ------------- Optional query parameter "date_to" ------------- + + err = runtime.BindQueryParameter("form", true, false, "date_to", ctx.QueryParams(), ¶ms.DateTo) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter date_to: %s", err)) + } + + // ------------- Optional query parameter "offset" ------------- + + err = runtime.BindQueryParameter("form", true, false, "offset", ctx.QueryParams(), ¶ms.Offset) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter offset: %s", err)) + } + + // ------------- Optional query parameter "limit" ------------- + + err = runtime.BindQueryParameter("form", true, false, "limit", ctx.QueryParams(), ¶ms.Limit) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter limit: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.GetOcpiSessions(ctx, params) + return err +} + +// GetOcpiSessionsCountryCodePartyIdSessionId converts echo context to params. +func (w *ServerInterfaceWrapper) GetOcpiSessionsCountryCodePartyIdSessionId(ctx echo.Context) error { + var err error + // ------------- Path parameter "country_code" ------------- + var countryCode string + + err = runtime.BindStyledParameterWithLocation("simple", false, "country_code", runtime.ParamLocationPath, ctx.Param("country_code"), &countryCode) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter country_code: %s", err)) + } + + // ------------- Path parameter "party_id" ------------- + var partyId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "party_id", runtime.ParamLocationPath, ctx.Param("party_id"), &partyId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter party_id: %s", err)) + } + + // ------------- Path parameter "session_id" ------------- + var sessionId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "session_id", runtime.ParamLocationPath, ctx.Param("session_id"), &sessionId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter session_id: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.GetOcpiSessionsCountryCodePartyIdSessionId(ctx, countryCode, partyId, sessionId) + return err +} + +// PatchOcpiSessionsCountryCodePartyIdSessionId converts echo context to params. +func (w *ServerInterfaceWrapper) PatchOcpiSessionsCountryCodePartyIdSessionId(ctx echo.Context) error { + var err error + // ------------- Path parameter "country_code" ------------- + var countryCode string + + err = runtime.BindStyledParameterWithLocation("simple", false, "country_code", runtime.ParamLocationPath, ctx.Param("country_code"), &countryCode) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter country_code: %s", err)) + } + + // ------------- Path parameter "party_id" ------------- + var partyId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "party_id", runtime.ParamLocationPath, ctx.Param("party_id"), &partyId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter party_id: %s", err)) + } + + // ------------- Path parameter "session_id" ------------- + var sessionId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "session_id", runtime.ParamLocationPath, ctx.Param("session_id"), &sessionId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter session_id: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.PatchOcpiSessionsCountryCodePartyIdSessionId(ctx, countryCode, partyId, sessionId) + return err +} + +// PutOcpiSessionsCountryCodePartyIdSessionId converts echo context to params. +func (w *ServerInterfaceWrapper) PutOcpiSessionsCountryCodePartyIdSessionId(ctx echo.Context) error { + var err error + // ------------- Path parameter "country_code" ------------- + var countryCode string + + err = runtime.BindStyledParameterWithLocation("simple", false, "country_code", runtime.ParamLocationPath, ctx.Param("country_code"), &countryCode) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter country_code: %s", err)) + } + + // ------------- Path parameter "party_id" ------------- + var partyId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "party_id", runtime.ParamLocationPath, ctx.Param("party_id"), &partyId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter party_id: %s", err)) + } + + // ------------- Path parameter "session_id" ------------- + var sessionId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "session_id", runtime.ParamLocationPath, ctx.Param("session_id"), &sessionId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter session_id: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.PutOcpiSessionsCountryCodePartyIdSessionId(ctx, countryCode, partyId, sessionId) + return err +} + +// PutOcpiSessionsSessionIdChargingPreferences converts echo context to params. +func (w *ServerInterfaceWrapper) PutOcpiSessionsSessionIdChargingPreferences(ctx echo.Context) error { + var err error + // ------------- Path parameter "session_id" ------------- + var sessionId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "session_id", runtime.ParamLocationPath, ctx.Param("session_id"), &sessionId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter session_id: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.PutOcpiSessionsSessionIdChargingPreferences(ctx, sessionId) + return err +} + +// GetOcpiTariffs converts echo context to params. +func (w *ServerInterfaceWrapper) GetOcpiTariffs(ctx echo.Context) error { + var err error + + // Parameter object where we will unmarshal all parameters from the context + var params GetOcpiTariffsParams + // ------------- Optional query parameter "date_from" ------------- + + err = runtime.BindQueryParameter("form", true, false, "date_from", ctx.QueryParams(), ¶ms.DateFrom) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter date_from: %s", err)) + } + + // ------------- Optional query parameter "date_to" ------------- + + err = runtime.BindQueryParameter("form", true, false, "date_to", ctx.QueryParams(), ¶ms.DateTo) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter date_to: %s", err)) + } + + // ------------- Optional query parameter "offset" ------------- + + err = runtime.BindQueryParameter("form", true, false, "offset", ctx.QueryParams(), ¶ms.Offset) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter offset: %s", err)) + } + + // ------------- Optional query parameter "limit" ------------- + + err = runtime.BindQueryParameter("form", true, false, "limit", ctx.QueryParams(), ¶ms.Limit) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter limit: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.GetOcpiTariffs(ctx, params) + return err +} + +// DeleteOcpiTariffsCountryCodePartyIdTariffId converts echo context to params. +func (w *ServerInterfaceWrapper) DeleteOcpiTariffsCountryCodePartyIdTariffId(ctx echo.Context) error { + var err error + // ------------- Path parameter "country_code" ------------- + var countryCode string + + err = runtime.BindStyledParameterWithLocation("simple", false, "country_code", runtime.ParamLocationPath, ctx.Param("country_code"), &countryCode) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter country_code: %s", err)) + } + + // ------------- Path parameter "party_id" ------------- + var partyId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "party_id", runtime.ParamLocationPath, ctx.Param("party_id"), &partyId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter party_id: %s", err)) + } + + // ------------- Path parameter "tariff_id" ------------- + var tariffId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "tariff_id", runtime.ParamLocationPath, ctx.Param("tariff_id"), &tariffId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter tariff_id: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.DeleteOcpiTariffsCountryCodePartyIdTariffId(ctx, countryCode, partyId, tariffId) + return err +} + +// GetOcpiTariffsCountryCodePartyIdTariffId converts echo context to params. +func (w *ServerInterfaceWrapper) GetOcpiTariffsCountryCodePartyIdTariffId(ctx echo.Context) error { + var err error + // ------------- Path parameter "country_code" ------------- + var countryCode string + + err = runtime.BindStyledParameterWithLocation("simple", false, "country_code", runtime.ParamLocationPath, ctx.Param("country_code"), &countryCode) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter country_code: %s", err)) + } + + // ------------- Path parameter "party_id" ------------- + var partyId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "party_id", runtime.ParamLocationPath, ctx.Param("party_id"), &partyId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter party_id: %s", err)) + } + + // ------------- Path parameter "tariff_id" ------------- + var tariffId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "tariff_id", runtime.ParamLocationPath, ctx.Param("tariff_id"), &tariffId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter tariff_id: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.GetOcpiTariffsCountryCodePartyIdTariffId(ctx, countryCode, partyId, tariffId) + return err +} + +// PutOcpiTariffsCountryCodePartyIdTariffId converts echo context to params. +func (w *ServerInterfaceWrapper) PutOcpiTariffsCountryCodePartyIdTariffId(ctx echo.Context) error { + var err error + // ------------- Path parameter "country_code" ------------- + var countryCode string + + err = runtime.BindStyledParameterWithLocation("simple", false, "country_code", runtime.ParamLocationPath, ctx.Param("country_code"), &countryCode) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter country_code: %s", err)) + } + + // ------------- Path parameter "party_id" ------------- + var partyId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "party_id", runtime.ParamLocationPath, ctx.Param("party_id"), &partyId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter party_id: %s", err)) + } + + // ------------- Path parameter "tariff_id" ------------- + var tariffId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "tariff_id", runtime.ParamLocationPath, ctx.Param("tariff_id"), &tariffId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter tariff_id: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.PutOcpiTariffsCountryCodePartyIdTariffId(ctx, countryCode, partyId, tariffId) + return err +} + +// GetOcpiTokens converts echo context to params. +func (w *ServerInterfaceWrapper) GetOcpiTokens(ctx echo.Context) error { + var err error + + // Parameter object where we will unmarshal all parameters from the context + var params GetOcpiTokensParams + // ------------- Optional query parameter "date_from" ------------- + + err = runtime.BindQueryParameter("form", true, false, "date_from", ctx.QueryParams(), ¶ms.DateFrom) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter date_from: %s", err)) + } + + // ------------- Optional query parameter "date_to" ------------- + + err = runtime.BindQueryParameter("form", true, false, "date_to", ctx.QueryParams(), ¶ms.DateTo) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter date_to: %s", err)) + } + + // ------------- Optional query parameter "offset" ------------- + + err = runtime.BindQueryParameter("form", true, false, "offset", ctx.QueryParams(), ¶ms.Offset) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter offset: %s", err)) + } + + // ------------- Optional query parameter "limit" ------------- + + err = runtime.BindQueryParameter("form", true, false, "limit", ctx.QueryParams(), ¶ms.Limit) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter limit: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.GetOcpiTokens(ctx, params) + return err +} + +// GetOcpiTokensCountryCodePartyIdTokenUid converts echo context to params. +func (w *ServerInterfaceWrapper) GetOcpiTokensCountryCodePartyIdTokenUid(ctx echo.Context) error { + var err error + // ------------- Path parameter "country_code" ------------- + var countryCode string + + err = runtime.BindStyledParameterWithLocation("simple", false, "country_code", runtime.ParamLocationPath, ctx.Param("country_code"), &countryCode) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter country_code: %s", err)) + } + + // ------------- Path parameter "party_id" ------------- + var partyId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "party_id", runtime.ParamLocationPath, ctx.Param("party_id"), &partyId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter party_id: %s", err)) + } + + // ------------- Path parameter "token_uid" ------------- + var tokenUid string + + err = runtime.BindStyledParameterWithLocation("simple", false, "token_uid", runtime.ParamLocationPath, ctx.Param("token_uid"), &tokenUid) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter token_uid: %s", err)) + } + + // Parameter object where we will unmarshal all parameters from the context + var params GetOcpiTokensCountryCodePartyIdTokenUidParams + // ------------- Optional query parameter "type" ------------- + + err = runtime.BindQueryParameter("form", true, false, "type", ctx.QueryParams(), ¶ms.Type) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter type: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.GetOcpiTokensCountryCodePartyIdTokenUid(ctx, countryCode, partyId, tokenUid, params) + return err +} + +// PatchOcpiTokensCountryCodePartyIdTokenUid converts echo context to params. +func (w *ServerInterfaceWrapper) PatchOcpiTokensCountryCodePartyIdTokenUid(ctx echo.Context) error { + var err error + // ------------- Path parameter "country_code" ------------- + var countryCode string + + err = runtime.BindStyledParameterWithLocation("simple", false, "country_code", runtime.ParamLocationPath, ctx.Param("country_code"), &countryCode) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter country_code: %s", err)) + } + + // ------------- Path parameter "party_id" ------------- + var partyId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "party_id", runtime.ParamLocationPath, ctx.Param("party_id"), &partyId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter party_id: %s", err)) + } + + // ------------- Path parameter "token_uid" ------------- + var tokenUid string + + err = runtime.BindStyledParameterWithLocation("simple", false, "token_uid", runtime.ParamLocationPath, ctx.Param("token_uid"), &tokenUid) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter token_uid: %s", err)) + } + + // Parameter object where we will unmarshal all parameters from the context + var params PatchOcpiTokensCountryCodePartyIdTokenUidParams + // ------------- Optional query parameter "type" ------------- + + err = runtime.BindQueryParameter("form", true, false, "type", ctx.QueryParams(), ¶ms.Type) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter type: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.PatchOcpiTokensCountryCodePartyIdTokenUid(ctx, countryCode, partyId, tokenUid, params) + return err +} + +// PutOcpiTokensCountryCodePartyIdTokenUid converts echo context to params. +func (w *ServerInterfaceWrapper) PutOcpiTokensCountryCodePartyIdTokenUid(ctx echo.Context) error { + var err error + // ------------- Path parameter "country_code" ------------- + var countryCode string + + err = runtime.BindStyledParameterWithLocation("simple", false, "country_code", runtime.ParamLocationPath, ctx.Param("country_code"), &countryCode) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter country_code: %s", err)) + } + + // ------------- Path parameter "party_id" ------------- + var partyId string + + err = runtime.BindStyledParameterWithLocation("simple", false, "party_id", runtime.ParamLocationPath, ctx.Param("party_id"), &partyId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter party_id: %s", err)) + } + + // ------------- Path parameter "token_uid" ------------- + var tokenUid string + + err = runtime.BindStyledParameterWithLocation("simple", false, "token_uid", runtime.ParamLocationPath, ctx.Param("token_uid"), &tokenUid) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter token_uid: %s", err)) + } + + // Parameter object where we will unmarshal all parameters from the context + var params PutOcpiTokensCountryCodePartyIdTokenUidParams + // ------------- Optional query parameter "type" ------------- + + err = runtime.BindQueryParameter("form", true, false, "type", ctx.QueryParams(), ¶ms.Type) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter type: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.PutOcpiTokensCountryCodePartyIdTokenUid(ctx, countryCode, partyId, tokenUid, params) + return err +} + +// GetOcpiVersions converts echo context to params. +func (w *ServerInterfaceWrapper) GetOcpiVersions(ctx echo.Context) error { + var err error + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.GetOcpiVersions(ctx) + return err +} + +// PostOcpiTokenUidAuthorize converts echo context to params. +func (w *ServerInterfaceWrapper) PostOcpiTokenUidAuthorize(ctx echo.Context) error { + var err error + // ------------- Path parameter "token_uid" ------------- + var tokenUid string + + err = runtime.BindStyledParameterWithLocation("simple", false, "token_uid", runtime.ParamLocationPath, ctx.Param("token_uid"), &tokenUid) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter token_uid: %s", err)) + } + + // Parameter object where we will unmarshal all parameters from the context + var params PostOcpiTokenUidAuthorizeParams + // ------------- Optional query parameter "type" ------------- + + err = runtime.BindQueryParameter("form", true, false, "type", ctx.QueryParams(), ¶ms.Type) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter type: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.PostOcpiTokenUidAuthorize(ctx, tokenUid, params) + return err +} + +// This is a simple interface which specifies echo.Route addition functions which +// are present on both echo.Echo and echo.Group, since we want to allow using +// either of them for path registration +type EchoRouter interface { + CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route +} + +// RegisterHandlers adds each server route to the EchoRouter. +func RegisterHandlers(router EchoRouter, si ServerInterface) { + RegisterHandlersWithBaseURL(router, si, "") +} + +// Registers handlers, and prepends BaseURL to the paths, so that the paths +// can be served under a prefix. +func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string) { + + wrapper := ServerInterfaceWrapper{ + Handler: si, + } + + router.DELETE(baseURL+"/ocpi/2.2.1/credentials", wrapper.DeleteOcpi221Credentials) + router.GET(baseURL+"/ocpi/2.2.1/credentials", wrapper.GetOcpi221Credentials) + router.POST(baseURL+"/ocpi/2.2.1/credentials", wrapper.PostOcpi221Credentials) + router.PUT(baseURL+"/ocpi/2.2.1/credentials", wrapper.PutOcpi221Credentials) + router.GET(baseURL+"/ocpi/2.2.1/details", wrapper.GetOcpi221Details) + router.GET(baseURL+"/ocpi/cdrs", wrapper.GetOcpiCdrs) + router.POST(baseURL+"/ocpi/cdrs", wrapper.PostOcpiCdrs) + router.POST(baseURL+"/ocpi/chargingprofile", wrapper.PostOcpiChargingprofile) + router.PUT(baseURL+"/ocpi/chargingprofile/:session_id", wrapper.PutOcpiChargingprofileSessionId) + router.PUT(baseURL+"/ocpi/chargingprofiles/:session_id", wrapper.PutOcpiChargingprofilesSessionId) + router.GET(baseURL+"/ocpi/chargingprofiles/:session_id/:duration/:response_url", wrapper.GetOcpiChargingprofilesSessionIdDurationResponseUrl) + router.DELETE(baseURL+"/ocpi/chargingprofiles/:session_id/:response_url", wrapper.DeleteOcpiChargingprofilesSessionIdResponseUrl) + router.GET(baseURL+"/ocpi/clientinfo/:country_code/:party_id", wrapper.GetOcpiClientinfoCountryCodePartyId) + router.PUT(baseURL+"/ocpi/clientinfo/:country_code/:party_id", wrapper.PutOcpiClientinfoCountryCodePartyId) + router.POST(baseURL+"/ocpi/commands/:command", wrapper.PostOcpiCommandsCommand) + router.POST(baseURL+"/ocpi/commands/:command/:uid", wrapper.PostOcpiCommandsCommandUid) + router.GET(baseURL+"/ocpi/hubclientinfo", wrapper.GetOcpiHubclientinfo) + router.GET(baseURL+"/ocpi/locations", wrapper.GetOcpiLocations) + router.GET(baseURL+"/ocpi/locations/:country_code/:party_id/:location_id", wrapper.GetOcpiLocationsCountryCodePartyIdLocationId) + router.PATCH(baseURL+"/ocpi/locations/:country_code/:party_id/:location_id", wrapper.PatchOcpiLocationsCountryCodePartyIdLocationId) + router.PUT(baseURL+"/ocpi/locations/:country_code/:party_id/:location_id", wrapper.PutOcpiLocationsCountryCodePartyIdLocationId) + router.GET(baseURL+"/ocpi/locations/:location_id", wrapper.GetOcpiLocationsLocationId) + router.GET(baseURL+"/ocpi/sessions", wrapper.GetOcpiSessions) + router.GET(baseURL+"/ocpi/sessions/:country_code/:party_id/:session_id", wrapper.GetOcpiSessionsCountryCodePartyIdSessionId) + router.PATCH(baseURL+"/ocpi/sessions/:country_code/:party_id/:session_id", wrapper.PatchOcpiSessionsCountryCodePartyIdSessionId) + router.PUT(baseURL+"/ocpi/sessions/:country_code/:party_id/:session_id", wrapper.PutOcpiSessionsCountryCodePartyIdSessionId) + router.PUT(baseURL+"/ocpi/sessions/:session_id/charging_preferences", wrapper.PutOcpiSessionsSessionIdChargingPreferences) + router.GET(baseURL+"/ocpi/tariffs", wrapper.GetOcpiTariffs) + router.DELETE(baseURL+"/ocpi/tariffs/:country_code/:party_id/:tariff_id", wrapper.DeleteOcpiTariffsCountryCodePartyIdTariffId) + router.GET(baseURL+"/ocpi/tariffs/:country_code/:party_id/:tariff_id", wrapper.GetOcpiTariffsCountryCodePartyIdTariffId) + router.PUT(baseURL+"/ocpi/tariffs/:country_code/:party_id/:tariff_id", wrapper.PutOcpiTariffsCountryCodePartyIdTariffId) + router.GET(baseURL+"/ocpi/tokens", wrapper.GetOcpiTokens) + router.GET(baseURL+"/ocpi/tokens/:country_code/:party_id/:token_uid", wrapper.GetOcpiTokensCountryCodePartyIdTokenUid) + router.PATCH(baseURL+"/ocpi/tokens/:country_code/:party_id/:token_uid", wrapper.PatchOcpiTokensCountryCodePartyIdTokenUid) + router.PUT(baseURL+"/ocpi/tokens/:country_code/:party_id/:token_uid", wrapper.PutOcpiTokensCountryCodePartyIdTokenUid) + router.GET(baseURL+"/ocpi/versions", wrapper.GetOcpiVersions) + router.POST(baseURL+"/ocpi/:token_uid/authorize", wrapper.PostOcpiTokenUidAuthorize) + +} + +// Base64 encoded, gzipped, json marshaled Swagger object +var swaggerSpec = []string{ + + "H4sIAAAAAAAC/+x9eXPaSvboV+nSe1U3+RW2BXacmP9kkG1+FwNPiOTembmlklFjNBESo8WOJ+Xv/qo3", + "qVtqLXi7JNEfiQGpt9NnP6dPf1eWwWYb+NCPI6X/XYmWa7ix8UcrWG5da7m2w1vXv92Gwcr1oLUNotgK", + "4X8SGMXorcCH05XS/+d35f+GcKX0lf9zlPV4RLs7spexewcHtK8Z6cuAUeLFymOnuu3yaa08aIe5Jn89", + "dtiqgs3G9p3IYp+sJy5saftL6BkwguGdHbuBXzuxEL8LJ8F97atRbIfxHEZRk36jONg2fTfxvWD5dRD4", + "PlzGQchDxguWeB2RlX60XMeybmFs9VTVCmG0DfwINgdR2mPttOBdBOs3Vpy1FLPQ5LZhsIVh7EKMzAyJ", + "rG32xg5Ipzx2FLwblmPH0IrdDe4BfrM3W9SZ0lO7Zwfq6UHv2FQ/9bunfbX3D6WjxA9b9DSKQ9e/VR4f", + "OwrCMDeEjtL/Z3FSxUH+SvsIbv4NlwjvlSpiKiy84Xor+kxnh2fPRoF+skFr0AYDfWbqQ6WjGPr/6gPy", + "cTH5fTL9MuGmXwIC2uGOy+R38Sfe5yReB6H7X8JX+t8VB0bL0N2Sr8pgbfu30AG+vYEgWIF4DQFpDFZh", + "sAHBauUuXdsDTrCMgJNAEAdgGXie67j+LWqG/gQr4PqrAFAwPiidbLXfFdvzgnu0CEUbj6df8N4K07JC", + "uIIh9Jdo6h9OP346U5WOgnpEzT3bv03sW/QM+ghM8Fus9Mmfx47COAMG8V0ErcR1IvRu+jl7x3LRLMbT", + "QRe1jIOvEDdbBn4c2suYPB7qn7TBoNvTT07Hn86UjrIMEj8OH6xl4ED8XOkoDlzZHA5ZFO6DK12bodX7", + "MLxFLUjHxUHUbu/4BC8V7WOy3XouDC20C0pfuQwh9LfQXkKg444AvEQTvg2DZEsneaGq6kFPVbsHn87O", + "UCduFCUwVPqKuYYTeH8dYKB0CuDz7Ci2ki3CGofg4qeDbu+gq5rdj/3eh35XRbi4tcP4gQxlTq4z5NSG", + "1tV0YC3muqF0lAS/cOOset2bJTxYLc8+HnS78NPBJ3jTO1j1PqndVffmbOV0lY5yZ3vo9ThMYEe5c6PE", + "9iw/2dzgSefWc4Aa3K/dGHoukqSKNv6i/TnHRCHSaopcHDdJsex8PB38jj/pf8xGBv40mVoDQx+OTPzZ", + "tNjbRS5TgaU8NacIW2jOMLhaEmHVwaAS0drAKEK7lcPsJrLRYPOLBOyuakpeyrMaBlPWiYyv3CSR68Mo", + "GsLYdr1IAMl3xQtu8cqXdgxvg/ABk4ZmXGKsWUP3dh0r/Q/dXkeJ18nmxrddT+kr6zjeRv2jI9rR4TLY", + "HLmb2yPUm4VfPPz39jaD9L+3EH1LwrrGtNm968RrPO5jR6G0ppPXwXQLQxspBB3lHt5Ebgxpn2KXSgEB", + "2VIrNzmEDvRj1/YixK5tKww8GFkMhpZDgGjhvtK58UgmmWYB3dJ58w0lS6iTNHh02Z4X9dSC6Ayzh5h7", + "fC9Okyl/Ft637/Wyne8w11w6Syc8D5yHHEYiUrY2MF4HWBAtzCvL0P/fQp+bldKo7AkexuIp1HacEEZI", + "8lwcGkEQwTvoxZ5t++BYQ6+7MaKCS+jHWKRQ/dNaBeHGRhxujliVKTzD3LUr/LQN7mHIpI02sLrW7Eqb", + "68I7UWz7jh06hOiG+vUUPw5Cx/XtmGKtHbtxguXZh+6hevLxAxYiXuDfst+PDz/2zs5OTjBMiQhU+sq5", + "PkbyDQlXPL1z/X/O9cH/6OpJ94N6rKrH7CmRDce9D6dIOKVyNyU8BAnwjwTvKTKbbI8J2DNVVYl2ExPE", + "QH/JxlolMnsyPjDn5sGASdWDeVFuD3JybW7+Xi3Xur1j+2aJR051Lxi6gYMh6Lgb6EfYJMmQeLAwDH2C", + "dvEu8BK0zl5PVWX6YKkSaIfuakW3vsfBXlgGYihuzIQp+ZZhJ2kt+7WjLJMQfUNbqS8MrKo4+Xl9wPM6", + "M3vd/vFZXz1DI66DDUzteGTwbqEfUeQns2AwO/mAlbe7wF3C/JykP8t0knQKvWwKGxhDShTpR2FHz/UB", + "ZhAbO/yq9NmHjhIRi9ZKZ4h+c299iFduE91hGSCNNmMR+V86+V+sOxhiQ7mvdpRtcuO5S+srRIDlvqQD", + "3dleQkjPt+MkRJCmHzrK1rNdn06F/5KbpfDtsULuKWUIJ9tYgnDE7hEx7VyX4osHN8zRsw3RZvLOH0Wf", + "6Mbln4RPx6G7jBmFOPaDFaysewjR3lxPJ0PtTw79chM87n9Q+93Tf9A3yBK66ie1o2zsbxaZVaz0j+kP", + "ThJSZDw+VelvX+/XSr9LPmO+qfSPex1l4/pce/pD1l4lP6SNXZ9vHPLCTzH0uW581szRdCKYY+XkTd6h", + "O6Ke9VUVSzwJEcpaU7Ni434jOIu/bcPASZYxMx70w+kEDN0Qfo3nMTLh4DLImkZBEi6pUQ/DJfRjbBr0", + "uocfOwp5iNjpYjDWNUPBM7tzQ0Q7my01ZOwNQhOlf/yx1+EVPNrI+qLNTR2rv5F1iywZi4zN+ETe2sET", + "pnbOECZxtFx7tu/gHigXbMwh0E4jnCTCf+lZd0i29g4/II7EvqqHp6ePdGebvlzgMrsydNuLLWK5llq0", + "vUNVBTAJA7A9WgdJCNAsEmxnf9bMQ6zUZ52J1I9o0PYfsNZLKfqoe1KQbzPtz2skn7B9QEQucVTWrZ+8", + "zTay++Hw+KQn/rpjVyv3G3R2bLO1w69E+jylFdmm00O19/Hkw2n307H6UT1Rj9lrvKK52wCUOR2efTzm", + "f2rYS9Gi5TVVzqoVVdbB9PpamyCD9svVyNTHo7m5qwlbeDev0laaNETLtoQ2eSWtaQfUDJUrWo06ybcr", + "6E28TTT4h8x8YjoV9yZhWPTNmyDwoO1nr+aUGxlAU+Ep2HJYjhZezsmAnMNQKrrzXVQpaQ2WRVaRDcuU", + "OYljQ6bdSQAgsu2yJfUqlpQpfZLuM67Md00YtMTuJHqhpB9eQcwDQNZVTnlsgqE53a3OP9xouznVrckU", + "2OsF5l/VmEjIggTgppsKAzI96tJ7LJEOO4wliogdGublxBOask0pWZRMWOwwSmHLmfCQjyZIkwbD5N15", + "nEDJMXmeX+c4Jse98rwJc4occXPEWMRuAeFyqCTApMKfY+WlE+/caX0vr+x7yakoDN4815KCvigS8V7w", + "7ei2FN8s7FOmDKUbNtDOx7pU8RG3UuDq1aPx28yHKLn91gZWT/LFms/GOK6gDazj9PlwUDO/DGey4TLk", + "GVxp0/8doX6m1/rcHA0sjf9yzn8Z8F+G/Bed/3LBf7nkv1zxX/6X//I7/2XMf7nmv0z4L2j6l+empQ3o", + "hyH6MNIH1ql6rJ5ZPSty/VsPWt3T3O/xOoSlPx/3pD+fnrCfe92zU8vs5r5ag+n1+VT8sZf7KnsH4zH/", + "HS1iol9r1gerp7LPp9Yx9/lD+rmrcg+6Kv/khH9yQp7MtIk5vTS02ZV1PjXN6bW1mIk/m9OZNZx+QYA2", + "9flYs4z007wE0QTus6tSb/HteXYkqlxjqUrLWJX4bpFryVsm+aaUoxX10dx7lNsV3ivGVXhOWFQvedbI", + "t6JcsqgXErYpi2k0EmtWbq/4iNpuQiMXo0obC4FLrp+i5p51LOwAG6MuiJQOyXdVJ95Tw5Fb+Js6+nN5", + "IPzQPBSks5AQ3m4GqNyaEWbP6f55+SSsS5vN2MepeYX/GhcjeZA7kVg9CBy1CSkcdAq6I6cM4l7IMJX7", + "LzH9OTR4s3CLiALisE9xRVhcFy+TGCTMWty42k1rkjLUZCXi5tRthwjTPOpmzdLgAflg6X/Mpkb2wBpd", + "0+/X2h9W1ux6NOG/aX9Ys+kXjPToCfs804zfR5NLyxxdI22I/cz58NmjuamZujW9sEjOApKv6IGMeNhC", + "OXCgNRdMudw2UJqgras2IR+nyoD+04WsRCwpLO+7zGVWsrz0XdeP4S2xpfn1fi/16WSL3tGrY4kdsMXm", + "czGiHZMx8mBoiCtWYTkc5rzYdoo7xrqVOeq4/r/X+tPq0lOKkxa7qIIR5zMTlIw28tlGPtvI5y8R+cwr", + "+WVaOuYCz4zpcCxjBxe9lbarjQs10hdF6tlpIllLaYBIajo+P+jDY3Mjv7qA0o1a7BQ7ekmtnaeHXbYi", + "31xCFDJlo44+ak1KRjkdZWZML0Zj3WJZ7uz7hTbnH18auj7BmvXlYqwZ9ec3yuMOlXGGBmLe4gmQk/et", + "+H4h8Z0/J5QHa4ZNKXwvxppZNMdKLaz8djyFjVpCJ5XuuOqmOZ9EixklmFFwo/CQynAiBZm50Ofk0xd9", + "OGGfzauFQT9eGCPyYa6ZC4N+XODWf1XkUpSLH243pK2LbB5tVZmwSoHPNThWJQFdcWP5t085rwFntaa7", + "zkeLSzqmm8r3KovLC9jS5GXphOWzZWhWN9sMBesmEIrHDRjqiHjKO3HIUR95LITH56eIcB7X+fYE7Tu7", + "+P0lGlbev/OzGzl5h49kvYKOLV96mbbLweJpGq+V60gKrid3LXQkA2eDhK0crAvAkoC9ThfLT+OvnVDY", + "KsKe17oaoWROpeDa8E5W3LzALFh/GZ9gHXeUS6SBaGPrYjqfj8Y4hVJDfy61OfeUKa/z6Ri3+jIiSZaa", + "qTfQZLnZppPZGYJ5FOMTXZoSZy5fgzbjee1HGbPNuixAkPbdUQaacT6dWMPR9I/RUK+HCR2c67wJRCTG", + "khANfaofIR8YZf3wtEO6LJhH+WnUDlcfI6Wj085L4GJw1RI4GESxHScR9Vt0VaQ+0J/YGdK+Mk+WSxhF", + "aAB3A+exvdlyetCxava6/Q9n/Q/YDBf9Kvf394e4yESITcdguXURQ4uOSNCzCEthPrz8V1WZJpSfqxDz", + "zKZd2IVsHTLVLrekYrCzzEyuW26DwFq6ejLLCM+SDFmys1HJ1qJH7aHF9tBie2ixPbTYHlpsDy22obs2", + "dNeG7tpDi/t0aPGFzY9iXJbqwA0cLEp+OvtpfTS0GKS2QlphLKvxU6i94kBE8ElYdaSMn+G/lH8pFf4z", + "H+bCtzJHrlj/ij+/QEKENDS4c0hQ6LchRMqMqaxwGgc8vubcq6OydAbS8ndDfaYZ5sLQsaFHS1bR7MeJ", + "rg/5nydT05pN5/PR+Vjnwq/mnzPdQs/mi9lsapglta1+PIKRgrHzRDpqWPqPGk87VgC0yrrhzbIQieHE", + "d4WDTV+UjqJJ90sahDlTS8MwwjjSo4yvWKMwW1uDXSihW1Ym0k88j+xrkCD5UyCvrJ7kbhVg8aAmmtwj", + "1391iEteeTJrvsNyTcoyxYKM7CmIA1yMMVe6EtDisqQ6I3oBXs9n6cuz6SFWmwt8ReQHQplNczq1phcm", + "5s+05KY11+dzZB9IzxM1qxn6llU+m5JfYZKeuyH0V0IcWbsaRCAd5Zo1mGqd0OIYVQU9vJUAmz2pHmq6", + "xJ9fTSvWi/576cJzoR+PaBnK8nxnXNK0aK3KBEChMGgYkCNNs2kqi9HX6WRCVrJDwuVQ3zmdsFHUXp7q", + "J9Q15fKNAk/UZPHC9Os5UmevFueImWLVdoJ/Ycer5oP5rELPEnpMYdNRphcX49EEq29jbTLBv80X85k+", + "GUr1turMufIT+XhV6WSqcaWMJeEXIotVNX1bHHp1FpdbXXVZ+JSsfgGWhuFSixc/NVr8EljBL3VHq0qs", + "YZzDD25NNaW8mWgsaKsVyj/X+xPLLBcFcoWyzMnqJrrya1oVJStqlCjBIP78bIgXyHBIFyLVl15jg7ld", + "HGiTgT7GjhU+LKJ/nuvWdDBYzEbEBYO+jybTmW5o5uizjl1bo3GtbTW61qcLk8MWfphnqXbpDRbihhdD", + "82lAXhqOOD7onppdtd9VKRfe2N8se7OFIQZ695T8Aj24jEN3ycJKNFp1F3g0FtNTO0p5nF8a3U+jxoir", + "d3HBBhhuIsv2HWsZ+I5Lw3DS0t7SVwsY/aTKMY3qxdQdcinAVZo3nAGaFxGnZYnA+V2oTcflt0g8oix7", + "/Y0q37T1btp6N69Y74ZnKwIZd+VyTMZyak5ty7lPHTenzEh+qkngBiLlCoTJkY9ULGQ3DRQOq5CkEXz1", + "APqQv33gp7+3oSa1Sv9DE22O7BINBd6sjm+Oz84OPn48Wx2cnJx9PDi7OXMO7OWp7RwvlycnTq9yRTif", + "kObeREdvYbk0Kk6Zu5fiFzBn8yvOxRxa4tgL4si5TNmu7H7HinATDmfTNJty8/ThiuXUoS+rvlmaJyxf", + "mIi4Lb7W46uIVDKIvcAdPi9X+Iss4ZX90zlcLKymqrAXnklzjLVkEG/vjPrZ74zaZRk5x/L+IkLOSSw5", + "NZXNWJ+YhjYZIIt0PB0wB9NEN79MDWRlEp/SlK/VN/0ykZ42y5bPAYpAolA5OgNNnbyqgpKkOkTaF4Xg", + "04RkDrpFxCTgrlln3oXNNiKrOlgiVOUsKEusd7aBS/PFXYy/KxeGLPZOWDD5XKPV9A57h11ykAiXi2PZ", + "90rvUN0XK4CR4K9hAQirzZ+4fqttz5985sZtulNW1oofIeNAaKiO0jvskv/p3x75/7BbrwywPuugaAnz", + "5+D5kiAUIcb3XA2yTeAkHhwNWZ4XU5+q2rh+DMOVvYRG4KUJYpSridlaC2PMcq8YEA75y2+bLa/2THa2", + "2jSSX8bY6NGHDfRj2xvh8w8DyhXlCWf0qQsjEKyA0ByQ8xOAHgPqPP1IMDleV5DvW/vG9VyyqURijiaX", + "VlpmSJtpJLU1DXZEbYjjuaciHTeE2QGnp5/qKD9NiZa58oIgtDx4BxGR4+t83Y19m9eX9k6xK0OgTzhT", + "oddXu9TQxKczxONiiv7Zmk7Gf6IX1g+Ru8QHNLJjuV0+i0H7rI3GFL2p+ELsBzEres7JDRzrBt66iEjV", + "j6S+CP0Z+g47WCbpkNV0JudYJdoqT3Y5jVVOf9wj/UI39MlAnwuPRzNroBlDFgbFxRUmpjYwx/p8XniE", + "r18mv860P2knQ/28+ONMH1qmblyPJrhUg6FfT03dmpuaYVpzczrjJkEDq/TLxWhoGbo2JLYveZ/E6S2a", + "PzI1+Fx6c/q7PrEujemC73MxGU8Hv6c/VF7jUO9ASCO2L1+UXyTqZ1aVa1S1XxpMEaieb30gfT3jCJXS", + "eMPuw64PuYpkKnO0SOiWq1GWEvBsvLi8JCcyRnO0+ThXYDE3p9e6MVc6yvXUnBqDPwfjkkpDMg5QG1Qu", + "5grybCK7zZzRo9JRxJyE6cKcXkwNgvZZRiGim8/0E6KSmgRTKUeq2iKMMfk2stLy8gscCkkjQmSMAqW8", + "grx09ELlmeew00JJGq4zoQzUx778Ygh+oCY1xfYEEYrVbbKFVyaT3kIfhu5SD0OSoNKsUkhPVbs7GpjX", + "bhQhrYRNE6xc6Dl9QM3/N7Y656VWJwVIk1IuBAoFL0DdSnd2DfyCu0BESetlbL2Mb+NlLDoSCub3iL0C", + "kGGfehGQ6U1rVvAnuub6ZEhvrRjoo88l28e0REM8bco5umitGyToss9ZQysrfVN0VmVtv5cPbTW7kikv", + "+bnWMniy52V+27pyRuxY2P0a+tbSCyI07Mr2IlisdfSSlYdkwcoXs8N/sfIaCP+i1n3Uuo9a99EbuY9W", + "9jIjs6upiVkaXxztx90aUoxHzYrxSOq8BVvos1IsVPAsIRbftoeFiOvfRjsAHSE/1wPtfsceQnibeHZo", + "IeqKdtrxewi/OvaD0u8idese+vHDCnUC7yCtivaI10xSBn72vIzg3oc//yrTakJU8Iynk0sLe7C+4Hpm", + "hUJR0tqGuEJctGYym361bM8L7qFjxRh+t2GQbElXwwtVVQ+QOXnw6QwLFTeKEgRuxVzDCby/Dugl1BX1", + "DFVWHVHpKHdulNieRdXy4gCYLjxE4JagKe4i4rJEmqfKtuweUGXuBXfQd3FRvOTmlyEqXEjqv4GPmyfI", + "ejg6D5Mogl60LzkPKX78IlkPufXudn16aza1ZlNrNrVmU2s2tWZTaza1ZlNrNrVmU2s2vbXZlLvShens", + "vBkhVd9LC/iJ+jzXD1Xti/cNEWWfH5Hq/ZK0qBfNb0otAzElaSwferfTVy+bO/VCN62m6npd2k1e08hi", + "w0zlMPS5qS0MbUKqXlzo+I788RhXGpvpxrVmEH1+TvPzDH1g6OQuNc3QNXygzFwYuN1iri+ulY5yPvpd", + "t+ZXmkGST84Xc5yPp3QUU/tjZM1NDV+bZBraNXtwrZvGFD2hsWnT0EYT7rs2MugE2NWQ4ymZsjGbTscW", + "/VXpKBcLfcw1/DK6GDUq5CGPQb54HlpBOyoMWDyrxWtOhdcLqlRzz4Ylts3pKFX9sBNaw+xcYyr1d2wn", + "ylEupykvUNnGX2qGdqkXMGE6sYbG6LNOXp4i5DF0nVTXGerGpTFdTIas8V+ND1qW3PkrCHP+fSrXiw2Y", + "oG9wc5tcC9hhXyUdlMnxHXotts/EsuDhyiR0MXdNFNk74gonBIWzjDl5WHvpGBWPVGaJAimTJ4UyHNnw", + "9V40S2LiZCkWP7+1k8sLKVnwU3mVJV1/BVxefKAC+J48gtiTDKS1LCNfNCDXwa7YapVBcfek2bfPj61O", + "S+X62hkqhS1/Sg6xQDxvnjqcji69uaGs5GA5DLMeG0BTLtY4IP7Ndq64G9lkhCrEhXkVFUY6UaGcsHTO", + "tbfr09Vosxn7yNIzjYuR/OaGQlY9D4TC2zmo7LTSx/odl2ocQgHKN3Yi5EtasuH5hfMzkaQwplMTji5k", + "syzV559lPBZOQdCZ8zOSkaBwwrWQXzodzEYAHzYF5EX+HCe+YydzCNBq+URBwuU0I0UsKdZR1skNKRRL", + "68Rm+55eWRdxF7TR6juRXB3PLrLi9abqO63ySgd9zCewo4aFgG3WE1818fD0tC7dNx1DBnzuAiYjC0uY", + "OVp/2mXlpG84Ce6LRyhKL/8U0Pz046czqZDILrusP52DNK6tGz6k16Y3T/ql1xaWrIxvI3uFFHKled5F", + "fsqqOlURHXmpuKPZesTZF6aWmwgbVoYKFPvzsfWnXeGq/BA3h+aWw64P7faefXuo5DZZyYWi9deC9tQD", + "9eRAPcOR6I/UH1Ny1WsXx1DxHYpqec3yE7PLXd4nyZhvcOcn2QsZgNB8j/PzzaKNA3q8K7sHL2p0WVuR", + "eaQ4yWkk4m4OptfXxIv35Wpk6uPR3JSyqUasSOqo5RG8qYeYUrQcSas6YfepFtoV8K32mOauHuYMTwWX", + "BkZZye1rTvmdTFJ0fiZ3LyxZfrYX04W04HAmYxtc1SGSz3PPj/C09r2pv0/ghMKZy6rrsKSU2eTgJqPZ", + "wfR6NtZJXfDR5LM2Hg3xCffJkHi1qyuDF2i+Ca7zTQoeMo4J8LSYo4ZCAbgUmTk8oyVtEYoUPGqieOXK", + "x+XhXXmglK6o7PxkJnpbedvK279f3r52iiuH8A34wA+a3konv9tdJKViPndi8C3JK5eeLAz9FJXF4rp4", + "mXschVmLFlyTNGRh+F12xRKBwW1Qky0R4VpwsD1NnWVD8DTSU+ucBPQgMG1cBYICK/lRXR/M21Mtk6NW", + "KLdC+ZcSytHPLZV3ksXxYNcLl3e8W1TmKiyWhCAea5y6h7nFLldNk2Fyo0hXizB5nilmL+qw3dFDsZsH", + "IGd0v6kvtuB9behsjYNtKaxr58tksXS9xTu4+CkxIi8rUUH4ePV1q+e6lG/Teh9kPe4SWhkQ0Uv4EngC", + "I6F4mWM/WMHKuofwq9JXrqeTIU6PYmIgl5Z23P+g9run/6BvEJ5L4tYb+5tFZhUr/WP6Q3bt+PGpSn/D", + "0qFLPtNjO8c9eut42p7+kLVXyQ9pY9fnG3N+d1YgNhMN5WKTvEMlh3rWV1W8gUUZKG29z4fAEAxe5OQX", + "Uykqz3Jw0hzvahaZq9ZJ8S42fbmQL7+rdpQGS591horrTEzxRvRm+w/kGBgJYB51TwoK40z781qfmLvc", + "bHyuP98vzLGHSjZLVpe+XudSbmYeNs9rZuML6cxNzMqmibVV7mMBd6tmSV7KI3CjFjslkb6kbc5j/zPT", + "1PMkIFWaaqihNrWF0UlHSc+WXun4ahL2/UKb848vDV0nAfLLxVgzdr7+mnNNy65YSzeuXG4PoQdj2KRK", + "32vYDz+BMVBee48A+GVAm+pYrWLVKlatYvUTKlZ7yz1T1lOvA70ytyVj1Plg8upgLqe5ZYfPYoe57O4C", + "NLnS4gysF2ONP+Nmjq51elF4WRKgsAs7qP5ioQRpMm9li3yNzXb7he0vlh3iAJRtfAopc6HPyacv+nDC", + "PptXC4N+vDBG5MNcMxcG/bjArf+qSBQqt5S4TZC2LlokZYcKhD3jGhzLWKu4n/zbp2rpNeX59KJuScfF", + "m8+PZYWJBSRp8rJ0wvLZMuyqm22GeXUTELCymsYrEo4fRVx+iqXJ47lwwuBMejqliqWIGiB/ydZPqQzm", + "b/SSLFJw8sjXW+Z34QDwtDPlVq4jKYx2cutYufYyKDY4CJsDcQFGEmjXXpeVm8ZfTbDUKoKDz+KuxJ5c", + "pIe+yxP9RxnV8wXdK4/511zpVcjsIxPgBiiHQPSCBnnUWuStRd5a5K1F/jdY5NFemOTVlnjhGvp8RtNQ", + "/6QNBt2efnI6/nRWzPcZImbqwJWdeDHLTGDFqZhrnRIr67g4SHpY9Ewp0tYlor8ttJeQURi8xNfXPOXY", + "bh5tizT56aDbO+iqZvdjv/eh31Vz2Vrm5Lo6W+vGWfW6N0t4sFqefTzoduGng0/wpnew6n1Su6vuzdnK", + "6Sod5c720OuEndScEsZFE+/Xbgw9N4px1a8v2p9zWbCPg6pwqja/izucHxlK44TyLedvgSF7T8Mp9WEU", + "KZrU5m5Y+UYCYrzBEeoMofhW0N85lijDu4aHRwScfJPT3Q2RvJjISrC+gQ7e/Ii4/B4/jlz44j6YbjqK", + "Nh5Pv+BTL/STNb24GI8mOr6fSH6HTSHOl9Fa4UAKxaTycF92TQ/+QuDCz7qUW79NIJATDa08+GHkwY8Y", + "vn1Wpl6ZrlOVpieXG1U60JPQsaFkFvqW1K0q9URIx63VDYX+SqETvSmTiVou03KZt+Ey0cuyGRkBJb4X", + "LL8O0ouVi9nle5w2XdRx+FO33NnaihRpGVDuYBhV3JEn+gHu7+8PcZWRELsCguXWPcLVYo6UtCfiatiX", + "mzvY8n6RizvE5Ypb+pytFAFfmgRY2WnR5GCjZGYAGq6j9A675H/6t0f+P+zW6/4k7Z71XATRIz7gtgqK", + "pY/mW7h0Vy4hHrAKQjAdzEYRq4ME1rbveDAkqBrjZeNqSVmdJB5qaLK0Fqu9dXFBKPXwGIuOeI2ByEOH", + "L5qEJ+bBWHr75yoINxGI1xAQMIN4bcfAjSPAdQHiANgYNfGb5DjLbxGIHqIYboAdQuAH98D1scwBtu+A", + "pe0DPwBe4N/CENxAkETQOQTnQbwGSNi5MAKbJIoB9FGDB2AncbBBQhIsg80m8SncDoG5diPgkpETP4S3", + "bhQTRzfYhgGaFH2HHPAD14u5CUIYJ6EPbHBlmjNAEB4ghAcn6oc+e9UPYkBLxQF3xa0NrO0IP72B0Adk", + "TBhCB9zAVRDCQ4XVsXUDf4T1Awzg6XLr9nrdgVCxijFMvBE9VWXKCQ0N20gXIWs9+ndEkJfwmtpoGzcM", + "RkNxb4XHHeVE/fBiIwvXa0uGFp+n2tvfND7WrTcbG5drzzDejgUUR0hMEZhcmB0XycWAcejCO0jJgGtN", + "uEGOTghF/RaBrWfHaFiEqBDfUg2jGNwEzgNCbLjZxg8d3ILhCkBgsl2/aqDakdxI1tL2oiDrHn6LQxsA", + "1yfX6yCism+CJOY5QpQs18COMFNgFXOBQ0rmFinhEsb7TAZ7hIqXMC7ZXlb+uYiBszC4cx0ocOx7N143", + "59a7YYYcMSiTrEQMoIHZdG4C13dj147plGXsG4vGGE2K3T79WwSo6CMUQxeK5QWe5QrGy7W4OtaW6y7t", + "gytCOFqhaaNhV4nX4cGIe8fbZccQ2MCH9zmofoU+lm0ElR0CeGESxTZSKs12Qkrcri8yg+Yb04RiX0dY", + "2l4IbeehscCcBVEZn8Dc8TxwHl6LRTy2Qnm/OKHA1UrYYbILN6T+lv3kigsT3LueB6J7F3OxALemzIoq", + "Jpn4z80qu6B/BVw0f8dd4bPcMViFwYZMhGSGlPPQSvZp39qu3wHwDvqMztncmFa8XNv+LVLnn8tNCatO", + "QVfNXOs39WdmsDJr5AHGEs6atIy1Zaw5xiqjndSD0RFcBxSNcYFymRF0gZlHCXkk220QooFEdYxxogpr", + "gd3B8YooxFYmgaGT3QCyZxYC470S0HJbhytpV+/YYGhEmYwYzKYpnyzblQEpz721QxuX0ImU/j8lJjFi", + "bbhzLLrW9h0EfNAD2KsYhiAIAfxPYntE3rkRGNoxPDLdDQTvcOJY5N7B9whD4Leth52pJHSBbzv4TwLx", + "dSk0YoPz2NBalA63C5J08gfsVkOoqjx2njD3ZFucbwfcJDHmx1nC2zv47SlLiINnLQCJt2C1imAMAiIw", + "Vm4YxUzMEbGD5PSQ4DRwI6A2nB/pVzY97ixCzfyu7W/uJtkA4v1GcyQzw3L7UjcbTsVzN+5uM/nrNQWR", + "E2YxU5kkEp7vHT9B2F7uXxiEENvqRGEbDA2iQ2FLnqop0TpIPIepSwTrEs/DytvK9W0PNaMbfQgAIbII", + "LIwxQoAlHsDh3ik1DSn7eRW9hRxUeHWdxQlrMGVPEYWgAb9JnKgRb2vAQU8pLplrGEIaHMDbH8HbDVJn", + "M4ECWKQF3DxgL80hABrR5efQd2AIEImHK3sJEe9a2p5H3kVvGHAJXaSNv4sfti569oDE2nsQ+AC/gMa8", + "de+wzpwFLZn2Twdg3lhqhqWdpgMfAjDCnJPJAgjczZacICD6D+W9tENuNvPBfPYeNXLQajeuDwG4R4KG", + "gwCCzzZJbZKFMSYkR3uLoO8gckRroa/wxEicyLm5kw6ylXBgjgOQRJAINNQlM8Ds6MFfrsPAD5IIZIYR", + "hTSuogbBDGkdhxQatnPnRqTHjf2V6zLx3f8kEPcM72D4AHgQp9aqi/ArcjeJF9s+DLA9RK786JCm9P7S", + "mwdgO1jE2qxn4DrI9rJ5nCp3MA1y6Po6DMVCpGHlSMNCdGHR4V6b11BqruI3hVf2iufMcSQQ4R7SVChN", + "BaF7i2VKGjQhGAmv57NynnT0Pauw9ogZlMx7tMA6XlRJu/dr6FczG/DVD+5JJ9oydu9gruQgNt5Th4lA", + "mPMrbTzGTI1QT8brKOXESDt2YzoE6SQiWip2BWxsB9KArb/yEugvYcVEMF3ZPgj82wARFIUR0CZDHgbY", + "mxsDD9pIk0RdZi4e74HxYOydoAMAQOGeLW22MLnlpB55NuS7eaE043vsTRJADZwARv5vZP3NIAze6Z/n", + "Om6INXQ/iN1VTlwU5cWKLce/he8RwF3Smmebkm3KbSfdz8nUlO4pgf5DCoN7LB5zgPfRxndEiEtB/jIQ", + "l+FjROgwieAqQXTnwTvbjwE7XYagJd+GOCBtqTSiyzpEAt0Gt4nrwD64gfE9wtwPWF08VcHG9ZMYRunm", + "U1jc29gVyfIHShCaa7C0fWB79/ZDBJwA2Mi6IC7EtA+2gFKPWU5S0PKOI6fOBDZxYgIWTa5DyRE7WVZu", + "6pomm0AF+GA2zQK1vAlEL77GNtDWjteZCcRVjOTTU+gJtXoDMsIqCzWMXl782bL9aSVejcQjAqhA0+Vy", + "LWom2HJGXI5qAh/YDCM7IEAa8Nazl+h9H8BvbhSjuUhaIdRF3LUpAUUtBTVHI0mt4tc2TsXhKn0a4V6b", + "qUFI/dtF8Rj4IC133Yyqjr4zQfF49J23Gx9L/atiWpBcVuFgEbZhSXDOe0AI7PvQSW0w9I+Yq9nVE3K/", + "bBmdDenM2VYucO7iT0N6Bf/iGPq38Zrpb5QsoVOyBS4C7DJA9jQDFPdbw7Wkh+wbrETinixdCrJlMfRL", + "UcgghhG2/qkP7gYyjYsGHVEvYOPertMQMmLqdH9HQ6Sa3UBg3xBtzSG8PnGjdaqYIb2pRNui8G0KqVzh", + "6uey3JYLVnl1iQL2ZFVCwunKUoYHHrTDKHMLcRgSQcE+ZzqDwNOqUmdL+dqvws8EJoAB/aa0P9THuqmD", + "wr62hL+fhE8oR6r0cIjO84D05uSj7/wpu8ej7+wAWrmWQw30q+SGWudxAJZruPxKBiNJLcEK2GCAhxn5", + "qwDkMm7oISPo0MyW9AiBG1PURfIHO/5IuzReXd4U5xfYnuvQpNIk3AYRjIhzBs2Wnh0I7n0YgtSxSAKR", + "HRAFaPB7RlOu5wW37tL20hSc3LhsWLC2HWBz6VcMAiG4tyOwcaMIe619Fgor1ebSTRmQLRkEDpyh7ag3", + "nGgLkktUUIO4fcjm0ICAcwfcX5LD4XUhbvSOpqaEYDR8/3JT5w7d7yvfIdiLllYZG5S9tn9qR3GjMksn", + "ioMQOnWkf1ia3TmB95lpJ0EJFjuL1siIYowCUXwcALswYLnb4oUJEOs+SDYj+sdO2NnCzMcZkdrBALDf", + "RPk6y3lBQn2F9IAU1V7dCdOMG/ww/hciIl0CuVTtoJFdpHTgT4/lSQM0Ckhf5NCrw1COoCFBORZyoBxG", + "bMMFrcujw3Rq9G+tdfGwxWSeDoXtiygTXI2JmQ1XjvxpdSVtMtDHFn89M7usWbcm0y9KR5mbmmFac30+", + "J0/n5nTGfV1MxtPB79ZgOpnoA3Mqr8j0RqRFA+UU7Bb7ZL1prJwOWil/86/sY6ycoVEVqR19T9wqgmuW", + "24KFwNMSWVL5IUtjYXksfBrLYDYlLRGFN0leEbNXnpy8Is9e2TV5pS57ZbfkFZE9LdyWQwl6TIOFJPuq", + "Y6QMBvEUCfkbQiIM2086lQ6Xyc3jt9KyzQq2STMdihlvKc8og2rKYNfJTeZF2fmMBDN9MtsEmypXyU2p", + "e+BKGLBhNn5mKjXOyd+fdPzayRNh1ebjt/n4orFW70/Zc3fKOrkp+kk45sMqMZUf9RnCLbXUg1QNA3Oi", + "ZkRgS8x7h5zUvNTNLDd3afsAuvE6K9aCcCKkkW0JK7MB8NwII7p9Z7seDiyM2QTBO5x8pX+e6xFO9UqL", + "ZEXvgR0DYGPt7h2aw9iN4veIF7lkGnXj0wkEPgQRLbGTDtzhz/p/6OIJoK7T4QEZc4rx/n0p100X0pDj", + "Zgvf7RAUtprjPeC6tQvgTkKlk2457y/NeTN2JGF13MP9c1unDItfQoHLlgfJjr5zRfFqQ2aI09WEzDL+", + "hTmWyLLEGBqxp7GvtVMdN8u/Xh0qo9Z2FiqjhNQ8VMYPlY+O1YbHwGiFG0TLEG5tf4lLI62CxKfSCk2P", + "rnWbRGsc2yZOR+o2wKPfuTawsYM6CMFMMwdXOHu6ns8XXf/s0dOCAGi6nMPSsWM7My44QO279/+F1/Ey", + "bv9iIhjdq0PXYRNnP3EVs5g20XCu+bqXLzdd/S6Ch4nrdDLfFj5owgHa9iW6iyQUWi4ruAqeT5er6diH", + "1bN96iRzVUcbT/Q1xRpxUadSwLI4RLCsWxhbPVW1wgpjI23bAWgXOiBd5h4KQ08UPUEoznZrx8u1JE5j", + "b3BSK/bkLth5RKIQBr73QHUw6DnRUarqpJolTUZiuiX+jfy0DWEE/fgQTLEtIuuBnCiNmfIPHYAmgjhL", + "Lo8Av7kM/AgxNaTC+vw5rBBXpuoQlZa6oem5HxAlbswypUK4CXIWSLS2UX/QDj0Xn3DxH/IBUSJ72ClN", + "etKLOzIt6NZ4lYfgCztsRhq7EcnVz0iLWC0dIJ5nIp3jGjYRLSnnw3txhDvbS9LEoK2NRTLebmSbZbyS", + "DBCVTgU3YbMom8Rus8iNLfGFIwRsZXUrq1tZ3crqX1hWz3EIFfNUkVxKE6iYVYdTpCKJm64j849xjgnG", + "Nw6xiM/55nDiBZpOjnpxy4zlIIUAiwVM1PikWXbKLGXpvMRBxpuPz72yimwyGdhEBO4gA0tEoDgjbkKN", + "JCGay79eUBImrc3aysFWDv7IcvC1Mqp2EYGPrUB+ZYEs8yU38hjrrLxrFIfJMk5CCBy4wjW06R0SlCEQ", + "DK4Q5P1al2dzYdGyqlZlbznEK7jXUj5Bz2rV1fCkJyJTTTtYZae/WBdY0QSpb40d7kNE+z0NGT9ipfc7", + "Db0+gndb+9b1UYPymPiczbFZSJy9/qNGxOvm3wbE24B4oYgHQZmqRKTiO3vHsgosRcKoqmLjuRo1Un5m", + "CoeGaGA39aEXi9gjDAF2jgGKVl12IVUcCEUEOyzoDdO4O8SVb27g0iYZ5WQyazsCIbHjHVwNBwEIOElI", + "hDDxhae8sZZRFu3zxhVxyszzLQwRGrMzMJe6yZwIAgR+AAO94Ur+Xht95GTFPQXEiwNwC8vw7++oSPS6", + "HK0BQ9tjfpZW3HPjNeCg/grRTR8S52hddPNCbHu/dpdrSWAT/VISwayLOdaEHFnM0cy3y+F7sR4uuA/C", + "r1FKrH7shtnrjD4QkNhhG/5eC3qEh1yxwR2BIe7mEJ8BItMh0EXTcX1ycD/TeSUE6bghXMZoUOy3Zcw6", + "TW8V7lOj8s3awtANnIgCAymcCNAFMfOeBokJSPE24ourID3Kw22D7TiA1H6EXB0NPEzBsc6c4OJgaSXE", + "dOqF2eK8WzcCwcaN0V6+I0YFdU375EI5/Nb7DvCDtHBoOn9SNzQ3jTSdNz8gnlGxMJy4KNfnwMao4AYC", + "AJjX3yG15jbBHUtApqUbybSYHM7IjY8YVKDau0zVZpDPr+B9RVT5rYS1GzH9QSblAKnhku4Q1lMQEyKB", + "AsqKeIGdlbEW6OAG4kog+FD84Y+mBpTASLyjqQZGTBOohM9uAHp15cIXKx3kGEKrTexbxc4qhYIEYqWB", + "u7dkNQuzZTTvd4NQy2Z+hjKqrObVq0a5fnpGJvH38OUCMwUrhDjBf0lgLE1DmcNY0BzBLGuETz8UStLT", + "wwDkpsR4zRWkyxq6nKuGFrbHDnZshmUF4InxhViavbVvXM+NH8DgSjMuR5NLa2boF7qhTwb63BpoM+18", + "rBPNlHUdsmp7wq2Eti9c5BeswIl6gh3qtk/Onwl3/AUr0FPVLuMU+IX0wHFQnevBREYqICSgqJMZtC0X", + "vGOUj+BGTE++nKOwP8gCJZp8BH8SHrGUgPDNai2nQ1YeVq16fa9LmBdrDsZ26K5WdYEt+tZu99OZtOtm", + "8Sj69g94Ir5m5u1x+DYGlREzpaQq9lJ4Zf+uxaeUXWAjVWEn8gqLOpXVL6ZFU21KVQwZiRik3kqc4mr7", + "D2AThBALdnxhM7mClzxNb76LkxAeAnCOT5MAPCqJFgn9d2hNREMfTK+v9clQxwV5oR8lIcxq/opzSm+h", + "oULAAbigkP9QPBuK9BI6pRQMUVWtZcpTiqYoefBiESq+VuAz4jv7FKp6oSW9krlH9o9T9kScwjW8EBI0", + "nGWKTfvrVSJTJKhdz/by7+1jRWcyUzS3Zx4rp3tPOYOIpp36ostiVB1ZC/Lj4xrWnWzPy45qy06SM1bY", + "6CB5Nm5JoeX8UXJuASRS4D3UKI6vzvza8Pzfzet2zEn9YbhdPZ/be+2O+FIyiDcsAy1ssbwENK0Mm55e", + "KnOu7I0O9HSnvIjwP7RPvgmcnuKZfzaI/jbmtUzLK9Mw+N/AxV7e/caUm9f1uP3gbJL61VJYpWZw8BXW", + "ZokXi7WZuBm+R9WX1BGKSlMZScOGHjYyuR3zvffGy1Y9+9bJ1jrZOO6CcaWSu+Te2D8ljFB2nrVUOtjQ", + "G1bSoOIZ5i11tinqLTVNuVzwWrOUezdX0SxX0gxPo9wSrSppxkxRbqyXuvCH8FSJ1ol+b1Diu/TOEeGC", + "BDfC8JMA7Ye4cORl1/JaKhzascOEU+EwTj/d/GQE9irzjGlp+Gyi/Awz+bBiiaV9YFyMhs34M56UrDi8", + "NrSupgNrMdcNpaNosxn7ODWv8F88RlW99zdi57XcfJ+Z+RoShs6XBHm51HZOKaor3NUBgaxwV1nlrvIK", + "XZL89p0S3El+e3ne76txYfGqJCELvXhZ0jMsf57V/EiG/w5Aep7d/0wAtTKjlRk/q8xg7oW8yGjif+Xa", + "yN2v7K4gdpdPqfv1bThw5WV1Lf8tB1HLfVvu+2zu+wr+YwSIV3cf/3TcPfXz0AP1uzuRMeEn220Q4gp2", + "tJtSN8dnNs4rblO6FgmAsmf7dyC5AEVufzg325GdxOsgdP8Ly+/vGwbABr+F0PYOYncDfwOsDdm6HF8X", + "Lg9IPWf+LeIhzCVHnG8s0e0dTU0L8IC25z3QC/1ZBaj35dfXMUmupcuou71Ozp6zPHVxcU+4165l2G/O", + "sFkFJOPN0u0FLJHRZ+6FvWIQWnHyEQzvGMEkoaf0lSPl8a/H/x8AAP//QEpUQfiwAQA=", +} + +// GetSwagger returns the content of the embedded swagger specification file +// or error if failed to decode +func decodeSpec() ([]byte, error) { + zipped, err := base64.StdEncoding.DecodeString(strings.Join(swaggerSpec, "")) + if err != nil { + return nil, fmt.Errorf("error base64 decoding spec: %s", err) + } + zr, err := gzip.NewReader(bytes.NewReader(zipped)) + if err != nil { + return nil, fmt.Errorf("error decompressing spec: %s", err) + } + var buf bytes.Buffer + _, err = buf.ReadFrom(zr) + if err != nil { + return nil, fmt.Errorf("error decompressing spec: %s", err) + } + + return buf.Bytes(), nil +} + +var rawSpec = decodeSpecCached() + +// a naive cached of a decoded swagger spec +func decodeSpecCached() func() ([]byte, error) { + data, err := decodeSpec() + return func() ([]byte, error) { + return data, err + } +} + +// Constructs a synthetic filesystem for resolving external references when loading openapi specifications. +func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) { + var res = make(map[string]func() ([]byte, error)) + if len(pathToFile) > 0 { + res[pathToFile] = rawSpec + } + + return res +} + +// GetSwagger returns the Swagger specification corresponding to the generated code +// in this file. The external references of Swagger specification are resolved. +// The logic of resolving external references is tightly connected to "import-mapping" feature. +// Externally referenced files must be embedded in the corresponding golang packages. +// Urls can be supported but this task was out of the scope. +func GetSwagger() (swagger *openapi3.T, err error) { + var resolvePath = PathToRawSpec("") + + loader := openapi3.NewLoader() + loader.IsExternalRefsAllowed = true + loader.ReadFromURIFunc = func(loader *openapi3.Loader, url *url.URL) ([]byte, error) { + var pathToFile = url.String() + pathToFile = path.Clean(pathToFile) + getSpec, ok := resolvePath[pathToFile] + if !ok { + err1 := fmt.Errorf("path not found: %s", pathToFile) + return nil, err1 + } + return getSpec() + } + var specData []byte + specData, err = rawSpec() + if err != nil { + return + } + swagger, err = loader.LoadFromData(specData) + if err != nil { + return + } + return +} diff --git a/2.2.1/go.mod b/2.2.1/go.mod new file mode 100644 index 0000000..3240733 --- /dev/null +++ b/2.2.1/go.mod @@ -0,0 +1,32 @@ +module github.com/GLCharge/ocpi/2.2.1 + +go 1.20 + +require ( + github.com/deepmap/oapi-codegen v1.12.4 + github.com/getkin/kin-openapi v0.117.0 + github.com/labstack/echo/v4 v4.10.2 +) + +require ( + github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/swag v0.21.1 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/invopop/yaml v0.1.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/labstack/gommon v0.4.0 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect + github.com/perimeterx/marshmallow v1.1.4 // indirect + github.com/valyala/bytebufferpool v1.0.0 // indirect + github.com/valyala/fasttemplate v1.2.2 // indirect + golang.org/x/crypto v0.6.0 // indirect + golang.org/x/net v0.7.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/2.2.1/go.sum b/2.2.1/go.sum new file mode 100644 index 0000000..db72602 --- /dev/null +++ b/2.2.1/go.sum @@ -0,0 +1,101 @@ +github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= +github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= +github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= +github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deepmap/oapi-codegen v1.12.4 h1:pPmn6qI9MuOtCz82WY2Xaw46EQjgvxednXXrP7g5Q2s= +github.com/deepmap/oapi-codegen v1.12.4/go.mod h1:3lgHGMu6myQ2vqbbTXH2H1o4eXFTGnFiDaOaKKl5yas= +github.com/getkin/kin-openapi v0.117.0 h1:QT2DyGujAL09F4NrKDHJGsUoIprlIcFVHWDVDcUFE8A= +github.com/getkin/kin-openapi v0.117.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BHOEV2VaAVf/pc= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= +github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= +github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/invopop/yaml v0.1.0 h1:YW3WGUoJEXYfzWBjn00zIlrw7brGVD0fUKRYDPAPhrc= +github.com/invopop/yaml v0.1.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/labstack/echo/v4 v4.10.2 h1:n1jAhnq/elIFTHr1EYpiYtyKgx4RW9ccVgkqByZaN2M= +github.com/labstack/echo/v4 v4.10.2/go.mod h1:OEyqf2//K1DFdE57vw2DRgWY0M7s65IVQO2FzvI4J5k= +github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8= +github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/perimeterx/marshmallow v1.1.4 h1:pZLDH9RjlLGGorbXhcaQLhfuV0pFMNfPO55FuFkxqLw= +github.com/perimeterx/marshmallow v1.1.4/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= +github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= +github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/README.md b/README.md new file mode 100644 index 0000000..bd4abd4 --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# GLCharge/client-ocpi + +Welcome 👋 + +This repository contains client libraries for Open Charge Points Interfaces modules. + +Every version has OpenAPI specification that is used to generate the client using `opai-codegen` generator. +OpenApi specifications contain also documentation. For more detailed documentation about the modules and APIs please follow +the official [OCPI documentation](https://evroaming.org/app/uploads/2021/11/OCPI-2.2.1.pdf) + +## Installation + +```go +import OCPI "https://github.com/GLCharge/ocpi/" +``` + +## Documentation + +- [2.2.1](https://www.github.com/GLCharge/ocpi/2.1.1/api/) + +## Generation + +This code base, was generated using [oapi-codegen](https://github.com/deepmap/oapi-codegen). +For further instructions, please follow READMEs for each client. New version can be generated +after creating or adjusting the OpenAPI specification. Please do not modify the clients, running +generation will overwrite them. \ No newline at end of file diff --git a/api/ocpi-2.2.1/cdrs.openapi.yml b/api/ocpi-2.2.1/cdrs.openapi.yml deleted file mode 100644 index dd14b4d..0000000 --- a/api/ocpi-2.2.1/cdrs.openapi.yml +++ /dev/null @@ -1,606 +0,0 @@ ---- -openapi: "3.0.3" -info: - version: 2.2.1 - title: OCPI CDRs module - description: Specification for OCPIs CDRs handlers -paths: - /ocpi/cdrs: - get: - description: "Fetch CDRs from the CPO's system" - parameters: - - in: query - name: date_from - schema: - type: string - description: "Return CDRs that have last_updated after or equal to this Date/Time (inclusive)." - - in: query - name: date_to - schema: - type: string - description: "Return CDRs that have last_updated up to this Date/Time, but not including (exclusive)." - - in: query - name: offset - schema: - type: integer - description: "The offset of the first object returned. Default is 0." - - in: query - name: limit - schema: - type: integer - description: "Maximum number of objects to GET." - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/cdrsResponse' - description: cdrsResponse - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Get CDRs - post: - description: "Creates a new CDR. The POST method should contain the full and final CDR object. \ - \ Returns URL of created CDR object" - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/cdr' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/cdrResponse' - description: cdrResponse - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Create CDR object -components: - schemas: - cdrsResponse: - type: object - properties: - cdrs: - $ref: '#/components/schemas/cdr' - status_code: - type: number - example: 1000 - status_message: - type: string - example: "Success" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timestamp - cdrResponse: - type: object - properties: - url: - type: string - example: "https://www.server.com/ocpi/cdrs/123456" - status_code: - type: number - example: 1000 - status_message: - type: string - example: "Success" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - url - - status_code - - timestamp - cdr: - type: object - properties: - country_code: - type: string - example: "CZ" - party_id: - type: string - example: "BEC" - id: - type: string - example: "12345" - start_date_time: - type: string - example: "2015-06-29T21:39:09Z" - end_date_time: - type: string - example: "2015-06-29T21:39:09Z" - session_id: - type: string - example: "1234" - cdr_token: - type: object - properties: - country_code: - type: string - example: "CZ" - party_id: - type: string - example: "STK" - uid: - type: string - example: "123abc" - type: - $ref: '#/components/schemas/tokenType' - contract_id: - type: string - example: "NL-TST-C12345678-S" - required: - - country_code - - party_id - - uid - - type - - contract_id - auth_method: - $ref: '#/components/schemas/authMethodType' - authorization_reference: - type: string - cdr_location: - type: object - properties: - id: - type: string - example: "LOC1" - name: - type: string - example: "Gent Zuid" - address: - type: string - example: "F.Rooseveltlaan 3A" - city: - type: string - example: "Gent" - postal_code: - type: string - example: "9000" - state: - type: string - country: - type: string - example: "BEL" - coordinates: - type: object - properties: - latitude: - type: string - example: "51.047599" - longitude: - type: string - example: "3.729944" - required: - - latitude - - longitude - evse_uid: - type: string - example: "3256" - evse_id: - type: string - example: "BE*BEC*E041503003" - connector_id: - type: string - example: "1" - connector_standard: - $ref: '#/components/schemas/connectorType' - connector_format: - $ref: '#/components/schemas/connectorFormatType' - connector_power_type: - $ref: '#/components/schemas/powerType' - meter_id: - type: string - currency: - type: string - example: "EUR" - tariffs: - type: object - properties: - country_code: - type: string - example: "BE" - party_id: - type: string - example: "BEC" - id: - type: string - example: "12" - currency: - type: string - example: "EUR" - type: - $ref: '#/components/schemas/tariffType' - tariff_alt_text: - type: object - properties: - language: - type: string - example: "en" - text: - type: string - example: "2.00 euro p/hour including VAT." - required: - - language - - text - tariff_alt_url: - type: string - example: "https://company.com/tariffs/14" - min_price: - $ref: '#/components/schemas/price' - max_price: - $ref: '#/components/schemas/price' - elements: - type: object - properties: - price_components: - $ref: '#/components/schemas/tariffDimensionType' - restrictions: - type: object - properties: - start_time: - type: string - example: "09:00" - end_time: - type: string - example: "18:00" - start_date: - type: string - example: "2019-06-23T08:16:02Z" - end_date: - type: string - example: "2015-06-29T23:50:16Z" - min_kwh: - type: number - example: 1.0 - max_kwh: - type: number - example: 1.0 - min_current: - type: number - example: "32.00" - max_current: - type: number - example: "30" - min_power: - type: number - example: 32.00 - max_power: - type: number - example: 32.00 - min_duration: - type: integer - example: 0 - max_duration: - type: integer - example: 3600 - day_of_week: - $ref: '#/components/schemas/dayOfWeekType' - reservation: - $ref: '#/components/schemas/reservationRestrictionType' - start_date_time: - type: string - example: "2019-06-23T08:16:02Z" - end_date_time: - type: string - example: "2019-06-23T08:16:02Z" - energy_mix: - type: object - properties: - is_green_energy: - type: boolean - example: true - energy_sources: - type: object - properties: - source: - $ref: '#/components/schemas/energySourceCategoryType' - percentage: - type: number - example: "21.7" - required: - - source - - percentage - environ_impact: - type: object - properties: - category: - $ref: '#/components/schemas/environmentalImpactCategoryType' - amount: - type: number - example: 372 - required: - - category - - amount - supplier_name: - type: string - example: "E.ON Energy Deutschland" - energy_product_name: - type: string - example: "E.ON DirektStrom eco" - required: - - is_green_energy - last_updated: - type: string - example: "2015-06-29T22:39:09Z" - required: - - country_code - - party_id - - id - - currency - - last_updated - charging_periods: - type: object - properties: - start_date_time: - type: string - example: "2019-06-23T08:16:02Z" - dimensions: - type: object - properties: - type: - $ref: '#/components/schemas/cdrDimensionType' - volume: - type: number - example: 2200 - required: - - type - - volume - tariff_id: - type: string - example: "12" - required: - - start_date_time - signed_data: - type: object - properties: - encoding_method: - type: string - encoding_method_version: - type: integer - public_key: - type: string - signed_values: - type: object - properties: - nature: - type: string - plain_data: - type: string - signed_data: - type: string - required: - - nature - - plain_data - - signed_data - url: - type: string - example: "https://example.com" - required: - - encoding_method - total_cost: - $ref: '#/components/schemas/price' - total_fixed_cost: - $ref: '#/components/schemas/price' - total_energy: - type: number - example: 15.342 - total_energy_cost: - $ref: '#/components/schemas/price' - total_time: - type: number - example: 1.973 - total_time_cost: - $ref: '#/components/schemas/price' - total_parking_time: - type: number - total_parking_cost: - $ref: '#/components/schemas/price' - total_reservation_cost: - $ref: '#/components/schemas/price' - remark: - type: string - invoice_reference_id: - type: string - credit: - type: boolean - example: true - credit_reference_id: - type: string - home_charging_compensation: - type: boolean - example: true - last_updated: - type: string - example: "2015-06-29T22:39:09Z" - required: - - country_code - - party_id - - id - - start_date_time - - end_date_time - - cdr_token - - auth_method - - cdr_location - - currency - - total_cost - - total_energy - - total_time - - last_updated - authMethodType: - description: "Authentications methods" - enum: - - "AUTH_REQUEST" - - "COMMAND" - - "WHITELIST" - type: string - connectorType: - description: "The socket or plug standard of the charging point." - enum: - - "CHADEMO" - - "CHAOJI" - - "DOMESTIC_A" - - "DOMESTIC_B" - - "DOMESTIC_C" - - "DOMESTIC_D" - - "DOMESTIC_E" - - "DOMESTIC_F" - - "DOMESTIC_G" - - "DOMESTIC_H" - - "DOMESTIC_J" - - "DOMESTIC_K" - - "DOMESTIC_L" - - "DOMESTIC_M" - - "DOMESTIC_N" - - "DOMESTIC_O" - - "GBT_AC" - - "GBT_DC" - - "IEC_60309_2_single_16" - - "IEC_60309_2_three_16" - - "IEC_60309_2_three_32" - - "IEC_60309_2_three_64" - - "IEC_62196_T1" - - "IEC_62196_T1_COMBO" - - "IEC_62196_T2" - - "IEC_62196_T2_COMBO" - - "IEC_62196_T3A" - - "IEC_62196_T3C" - - "NEMA_5_20" - - "NEMA_6_30" - - "NEMA_6_50" - - "NEMA_10_30" - - "NEMA_10_50" - - "NEMA_14_30" - - "NEMA_14_50" - - "PANTOGRAPH_BOTTOM_UP" - - "PANTOGRAPH_TOP_DOWN" - - "TESLA_R" - - "TESLA_S" - type: string - tokenType: - description: "Tokens" - enum: - - "AD_HOC_USER" - - "APP_USER" - - "OTHER" - - "RFID" - type: string - connectorFormatType: - description: "The format of the connector, whether it is a socket or a plug." - enum: - - "SOCKET" - - "CABLE" - type: string - powerType: - enum: - - "AC_1_PHASE" - - "AC_2_PHASE" - - "AC_2_PHASE_SPLIT" - - "AC_3_PHASE" - - "DC" - type: string - tariffType: - enum: - - "AD_HOC_PAYMENT" - - "PROFILE_CHEAP" - - "PROFILE_FAST" - - "PROFILE_GREEN" - - "REGULAR" - type: string - tariffDimensionType: - enum: - - "ENERGY" - - "FLAT" - - "PARKING_TIME" - - "TIME" - type: string - dayOfWeekType: - enum: - - "MONDAY" - - "TUESDAY" - - "WEDNESDAY" - - "THURSDAY" - - "FRIDAY" - - "SATURDAY" - - "SUNDAY" - type: string - reservationRestrictionType: - enum: - - "RESERVATION" - - "RESERVATION_EXPIRES" - type: string - energySourceCategoryType: - description: "Categories of energy sources." - enum: - - "NUCLEAR" - - "GENERAL_FOSSIL" - - "COAL" - - "GAS" - - "GENERAL_GREEN" - - "SOLAR" - - "WIND" - - "WATER" - type: string - environmentalImpactCategoryType: - description: "Categories of environmental impact values" - enum: - - "NUCLEAR_WASTE" - - "CARBON_DIOXIDE" - type: string - cdrDimensionType: - description: "Allowed values for cdr dimensions" - enum: - - "CURRENT" - - "ENERGY" - - "ENERGY_EXPORT" - - "ENERGY_IMPORT" - - "MAX_CURRENT" - - "MIN_CURRENT" - - "MAX_POWER" - - "MIN_POWER" - - "PARKING_TIME" - - "POWER" - - "RESERVATION_TIME" - - "STATE_OF_CHARGE" - - "TIME" - type: string - price: - type: object - properties: - excl_vat: - type: number - example: 2.5 - incl_vat: - type: number - example: 0.66 - required: - - excl_vat - genericError: - type: object - properties: - status_code: - type: number - example: 2001 - status_message: - type: string - example: "Missing required field: type" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timeStamp - - diff --git a/api/ocpi-2.2.1/charging_profiles.openapi.yml b/api/ocpi-2.2.1/charging_profiles.openapi.yml deleted file mode 100644 index 49f3436..0000000 --- a/api/ocpi-2.2.1/charging_profiles.openapi.yml +++ /dev/null @@ -1,340 +0,0 @@ ---- -openapi: "3.0.3" -info: - version: 2.2.1 - title: OCPI charging profiles module - description: Specification for OCPIs charging profiles handlers -paths: - /ocpi/chargingprofiles/{session_id}/{duration}/{url}: - get: - description: "Retrieves the ActiveChargingProfile as it is currently planned for the the given session" - parameters: - - in: path - name: session_id - schema: - type: string - required: true - description: "The unique id that identifies the session in the CPO platform." - - in: path - name: duration - schema: - type: integer - required: true - description: "Length of the requested ActiveChargingProfile in seconds Duration in seconds." - - in: path - name: response_url - schema: - type: string - required: true - description: "URL that the ActiveChargingProfileResult POST should be send to. This URL \ - \ might contain an unique ID to be able to distinguish between GET ActiveChargingProfile \ - \ requests." - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/response' - description: response - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Get active charging profile - /ocpi/chargingprofiles/{session_id}: - put: - description: "Creates a new ChargingProfile on a session, or replaces an existing ChargingProfile on the EVSE." - parameters: - - in: path - name: session_id - schema: - type: string - required: true - description: "The unique id that identifies the session in the CPO platform." - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/setChargingProfile' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/response' - description: response - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Create or update charging profile on session - /ocpi/chargingprofiles/{session_id}/{response_url}: - delete: - description: "Clears the ChargingProfile set by the eMSP on the given session." - parameters: - - in: path - name: session_id - schema: - type: string - required: true - description: "The unique id that identifies the session in the CPO platform." - - in: path - name: response_url - schema: - type: string - required: true - description: "URL that the ClearProfileResult POST should be send to. This URL \ - \ might contain an unique ID to be able to distinguish between DELETE \ - \ ChargingProfile requests." - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/response' - description: response - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Delete charging profile on the session - /ocpi/chargingprofile: - post: - description: "There are no URL segment parameters required by OCPI. \ - \ As the Sender interface is called by the Receiver (typically CPO) on \ - \ the URL given response_url in the Sender request to the Receiver interface. \ - \ It is up to the implementation of the Sender (typically SCSP) to determine \ - \ what parameters are put in the URL. The Sender sends a URL in the POST method \ - \ body to the Receiver. The Receiver is required to use this URL for the asynchronous \ - \ response by the Charge Point. It is advised to make this URL unique for every \ - \ request to differentiate simultaneous commands, for example by adding a unique \ - \ id as a URL segment." - requestBody: - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/activeChargingProfileResult' - - $ref: '#/components/schemas/chargingProfileResult' - - $ref: '#/components/schemas/clearProfileResult' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/genericResponse' - description: genericResponse - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Send a result of the original request by the eMSP - /ocpi/chargingprofile/{session_id}: - put: - description: "Updates the Sender (typically SCSP) when the Receiver (typically CPO) \ - \ knows the ActiveChargingProfile has changed. The Receiver SHALL call this interface \ - \ every time it knows changes have been made that influence the ActiveChargingProfile \ - \ for an ongoing session AND the Sender has at least once successfully called the charging \ - \ profile Receiver PUT interface for this session (SetChargingProfile). If the Receiver \ - \ doesn't know the ActiveChargingProfile has changed (EVSE does not notify the Receiver \ - \ (typically CPO) of the change) it is not required to call this interface. The Receiver \ - \ SHALL NOT call this interface for any session where the Sender has never, successfully \ - \ called the charging profile Receiver PUT interface for this session (SetChargingProfile). \ - \ The Receiver SHALL send a useful relevant duration of ActiveChargingProfile to send to the \ - \ Sender. As a guide: between 5 and 60 minutes. If the Sender wants a longer ActiveChargingProfile \ - \ the Sender can always do a GET with a longer duration." - parameters: - - in: path - name: session_id - schema: - type: string - required: true - description: "The unique id that identifies the session in the CPO platform." - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/activeChargingProfile' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/genericResponse' - description: genericResponse - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Update charging profile -components: - schemas: - response: - type: object - properties: - chargingProfile: - $ref: '#/components/schemas/chargingProfileResponse' - status_code: - type: number - example: 1000 - status_message: - type: string - example: "Success" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timestamp - chargingProfileResponse: - type: object - properties: - result: - $ref: '#/components/schemas/chargingProfileResponseType' - timeout: - type: integer - example: 0 - required: - - result - - timeout - chargingProfileResponseType: - description: "Response to the ChargingProfile request from the eMSP to the CPO." - enum: - - "ACCEPTED" - - "NOT_SUPPORTED" - - "REJECTED" - - "TOO_OFTEN" - - "UNKNOWN_SESSION" - type: string - setChargingProfile: - type: object - properties: - charging_profile: - $ref: '#/components/schemas/chargingProfile' - response_url: - type: string - example: "https://client.com/12345" - required: - - charging_profile - - response_url - chargingProfile: - type: object - properties: - start_date_time: - type: string - example: "2019-06-23T08:16:02Z" - duration: - type: integer - example: 900 - charging_rate_unit: - $ref: '#/components/schemas/chargingRateUnitType' - min_charging_rate: - type: number - charging_profile_period: - type: object - properties: - start_period: - type: integer - limit: - type: number - required: - - start_period - - limit - required: - - charging_rate_unit - chargingRateUnitType: - description: "Unit in which a charging profile is defined." - enum: - - "W" - - "A" - type: string - activeChargingProfileResult: - type: object - properties: - result: - $ref: '#/components/schemas/chargingProfileResultType' - profile: - type: object - properties: - start_date_time: - type: string - example: "2019-06-23T08:16:02Z" - charging_profile: - $ref: '#/components/schemas/chargingProfile' - required: - - start_date_time - - charging_profile - required: - - result - chargingProfileResult: - type: object - properties: - result: - $ref: '#/components/schemas/chargingProfileResultType' - required: - - result - clearProfileResult: - type: object - properties: - result: - $ref: '#/components/schemas/chargingProfileResultType' - required: - - result - chargingProfileResultType: - description: "Result of a ChargingProfile request that the EVSE sends via the CPO to the eMSP" - enum: - - "ACCEPTED" - - "REJECTED" - - "UNKNOWN" - type: string - genericResponse: - type: object - properties: - status_code: - type: number - example: 2001 - status_message: - type: string - example: "Missing required field: type" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timeStamp - activeChargingProfile: - type: object - properties: - start_date_time: - type: string - example: "2019-06-23T08:16:02Z" - charging_profile: - $ref: '#/components/schemas/chargingProfile' - required: - - start_date_time - - charging_profile - genericError: - type: object - properties: - status_code: - type: number - example: 2001 - status_message: - type: string - example: "Missing required field: type" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timeStamp diff --git a/api/ocpi-2.2.1/commands.openapi.yml b/api/ocpi-2.2.1/commands.openapi.yml deleted file mode 100644 index 73f56b6..0000000 --- a/api/ocpi-2.2.1/commands.openapi.yml +++ /dev/null @@ -1,327 +0,0 @@ ---- -openapi: "3.0.3" -info: - version: 2.2.1 - title: OCPI commands module - description: Specification for OCPIs commands handlers -paths: - /ocpi/commands/{command}: - post: - description: "Send a command to the CPO, requesting the CPO to send \ - \ the command to the Charge Point" - parameters: - - in: query - name: command - schema: - $ref: '#/components/schemas/commandType' - description: "Type of command that is requested." - requestBody: - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/cancelReservation' - - $ref: '#/components/schemas/reserveNow' - - $ref: '#/components/schemas/startSession' - - $ref: '#/components/schemas/stopSession' - - $ref: '#/components/schemas/unlockConnector' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/commandResponse' - description: commandResponse - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Send a command - /ocpi/commands/{command}/{uid}: - post: - description: "It is up to the implementation of the eMSP to determine \ - \ what parameters are put in the URL. The eMSP sends a URL in the POST \ - \ method body to the CPO. The CPO is required to use this URL for the \ - \ asynchronous response by the Charge Point. It is advised to make this \ - \ URL unique for every request to differentiate simultaneous commands, \ - \ for example by adding a unique id as a URL segment." - requestBody: - description: "Result of the command request, from the Charge Point." - content: - application/json: - schema: - $ref: '#/components/schemas/commandResult' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/commandResponse' - description: commandResponse - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Receive the asynchronous response from the Charge Point. -components: - schemas: - commandType: - description: "The command requested." - enum: - - "CANCEL_RESERVATION" - - "RESERVE_NOW" - - "START_SESSION" - - "STOP_SESSION" - - "UNLOCK_CONNECTOR" - type: string - cancelReservation: - type: object - properties: - response_url: - type: string - reservation_id: - type: string - required: - - response_url - - reservation_id - reserveNow: - type: object - properties: - response_url: - type: string - token: - $ref: '#/components/schemas/token' - expiry_date: - type: string - reservation_id: - type: string - location_id: - type: string - example: "1234" - evse_uid: - type: string - example: "3256" - authorization_reference: - type: string - example: "567890" - required: - - response_url - - token - - expiry_date - - reservation_id - - location_id - startSession: - type: object - properties: - response_url: - type: string - token: - $ref: '#/components/schemas/token' - location_id: - type: string - evse_uid: - type: string - example: "3256" - connector_id: - type: string - example: "1" - authorization_reference: - type: string - example: "567890" - required: - - response_url - - token - - location_id - stopSession: - type: object - properties: - response_url: - type: string - session_id: - type: string - required: - - response_url - - sessions_id - unlockConnector: - type: object - properties: - response_url: - type: string - location_id: - type: string - evse_uid: - type: string - example: "3256" - connector_id: - type: string - example: "1" - required: - - response_url - - location_id - - evse_uid - - connector_id - token: - type: object - properties: - country_code: - type: string - example: "DE" - party_id: - type: string - example: "TNM" - uid: - type: string - example: "bdf21bce-fc97-11e8-8eb2-f2801f1b9fd1" - type: - $ref: '#/components/schemas/tokenType' - contract_id: - type: string - example: "DE8ACC12E46L89" - visual_number: - type: string - example: "DF000-2001-8999-1" - issuer: - type: string - example: "TheNewMotion" - group_id: - type: string - example: "DF000-2001-8999" - valid: - type: boolean - example: true - whitelist: - $ref: '#/components/schemas/whitelistType' - language: - type: string - example: "en" - default_profile_type: - $ref: '#/components/schemas/profileType' - energy_contract: - type: object - properties: - supplier_name: - type: string - example: "Greenpeace Energy eG" - contract_id: - type: string - example: "0123456789" - required: - - supplier_name - last_updated: - type: string - example: "2018-12-10T17:25:10Z" - required: - - country_code - - party_id - - uid - - type - - contract_id - - issuer - - valid - - whitelist - - last_updated - tokenType: - description: "Tokens" - enum: - - "AD_HOC_USER" - - "APP_USER" - - "OTHER" - - "RFID" - type: string - whitelistType: - description: "Defines when authorization of a Token by the CPO is allowed." - enum: - - "ALWAYS" - - "ALLOWED" - - "ALLOWED_OFFLINE" - - "NEVER" - type: string - profileType: - description: "Different smart charging profile types" - enum: - - "CHEAP" - - "FAST" - - "GREEN" - - "REGULAR" - type: string - commandResponse: - type: object - properties: - result: - $ref: '#/components/schemas/commandResponseType' - timeout: - type: integer - example: 0 - message: - type: object - properties: - language: - type: string - example: "en" - text: - type: string - required: - - language - - text - required: - - result - - timeout - commandResponseType: - description: "Response to the command request from the eMSP to the CPO." - enum: - - "NOT_SUPPORTED" - - "REJECTED" - - "ACCEPTED" - - "UNKNOWN_SESSION" - type: string - commandResult: - type: object - properties: - result: - $ref: '#/components/schemas/commandResultType' - message: - type: object - properties: - language: - type: string - example: "en" - text: - type: string - required: - - language - - text - required: - - result - commandResultType: - description: "Result of the command that was send to the Charge Point" - enum: - - "ACCEPTED" - - "CANCELED_RESERVATION" - - "EVSE_OCCUPIED" - - "EVSE_INOPERATIVE" - - "FAILED" - - "NOT_SUPPORTED" - - "REJECTED" - - "TIMEOUT" - - "UNKNOWN_RESERVATION" - type: string - genericError: - type: object - properties: - status_code: - type: number - example: 2001 - status_message: - type: string - example: "Missing required field: type" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timeStamp - diff --git a/api/ocpi-2.2.1/credentials.openapi.yml b/api/ocpi-2.2.1/credentials.openapi.yml deleted file mode 100644 index 18045c1..0000000 --- a/api/ocpi-2.2.1/credentials.openapi.yml +++ /dev/null @@ -1,238 +0,0 @@ ---- -openapi: "3.0.3" -info: - version: 2.2.1 - title: OCPI credentials module - description: Specification for OCPIs credentials handlers -paths: - /ocpi/2.2.1/credentials: - get: - description: "Retrieves the credentials object to access the server's platform.\ - \ The request body is empty, the response contains the credentials object to \ - \ access the server's platform. This credentials object also contains extra \ - \ information about the server such as its business details." - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/credentials' - description: credentials - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Get the credentials object - post: - description: "Provides the server with credentials to access the client's system.\ - \ This credentials object also contains extra information about the client such\ - \ as its business details. A POST initiates the registration process for this endpoint's\ - \ version. The server must also fetch the client's endpoints for this version. OCPI 2.2.1\ - \ If successful, the server must generate a new credentials token and respond with the\ - \ client's new credentials to access the server's system. The credentials object in the\ - \ response also contains extra information about the server such as its business details.\ - \ This method MUST return a HTTP status code 405: method not allowed if the client has\ - \ already been registered before." - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/credentials' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/credentials' - description: credentials - "405": - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Provides the credentials object - put: - description: "Provides the server with updated credentials to access the client's system.\ - \ This credentials object also contains extra information about the client such as its\ - \ business details. A PUT will switch to the version that contains this credentials endpoint\ - \ if it's different from the current version. The server must fetch the client's endpoints\ - \ again, even if the version has not changed. If successful, the server must generate a new\ - \ credentials token for the client and respond with the client's updated credentials to access\ - \ the server's system. The credentials object in the response also contains extra information\ - \ about the server such as its business details. This method MUST return a HTTP status code 405:\ - \ method not allowed if the client has not been registered yet." - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/credentials' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/credentials' - description: credentials - "405": - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Provides updated credentials object - delete: - description: "Informs the server that its credentials to access the client's system are now\ - \ invalid and can no longer be used. Both parties must end any automated communication.\ - \ This is the unregistration process. This method MUST return a HTTP status code 405:\ - \ method not allowed if the client has not been registered before." - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/credentials' - description: credentials - "405": - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Informs that credentials are invalid -components: - schemas: - credentials: - type: object - properties: - data: - type: object - properties: - token: - type: string - example: "ebf3b399-779f-4497-9b9d-ac6ad3cc44d2" - url: - type: string - example: "https://example.com/ocpi/versions/" - roles: - type: object - properties: - role: - $ref: '#/components/schemas/roleType' - business_details: - type: object - properties: - name: - type: string - example: "Example Operator" - website: - type: string - example: "http://example.com" - logo: - type: object - properties: - url: - type: string - example: "https://example.com/img/logo.jpg" - thumbnail: - type: string - example: "https://example.com/img/logo_thumb.jpg" - category: - $ref: '#/components/schemas/imageCategoryType' - type: - type: string - example: "jpeg" - width: - type: number - example: 512 - height: - type: number - example: 512 - required: - - url - - category - - type - required: - - name - party_id: - type: string - example: "EXA" - country_code: - type: string - example: "CZ" - required: - - role - - business_details - - party_id - - country_code - required: - - token - - url - status_code: - type: number - example: 1000 - status_message: - type: string - example: "Success" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timestamp - roleType: - description: "Type of role" - enum: - - "CPO" - - "EMSP" - - "HUB" - - "NAP" - - "NSP" - - "OTHER" - - "SCSP" - type: string - imageCategoryType: - description: "The category of an image to obtain the correct usage in a user presentation." - enum: - - "CHARGER" - - "ENTRANCE" - - "LOCATION" - - "NETWORK" - - "OPERATOR" - - "OTHER" - - "OWNER" - genericError: - type: object - properties: - status_code: - type: number - example: 3003 - status_message: - type: string - example: "Required endpoints not available" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timeStamp \ No newline at end of file diff --git a/api/ocpi-2.2.1/hub_client_info.openapi.yml b/api/ocpi-2.2.1/hub_client_info.openapi.yml deleted file mode 100644 index cbff84a..0000000 --- a/api/ocpi-2.2.1/hub_client_info.openapi.yml +++ /dev/null @@ -1,205 +0,0 @@ ---- -openapi: "3.0.3" -info: - version: 2.2.1 - title: OCPI hub client info module - description: Specification for OCPIs hub client info handlers -paths: - /ocpi/clientinfo/{country_code}/{party_id}: - get: - description: "If the Hub wants to check the status of a ClientInfo \ - \ object in the connected clients system it might GET the object from the \ - \ connected clients system for validation purposes. The Hub is the owner \ - \ of the objects, so it would be illogical if the connected client system \ - \ had a different status or was missing an object." - parameters: - - in: path - name: country_code - schema: - type: string - required: true - description: "Country code of the requested ClientInfo object." - - in: path - name: party_id - schema: - type: string - required: true - description: "Party ID (Provider ID) of the requested ClientInfo object." - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/response' - description: response - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Get a ClientInfo object as it is stored in the connected clients system. - put: - description: "New or updated ClientInfo objects are pushed from the Hub to a connected client." - parameters: - - in: path - name: country_code - schema: - type: string - required: true - description: "Country code of the eMSP sending this PUT request to the CPO system." - - in: path - name: party_id - schema: - type: string - required: true - description: "Party ID (Provider ID) of the eMSP sending this PUT request to the CPO system." - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/clientInfo' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/response' - description: response - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Create or update client info - /ocpi/hubclientinfo: - get: - description: "Fetch information about clients connected to a Hub." - parameters: - - in: query - name: date_from - schema: - type: string - description: "Return ClientInfo that have last_updated after or equal to Date/Time (inclusive)." - - in: query - name: date_to - schema: - type: string - description: "Return ClientInfo that have last_updated up to Date/Time, but not including (exclusive)." - - in: query - name: offset - schema: - type: integer - description: "The offset of the first object returned. Default is 0." - - in: query - name: limit - schema: - type: integer - description: "Maximum number of objects to GET." - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/clientInfoResponse' - description: clientInfoResponse - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Get hub connected clients -components: - schemas: - response: - type: object - properties: - client_info: - $ref: '#/components/schemas/clientInfo' - status_code: - type: number - example: 1000 - status_message: - type: string - example: "Success" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - client_info - - status_code - - timestamp - clientInfoResponse: - type: object - properties: - clients_info: - $ref: '#/components/schemas/clientInfo' - status_code: - type: number - example: 1000 - status_message: - type: string - example: "Success" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timestamp - clientInfo: - type: object - properties: - party_id: - type: string - example: "TNM" - country_code: - type: string - example: "DE" - role: - $ref: '#/components/schemas/roleType' - status: - $ref: '#/components/schemas/connectionStatusType' - last_updated: - type: string - example: "2019-06-23T08:16:02Z" - required: - - party_id - - country_code - - role - - status - - last_updated - roleType: - enum: - - "CPO" - - "EMSP" - - "HUB" - - "NAP" - - "NSP" - - "OTHER" - - "SCSP" - type: string - connectionStatusType: - enum: - - "CONNECTED" - - "OFFLINE" - - "PLANNED" - - "SUSPENDED" - type: string - genericError: - type: object - properties: - status_code: - type: number - example: 2001 - status_message: - type: string - example: "Missing required field: type" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timeStamp - diff --git a/api/ocpi-2.2.1/locations.openapi.yml b/api/ocpi-2.2.1/locations.openapi.yml deleted file mode 100644 index 0bcdcea..0000000 --- a/api/ocpi-2.2.1/locations.openapi.yml +++ /dev/null @@ -1,805 +0,0 @@ ---- -openapi: "3.0.3" -info: - version: 2.2.1 - title: OCPI locations module - description: Specification for OCPIs locations handlers -paths: - /ocpi/locations: - get: - description: "Depending on the URL Segments provided, the GET \ - \ request can either be used to retrieve information about a \ - \ list of available Locations (with EVSEs and Connectors) at \ - \ a CPO (GET List) or it can be used to retrieve information \ - \ about one specific Location, OCPI 2.2.1 51 EVSE or Connector \ - \ (GET Object)." - parameters: - - in: query - name: date_from - schema: - type: string - description: "Return Locations that have last_updated after or equal to this date time (inclusive)." - - in: query - name: date_to - schema: - type: string - description: "Return Locations that have last_updated up to this date time, but not including (exclusive)." - - in: query - name: offset - schema: - type: integer - description: "The offset of the first object returned. Default is 0." - - in: query - name: limit - schema: - type: integer - description: "Maximum number of objects to GET." - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/locations' - description: locations - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Get available locations - /ocpi/locations/{location_id}/{evse_uid}/{connector_id}: - get: - description: "Endpoint structure definition for retrieving a Location, EVSE or Connector:" - parameters: - - in: path - name: location_id - schema: - type: string - required: true - description: "Location.id of the Location object to retrieve." - - in: path - name: evse_uid - schema: - type: string - description: "Evse.uid, required when requesting an EVSE or Connector object." - - in: path - name: connector_id - schema: - type: string - description: "Connector.id, required when requesting a Connector object." - responses: - "200": - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/locations' - - $ref: '#/components/schemas/evse' - - $ref: '#/components/schemas/connector' - description: locations, evse, connector - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Get location, EVSE or connector - /ocpi/locations/{country_code}/{party_id}/{location_id}/{evse_uid}/{connector_id}: - get: - description: "If the CPO wants to check the status of a Location, EVSE \ - \ or Connector object in the eMSP system, it might GET the object from \ - \ the eMSP system for validation purposes. The CPO is the owner of the \ - \ objects, so it would be illogical if the eMSP system had a different \ - \ status or was missing an object. If a discrepancy is found, the CPO \ - \ might push an update to the eMSP via a PUT or PATCH call." - parameters: - - in: path - name: country_code - schema: - type: string - required: true - description: "Country code of the CPO requesting data from the eMSP system." - - in: path - name: party_id - schema: - type: string - required: true - description: "Party ID (Provider ID) of the CPO requesting data from the eMSP system." - - in: path - name: location_id - schema: - type: string - required: true - description: "Location.id of the Location object to retrieve." - - in: path - name: evse_uid - schema: - type: string - description: "Evse.uid, required when requesting an EVSE or Connector object." - - in: path - name: connector_id - schema: - type: string - description: "Connector.id, required when requesting a Connector object." - responses: - "200": - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/locations' - - $ref: '#/components/schemas/evse' - - $ref: '#/components/schemas/connector' - description: locations, evse, connector - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Get location, EVSE or connector - put: - description: "The CPO pushes available Location, EVSE or Connector \ - \ objects to the eMSP. PUT can be used to send new Location objects to \ - \ the eMSP but also to replace existing Locations. When the PUT only \ - \ contains a Connector Object, the Receiver SHALL also set the new \ - \ last_updated value on the parent EVSE and Location Objects. When \ - \ the PUT only contains a EVSE Object, the Receiver SHALL also set \ - \the new last_updated value on the parent Location Object." - parameters: - - in: path - name: country_code - schema: - type: string - required: true - description: "Country code of the CPO requesting data from the eMSP system." - - in: path - name: party_id - schema: - type: string - required: true - description: "Party ID (Provider ID) of the CPO requesting data from the eMSP system." - - in: path - name: location_id - schema: - type: string - required: true - description: "Location.id of the Location object to retrieve." - - in: path - name: evse_uid - schema: - type: string - description: "Evse.uid, required when requesting an EVSE or Connector object." - - in: path - name: connector_id - schema: - type: string - description: "Connector.id, required when requesting a Connector object." - requestBody: - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/locations' - - $ref: '#/components/schemas/evse' - - $ref: '#/components/schemas/connector' - responses: - "200": - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/locations' - - $ref: '#/components/schemas/evse' - - $ref: '#/components/schemas/connector' - description: locations, evse, connector - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Sends new location object - patch: - description: "Same as the PUT method, but only the fields/objects that have \ - \ to be updated have to be present. Other fields/objects that are not specified \ - \ as part of the request are considered unchanged. Therefore, this method is not \ - \ suitable to remove information shared earlier. Any request to the PATCH method \ - \ SHALL contain the last_updated field. When the PATCH is on a Connector Object, \ - \ the Receiver SHALL also set the new last_updated value on the parent EVSE and \ - \ Location Objects. When the PATCH is on a EVSE Object, the Receiver SHALL also \ - \ set the new last_updated value on the parent Location Object." - responses: - "200": - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/locations' - - $ref: '#/components/schemas/evse' - - $ref: '#/components/schemas/connector' - description: locations, evse, connector - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Sends new location object -components: - schemas: - locations: - type: object - properties: - data: - type: object - properties: - country_code: - type: string - example: "CZ" - party_id: - type: string - example: "BEC" - id: - type: string - example: "LOC1" - publish: - type: boolean - example: true - publish_allowed_to: - type: object - properties: - uid: - type: string - example: "012345678" - type: - $ref: '#/components/schemas/tokenType' - visual_number: - type: string - example: "DF000-2001-8999" - issuer: - type: string - example: "TheNewMotion" - group_id: - type: string - example: "DF000-2001-8999" - name: - type: string - example: "Gent Zuid" - address: - type: string - example: "F.Rooseveltlaan 3A" - city: - type: string - example: "Gent" - postal_code: - type: string - example: "9000" - state: - type: string - example: "Slovenia" - country: - type: string - example: "BEL" - coordinates: - type: object - properties: - latitude: - type: string - example: "51.047599" - longitude: - type: string - example: "3.729944" - required: - - latitude - - longitude - related_locations: - type: object - properties: - latitude: - type: string - example: "51.047599" - longitude: - type: string - example: "3.729944" - name: - type: object - properties: - language: - type: string - example: "en" - text: - type: string - example: "2.00 euro p/hour including VAT." - required: - - language - - text - required: - - latitude - - longitude - parking_type: - $ref: '#/components/schemas/parkingType' - evses: - $ref: '#/components/schemas/evse' - directions: - type: object - properties: - language: - type: string - example: "en" - text: - type: string - example: "2.00 euro p/hour including VAT." - required: - - language - - text - operator: - $ref: '#/components/schemas/businessDetails' - suboperator: - $ref: '#/components/schemas/businessDetails' - owner: - $ref: '#/components/schemas/businessDetails' - facilities: - $ref: '#/components/schemas/facilityType' - time_zone: - type: string - example: "Europe/Brussels" - opening_times: - type: object - properties: - twentyfourseven: - type: boolean - example: true - regular_hours: - type: object - properties: - weekday: - type: integer - example: 1 - period_begin: - type: string - example: "07:00" - period_end: - type: string - example: "18:00" - required: - - weekday - - period_begin - - period_end - exceptional_openings: - type: object - properties: - period_begin: - type: string - example: "07:00" - period_end: - type: string - example: "18:00" - required: - - period_begin - - period_end - exceptional_closings: - type: object - properties: - period_begin: - type: string - example: "07:00" - period_end: - type: string - example: "18:00" - required: - - period_begin - - period_end - required: - - twentyfourseven - charging_when_closed: - type: boolean - example: false - images: - $ref: '#/components/schemas/image' - energy_mix: - type: object - properties: - is_green_energy: - type: boolean - example: true - energy_sources: - type: object - properties: - source: - $ref: '#/components/schemas/energySourceCategoryType' - percentage: - type: number - example: "21.7" - required: - - source - - percentage - environ_impact: - type: object - properties: - category: - $ref: '#/components/schemas/environmentalImpactCategoryType' - amount: - type: number - example: 372 - required: - - category - - amount - supplier_name: - type: string - example: "E.ON Energy Deutschland" - energy_product_name: - type: string - example: "E.ON DirektStrom eco" - required: - - is_green_energy - last_updated: - type: string - example: "2015-06-29T20:39:09Z" - required: - - address - - city - - country - - coordinates - - time_zone - - last_updated - status_code: - type: number - example: 1000 - status_message: - type: string - example: "Success" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timestamp - image: - type: object - properties: - url: - type: string - example: "https://example.com/img/logo.jpg" - thumbnail: - type: string - example: "https://example.com/img/logo_thumb.jpg" - category: - $ref: '#/components/schemas/imageCategoryType' - type: - type: string - example: "jpeg" - width: - type: number - example: 512 - height: - type: number - example: 512 - required: - - url - - category - - type - evse: - type: object - properties: - uid: - type: string - example: "3256" - evse_id: - type: string - example: "BE*BEC*E041503001" - status: - $ref: '#/components/schemas/statusType' - status_schedule: - type: object - properties: - period_begin: - type: string - example: "07:00" - period_end: - type: string - example: "18:00" - status: - $ref: '#/components/schemas/statusType' - required: - - period_begin - - status - capabilities: - $ref: '#/components/schemas/capabilityType' - connectors: - $ref: '#/components/schemas/connector' - floor_level: - type: string - example: "-1" - coordinates: - type: object - properties: - latitude: - type: string - example: "51.047599" - longitude: - type: string - example: "3.729944" - required: - - latitude - - longitude - physical_reference: - type: string - example: "1" - directions: - type: object - properties: - language: - type: string - example: "en" - text: - type: string - example: "2.00 euro p/hour including VAT." - required: - - language - - text - parking_restrictions: - $ref: '#/components/schemas/parkingRestrictionType' - images: - $ref: '#/components/schemas/image' - last_updated: - type: string - example: "2015-03-18T08:12:01Z" - required: - - uid - - status - - last_updated - connector: - type: object - properties: - id: - type: string - example: "1" - standard: - $ref: '#/components/schemas/connectorType' - format: - $ref: '#/components/schemas/connectorFormatType' - power_type: - $ref: '#/components/schemas/powerType' - max_voltage: - type: integer - example: 220 - max_amperage: - type: integer - example: 16 - max_electric_power: - type: integer - example: 0 - tariff_ids: - type: string - example: "11" - terms_and_conditions: - type: string - example: "https://example.com/terms_and_conditions" - last_updated: - type: string - example: "2015-03-16T10:10:02Z" - required: - - id - - standard - - format - - power_type - - max_voltage - - max_amperage - - last_updated - businessDetails: - type: object - properties: - name: - type: string - example: "Example Operator" - website: - type: string - example: "http://example.com" - logo: - type: object - properties: - url: - type: string - example: "https://example.com/img/logo.jpg" - thumbnail: - type: string - example: "https://example.com/img/logo_thumb.jpg" - category: - $ref: '#/components/schemas/imageCategoryType' - type: - type: string - example: "jpeg" - width: - type: number - example: 512 - height: - type: number - example: 512 - required: - - url - - category - - type - required: - - name - tokenType: - description: "Tokens" - enum: - - "AD_HOC_USER" - - "APP_USER" - - "OTHER" - - "RFID" - type: string - parkingType: - description: "General type of the charge point's location." - enum: - - "ALONG_MOTORWAY" - - "PARKING_GARAGE" - - "PARKING_LOT" - - "ON_DRIVEWAY" - - "ON_STREET" - - "UNDERGROUND_GARAGE" - type: string - statusType: - description: "The status of an EVSE." - enum: - - "AVAILABLE" - - "BLOCKED" - - "CHARGING" - - "INOPERATIVE" - - "OUTOFORDER" - - "PLANNED" - - "REMOVED" - - "RESERVED" - - "UNKNOWN" - type: string - capabilityType: - description: "The capabilities of an EVSE." - enum: - - "CHARGING_PROFILE_CAPABLE" - - "CHARGING_PREFERENCES_CAPABLE" - - "CHIP_CARD_SUPPORT" - - "CONTACTLESS_CARD_SUPPORT" - - "CREDIT_CARD_PAYABLE" - - "DEBIT_CARD_PAYABLE" - - "PED_TERMINAL" - - "REMOTE_START_STOP_CAPABLE" - - "RESERVABLE" - - "RFID_READER" - - "START_SESSION_CONNECTOR_REQUIRED" - - "TOKEN_GROUP_CAPABLE" - - "UNLOCK_CAPABLE" - type: string - imageCategoryType: - description: "The category of an image to obtain the correct usage in a user presentation." - enum: - - "CHARGER" - - "ENTRANCE" - - "LOCATION" - - "NETWORK" - - "OPERATOR" - - "OTHER" - - "OWNER" - connectorType: - description: "The socket or plug standard of the charging point." - enum: - - "CHADEMO" - - "CHAOJI" - - "DOMESTIC_A" - - "DOMESTIC_B" - - "DOMESTIC_C" - - "DOMESTIC_D" - - "DOMESTIC_E" - - "DOMESTIC_F" - - "DOMESTIC_G" - - "DOMESTIC_H" - - "DOMESTIC_J" - - "DOMESTIC_K" - - "DOMESTIC_L" - - "DOMESTIC_M" - - "DOMESTIC_N" - - "DOMESTIC_O" - - "GBT_AC" - - "GBT_DC" - - "IEC_60309_2_single_16" - - "IEC_60309_2_three_16" - - "IEC_60309_2_three_32" - - "IEC_60309_2_three_64" - - "IEC_62196_T1" - - "IEC_62196_T1_COMBO" - - "IEC_62196_T2" - - "IEC_62196_T2_COMBO" - - "IEC_62196_T3A" - - "IEC_62196_T3C" - - "NEMA_5_20" - - "NEMA_6_30" - - "NEMA_6_50" - - "NEMA_10_30" - - "NEMA_10_50" - - "NEMA_14_30" - - "NEMA_14_50" - - "PANTOGRAPH_BOTTOM_UP" - - "PANTOGRAPH_TOP_DOWN" - - "TESLA_R" - - "TESLA_S" - type: string - connectorFormatType: - description: "The format of the connector, whether it is a socket or a plug." - enum: - - "SOCKET" - - "CABLE" - type: string - powerType: - enum: - - "AC_1_PHASE" - - "AC_2_PHASE" - - "AC_2_PHASE_SPLIT" - - "AC_3_PHASE" - - "DC" - type: string - parkingRestrictionType: - description: "This value, if provided, represents the restriction to the parking spot for different purposes." - enum: - - "EV_ONLY" - - "PLUGGED" - - "DISABLED" - - "CUSTOMERS" - - "MOTORCYCLES" - type: string - facilityType: - enum: - - "HOTEL" - - "RESTAURANT" - - "CAFE" - - "MALL" - - "SUPERMARKET" - - "SPORT" - - "RECREATION_AREA" - - "NATURE" - - "MUSEUM" - - "BIKE_SHARING" - - "BUS_STOP" - - "TAXI_STAND" - - "TRAM_STOP" - - "METRO_STATION" - - "TRAIN_STATION" - - "AIRPORT" - - "PARKING_LOT" - - "CARPOOL_PARKING" - - "FUEL_STATION" - - "WIFI" - type: string - energySourceCategoryType: - description: "Categories of energy sources." - enum: - - "NUCLEAR" - - "GENERAL_FOSSIL" - - "COAL" - - "GAS" - - "GENERAL_GREEN" - - "SOLAR" - - "WIND" - - "WATER" - type: string - environmentalImpactCategoryType: - description: "Categories of environmental impact values" - enum: - - "NUCLEAR_WASTE" - - "CARBON_DIOXIDE" - type: string - genericError: - type: object - properties: - status_code: - type: number - example: 2001 - status_message: - type: string - example: "Missing required field: type" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timeStamp diff --git a/api/ocpi-2.2.1/sessions.openapi.yml b/api/ocpi-2.2.1/sessions.openapi.yml deleted file mode 100644 index 3f0dca0..0000000 --- a/api/ocpi-2.2.1/sessions.openapi.yml +++ /dev/null @@ -1,443 +0,0 @@ ---- -openapi: "3.0.3" -info: - version: 2.2.1 - title: OCPI sessions module - description: Specification for OCPIs sessions handlers -paths: - /ocpi/sessions: - get: - description: "Fetch Session objects of charging sessions last \ - \ updated between the {date_from} and {date_to} (paginated)." - parameters: - - in: query - name: date_from - schema: - type: string - description: "Return Sessions that have last_updated after or equal to this date time (inclusive)." - - in: query - name: date_to - schema: - type: string - description: "Return Sessions that have last_updated up to this date time, but not including (exclusive)." - - in: query - name: offset - schema: - type: integer - description: "The offset of the first object returned. Default is 0." - - in: query - name: limit - schema: - type: integer - description: "Maximum number of objects to GET." - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/sessionsResponse' - description: sessionsResponse - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Get charging sessions - /ocpi/sessions/{session_id}/charging_preferences: - put: - description: "Setting Charging Preferences of an ongoing session.\ - \ If a PUT with ChargingPreferences is received for an EVSE that \ - \ does not have the capability CHARGING_PREFERENCES_CAPABLE, the \ - \ receiver should respond with an HTTP status of 404 and an OCPI \ - \ status code of 2001 in the OCPI response object." - parameters: - - in: path - name: session_id - schema: - type: string - required: true - description: "Session.id of the Session for which the Charging Preferences are to be set." - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/chargingPreferences' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/chargingPreferencesResponse' - description: chargingPreferencesResponse - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Update charging session - /ocpi/sessions/{country_code}/{party_id}/{session_id}: - get: - description: "The CPO system might request the current version of \ - \ a Session object from the eMSP's system to, for example, validate the state,\ - \ or because the CPO has received an error during a PATCH operation." - parameters: - - in: path - name: country_code - schema: - type: string - required: true - description: "Country code of the CPO performing the GET on the eMSP's system" - - in: path - name: party_id - schema: - type: string - required: true - description: "Party ID (Provider ID) of the CPO performing the GET on the eMSP's system." - - in: path - name: session_id - schema: - type: string - required: true - description: "Id of the Session object to get from the eMSP's system." - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/sessionResponse' - description: sessionResponse - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Get session with session_id - put: - description: "" - parameters: - - in: path - name: country_code - schema: - type: string - required: true - description: "Country code of the CPO performing this PUT on the eMSP's system. \ - \ This SHALL be the same value as the country_code in the Session object being pushed." - - in: path - name: party_id - schema: - type: string - required: true - description: "Party ID (Provider ID) of the CPO performing this PUT on the eMSP's \ - \ system. This SHALL be the same value as the party_id in the Session object being \ - \ pushed." - - in: path - name: session_id - schema: - type: string - required: true - description: "Id of the new or updated Session object." - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/session' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/sessionResponse' - description: sessionResponse - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Update session with session_id - patch: - description: "Same as the PUT method, but only the fields/objects that need to \ - \ be updated have to be present. Fields/objects which are not specified are \ - \ considered unchanged. Any request to the PATCH method SHALL contain the last_updated \ - \ field. The PATCH method of the Session Receiver interface works on the entire Session \ - \ object only. It is not allowed to use extra URL segments to try to PATCH fields of inner \ - \ objects of the Session object directly. When a PATCH request contains the charging_periods \ - \ field (inside a Session object), this SHALL be processed as a request to add all the \ - \ ChargingPeriod objects to the existing Session object. If the request charging_periods \ - \ list is omitted (or contains an empty list), no changes SHALL be made to the existing \ - \ list of charging_periods. If existing ChargingPeriod objects in a Session need to be \ - \ replaced or removed, the Sender SHALL use the PUT method to replace the entire Session \ - \ object (including all the charging_periods)." - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/sessionResponse' - description: sessionResponse - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Update session with session_id -components: - schemas: - sessionsResponse: - type: object - properties: - sessions: - $ref: '#/components/schemas/session' - status_code: - type: number - example: 1000 - status_message: - type: string - example: "Success" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timestamp - sessionResponse: - type: object - properties: - session: - $ref: '#/components/schemas/session' - status_code: - type: number - example: 1000 - status_message: - type: string - example: "Success" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - session - - status_code - - timestamp - session: - type: object - properties: - country_code: - type: string - example: "CZ" - party_id: - type: string - example: "STK" - id: - type: string - example: "101" - start_date_time: - type: string - example: "2020-03-09T10:17:09Z" - end_date_time: - type: string - example: "2020-04-09T10:17:09Z" - kwh: - type: number - example: 0.0 - cdr_token: - type: object - properties: - country_code: - type: string - example: "CZ" - party_id: - type: string - example: "STK" - uid: - type: string - example: "123abc" - type: - $ref: '#/components/schemas/tokenType' - contract_id: - type: string - example: "NL-TST-C12345678-S" - required: - - country_code - - party_id - - uid - - type - - contract_id - auth_method: - $ref: '#/components/schemas/authMethodType' - authorization_reference: - type: string - example: "" - location_id: - type: string - example: "LOC1" - evse_uid: - type: string - example: "3256" - connector_id: - type: string - example: "1" - meter_id: - type: string - currency: - type: string - example: "EUR" - charging_periods: - type: object - properties: - start_date_time: - type: string - example: "2019-06-23T08:16:02Z" - dimensions: - type: object - properties: - type: - $ref: '#/components/schemas/authMethodType' - volume: - type: number - example: "120" - required: - - type - - volume - tariff_id: - type: string - example: "12" - required: - - start_date_time - total_costs: - type: object - properties: - excl_vat: - type: number - example: 2.5 - incl_vat: - type: number - example: 0.66 - required: - - excl_vat - status: - $ref: '#/components/schemas/sessionStatusType' - last_updated: - type: string - example: "2019-06-24T12:39:09Z" - required: - - country_code - - party_id - - id - - start_date_time - - kwh - - cdr_token - - auth_method - - location_id - - evse_uid - - connector_id - - currency - - status - - last_updated - tokenType: - description: "Tokens" - enum: - - "AD_HOC_USER" - - "APP_USER" - - "OTHER" - - "RFID" - type: string - authMethodType: - description: "Authentications methods" - enum: - - "AUTH_REQUEST" - - "COMMAND" - - "WHITELIST" - type: string - cdrDimensionType: - description: "Allowed values for cdr dimensions" - enum: - - "CURRENT" - - "ENERGY" - - "ENERGY_EXPORT" - - "ENERGY_IMPORT" - - "MAX_CURRENT" - - "MIN_CURRENT" - - "MAX_POWER" - - "MIN_POWER" - - "PARKING_TIME" - - "POWER" - - "RESERVATION_TIME" - - "STATE_OF_CHARGE" - - "TIME" - type: string - sessionStatusType: - description: "State of session" - enum: - - "ACTIVE" - - "COMPLETED" - - "INVALID" - - "PENDING" - - "RESERVATION" - type: string - chargingPreferences: - type: object - properties: - profile_type: - $ref: '#/components/schemas/profileType' - departure_time: - type: string - example: 2015-06-30T21:59:59Z"" - energy_need: - type: number - example: 1 - required: - - profile_type - profileType: - description: "Different smart charging profile types." - enum: - - "CHEAP" - - "FAST" - - "GREEN" - - "REGULAR" - type: string - chargingPreferencesResponse: - type: object - properties: - charging_preferences: - $ref: '#/components/schemas/chargingPreferencesResponseType' - status_code: - type: number - example: 1000 - status_message: - type: string - example: "Success" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - charging_preferences - - status_code - - timestamp - chargingPreferencesResponseType: - description: "Different smart charging profile types" - enum: - - "ACCEPTED" - - "DEPARTURE_REQUIRED" - - "ENERGY_NEED_REQUIRED" - - "NOT_POSSIBLE" - - "PROFILE_TYPE_NOT_SUPPORTED" - type: string - genericError: - type: object - properties: - status_code: - type: number - example: 2001 - status_message: - type: string - example: "Missing required field: type" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timeStamp \ No newline at end of file diff --git a/api/ocpi-2.2.1/tariffs.openapi.yml b/api/ocpi-2.2.1/tariffs.openapi.yml deleted file mode 100644 index 3f979d7..0000000 --- a/api/ocpi-2.2.1/tariffs.openapi.yml +++ /dev/null @@ -1,425 +0,0 @@ ---- -openapi: "3.0.3" -info: - version: 2.2.1 - title: OCPI tariffs module - description: Specification for OCPIs tariffs handlers -paths: - /ocpi/tariffs: - get: - description: "Fetch tariffs from the CPO's system" - parameters: - - in: query - name: date_from - schema: - type: string - description: "Return Tariffs that have last_updated after or equal to Date/Time (inclusive)." - - in: query - name: date_to - schema: - type: string - description: "Return Tariffs that have last_updated up to Date/Time, but not including (exclusive)." - - in: query - name: offset - schema: - type: integer - description: "The offset of the first object returned. Default is 0." - - in: query - name: limit - schema: - type: integer - description: "Maximum number of objects to GET." - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/tariffsResponse' - description: tariffsResponse - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Get tariffs - /ocpi/tariffs/{country_code}/{party_id}/{tariff_id}: - get: - description: "If the CPO wants to check the status of a Tariff in the \ - \ eMSP's system, it might GET the object from the eMSP's system for \ - \ validation purposes. After all, the CPO is the owner of the object, \ - \ so it would be illogical if the eMSP's system had a different status \ - \ or was missing the object entirely" - parameters: - - in: path - name: country_code - schema: - type: string - required: true - description: "Country code of the CPO performing the GET on the eMSP's system" - - in: path - name: party_id - schema: - type: string - required: true - description: "Party ID (Provider ID) of the CPO performing the GET on the eMSP's system." - - in: path - name: tariff_id - schema: - type: string - required: true - description: "Tariff.id of the Tariff object to retrieve." - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/tariffResponse' - description: tariffResponse - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Get tariff with tariff_id - put: - description: "New or updated Tariff objects are pushed from the CPO to the eMSP." - parameters: - - in: path - name: country_code - schema: - type: string - required: true - description: "Country code of the CPO performing the PUT request on the eMSP's system. \ - \ This SHALL be the same value as the country_code in the Tariff object being pushed." - - in: path - name: party_id - schema: - type: string - required: true - description: "Party ID (Provider ID) of the CPO performing the PUT request on the eMSP's \ - system. This SHALL be the same value as the party_id in the Tariff object being pushed." - - in: path - name: tariff_id - schema: - type: string - required: true - description: "Tariff.id of the Tariff object to create or replace." - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/tariff' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/tariffResponse' - description: tariffResponse - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Update tariff - delete: - description: "Delete a Tariff object which is not used any more and will not be used in the future. \ - \ Before deleting a Tariff object, it is RECOMMENDED to ensure that the Tariff object is not referenced \ - \ by any Connector object within the tariff_ids." - parameters: - - in: path - name: country_code - schema: - type: string - required: true - description: "Country code of the CPO performing the PUT request on the eMSP's system." - - in: path - name: party_id - schema: - type: string - required: true - description: "Party ID (Provider ID) of the CPO performing the PUT request on the eMSP's system." - - in: path - name: tariff_id - schema: - type: string - required: true - description: "Tariff.id of the Tariff object to delete." - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/tariffDeleteResponse' - description: tariffDeleteResponse - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Delete tariff -components: - schemas: - tariffsResponse: - type: object - properties: - tariffs: - $ref: '#/components/schemas/tariff' - status_code: - type: number - example: 1000 - status_message: - type: string - example: "Success" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timestamp - tariffResponse: - type: object - properties: - tariff: - $ref: '#/components/schemas/tariff' - status_code: - type: number - example: 1000 - status_message: - type: string - example: "Success" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - tariff - - status_code - - timestamp - tariff: - type: object - properties: - country_code: - type: string - example: "BE" - party_id: - type: string - example: "BEC" - id: - type: string - example: "12" - currency: - type: string - example: "EUR" - type: - $ref: '#/components/schemas/tariffType' - tariff_alt_text: - type: object - properties: - language: - type: string - example: "en" - text: - type: string - example: "2.00 euro p/hour including VAT." - required: - - language - - text - tariff_alt_url: - type: string - example: "https://company.com/tariffs/14" - min_price: - $ref: '#/components/schemas/price' - max_price: - $ref: '#/components/schemas/price' - elements: - type: object - properties: - price_components: - $ref: '#/components/schemas/tariffDimensionType' - restrictions: - type: object - properties: - start_time: - type: string - example: "09:00" - end_time: - type: string - example: "18:00" - start_date: - type: string - example: "2019-06-23T08:16:02Z" - end_date: - type: string - example: "2015-06-29T23:50:16Z" - min_kwh: - type: number - example: 1.0 - max_kwh: - type: number - example: 1.0 - min_current: - type: number - example: "32.00" - max_current: - type: number - example: "30" - min_power: - type: number - example: 32.00 - max_power: - type: number - example: 32.00 - min_duration: - type: integer - example: 0 - max_duration: - type: integer - example: 3600 - day_of_week: - $ref: '#/components/schemas/dayOfWeekType' - reservation: - $ref: '#/components/schemas/reservationRestrictionType' - start_date_time: - type: string - example: "2019-06-23T08:16:02Z" - end_date_time: - type: string - example: "2019-06-23T08:16:02Z" - energy_mix: - type: object - properties: - is_green_energy: - type: boolean - example: true - energy_sources: - type: object - properties: - source: - $ref: '#/components/schemas/energySourceCategoryType' - percentage: - type: number - example: "21.7" - required: - - source - - percentage - environ_impact: - type: object - properties: - category: - $ref: '#/components/schemas/environmentalImpactCategoryType' - amount: - type: number - example: 372 - required: - - category - - amount - supplier_name: - type: string - example: "E.ON Energy Deutschland" - energy_product_name: - type: string - example: "E.ON DirektStrom eco" - required: - - is_green_energy - last_updated: - type: string - example: "2015-06-29T22:39:09Z" - required: - - country_code - - party_id - - id - - currency - - last_updated - price: - type: object - properties: - excl_vat: - type: number - example: 2.5 - incl_vat: - type: number - example: 0.66 - required: - - excl_vat - tariffType: - enum: - - "AD_HOC_PAYMENT" - - "PROFILE_CHEAP" - - "PROFILE_FAST" - - "PROFILE_GREEN" - - "REGULAR" - type: string - tariffDimensionType: - enum: - - "ENERGY" - - "FLAT" - - "PARKING_TIME" - - "TIME" - type: string - dayOfWeekType: - enum: - - "MONDAY" - - "TUESDAY" - - "WEDNESDAY" - - "THURSDAY" - - "FRIDAY" - - "SATURDAY" - - "SUNDAY" - type: string - reservationRestrictionType: - enum: - - "RESERVATION" - - "RESERVATION_EXPIRES" - type: string - energySourceCategoryType: - description: "Categories of energy sources." - enum: - - "NUCLEAR" - - "GENERAL_FOSSIL" - - "COAL" - - "GAS" - - "GENERAL_GREEN" - - "SOLAR" - - "WIND" - - "WATER" - type: string - environmentalImpactCategoryType: - description: "Categories of environmental impact values" - enum: - - "NUCLEAR_WASTE" - - "CARBON_DIOXIDE" - type: string - tariffDeleteResponse: - type: object - properties: - status_code: - type: number - example: 1000 - status_message: - type: string - example: "Success" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timeStamp - genericError: - type: object - properties: - status_code: - type: number - example: 2001 - status_message: - type: string - example: "Missing required field: type" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timeStamp \ No newline at end of file diff --git a/api/ocpi-2.2.1/tokens.openapi.yml b/api/ocpi-2.2.1/tokens.openapi.yml deleted file mode 100644 index 96b9c61..0000000 --- a/api/ocpi-2.2.1/tokens.openapi.yml +++ /dev/null @@ -1,371 +0,0 @@ ---- -openapi: "3.0.3" -info: - version: 2.2.1 - title: OCPI tokens module - description: Specification for OCPIs tokens handlers -paths: - /ocpi/tokens: - get: - description: "Fetch information about Tokens known in the eMSP systems." - parameters: - - in: query - name: date_from - schema: - type: string - description: "Return tokens that have last_updated after or equal to this Date/Time (inclusive)." - - in: query - name: date_to - schema: - type: string - description: "Return tokens that have last_updated up to Date/Time, but not including (exclusive)." - - in: query - name: offset - schema: - type: integer - description: "The offset of the first object returned. Default is 0." - - in: query - name: limit - schema: - type: integer - description: "Maximum number of objects to GET." - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/tokensResponse' - description: tokensResponse - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Get tokens - /ocpi/{token_uid}/authorize: - post: - description: "Do a 'real-time' authorization request to the eMSP system, \ - \ validating if a Token might be used (at the optionally given Location)." - parameters: - - in: path - name: token_uid - schema: - type: string - required: true - description: "Token.uid of the Token for which authorization is requested." - - in: path - name: type - schema: - type: string - description: "Token.type of the Token for which this authorization is. Default if omitted: RFID" - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/locationReferences' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/authorizationInfo' - description: authorizationInfo - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Authorization - /ocpi/tokens/{country_code}/{party_id}/{token_uid}: - get: - description: "If the eMSP wants to check the status of a Token in the \ - \ CPO system it might GET the object from the CPO system for validation \ - \ purposes. The eMSP is the owner of the objects, so it would be illogical \ - \ if the CPO system had a different status or was missing an object." - parameters: - - in: path - name: country_code - schema: - type: string - required: true - description: "Country code of the eMSP requesting this GET from the CPO system." - - in: path - name: party_id - schema: - type: string - required: true - description: "Party ID (Provider ID) of the eMSP requesting this GET from the CPO system." - - in: path - name: token_uid - schema: - type: string - required: true - description: "Token.uid of the Token object to retrieve." - - in: path - name: type - schema: - type: string - description: "Token.type of the Token to retrieve. Default if omitted: RFID" - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/tokenResponse' - description: tokenResponse - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Get the token object - put: - description: "New or updated Token objects are pushed from the eMSP to the CPO." - parameters: - - in: path - name: country_code - schema: - type: string - required: true - description: "Country code of the eMSP sending this PUT request to the CPO system. \ - \ This SHALL be the same value as the country_code in the Token object being pushed." - - in: path - name: party_id - schema: - type: string - required: true - description: "Party ID (Provider ID) of the eMSP sending this PUT request to the CPO \ - \ system. This SHALL be the same value as the party_id in the Token object being pushed." - - in: path - name: token_uid - schema: - type: string - required: true - description: "s Token.uid of the (new) Token object (to replace)." - - in: path - name: type - schema: - type: string - description: "Token.type of the Token of the (new) Token object (to replace). \ - \ Default if omitted: RFID" - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/token' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/tokenResponse' - description: tokenResponse - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Update token object - patch: - description: "Same as the PUT method, but only the fields/objects \ - \ that have to be updated have to be present, other fields/objects \ - \ that are not specified are considered unchanged. Any request to the \ - \ PATCH method SHALL contain the last_updated field." - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/tokenResponse' - description: tokenResponse - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Update token object -components: - schemas: - tokensResponse: - type: object - properties: - tokens: - $ref: '#/components/schemas/token' - status_code: - type: number - example: 1000 - status_message: - type: string - example: "Success" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timestamp - tokenResponse: - type: object - properties: - token: - $ref: '#/components/schemas/token' - status_code: - type: number - example: 1000 - status_message: - type: string - example: "Success" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - token - - status_code - - timestamp - token: - type: object - properties: - country_code: - type: string - example: "DE" - party_id: - type: string - example: "TNM" - uid: - type: string - example: "bdf21bce-fc97-11e8-8eb2-f2801f1b9fd1" - type: - $ref: '#/components/schemas/tokenType' - contract_id: - type: string - example: "DE8ACC12E46L89" - visual_number: - type: string - example: "DF000-2001-8999-1" - issuer: - type: string - example: "TheNewMotion" - group_id: - type: string - example: "DF000-2001-8999" - valid: - type: boolean - example: true - whitelist: - $ref: '#/components/schemas/whitelistType' - language: - type: string - example: "en" - default_profile_type: - $ref: '#/components/schemas/profileType' - energy_contract: - type: object - properties: - supplier_name: - type: string - example: "Greenpeace Energy eG" - contract_id: - type: string - example: "0123456789" - required: - - supplier_name - last_updated: - type: string - example: "2018-12-10T17:25:10Z" - required: - - country_code - - party_id - - uid - - type - - contract_id - - issuer - - valid - - whitelist - - last_updated - tokenType: - description: "Tokens" - enum: - - "AD_HOC_USER" - - "APP_USER" - - "OTHER" - - "RFID" - type: string - whitelistType: - description: "Defines when authorization of a Token by the CPO is allowed." - enum: - - "ALWAYS" - - "ALLOWED" - - "ALLOWED_OFFLINE" - - "NEVER" - type: string - profileType: - description: "Different smart charging profile types" - enum: - - "CHEAP" - - "FAST" - - "GREEN" - - "REGULAR" - type: string - locationReferences: - type: object - properties: - location_id: - type: string - example: "LOC1" - evse_uids: - type: string - required: - - location_id - authorizationInfo: - type: object - properties: - allowed: - $ref: '#/components/schemas/allowedType' - token: - $ref: '#/components/schemas/token' - location: - $ref: '#/components/schemas/locationReferences' - authorization_reference: - type: string - example: "567890" - info: - type: object - properties: - language: - type: string - example: "en" - text: - type: string - required: - - language - - text - required: - - allowed - - token - allowedType: - enum: - - "ALLOWED" - - "BLOCKED" - - "EXPIRED" - - "NO_CREDIT" - - "NOT_ALLOWED" - type: string - genericError: - type: object - properties: - status_code: - type: number - example: 2001 - status_message: - type: string - example: "Missing required field: type" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timeStamp \ No newline at end of file diff --git a/api/ocpi-2.2.1/versions.openapi.yml b/api/ocpi-2.2.1/versions.openapi.yml deleted file mode 100644 index 244d4ab..0000000 --- a/api/ocpi-2.2.1/versions.openapi.yml +++ /dev/null @@ -1,152 +0,0 @@ ---- -openapi: "3.0.3" -info: - version: 2.2.1 - title: OCPI versions module - description: Specification for OCPIs versions handlers -paths: - /ocpi/versions: - get: - description: "Fetch information about the supported versions." - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/versions' - description: versions - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Get supported versions - /ocpi/2.2.1/details: - get: - description: "Fetch information about the supported endpoints for version." - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/details' - description: details - default: - content: - application/json: - schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Get version supported endpoints -components: - schemas: - versions: - type: object - properties: - data: - type: object - properties: - version: - $ref: '#/components/schemas/versionNumberType' - url: - type: string - example: "https://www.server.com/ocpi/2.2.1/" - required: - - version - - url - status_code: - type: number - example: 1000 - status_message: - type: string - example: "Success" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timestamp - details: - type: object - properties: - data: - type: object - properties: - version: - $ref: '#/components/schemas/versionNumberType' - endpoints: - type: object - properties: - identifier: - $ref: '#/components/schemas/moduleIDType' - role: - $ref: '#/components/schemas/interfaceRoleType' - url: - description: "URL to the endpoint." - type: string - example: "https://example.com/ocpi/2.2.1/cdrs/" - required: - - identifier - - role - - url - required: - - version - status_code: - type: number - example: 1000 - status_message: - type: string - example: "Success" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timestamp - versionNumberType: - description: "Versions" - enum: - - "2.0" - - "2.1" - - "2.1.1" - - "2.2" - - "2.2.1" - type: string - moduleIDType: - description: "OCPI 2.2.1 modules" - enum: - - cdrs - - chargingprofiles - - commands - - credentials - - hubclientinfo - - locations - - sessions - - tariffs - - tokens - type: string - interfaceRoleType: - description: "Interface role endpoint implements." - enum: - - SENDER - - RECEIVER - type: string - genericError: - type: object - properties: - status_code: - type: number - example: 2001 - status_message: - type: string - example: "Missing required field: type" - timeStamp: - type: string - example: "2015-06-30T21:59:59Z" - required: - - status_code - - timeStamp - - -