Documentation
¶
Index ¶
- func Bool(b bool) param.Opt[bool]
- func BoolPtr(v bool) *bool
- func DefaultClientOptions() []option.RequestOption
- func File(rdr io.Reader, filename string, contentType string) file
- func Float(f float64) param.Opt[float64]
- func FloatPtr(v float64) *float64
- func Int(i int64) param.Opt[int64]
- func IntPtr(v int64) *int64
- func Opt[T comparable](v T) param.Opt[T]
- func Ptr[T any](v T) *T
- func String(s string) param.Opt[string]
- func StringPtr(v string) *string
- func Time(t time.Time) param.Opt[time.Time]
- func TimePtr(v time.Time) *time.Time
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, ...) error
- func (r *Client) Get(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Post(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Put(ctx context.Context, path string, params any, res any, ...) error
- type CommentService
- type CommentSubmitParams
- type CommentSubmitResponse
- type Country
- type Error
- type MediaitemNewParams
- type MediaitemNewResponse
- type MediaitemService
- type OpenAPIGetResponse
- type OpenAPIService
- type PoiListParams
- type PoiListResponse
- type PoiListResponseAddressInfo
- type PoiListResponseConnection
- type PoiListResponseConnectionConnectionType
- type PoiListResponseConnectionCurrentType
- type PoiListResponseConnectionLevel
- type PoiListResponseConnectionStatusType
- type PoiListResponseDataProvider
- type PoiListResponseDataProviderDataProviderStatusType
- type PoiListResponseMediaItem
- type PoiListResponseMediaItemUser
- type PoiListResponseOperatorInfo
- type PoiListResponseOperatorInfoAddressInfo
- type PoiListResponseStatusType
- type PoiListResponseSubmissionStatus
- type PoiListResponseUsageType
- type PoiListResponseUserComment
- type PoiListResponseUserCommentCheckinStatusType
- type PoiListResponseUserCommentCommentType
- type PoiListResponseUserCommentUser
- type PoiService
- type ProfileAuthenticateParams
- type ProfileAuthenticateResponse
- type ProfileAuthenticateResponseData
- type ProfileAuthenticateResponseDataUserProfile
- type ProfileAuthenticateResponseMetadata
- type ProfileService
- type ReferencedataGetParams
- type ReferencedataGetResponse
- type ReferencedataGetResponseChargerType
- type ReferencedataGetResponseCheckinStatusType
- type ReferencedataGetResponseConnectionType
- type ReferencedataGetResponseCurrentType
- type ReferencedataGetResponseDataProvider
- type ReferencedataGetResponseDataProviderDataProviderStatusType
- type ReferencedataGetResponseOperator
- type ReferencedataGetResponseOperatorAddressInfo
- type ReferencedataGetResponseStatusType
- type ReferencedataGetResponseSubmissionStatusType
- type ReferencedataGetResponseUsageType
- type ReferencedataGetResponseUserCommentType
- type ReferencedataService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (OCM_API_KEY, OCM_API_KEY, OCM_USERNAME, OCM_BASE_URL). This should be used to initialize new clients.
func Opt ¶
func Opt[T comparable](v T) param.Opt[T]
Types ¶
type Client ¶
type Client struct {
Options []option.RequestOption
Poi PoiService
Referencedata ReferencedataService
Profile ProfileService
Comment CommentService
Mediaitem MediaitemService
OpenAPI OpenAPIService
}
Client creates a struct with services and top level methods that help with interacting with the ocm API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r Client)
NewClient generates a new client with the default option read from the environment (OCM_API_KEY, OCM_API_KEY, OCM_USERNAME, OCM_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type CommentService ¶
type CommentService struct {
Options []option.RequestOption
}
CommentService contains methods and other services that help with interacting with the ocm API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCommentService method instead.
func NewCommentService ¶
func NewCommentService(opts ...option.RequestOption) (r CommentService)
NewCommentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CommentService) Submit ¶
func (r *CommentService) Submit(ctx context.Context, body CommentSubmitParams, opts ...option.RequestOption) (res *CommentSubmitResponse, err error)
Submit a user comment or checkin for a specific charging location
type CommentSubmitParams ¶
type CommentSubmitParams struct {
// This must be a valid POI ID
ChargePointID int64 `json:"chargePointID" api:"required"`
// Optional valid CheckStatusTypeID to indicate overall catgeory and
// success/failure to use equipment e.g. 10 = Charged Successfully.
CheckinStatusTypeID param.Opt[int64] `json:"checkinStatusTypeID,omitzero"`
// This is an optional comment to describe the charging experience, may include
// guidance for future users.
Comment param.Opt[string] `json:"comment,omitzero"`
// This must be a valid Comment Type ID as per UserCommentTypes found in Core
// Reference Data. If left as null then General Comment will be used.
CommentTypeID param.Opt[int64] `json:"commentTypeID,omitzero"`
// Optional integer rating between 1 = Worst, 5 = Best.
Rating param.Opt[int64] `json:"rating,omitzero"`
// Optional website URL for related information
RelatedURL param.Opt[string] `json:"relatedURL,omitzero"`
// This is an optional name to associate with the submission, for authenticated
// users their profile username is used.
UserName param.Opt[string] `json:"userName,omitzero"`
// contains filtered or unexported fields
}
func (CommentSubmitParams) MarshalJSON ¶
func (r CommentSubmitParams) MarshalJSON() (data []byte, err error)
func (*CommentSubmitParams) UnmarshalJSON ¶
func (r *CommentSubmitParams) UnmarshalJSON(data []byte) error
type CommentSubmitResponse ¶
type CommentSubmitResponse struct {
Description string `json:"description" api:"required"`
Status string `json:"status" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Description respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CommentSubmitResponse) RawJSON ¶
func (r CommentSubmitResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CommentSubmitResponse) UnmarshalJSON ¶
func (r *CommentSubmitResponse) UnmarshalJSON(data []byte) error
type Country ¶
type Country struct {
// The Continentcode Schema
ContinentCode string `json:"ContinentCode" api:"required"`
// The Id Schema
ID int64 `json:"ID" api:"required"`
// The Isocode Schema
ISOCode string `json:"ISOCode" api:"required"`
// The Title Schema
Title string `json:"Title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ContinentCode respjson.Field
ID respjson.Field
ISOCode respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Country details
func (*Country) UnmarshalJSON ¶
type MediaitemNewParams ¶
type MediaitemNewParams struct {
// ID value for the OCM site (POI) this image relates to.
ChargePointID int64 `json:"chargePointID" api:"required"`
// BASE64 encoded data
ImageDataBase64 string `json:"imageDataBase64" api:"required"`
// Optional description of image or context
Comment param.Opt[string] `json:"comment,omitzero"`
// contains filtered or unexported fields
}
func (MediaitemNewParams) MarshalJSON ¶
func (r MediaitemNewParams) MarshalJSON() (data []byte, err error)
func (*MediaitemNewParams) UnmarshalJSON ¶
func (r *MediaitemNewParams) UnmarshalJSON(data []byte) error
type MediaitemNewResponse ¶
type MediaitemNewResponse struct {
// status code OK
Status string `json:"status" api:"required"`
Description string `json:"description"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Status respjson.Field
Description respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MediaitemNewResponse) RawJSON ¶
func (r MediaitemNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*MediaitemNewResponse) UnmarshalJSON ¶
func (r *MediaitemNewResponse) UnmarshalJSON(data []byte) error
type MediaitemService ¶
type MediaitemService struct {
Options []option.RequestOption
}
MediaitemService contains methods and other services that help with interacting with the ocm API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMediaitemService method instead.
func NewMediaitemService ¶
func NewMediaitemService(opts ...option.RequestOption) (r MediaitemService)
NewMediaitemService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*MediaitemService) New ¶
func (r *MediaitemService) New(ctx context.Context, body MediaitemNewParams, opts ...option.RequestOption) (res *MediaitemNewResponse, err error)
Submit a photo for a specific charging location
type OpenAPIGetResponse ¶
type OpenAPIGetResponse = any
type OpenAPIService ¶
type OpenAPIService struct {
Options []option.RequestOption
}
OpenAPIService contains methods and other services that help with interacting with the ocm API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOpenAPIService method instead.
func NewOpenAPIService ¶
func NewOpenAPIService(opts ...option.RequestOption) (r OpenAPIService)
NewOpenAPIService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*OpenAPIService) Get ¶
func (r *OpenAPIService) Get(ctx context.Context, opts ...option.RequestOption) (res *OpenAPIGetResponse, err error)
Retrieve the current OpenAPI format (YAML) definition for this API. This is useful for documentation tools, mocking, testing and client generation.
type PoiListParams ¶
type PoiListParams struct {
// Set to true to get a property names in camelCase format.
Camelcase param.Opt[bool] `query:"camelcase,omitzero" json:"-"`
// Exact match on a given OCM POI ID (comma separated list)
Chargepointid param.Opt[string] `query:"chargepointid,omitzero" json:"-"`
// String to identify your client application. Optional but recommended to
// distinguish your client from other bots/crawlers
Client param.Opt[string] `query:"client,omitzero" json:"-"`
// Set to true to remove reference data objects from output (just returns IDs for
// common reference data such as DataProvider etc).
Compact param.Opt[bool] `query:"compact,omitzero" json:"-"`
// 2-character ISO Country code to filter to one specific country
Countrycode param.Opt[string] `query:"countrycode,omitzero" json:"-"`
// Optionally filter results by a max distance from the given latitude/longitude
Distance param.Opt[float64] `query:"distance,omitzero" json:"-"`
// `miles` or `km` distance unit
Distanceunit param.Opt[string] `query:"distanceunit,omitzero" json:"-"`
// Filter to items with ID greater than given value
Greaterthanid param.Opt[string] `query:"greaterthanid,omitzero" json:"-"`
// If true, user comments and media items will be include in result set
Includecomments param.Opt[bool] `query:"includecomments,omitzero" json:"-"`
// Latitude for distance calculation and filtering
Latitude param.Opt[int64] `query:"latitude,omitzero" json:"-"`
// Longitude for distance calculation and filtering
Longitude param.Opt[float64] `query:"longitude,omitzero" json:"-"`
// Limit on max number of results returned
Maxresults param.Opt[int64] `query:"maxresults,omitzero" json:"-"`
// Filter to results modified after the given date
Modifiedsince param.Opt[string] `query:"modifiedsince,omitzero" json:"-"`
// Use opendata=true for only OCM provided ("Open") data.
Opendata param.Opt[bool] `query:"opendata,omitzero" json:"-"`
// Optional output format `json`,`geojson`,`xml`,`csv`, JSON is the default and
// recommended as the highest fidelity.
Output param.Opt[string] `query:"output,omitzero" json:"-"`
// Filter results within a given Polygon. Specify an encoded polyline for the
// polygon shape. Polygon will be automatically closed from the last point to the
// first point.
Polygon param.Opt[string] `query:"polygon,omitzero" json:"-"`
// Filter results along an encoded polyline, use with distance param to increase
// search distance along line. Polyline is expanded into a polygon to cover the
// search distance.
Polyline param.Opt[string] `query:"polyline,omitzero" json:"-"`
// Default sort order is based on spatial index but you can optionally sort by
// `modified_asc` for results in order of modification (oldest to newest), or
// ` id_asc` for results in order of ID
Sortby param.Opt[string] `query:"sortby,omitzero" json:"-"`
// Set to false to get a smaller result set with null items removed.
Verbose param.Opt[bool] `query:"verbose,omitzero" json:"-"`
// Filter results to a given bounding box. specify top left and bottom right box
// corners as: (lat,lng),(lat2,lng2)
Boundingbox []any `query:"boundingbox,omitzero" json:"-"`
// Exact match on a given connection type id (comma separated list)
Connectiontypeid []any `query:"connectiontypeid,omitzero" json:"-"`
// Exact match on a given numeric country id (comma separated list)
Countryid []string `query:"countryid,omitzero" json:"-"`
// Exact match on a given data provider id id (comma separated list).
Dataproviderid []any `query:"dataproviderid,omitzero" json:"-"`
// Exact match on a given charging level (1-3) id (comma separated list)
Levelid []any `query:"levelid,omitzero" json:"-"`
// Exact match on a given EVSE operator id (comma separated list)
Operatorid []any `query:"operatorid,omitzero" json:"-"`
// Exact match on a given status type id (comma separated list)
Statustypeid []any `query:"statustypeid,omitzero" json:"-"`
// Exact match on a given usage type id (comma separated list)
Usagetypeid []any `query:"usagetypeid,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (PoiListParams) URLQuery ¶
func (r PoiListParams) URLQuery() (v url.Values, err error)
URLQuery serializes PoiListParams's query parameters as `url.Values`.
type PoiListResponse ¶
type PoiListResponse struct {
// Geographic position for site and (nearest) address component information.
AddressInfo PoiListResponseAddressInfo `json:"AddressInfo"`
// List of equipment summary information for this site
Connections []PoiListResponseConnection `json:"Connections"`
// A Data Provider is the controller of the source data set used to construct the
// details for this POI. Data has been transformed and interpreted from it's
// original form. Each Data Provider provides data either by an explicit license or
// agreement.
DataProvider PoiListResponseDataProvider `json:"DataProvider"`
// The reference ID for the Data Provider of this POI
DataProviderID int64 `json:"DataProviderID"`
// If present, this is the Data Providers own key for this POI within their source
// data set
DataProvidersReference string `json:"DataProvidersReference"`
// A metric applied during imports to indicate a quality level based on available
// information detail (5 == best). Largely unused currently.
DataQualityLevel int64 `json:"DataQualityLevel"`
// The date and time (UTC, ISO 8601) this POI was added to the Open Charge Map
// database
DateCreated time.Time `json:"DateCreated" format:"date-time"`
// The date and time (UTC, ISO 8601) this POI was last confirmed according to the
// data provider or a user. See DateLastVerified for a dynamically computed date
// based on multiple signals.
DateLastConfirmed time.Time `json:"DateLastConfirmed" format:"date-time"`
// The date and time (UTC, ISO 8601) this POI or directly related child properties
// were updated.
DateLastStatusUpdate time.Time `json:"DateLastStatusUpdate" format:"date-time"`
// A dynamically computed value, the date and time (UTC, ISO 8601) this POI was
// last confirmed by a user edit or related user comment
DateLastVerified time.Time `json:"DateLastVerified" format:"date-time"`
// The date and time (UTC, ISO 8601) this POI is or was planned for commissioning.
// In general planned POIs should not be presented to end users until confirmed
// operational.
DatePlanned time.Time `json:"DatePlanned" format:"date-time"`
// General additional factual information for the POI. Users are discouraged from
// using this field for opinions on site quality etc.
GeneralComments string `json:"GeneralComments"`
// The OCM reference ID for this POI (Point of Interest).
ID int64 `json:"ID"`
// A dynamically computed value indicating of any recently confirmation activity
// has taken place for this site (positive check-ins etc)
IsRecentlyVerified bool `json:"IsRecentlyVerified"`
// A list of user submitted photos for this site
MediaItems []PoiListResponseMediaItem `json:"MediaItems"`
// Optional array of metadata values. Generally used to indicate data attribution
// but is also intended for future use to indicate surrounding amenties, links or
// foreign key values into other data sets.
MetadataValues []any `json:"MetadataValues"`
// The number of bays or discreet stations available overall at this site. This
// indicates the limiting for number of simultaneous site users.
NumberOfPoints int64 `json:"NumberOfPoints"`
// The reference ID of the equipment network operator or owner
OperatorID int64 `json:"OperatorID"`
// An Operator is the public organisation which controls a network of charging
// points.
OperatorInfo PoiListResponseOperatorInfo `json:"OperatorInfo"`
// The network operators own reference for this site (may be a site reference or a
// single equipment reference)
OperatorsReference string `json:"OperatorsReference"`
// If present, this data in this POI supercedes information in another POI.
// Generally not relevant to consumers.
ParentChargePointID int64 `json:"ParentChargePointID"`
// The Status Type of a site or equipment item indicates whether it is generally
// operational.
StatusType PoiListResponseStatusType `json:"StatusType"`
// The overall operational status type reference ID for this POI (i.e. Operational
// etc). 0 == Unknown
StatusTypeID int64 `json:"StatusTypeID"`
// Submission Status object, detailing the POI listing status
SubmissionStatus PoiListResponseSubmissionStatus `json:"SubmissionStatus"`
// The reference ID for the submission status type which applied to this POI.
SubmissionStatusTypeID int64 `json:"SubmissionStatusTypeID"`
// Free text description of likely usage costs associated with this site. Generally
// relates to parking charges whether network operates this site as Free
UsageCost string `json:"UsageCost"`
// The Usage Type of a site indicates the general restrictions on usage.
UsageType PoiListResponseUsageType `json:"UsageType"`
// The reference ID for the site Usage Type, 0 == Unknown
UsageTypeID int64 `json:"UsageTypeID"`
// A list of user comments or check-ins for this site
UserComments []PoiListResponseUserComment `json:"UserComments"`
// A universally unique identifier used as surrogate key. ID and UUID must be
// preserved when submitting POI update information.
Uuid string `json:"UUID" format:"uuid"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AddressInfo respjson.Field
Connections respjson.Field
DataProvider respjson.Field
DataProviderID respjson.Field
DataProvidersReference respjson.Field
DataQualityLevel respjson.Field
DateCreated respjson.Field
DateLastConfirmed respjson.Field
DateLastStatusUpdate respjson.Field
DateLastVerified respjson.Field
DatePlanned respjson.Field
GeneralComments respjson.Field
ID respjson.Field
IsRecentlyVerified respjson.Field
MediaItems respjson.Field
MetadataValues respjson.Field
NumberOfPoints respjson.Field
OperatorID respjson.Field
OperatorInfo respjson.Field
OperatorsReference respjson.Field
ParentChargePointID respjson.Field
StatusType respjson.Field
StatusTypeID respjson.Field
SubmissionStatus respjson.Field
SubmissionStatusTypeID respjson.Field
UsageCost respjson.Field
UsageType respjson.Field
UsageTypeID respjson.Field
UserComments respjson.Field
Uuid respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A POI (Point of Interest), also referred to as a `Site` or `ChargePoint`, is the top-level set of information regarding a geographic site with one or more electric vehicle charging equipment present. The term `ChargePointID` is used to reference the unique ID for each POI, as called OCM ID. This reference appears in various UI elements in the format `OCM-12345` to distinguish the ID number as being a reference for a specific POI/site.
Note: If the API is called in verbose mode properties expanded properties are included in the results (e.g. UsageType, StatusType, DataProvider, OperatorInfo, SubmissionStatus). With the exception of the AddressInfo property, other object properties will not be populated in a compact result set and instead only the associated reference IDs will be set (e.g. UsageTypeID, DataProviderID etc)
func (PoiListResponse) RawJSON ¶
func (r PoiListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoiListResponse) UnmarshalJSON ¶
func (r *PoiListResponse) UnmarshalJSON(data []byte) error
type PoiListResponseAddressInfo ¶
type PoiListResponseAddressInfo struct {
// The reference ID for the Country
CountryID int64 `json:"CountryID" api:"required"`
// ID
ID int64 `json:"ID" api:"required"`
// Site latitude coordinate in decimal degrees
Latitude float64 `json:"Latitude" api:"required"`
// Site longitude coordinate in decimal degrees
Longitude float64 `json:"Longitude" api:"required"`
// Guidance for users to use or find the equipment
AccessComments string `json:"AccessComments"`
// First line of nearby street address
AddressLine1 string `json:"AddressLine1"`
// Second line of nearby street address
AddressLine2 string `json:"AddressLine2"`
// Primary contact email
ContactEmail string `json:"ContactEmail"`
// Primary contact number
ContactTelephone1 string `json:"ContactTelephone1"`
// Secondary contact number
ContactTelephone2 string `json:"ContactTelephone2"`
// Country details
Country Country `json:"Country"`
// Distance from search location, if search is around a point
Distance float64 `json:"Distance"`
// Unit used for distance, 1= Miles, 2 = KM
DistanceUnit int64 `json:"DistanceUnit"`
// Postal code or Zipcode
Postcode string `json:"Postcode"`
// Optional website for more information
RelatedURL string `json:"RelatedURL"`
// State or Province
StateOrProvince string `json:"StateOrProvince"`
// General title for this location to aid user
Title string `json:"Title"`
// Town or City
Town string `json:"Town"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CountryID respjson.Field
ID respjson.Field
Latitude respjson.Field
Longitude respjson.Field
AccessComments respjson.Field
AddressLine1 respjson.Field
AddressLine2 respjson.Field
ContactEmail respjson.Field
ContactTelephone1 respjson.Field
ContactTelephone2 respjson.Field
Country respjson.Field
Distance respjson.Field
DistanceUnit respjson.Field
Postcode respjson.Field
RelatedURL respjson.Field
StateOrProvince respjson.Field
Title respjson.Field
Town respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Geographic position for site and (nearest) address component information.
func (PoiListResponseAddressInfo) RawJSON ¶
func (r PoiListResponseAddressInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoiListResponseAddressInfo) UnmarshalJSON ¶
func (r *PoiListResponseAddressInfo) UnmarshalJSON(data []byte) error
type PoiListResponseConnection ¶
type PoiListResponseConnection struct {
// EVSE supply max current in Amps
Amps int64 `json:"Amps"`
Comments string `json:"Comments"`
// The type of end-user connection an EVSE supports.
ConnectionType PoiListResponseConnectionConnectionType `json:"ConnectionType"`
ConnectionTypeID int64 `json:"ConnectionTypeID"`
// Indicates the EVSE power supply type e.g. DC (Direct Current), AC (Single
// Phase), AC (3 Phase).
CurrentType PoiListResponseConnectionCurrentType `json:"CurrentType"`
// The supply type reference ID (e.g. DC etc)
CurrentTypeID int64 `json:"CurrentTypeID"`
ID int64 `json:"ID"`
// A general category for equipment power capability. Deprecated for general use.
// Currently computed automatically based on equipment power.
Level PoiListResponseConnectionLevel `json:"Level"`
// A general category for power capability. Depreceated in favour of documenting
// specific equipment power in kW.
//
// Deprecated: deprecated
LevelID int64 `json:"LevelID"`
// Peak available power in kW
PowerKw float64 `json:"PowerKW"`
// Optional summary number of equipment items available with this specification
Quantity int64 `json:"Quantity"`
// Optional operators reference for this connection/port
Reference string `json:"Reference"`
// The Status Type of a site or equipment item indicates whether it is generally
// operational.
StatusType PoiListResponseConnectionStatusType `json:"StatusType"`
// Status Type reference ID. 0 = Unknown
StatusTypeID int64 `json:"StatusTypeID"`
// EVSE supply voltage
Voltage float64 `json:"Voltage"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amps respjson.Field
Comments respjson.Field
ConnectionType respjson.Field
ConnectionTypeID respjson.Field
CurrentType respjson.Field
CurrentTypeID respjson.Field
ID respjson.Field
Level respjson.Field
LevelID respjson.Field
PowerKw respjson.Field
Quantity respjson.Field
Reference respjson.Field
StatusType respjson.Field
StatusTypeID respjson.Field
Voltage respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Details on the equipment type and power capability.
If calling the API in verbose mode related models are also included in the result (e.g. ConnectionType, Level, StatusType, CurrentType)
func (PoiListResponseConnection) RawJSON ¶
func (r PoiListResponseConnection) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoiListResponseConnection) UnmarshalJSON ¶
func (r *PoiListResponseConnection) UnmarshalJSON(data []byte) error
type PoiListResponseConnectionConnectionType ¶
type PoiListResponseConnectionConnectionType struct {
// Formal (standard) name for this connection type
FormalName string `json:"FormalName"`
ID int64 `json:"ID"`
// If true, this is an discontinued but used connection type
IsDiscontinued bool `json:"IsDiscontinued"`
// If true, this is an obsolete connection type and is unlikely top be present in
// modern infrastructure
IsObsolete bool `json:"IsObsolete"`
Title string `json:"Title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FormalName respjson.Field
ID respjson.Field
IsDiscontinued respjson.Field
IsObsolete respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The type of end-user connection an EVSE supports.
func (PoiListResponseConnectionConnectionType) RawJSON ¶
func (r PoiListResponseConnectionConnectionType) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoiListResponseConnectionConnectionType) UnmarshalJSON ¶
func (r *PoiListResponseConnectionConnectionType) UnmarshalJSON(data []byte) error
type PoiListResponseConnectionCurrentType ¶
type PoiListResponseConnectionCurrentType struct {
ID int64 `json:"ID" api:"required"`
Title string `json:"Title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Indicates the EVSE power supply type e.g. DC (Direct Current), AC (Single Phase), AC (3 Phase).
func (PoiListResponseConnectionCurrentType) RawJSON ¶
func (r PoiListResponseConnectionCurrentType) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoiListResponseConnectionCurrentType) UnmarshalJSON ¶
func (r *PoiListResponseConnectionCurrentType) UnmarshalJSON(data []byte) error
type PoiListResponseConnectionLevel ¶
type PoiListResponseConnectionLevel struct {
Comments string `json:"Comments" api:"required"`
ID int64 `json:"ID" api:"required"`
// If true, this level is considered 'fast' charging, relative to other levels.
IsFastChargeCapable bool `json:"IsFastChargeCapable" api:"required"`
Title string `json:"Title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Comments respjson.Field
ID respjson.Field
IsFastChargeCapable respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A general category for equipment power capability. Deprecated for general use. Currently computed automatically based on equipment power.
func (PoiListResponseConnectionLevel) RawJSON ¶
func (r PoiListResponseConnectionLevel) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoiListResponseConnectionLevel) UnmarshalJSON ¶
func (r *PoiListResponseConnectionLevel) UnmarshalJSON(data []byte) error
type PoiListResponseConnectionStatusType ¶
type PoiListResponseConnectionStatusType struct {
ID int64 `json:"ID" api:"required"`
IsOperational bool `json:"IsOperational" api:"required"`
IsUserSelectable bool `json:"IsUserSelectable" api:"required"`
Title string `json:"Title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
IsOperational respjson.Field
IsUserSelectable respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The Status Type of a site or equipment item indicates whether it is generally operational.
func (PoiListResponseConnectionStatusType) RawJSON ¶
func (r PoiListResponseConnectionStatusType) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoiListResponseConnectionStatusType) UnmarshalJSON ¶
func (r *PoiListResponseConnectionStatusType) UnmarshalJSON(data []byte) error
type PoiListResponseDataProvider ¶
type PoiListResponseDataProvider struct {
// The reference ID for this Data Provider
ID int64 `json:"ID" api:"required"`
// Currently not implemented. Indicates a potential editing restriction.
IsRestrictedEdit bool `json:"IsRestrictedEdit" api:"required"`
// General public comments with information about this Data Provider.
Comments string `json:"Comments"`
// Status object describing whether this data provider is currently enabled and the
// type of source (manual entry, imported etc)
DataProviderStatusType PoiListResponseDataProviderDataProviderStatusType `json:"DataProviderStatusType"`
// Date and time (UTC) the last import was performed for this data provider (if an
// import).
DateLastImported time.Time `json:"DateLastImported" format:"date-time"`
// If false, data may not be imported for this provider.
IsApprovedImport bool `json:"IsApprovedImport"`
// If true, data provider uses an Open Data license
IsOpenDataLicensed bool `json:"IsOpenDataLicensed"`
// Summary of the licensing which applies for this Data Provider. Each Data
// Provider has one specific license or agreement. Usage of the data requires
// acceptance of the given license.
License string `json:"License"`
// The Title for this Data Provider
Title string `json:"Title"`
// Website URL for this data provider
WebsiteURL string `json:"WebsiteURL"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
IsRestrictedEdit respjson.Field
Comments respjson.Field
DataProviderStatusType respjson.Field
DateLastImported respjson.Field
IsApprovedImport respjson.Field
IsOpenDataLicensed respjson.Field
License respjson.Field
Title respjson.Field
WebsiteURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Data Provider is the controller of the source data set used to construct the details for this POI. Data has been transformed and interpreted from it's original form. Each Data Provider provides data either by an explicit license or agreement.
func (PoiListResponseDataProvider) RawJSON ¶
func (r PoiListResponseDataProvider) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoiListResponseDataProvider) UnmarshalJSON ¶
func (r *PoiListResponseDataProvider) UnmarshalJSON(data []byte) error
type PoiListResponseDataProviderDataProviderStatusType ¶
type PoiListResponseDataProviderDataProviderStatusType struct {
// The reference ID for this provider status type
ID int64 `json:"ID" api:"required"`
// If false, results from this data provider are not currently enabled
IsProviderEnabled bool `json:"IsProviderEnabled" api:"required"`
// The Title of this status type
Description string `json:"description"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
IsProviderEnabled respjson.Field
Description respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Status object describing whether this data provider is currently enabled and the type of source (manual entry, imported etc)
func (PoiListResponseDataProviderDataProviderStatusType) RawJSON ¶
func (r PoiListResponseDataProviderDataProviderStatusType) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoiListResponseDataProviderDataProviderStatusType) UnmarshalJSON ¶
func (r *PoiListResponseDataProviderDataProviderStatusType) UnmarshalJSON(data []byte) error
type PoiListResponseMediaItem ¶
type PoiListResponseMediaItem struct {
ChargePointID string `json:"ChargePointID"`
Comment string `json:"Comment"`
DateCreated string `json:"DateCreated"`
ID string `json:"ID"`
IsEnabled bool `json:"IsEnabled"`
IsExternalResource bool `json:"IsExternalResource"`
IsFeaturedItem bool `json:"IsFeaturedItem"`
IsVideo bool `json:"IsVideo"`
ItemThumbnailURL string `json:"ItemThumbnailURL"`
ItemURL string `json:"ItemURL"`
// Short public summary profile for a specific Open Charge Map user
User PoiListResponseMediaItemUser `json:"User"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChargePointID respjson.Field
Comment respjson.Field
DateCreated respjson.Field
ID respjson.Field
IsEnabled respjson.Field
IsExternalResource respjson.Field
IsFeaturedItem respjson.Field
IsVideo respjson.Field
ItemThumbnailURL respjson.Field
ItemURL respjson.Field
User respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A user submitted media item related to a specific charge point or site. Currently always an image.
func (PoiListResponseMediaItem) RawJSON ¶
func (r PoiListResponseMediaItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoiListResponseMediaItem) UnmarshalJSON ¶
func (r *PoiListResponseMediaItem) UnmarshalJSON(data []byte) error
type PoiListResponseMediaItemUser ¶
type PoiListResponseMediaItemUser struct {
ID int64 `json:"ID"`
ProfileImageURL string `json:"ProfileImageURL"`
ReputationPoints int64 `json:"ReputationPoints"`
Username string `json:"Username"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ProfileImageURL respjson.Field
ReputationPoints respjson.Field
Username respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Short public summary profile for a specific Open Charge Map user
func (PoiListResponseMediaItemUser) RawJSON ¶
func (r PoiListResponseMediaItemUser) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoiListResponseMediaItemUser) UnmarshalJSON ¶
func (r *PoiListResponseMediaItemUser) UnmarshalJSON(data []byte) error
type PoiListResponseOperatorInfo ¶
type PoiListResponseOperatorInfo struct {
// Id
ID int64 `json:"ID" api:"required"`
// Geographic position for site and (nearest) address component information.
AddressInfo PoiListResponseOperatorInfoAddressInfo `json:"AddressInfo"`
BookingURL string `json:"BookingURL"`
Comments string `json:"Comments"`
ContactEmail string `json:"ContactEmail"`
// Used to send automated notification to network operator if a user submits a
// fault report comment/check-in
FaultReportEmail string `json:"FaultReportEmail"`
// If true, this operator represents a private individual
//
// Deprecated: deprecated
IsPrivateIndividual bool `json:"IsPrivateIndividual"`
// If true, this network restricts community edits for OCM data
IsRestrictedEdit bool `json:"IsRestrictedEdit"`
// Primary contact number for network users
PhonePrimaryContact string `json:"PhonePrimaryContact"`
// Secondary contact number
PhoneSecondaryContact string `json:"PhoneSecondaryContact"`
// Title
Title string `json:"Title"`
// Website for more information about this network
WebsiteURL string `json:"WebsiteURL"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AddressInfo respjson.Field
BookingURL respjson.Field
Comments respjson.Field
ContactEmail respjson.Field
FaultReportEmail respjson.Field
IsPrivateIndividual respjson.Field
IsRestrictedEdit respjson.Field
PhonePrimaryContact respjson.Field
PhoneSecondaryContact respjson.Field
Title respjson.Field
WebsiteURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An Operator is the public organisation which controls a network of charging points.
func (PoiListResponseOperatorInfo) RawJSON ¶
func (r PoiListResponseOperatorInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoiListResponseOperatorInfo) UnmarshalJSON ¶
func (r *PoiListResponseOperatorInfo) UnmarshalJSON(data []byte) error
type PoiListResponseOperatorInfoAddressInfo ¶
type PoiListResponseOperatorInfoAddressInfo struct {
// The reference ID for the Country
CountryID int64 `json:"CountryID" api:"required"`
// ID
ID int64 `json:"ID" api:"required"`
// Site latitude coordinate in decimal degrees
Latitude float64 `json:"Latitude" api:"required"`
// Site longitude coordinate in decimal degrees
Longitude float64 `json:"Longitude" api:"required"`
// Guidance for users to use or find the equipment
AccessComments string `json:"AccessComments"`
// First line of nearby street address
AddressLine1 string `json:"AddressLine1"`
// Second line of nearby street address
AddressLine2 string `json:"AddressLine2"`
// Primary contact email
ContactEmail string `json:"ContactEmail"`
// Primary contact number
ContactTelephone1 string `json:"ContactTelephone1"`
// Secondary contact number
ContactTelephone2 string `json:"ContactTelephone2"`
// Country details
Country Country `json:"Country"`
// Distance from search location, if search is around a point
Distance float64 `json:"Distance"`
// Unit used for distance, 1= Miles, 2 = KM
DistanceUnit int64 `json:"DistanceUnit"`
// Postal code or Zipcode
Postcode string `json:"Postcode"`
// Optional website for more information
RelatedURL string `json:"RelatedURL"`
// State or Province
StateOrProvince string `json:"StateOrProvince"`
// General title for this location to aid user
Title string `json:"Title"`
// Town or City
Town string `json:"Town"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CountryID respjson.Field
ID respjson.Field
Latitude respjson.Field
Longitude respjson.Field
AccessComments respjson.Field
AddressLine1 respjson.Field
AddressLine2 respjson.Field
ContactEmail respjson.Field
ContactTelephone1 respjson.Field
ContactTelephone2 respjson.Field
Country respjson.Field
Distance respjson.Field
DistanceUnit respjson.Field
Postcode respjson.Field
RelatedURL respjson.Field
StateOrProvince respjson.Field
Title respjson.Field
Town respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Geographic position for site and (nearest) address component information.
func (PoiListResponseOperatorInfoAddressInfo) RawJSON ¶
func (r PoiListResponseOperatorInfoAddressInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoiListResponseOperatorInfoAddressInfo) UnmarshalJSON ¶
func (r *PoiListResponseOperatorInfoAddressInfo) UnmarshalJSON(data []byte) error
type PoiListResponseStatusType ¶
type PoiListResponseStatusType struct {
ID int64 `json:"ID" api:"required"`
IsOperational bool `json:"IsOperational" api:"required"`
IsUserSelectable bool `json:"IsUserSelectable" api:"required"`
Title string `json:"Title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
IsOperational respjson.Field
IsUserSelectable respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The Status Type of a site or equipment item indicates whether it is generally operational.
func (PoiListResponseStatusType) RawJSON ¶
func (r PoiListResponseStatusType) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoiListResponseStatusType) UnmarshalJSON ¶
func (r *PoiListResponseStatusType) UnmarshalJSON(data []byte) error
type PoiListResponseSubmissionStatus ¶
type PoiListResponseSubmissionStatus struct {
// Submission Status Type reference ID
ID int64 `json:"ID" api:"required"`
// If true, POI listing is live (not draft or de-listed)
IsLive bool `json:"IsLive" api:"required"`
Title string `json:"Title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
IsLive respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Submission Status object, detailing the POI listing status
func (PoiListResponseSubmissionStatus) RawJSON ¶
func (r PoiListResponseSubmissionStatus) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoiListResponseSubmissionStatus) UnmarshalJSON ¶
func (r *PoiListResponseSubmissionStatus) UnmarshalJSON(data []byte) error
type PoiListResponseUsageType ¶
type PoiListResponseUsageType struct {
ID int64 `json:"ID" api:"required"`
// If true this usage required a physical access key
//
// Deprecated: deprecated
IsAccessKeyRequired bool `json:"IsAccessKeyRequired" api:"required"`
// If true, this usage type requires registration or membership with a service.
IsMembershipRequired bool `json:"IsMembershipRequired" api:"required"`
// If true, usage requires paying at location
IsPayAtLocation bool `json:"IsPayAtLocation" api:"required"`
Title string `json:"Title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
IsAccessKeyRequired respjson.Field
IsMembershipRequired respjson.Field
IsPayAtLocation respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The Usage Type of a site indicates the general restrictions on usage.
func (PoiListResponseUsageType) RawJSON ¶
func (r PoiListResponseUsageType) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoiListResponseUsageType) UnmarshalJSON ¶
func (r *PoiListResponseUsageType) UnmarshalJSON(data []byte) error
type PoiListResponseUserComment ¶
type PoiListResponseUserComment struct {
ChargePointID int64 `json:"ChargePointID"`
// Classification for the users comment or experience using a specific charging
// location.
CheckinStatusType PoiListResponseUserCommentCheckinStatusType `json:"CheckinStatusType"`
CheckinStatusTypeID int64 `json:"CheckinStatusTypeID"`
Comment string `json:"Comment"`
// Category for a user comment, e.g. General Comment, Fault Report (Notice To Users
// And Operator)
CommentType PoiListResponseUserCommentCommentType `json:"CommentType"`
CommentTypeID int64 `json:"CommentTypeID"`
DateCreated time.Time `json:"DateCreated" format:"date-time"`
ID string `json:"ID"`
RelatedURL string `json:"RelatedURL"`
// Short public summary profile for a specific Open Charge Map user
User PoiListResponseUserCommentUser `json:"User"`
UserName string `json:"UserName"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChargePointID respjson.Field
CheckinStatusType respjson.Field
CheckinStatusTypeID respjson.Field
Comment respjson.Field
CommentType respjson.Field
CommentTypeID respjson.Field
DateCreated respjson.Field
ID respjson.Field
RelatedURL respjson.Field
User respjson.Field
UserName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A user comment or check-in for a specific charging point (POI/Site)
func (PoiListResponseUserComment) RawJSON ¶
func (r PoiListResponseUserComment) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoiListResponseUserComment) UnmarshalJSON ¶
func (r *PoiListResponseUserComment) UnmarshalJSON(data []byte) error
type PoiListResponseUserCommentCheckinStatusType ¶
type PoiListResponseUserCommentCheckinStatusType struct {
ID int64 `json:"ID" api:"required"`
// If true, checkin or comment was provided by an automated system.
IsAutomatedCheckin bool `json:"IsAutomatedCheckin" api:"required"`
// If true, this type of checkin/comment is considered positive.
IsPositive bool `json:"IsPositive"`
Title string `json:"Title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
IsAutomatedCheckin respjson.Field
IsPositive respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Classification for the users comment or experience using a specific charging location.
func (PoiListResponseUserCommentCheckinStatusType) RawJSON ¶
func (r PoiListResponseUserCommentCheckinStatusType) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoiListResponseUserCommentCheckinStatusType) UnmarshalJSON ¶
func (r *PoiListResponseUserCommentCheckinStatusType) UnmarshalJSON(data []byte) error
type PoiListResponseUserCommentCommentType ¶
type PoiListResponseUserCommentCommentType struct {
ID int64 `json:"ID"`
Title string `json:"Title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Category for a user comment, e.g. General Comment, Fault Report (Notice To Users And Operator)
func (PoiListResponseUserCommentCommentType) RawJSON ¶
func (r PoiListResponseUserCommentCommentType) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoiListResponseUserCommentCommentType) UnmarshalJSON ¶
func (r *PoiListResponseUserCommentCommentType) UnmarshalJSON(data []byte) error
type PoiListResponseUserCommentUser ¶
type PoiListResponseUserCommentUser struct {
ID int64 `json:"ID"`
ProfileImageURL string `json:"ProfileImageURL"`
ReputationPoints int64 `json:"ReputationPoints"`
Username string `json:"Username"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ProfileImageURL respjson.Field
ReputationPoints respjson.Field
Username respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Short public summary profile for a specific Open Charge Map user
func (PoiListResponseUserCommentUser) RawJSON ¶
func (r PoiListResponseUserCommentUser) RawJSON() string
Returns the unmodified JSON received from the API
func (*PoiListResponseUserCommentUser) UnmarshalJSON ¶
func (r *PoiListResponseUserCommentUser) UnmarshalJSON(data []byte) error
type PoiService ¶
type PoiService struct {
Options []option.RequestOption
}
PoiService contains methods and other services that help with interacting with the ocm API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPoiService method instead.
func NewPoiService ¶
func NewPoiService(opts ...option.RequestOption) (r PoiService)
NewPoiService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PoiService) List ¶
func (r *PoiService) List(ctx context.Context, query PoiListParams, opts ...option.RequestOption) (res *[]PoiListResponse, err error)
Used to fetch a list of POIs (sites) within a geographic boundary or near a specific latitude/longitude. This is the primary method for most applications and services to consume data from Open Charge Map.
type ProfileAuthenticateParams ¶
type ProfileAuthenticateParams struct {
Emailaddress param.Opt[string] `json:"emailaddress,omitzero"`
Password param.Opt[string] `json:"password,omitzero"`
// contains filtered or unexported fields
}
func (ProfileAuthenticateParams) MarshalJSON ¶
func (r ProfileAuthenticateParams) MarshalJSON() (data []byte, err error)
func (*ProfileAuthenticateParams) UnmarshalJSON ¶
func (r *ProfileAuthenticateParams) UnmarshalJSON(data []byte) error
type ProfileAuthenticateResponse ¶
type ProfileAuthenticateResponse struct {
Data ProfileAuthenticateResponseData `json:"Data" api:"required"`
Metadata ProfileAuthenticateResponseMetadata `json:"Metadata" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Metadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ProfileAuthenticateResponse) RawJSON ¶
func (r ProfileAuthenticateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProfileAuthenticateResponse) UnmarshalJSON ¶
func (r *ProfileAuthenticateResponse) UnmarshalJSON(data []byte) error
type ProfileAuthenticateResponseData ¶
type ProfileAuthenticateResponseData struct {
// JWT Bearer Token to use in subsequent authenticated requests
AccessToken string `json:"access_token" api:"required"`
// Full user profile, including non-public fields such as Email Address
UserProfile ProfileAuthenticateResponseDataUserProfile `json:"UserProfile" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AccessToken respjson.Field
UserProfile respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ProfileAuthenticateResponseData) RawJSON ¶
func (r ProfileAuthenticateResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProfileAuthenticateResponseData) UnmarshalJSON ¶
func (r *ProfileAuthenticateResponseData) UnmarshalJSON(data []byte) error
type ProfileAuthenticateResponseDataUserProfile ¶
type ProfileAuthenticateResponseDataUserProfile struct {
DateCreated string `json:"DateCreated" api:"required"`
ID float64 `json:"ID" api:"required"`
IsProfilePublic bool `json:"IsProfilePublic" api:"required"`
Username string `json:"Username" api:"required"`
DateLastLogin string `json:"DateLastLogin"`
EmailAddress string `json:"EmailAddress"`
Latitude float64 `json:"Latitude"`
Location string `json:"Location"`
Longitude float64 `json:"Longitude"`
Permissions string `json:"Permissions"`
Profile string `json:"Profile"`
ProfileImageURL string `json:"ProfileImageURL"`
ReputationPoints float64 `json:"ReputationPoints"`
WebsiteURL string `json:"WebsiteURL"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DateCreated respjson.Field
ID respjson.Field
IsProfilePublic respjson.Field
Username respjson.Field
DateLastLogin respjson.Field
EmailAddress respjson.Field
Latitude respjson.Field
Location respjson.Field
Longitude respjson.Field
Permissions respjson.Field
Profile respjson.Field
ProfileImageURL respjson.Field
ReputationPoints respjson.Field
WebsiteURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Full user profile, including non-public fields such as Email Address
func (ProfileAuthenticateResponseDataUserProfile) RawJSON ¶
func (r ProfileAuthenticateResponseDataUserProfile) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProfileAuthenticateResponseDataUserProfile) UnmarshalJSON ¶
func (r *ProfileAuthenticateResponseDataUserProfile) UnmarshalJSON(data []byte) error
type ProfileAuthenticateResponseMetadata ¶
type ProfileAuthenticateResponseMetadata struct {
StatusCode int64 `json:"StatusCode" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
StatusCode respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ProfileAuthenticateResponseMetadata) RawJSON ¶
func (r ProfileAuthenticateResponseMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProfileAuthenticateResponseMetadata) UnmarshalJSON ¶
func (r *ProfileAuthenticateResponseMetadata) UnmarshalJSON(data []byte) error
type ProfileService ¶
type ProfileService struct {
Options []option.RequestOption
}
ProfileService contains methods and other services that help with interacting with the ocm API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProfileService method instead.
func NewProfileService ¶
func NewProfileService(opts ...option.RequestOption) (r ProfileService)
NewProfileService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ProfileService) Authenticate ¶
func (r *ProfileService) Authenticate(ctx context.Context, body ProfileAuthenticateParams, opts ...option.RequestOption) (res *ProfileAuthenticateResponse, err error)
Perform user authentication, returning a model which includes the users profile and a JWT auth token to re-use in subsequent requests.
type ReferencedataGetParams ¶
type ReferencedataGetParams struct {
// Optional filter on countryid, exact match on a given numeric country id (comma
// separated list)
Countryid []any `query:"countryid,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ReferencedataGetParams) URLQuery ¶
func (r ReferencedataGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes ReferencedataGetParams's query parameters as `url.Values`.
type ReferencedataGetResponse ¶
type ReferencedataGetResponse struct {
ChargerTypes []ReferencedataGetResponseChargerType `json:"ChargerTypes"`
CheckinStatusTypes []ReferencedataGetResponseCheckinStatusType `json:"CheckinStatusTypes"`
ConnectionTypes []ReferencedataGetResponseConnectionType `json:"ConnectionTypes"`
Countries []Country `json:"Countries"`
CurrentTypes []ReferencedataGetResponseCurrentType `json:"CurrentTypes"`
DataProviders []ReferencedataGetResponseDataProvider `json:"DataProviders"`
DataTypes any `json:"DataTypes"`
MetadataGroups string `json:"MetadataGroups"`
Operators []ReferencedataGetResponseOperator `json:"Operators"`
StatusTypes []ReferencedataGetResponseStatusType `json:"StatusTypes"`
SubmissionStatusTypes []ReferencedataGetResponseSubmissionStatusType `json:"SubmissionStatusTypes"`
UsageTypes []ReferencedataGetResponseUsageType `json:"UsageTypes"`
UserCommentTypes []ReferencedataGetResponseUserCommentType `json:"UserCommentTypes"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChargerTypes respjson.Field
CheckinStatusTypes respjson.Field
ConnectionTypes respjson.Field
Countries respjson.Field
CurrentTypes respjson.Field
DataProviders respjson.Field
DataTypes respjson.Field
MetadataGroups respjson.Field
Operators respjson.Field
StatusTypes respjson.Field
SubmissionStatusTypes respjson.Field
UsageTypes respjson.Field
UserCommentTypes respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Set of core reference data used for other API results and UI
func (ReferencedataGetResponse) RawJSON ¶
func (r ReferencedataGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReferencedataGetResponse) UnmarshalJSON ¶
func (r *ReferencedataGetResponse) UnmarshalJSON(data []byte) error
type ReferencedataGetResponseChargerType ¶
type ReferencedataGetResponseChargerType struct {
Comments string `json:"Comments" api:"required"`
ID int64 `json:"ID" api:"required"`
// If true, this level is considered 'fast' charging, relative to other levels.
IsFastChargeCapable bool `json:"IsFastChargeCapable" api:"required"`
Title string `json:"Title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Comments respjson.Field
ID respjson.Field
IsFastChargeCapable respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A general category for equipment power capability. Deprecated for general use. Currently computed automatically based on equipment power.
func (ReferencedataGetResponseChargerType) RawJSON ¶
func (r ReferencedataGetResponseChargerType) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReferencedataGetResponseChargerType) UnmarshalJSON ¶
func (r *ReferencedataGetResponseChargerType) UnmarshalJSON(data []byte) error
type ReferencedataGetResponseCheckinStatusType ¶
type ReferencedataGetResponseCheckinStatusType struct {
ID int64 `json:"ID" api:"required"`
// If true, checkin or comment was provided by an automated system.
IsAutomatedCheckin bool `json:"IsAutomatedCheckin" api:"required"`
// If true, this type of checkin/comment is considered positive.
IsPositive bool `json:"IsPositive"`
Title string `json:"Title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
IsAutomatedCheckin respjson.Field
IsPositive respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Classification for the users comment or experience using a specific charging location.
func (ReferencedataGetResponseCheckinStatusType) RawJSON ¶
func (r ReferencedataGetResponseCheckinStatusType) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReferencedataGetResponseCheckinStatusType) UnmarshalJSON ¶
func (r *ReferencedataGetResponseCheckinStatusType) UnmarshalJSON(data []byte) error
type ReferencedataGetResponseConnectionType ¶
type ReferencedataGetResponseConnectionType struct {
// Formal (standard) name for this connection type
FormalName string `json:"FormalName"`
ID int64 `json:"ID"`
// If true, this is an discontinued but used connection type
IsDiscontinued bool `json:"IsDiscontinued"`
// If true, this is an obsolete connection type and is unlikely top be present in
// modern infrastructure
IsObsolete bool `json:"IsObsolete"`
Title string `json:"Title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FormalName respjson.Field
ID respjson.Field
IsDiscontinued respjson.Field
IsObsolete respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The type of end-user connection an EVSE supports.
func (ReferencedataGetResponseConnectionType) RawJSON ¶
func (r ReferencedataGetResponseConnectionType) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReferencedataGetResponseConnectionType) UnmarshalJSON ¶
func (r *ReferencedataGetResponseConnectionType) UnmarshalJSON(data []byte) error
type ReferencedataGetResponseCurrentType ¶
type ReferencedataGetResponseCurrentType struct {
ID int64 `json:"ID" api:"required"`
Title string `json:"Title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Indicates the EVSE power supply type e.g. DC (Direct Current), AC (Single Phase), AC (3 Phase).
func (ReferencedataGetResponseCurrentType) RawJSON ¶
func (r ReferencedataGetResponseCurrentType) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReferencedataGetResponseCurrentType) UnmarshalJSON ¶
func (r *ReferencedataGetResponseCurrentType) UnmarshalJSON(data []byte) error
type ReferencedataGetResponseDataProvider ¶
type ReferencedataGetResponseDataProvider struct {
// The reference ID for this Data Provider
ID int64 `json:"ID" api:"required"`
// Currently not implemented. Indicates a potential editing restriction.
IsRestrictedEdit bool `json:"IsRestrictedEdit" api:"required"`
// General public comments with information about this Data Provider.
Comments string `json:"Comments"`
// Status object describing whether this data provider is currently enabled and the
// type of source (manual entry, imported etc)
DataProviderStatusType ReferencedataGetResponseDataProviderDataProviderStatusType `json:"DataProviderStatusType"`
// Date and time (UTC) the last import was performed for this data provider (if an
// import).
DateLastImported time.Time `json:"DateLastImported" format:"date-time"`
// If false, data may not be imported for this provider.
IsApprovedImport bool `json:"IsApprovedImport"`
// If true, data provider uses an Open Data license
IsOpenDataLicensed bool `json:"IsOpenDataLicensed"`
// Summary of the licensing which applies for this Data Provider. Each Data
// Provider has one specific license or agreement. Usage of the data requires
// acceptance of the given license.
License string `json:"License"`
// The Title for this Data Provider
Title string `json:"Title"`
// Website URL for this data provider
WebsiteURL string `json:"WebsiteURL"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
IsRestrictedEdit respjson.Field
Comments respjson.Field
DataProviderStatusType respjson.Field
DateLastImported respjson.Field
IsApprovedImport respjson.Field
IsOpenDataLicensed respjson.Field
License respjson.Field
Title respjson.Field
WebsiteURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Data Provider is the controller of the source data set used to construct the details for this POI. Data has been transformed and interpreted from it's original form. Each Data Provider provides data either by an explicit license or agreement.
func (ReferencedataGetResponseDataProvider) RawJSON ¶
func (r ReferencedataGetResponseDataProvider) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReferencedataGetResponseDataProvider) UnmarshalJSON ¶
func (r *ReferencedataGetResponseDataProvider) UnmarshalJSON(data []byte) error
type ReferencedataGetResponseDataProviderDataProviderStatusType ¶
type ReferencedataGetResponseDataProviderDataProviderStatusType struct {
// The reference ID for this provider status type
ID int64 `json:"ID" api:"required"`
// If false, results from this data provider are not currently enabled
IsProviderEnabled bool `json:"IsProviderEnabled" api:"required"`
// The Title of this status type
Description string `json:"description"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
IsProviderEnabled respjson.Field
Description respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Status object describing whether this data provider is currently enabled and the type of source (manual entry, imported etc)
func (ReferencedataGetResponseDataProviderDataProviderStatusType) RawJSON ¶
func (r ReferencedataGetResponseDataProviderDataProviderStatusType) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReferencedataGetResponseDataProviderDataProviderStatusType) UnmarshalJSON ¶
func (r *ReferencedataGetResponseDataProviderDataProviderStatusType) UnmarshalJSON(data []byte) error
type ReferencedataGetResponseOperator ¶
type ReferencedataGetResponseOperator struct {
// Id
ID int64 `json:"ID" api:"required"`
// Geographic position for site and (nearest) address component information.
AddressInfo ReferencedataGetResponseOperatorAddressInfo `json:"AddressInfo"`
BookingURL string `json:"BookingURL"`
Comments string `json:"Comments"`
ContactEmail string `json:"ContactEmail"`
// Used to send automated notification to network operator if a user submits a
// fault report comment/check-in
FaultReportEmail string `json:"FaultReportEmail"`
// If true, this operator represents a private individual
//
// Deprecated: deprecated
IsPrivateIndividual bool `json:"IsPrivateIndividual"`
// If true, this network restricts community edits for OCM data
IsRestrictedEdit bool `json:"IsRestrictedEdit"`
// Primary contact number for network users
PhonePrimaryContact string `json:"PhonePrimaryContact"`
// Secondary contact number
PhoneSecondaryContact string `json:"PhoneSecondaryContact"`
// Title
Title string `json:"Title"`
// Website for more information about this network
WebsiteURL string `json:"WebsiteURL"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AddressInfo respjson.Field
BookingURL respjson.Field
Comments respjson.Field
ContactEmail respjson.Field
FaultReportEmail respjson.Field
IsPrivateIndividual respjson.Field
IsRestrictedEdit respjson.Field
PhonePrimaryContact respjson.Field
PhoneSecondaryContact respjson.Field
Title respjson.Field
WebsiteURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An Operator is the public organisation which controls a network of charging points.
func (ReferencedataGetResponseOperator) RawJSON ¶
func (r ReferencedataGetResponseOperator) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReferencedataGetResponseOperator) UnmarshalJSON ¶
func (r *ReferencedataGetResponseOperator) UnmarshalJSON(data []byte) error
type ReferencedataGetResponseOperatorAddressInfo ¶
type ReferencedataGetResponseOperatorAddressInfo struct {
// The reference ID for the Country
CountryID int64 `json:"CountryID" api:"required"`
// ID
ID int64 `json:"ID" api:"required"`
// Site latitude coordinate in decimal degrees
Latitude float64 `json:"Latitude" api:"required"`
// Site longitude coordinate in decimal degrees
Longitude float64 `json:"Longitude" api:"required"`
// Guidance for users to use or find the equipment
AccessComments string `json:"AccessComments"`
// First line of nearby street address
AddressLine1 string `json:"AddressLine1"`
// Second line of nearby street address
AddressLine2 string `json:"AddressLine2"`
// Primary contact email
ContactEmail string `json:"ContactEmail"`
// Primary contact number
ContactTelephone1 string `json:"ContactTelephone1"`
// Secondary contact number
ContactTelephone2 string `json:"ContactTelephone2"`
// Country details
Country Country `json:"Country"`
// Distance from search location, if search is around a point
Distance float64 `json:"Distance"`
// Unit used for distance, 1= Miles, 2 = KM
DistanceUnit int64 `json:"DistanceUnit"`
// Postal code or Zipcode
Postcode string `json:"Postcode"`
// Optional website for more information
RelatedURL string `json:"RelatedURL"`
// State or Province
StateOrProvince string `json:"StateOrProvince"`
// General title for this location to aid user
Title string `json:"Title"`
// Town or City
Town string `json:"Town"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CountryID respjson.Field
ID respjson.Field
Latitude respjson.Field
Longitude respjson.Field
AccessComments respjson.Field
AddressLine1 respjson.Field
AddressLine2 respjson.Field
ContactEmail respjson.Field
ContactTelephone1 respjson.Field
ContactTelephone2 respjson.Field
Country respjson.Field
Distance respjson.Field
DistanceUnit respjson.Field
Postcode respjson.Field
RelatedURL respjson.Field
StateOrProvince respjson.Field
Title respjson.Field
Town respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Geographic position for site and (nearest) address component information.
func (ReferencedataGetResponseOperatorAddressInfo) RawJSON ¶
func (r ReferencedataGetResponseOperatorAddressInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReferencedataGetResponseOperatorAddressInfo) UnmarshalJSON ¶
func (r *ReferencedataGetResponseOperatorAddressInfo) UnmarshalJSON(data []byte) error
type ReferencedataGetResponseStatusType ¶
type ReferencedataGetResponseStatusType struct {
ID int64 `json:"ID" api:"required"`
IsOperational bool `json:"IsOperational" api:"required"`
IsUserSelectable bool `json:"IsUserSelectable" api:"required"`
Title string `json:"Title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
IsOperational respjson.Field
IsUserSelectable respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The Status Type of a site or equipment item indicates whether it is generally operational.
func (ReferencedataGetResponseStatusType) RawJSON ¶
func (r ReferencedataGetResponseStatusType) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReferencedataGetResponseStatusType) UnmarshalJSON ¶
func (r *ReferencedataGetResponseStatusType) UnmarshalJSON(data []byte) error
type ReferencedataGetResponseSubmissionStatusType ¶
type ReferencedataGetResponseSubmissionStatusType struct {
// Submission Status Type reference ID
ID int64 `json:"ID" api:"required"`
// If true, POI listing is live (not draft or de-listed)
IsLive bool `json:"IsLive" api:"required"`
Title string `json:"Title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
IsLive respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Submission Status object, detailing the POI listing status
func (ReferencedataGetResponseSubmissionStatusType) RawJSON ¶
func (r ReferencedataGetResponseSubmissionStatusType) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReferencedataGetResponseSubmissionStatusType) UnmarshalJSON ¶
func (r *ReferencedataGetResponseSubmissionStatusType) UnmarshalJSON(data []byte) error
type ReferencedataGetResponseUsageType ¶
type ReferencedataGetResponseUsageType struct {
ID int64 `json:"ID" api:"required"`
// If true this usage required a physical access key
//
// Deprecated: deprecated
IsAccessKeyRequired bool `json:"IsAccessKeyRequired" api:"required"`
// If true, this usage type requires registration or membership with a service.
IsMembershipRequired bool `json:"IsMembershipRequired" api:"required"`
// If true, usage requires paying at location
IsPayAtLocation bool `json:"IsPayAtLocation" api:"required"`
Title string `json:"Title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
IsAccessKeyRequired respjson.Field
IsMembershipRequired respjson.Field
IsPayAtLocation respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The Usage Type of a site indicates the general restrictions on usage.
func (ReferencedataGetResponseUsageType) RawJSON ¶
func (r ReferencedataGetResponseUsageType) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReferencedataGetResponseUsageType) UnmarshalJSON ¶
func (r *ReferencedataGetResponseUsageType) UnmarshalJSON(data []byte) error
type ReferencedataGetResponseUserCommentType ¶
type ReferencedataGetResponseUserCommentType struct {
ID int64 `json:"ID"`
Title string `json:"Title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Category for a user comment, e.g. General Comment, Fault Report (Notice To Users And Operator)
func (ReferencedataGetResponseUserCommentType) RawJSON ¶
func (r ReferencedataGetResponseUserCommentType) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReferencedataGetResponseUserCommentType) UnmarshalJSON ¶
func (r *ReferencedataGetResponseUserCommentType) UnmarshalJSON(data []byte) error
type ReferencedataService ¶
type ReferencedataService struct {
Options []option.RequestOption
}
ReferencedataService contains methods and other services that help with interacting with the ocm API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewReferencedataService method instead.
func NewReferencedataService ¶
func NewReferencedataService(opts ...option.RequestOption) (r ReferencedataService)
NewReferencedataService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ReferencedataService) Get ¶
func (r *ReferencedataService) Get(ctx context.Context, query ReferencedataGetParams, opts ...option.RequestOption) (res *ReferencedataGetResponse, err error)
Returns the core reference data used for looking up IDs such as Connection Types, Operators, Countries etc.
This information is useful for UIs such as editing systems or for fetching results in the lighter non-verbose mode, then hydrating POI results back into complex objects.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
encoding/json
Package json implements encoding and decoding of JSON as defined in RFC 7159.
|
Package json implements encoding and decoding of JSON as defined in RFC 7159. |
|
encoding/json/shims
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
|
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package. |
|
packages
|
|
|
shared
|
|