Documentation
¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
Index ¶
- func NewCreateDeviceAuthorizationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateDeviceAuthorizationRequestWithFormdataBody(server string, body CreateDeviceAuthorizationFormdataRequestBody) (*http.Request, error)
- func NewCreateMessageRequest(server string, body CreateMessageJSONRequestBody) (*http.Request, error)
- func NewCreateMessageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreatePairingRequest(server string, body CreatePairingJSONRequestBody) (*http.Request, error)
- func NewCreatePairingRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewExchangeDeviceCodeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewExchangeDeviceCodeRequestWithFormdataBody(server string, body ExchangeDeviceCodeFormdataRequestBody) (*http.Request, error)
- func NewGetCurrentSenderCredentialRequest(server string) (*http.Request, error)
- func NewGetOwnMessageRequest(server string, messageId MessageId) (*http.Request, error)
- func NewGetPairingRequest(server string, pairingId PairingId, params *GetPairingParams) (*http.Request, error)
- func NewGetUsageRequest(server string) (*http.Request, error)
- func NewListDevicesRequest(server string) (*http.Request, error)
- func NewListOwnMessagesRequest(server string, params *ListOwnMessagesParams) (*http.Request, error)
- func NewRevokeCurrentSenderCredentialRequest(server string) (*http.Request, error)
- func NewUpdateCurrentSenderCredentialRequest(server string, body UpdateCurrentSenderCredentialJSONRequestBody) (*http.Request, error)
- func NewUpdateCurrentSenderCredentialRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- type APIError
- type Client
- func (c *Client) CreateDeviceAuthorizationWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateDeviceAuthorizationWithFormdataBody(ctx context.Context, body CreateDeviceAuthorizationFormdataRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateMessage(ctx context.Context, body CreateMessageJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateMessageWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreatePairing(ctx context.Context, body CreatePairingJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreatePairingWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) ExchangeDeviceCodeWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) ExchangeDeviceCodeWithFormdataBody(ctx context.Context, body ExchangeDeviceCodeFormdataRequestBody, ...) (*http.Response, error)
- func (c *Client) GetCurrentSenderCredential(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetOwnMessage(ctx context.Context, messageId MessageId, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetPairing(ctx context.Context, pairingId PairingId, params *GetPairingParams, ...) (*http.Response, error)
- func (c *Client) GetUsage(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListDevices(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListOwnMessages(ctx context.Context, params *ListOwnMessagesParams, ...) (*http.Response, error)
- func (c *Client) RevokeCurrentSenderCredential(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) UpdateCurrentSenderCredential(ctx context.Context, body UpdateCurrentSenderCredentialJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateCurrentSenderCredentialWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateDeviceAuthorizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateDeviceAuthorizationResponse, error)
- func (c *ClientWithResponses) CreateDeviceAuthorizationWithFormdataBodyWithResponse(ctx context.Context, body CreateDeviceAuthorizationFormdataRequestBody, ...) (*CreateDeviceAuthorizationResponse, error)
- func (c *ClientWithResponses) CreateMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateMessageResponse, error)
- func (c *ClientWithResponses) CreateMessageWithResponse(ctx context.Context, body CreateMessageJSONRequestBody, ...) (*CreateMessageResponse, error)
- func (c *ClientWithResponses) CreatePairingWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreatePairingResponse, error)
- func (c *ClientWithResponses) CreatePairingWithResponse(ctx context.Context, body CreatePairingJSONRequestBody, ...) (*CreatePairingResponse, error)
- func (c *ClientWithResponses) ExchangeDeviceCodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*ExchangeDeviceCodeResponse, error)
- func (c *ClientWithResponses) ExchangeDeviceCodeWithFormdataBodyWithResponse(ctx context.Context, body ExchangeDeviceCodeFormdataRequestBody, ...) (*ExchangeDeviceCodeResponse, error)
- func (c *ClientWithResponses) GetCurrentSenderCredentialWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentSenderCredentialResponse, error)
- func (c *ClientWithResponses) GetOwnMessageWithResponse(ctx context.Context, messageId MessageId, reqEditors ...RequestEditorFn) (*GetOwnMessageResponse, error)
- func (c *ClientWithResponses) GetPairingWithResponse(ctx context.Context, pairingId PairingId, params *GetPairingParams, ...) (*GetPairingResponse, error)
- func (c *ClientWithResponses) GetUsageWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetUsageResponse, error)
- func (c *ClientWithResponses) ListDevicesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListDevicesResponse, error)
- func (c *ClientWithResponses) ListOwnMessagesWithResponse(ctx context.Context, params *ListOwnMessagesParams, ...) (*ListOwnMessagesResponse, error)
- func (c *ClientWithResponses) RevokeCurrentSenderCredentialWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RevokeCurrentSenderCredentialResponse, error)
- func (c *ClientWithResponses) UpdateCurrentSenderCredentialWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*UpdateCurrentSenderCredentialResponse, error)
- func (c *ClientWithResponses) UpdateCurrentSenderCredentialWithResponse(ctx context.Context, body UpdateCurrentSenderCredentialJSONRequestBody, ...) (*UpdateCurrentSenderCredentialResponse, error)
- type ClientWithResponsesInterface
- type CreateDeviceAuthorizationFormdataBody
- type CreateDeviceAuthorizationFormdataBodyClientId
- type CreateDeviceAuthorizationFormdataBodyPlatform
- type CreateDeviceAuthorizationFormdataBodyScope
- type CreateDeviceAuthorizationFormdataRequestBody
- type CreateDeviceAuthorizationResponse
- func (r CreateDeviceAuthorizationResponse) ContentType() string
- func (r CreateDeviceAuthorizationResponse) GetBody() []byte
- func (r CreateDeviceAuthorizationResponse) GetJSON200() *DeviceAuthorization
- func (r CreateDeviceAuthorizationResponse) GetJSONDefault() *APIError
- func (r CreateDeviceAuthorizationResponse) Status() string
- func (r CreateDeviceAuthorizationResponse) StatusCode() int
- type CreateDeviceAuthorizationResponseDefaultHeaders
- type CreateMessageJSONRequestBody
- type CreateMessageResponse
- func (r CreateMessageResponse) ContentType() string
- func (r CreateMessageResponse) GetBody() []byte
- func (r CreateMessageResponse) GetJSON202() *MessageAccepted
- func (r CreateMessageResponse) GetJSONDefault() *APIError
- func (r CreateMessageResponse) Status() string
- func (r CreateMessageResponse) StatusCode() int
- type CreateMessageResponseDefaultHeaders
- type CreatePairingJSONBody
- type CreatePairingJSONBodyPlatform
- type CreatePairingJSONRequestBody
- type CreatePairingResponse
- func (r CreatePairingResponse) ContentType() string
- func (r CreatePairingResponse) GetBody() []byte
- func (r CreatePairingResponse) GetJSON201() *PairingCreated
- func (r CreatePairingResponse) GetJSONDefault() *APIError
- func (r CreatePairingResponse) Status() string
- func (r CreatePairingResponse) StatusCode() int
- type CreatePairingResponseDefaultHeaders
- type Cursor
- type DeliveryState
- type Device
- type DeviceAuthorization
- type DeviceId
- type DeviceNotificationStatus
- type DevicePlatform
- type DeviceToken
- type DeviceTokenScope
- type DeviceTokenTokenType
- type Error
- type ErrorResponse
- type ExchangeDeviceCodeFormdataBody
- type ExchangeDeviceCodeFormdataBodyClientId
- type ExchangeDeviceCodeFormdataBodyGrantType
- type ExchangeDeviceCodeFormdataRequestBody
- type ExchangeDeviceCodeResponse
- func (r ExchangeDeviceCodeResponse) ContentType() string
- func (r ExchangeDeviceCodeResponse) GetBody() []byte
- func (r ExchangeDeviceCodeResponse) GetJSON200() *DeviceToken
- func (r ExchangeDeviceCodeResponse) GetJSON400() *OAuthError
- func (r ExchangeDeviceCodeResponse) GetJSONDefault() *APIError
- func (r ExchangeDeviceCodeResponse) Status() string
- func (r ExchangeDeviceCodeResponse) StatusCode() int
- type ExchangeDeviceCodeResponseDefaultHeaders
- type GetCurrentSenderCredentialResponse
- func (r GetCurrentSenderCredentialResponse) ContentType() string
- func (r GetCurrentSenderCredentialResponse) GetBody() []byte
- func (r GetCurrentSenderCredentialResponse) GetJSON200() *SenderCredential
- func (r GetCurrentSenderCredentialResponse) GetJSONDefault() *APIError
- func (r GetCurrentSenderCredentialResponse) Status() string
- func (r GetCurrentSenderCredentialResponse) StatusCode() int
- type GetCurrentSenderCredentialResponseDefaultHeaders
- type GetOwnMessageResponse
- func (r GetOwnMessageResponse) ContentType() string
- func (r GetOwnMessageResponse) GetBody() []byte
- func (r GetOwnMessageResponse) GetJSON200() *MessageDetail
- func (r GetOwnMessageResponse) GetJSONDefault() *APIError
- func (r GetOwnMessageResponse) Status() string
- func (r GetOwnMessageResponse) StatusCode() int
- type GetOwnMessageResponseDefaultHeaders
- type GetPairingParams
- type GetPairingResponse
- type GetPairingResponseDefaultHeaders
- type GetUsageResponse
- type GetUsageResponseDefaultHeaders
- type HttpRequestDoer
- type IssuedCredential
- type Limit
- type ListDevicesResponse
- type ListDevicesResponseDefaultHeaders
- type ListOwnMessagesParams
- type ListOwnMessagesResponse
- func (r ListOwnMessagesResponse) ContentType() string
- func (r ListOwnMessagesResponse) GetBody() []byte
- func (r ListOwnMessagesResponse) GetJSON200() *MessagePage
- func (r ListOwnMessagesResponse) GetJSONDefault() *APIError
- func (r ListOwnMessagesResponse) Status() string
- func (r ListOwnMessagesResponse) StatusCode() int
- type ListOwnMessagesResponseDefaultHeaders
- type LogicalMessageId
- type MessageAccepted
- type MessageDelivery
- type MessageDetail
- type MessageId
- type MessageInput
- type MessageInputFormat
- type MessageInputSound
- type MessagePage
- type MessageRevision
- type MessageRevisionFormat
- type MessageRevisionSound
- type MessageSummary
- type OAuthError
- type OAuthErrorError
- type Pairing
- type PairingCreated
- type PairingCreatedStatus
- type PairingId
- type PairingStatus
- type RequestEditorFn
- type RestrictedIdentifier
- type RevokeCurrentSenderCredentialResponse
- func (r RevokeCurrentSenderCredentialResponse) ContentType() string
- func (r RevokeCurrentSenderCredentialResponse) GetBody() []byte
- func (r RevokeCurrentSenderCredentialResponse) GetJSONDefault() *APIError
- func (r RevokeCurrentSenderCredentialResponse) Status() string
- func (r RevokeCurrentSenderCredentialResponse) StatusCode() int
- type RevokeCurrentSenderCredentialResponseDefaultHeaders
- type SenderCredential
- type SenderCredentialAuthorizationMethod
- type SenderCredentialKind
- type UpdateCurrentSenderCredentialJSONBody
- type UpdateCurrentSenderCredentialJSONRequestBody
- type UpdateCurrentSenderCredentialResponse
- func (r UpdateCurrentSenderCredentialResponse) ContentType() string
- func (r UpdateCurrentSenderCredentialResponse) GetBody() []byte
- func (r UpdateCurrentSenderCredentialResponse) GetJSON200() *SenderCredential
- func (r UpdateCurrentSenderCredentialResponse) GetJSONDefault() *APIError
- func (r UpdateCurrentSenderCredentialResponse) Status() string
- func (r UpdateCurrentSenderCredentialResponse) StatusCode() int
- type UpdateCurrentSenderCredentialResponseDefaultHeaders
- type Usage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreateDeviceAuthorizationRequestWithBody ¶
func NewCreateDeviceAuthorizationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateDeviceAuthorizationRequestWithBody constructs an http.Request for the CreateDeviceAuthorization method, with any body, and a specified content type
func NewCreateDeviceAuthorizationRequestWithFormdataBody ¶
func NewCreateDeviceAuthorizationRequestWithFormdataBody(server string, body CreateDeviceAuthorizationFormdataRequestBody) (*http.Request, error)
NewCreateDeviceAuthorizationRequestWithFormdataBody calls the generic CreateDeviceAuthorization builder with application/x-www-form-urlencoded body
func NewCreateMessageRequest ¶
func NewCreateMessageRequest(server string, body CreateMessageJSONRequestBody) (*http.Request, error)
NewCreateMessageRequest calls the generic CreateMessage builder with application/json body
func NewCreateMessageRequestWithBody ¶
func NewCreateMessageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateMessageRequestWithBody constructs an http.Request for the CreateMessage method, with any body, and a specified content type
func NewCreatePairingRequest ¶
func NewCreatePairingRequest(server string, body CreatePairingJSONRequestBody) (*http.Request, error)
NewCreatePairingRequest calls the generic CreatePairing builder with application/json body
func NewCreatePairingRequestWithBody ¶
func NewCreatePairingRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreatePairingRequestWithBody constructs an http.Request for the CreatePairing method, with any body, and a specified content type
func NewExchangeDeviceCodeRequestWithBody ¶
func NewExchangeDeviceCodeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewExchangeDeviceCodeRequestWithBody constructs an http.Request for the ExchangeDeviceCode method, with any body, and a specified content type
func NewExchangeDeviceCodeRequestWithFormdataBody ¶
func NewExchangeDeviceCodeRequestWithFormdataBody(server string, body ExchangeDeviceCodeFormdataRequestBody) (*http.Request, error)
NewExchangeDeviceCodeRequestWithFormdataBody calls the generic ExchangeDeviceCode builder with application/x-www-form-urlencoded body
func NewGetCurrentSenderCredentialRequest ¶
NewGetCurrentSenderCredentialRequest constructs an http.Request for the GetCurrentSenderCredential method
func NewGetOwnMessageRequest ¶
NewGetOwnMessageRequest constructs an http.Request for the GetOwnMessage method
func NewGetPairingRequest ¶
func NewGetPairingRequest(server string, pairingId PairingId, params *GetPairingParams) (*http.Request, error)
NewGetPairingRequest constructs an http.Request for the GetPairing method
func NewGetUsageRequest ¶
NewGetUsageRequest constructs an http.Request for the GetUsage method
func NewListDevicesRequest ¶
NewListDevicesRequest constructs an http.Request for the ListDevices method
func NewListOwnMessagesRequest ¶
func NewListOwnMessagesRequest(server string, params *ListOwnMessagesParams) (*http.Request, error)
NewListOwnMessagesRequest constructs an http.Request for the ListOwnMessages method
func NewRevokeCurrentSenderCredentialRequest ¶
NewRevokeCurrentSenderCredentialRequest constructs an http.Request for the RevokeCurrentSenderCredential method
func NewUpdateCurrentSenderCredentialRequest ¶
func NewUpdateCurrentSenderCredentialRequest(server string, body UpdateCurrentSenderCredentialJSONRequestBody) (*http.Request, error)
NewUpdateCurrentSenderCredentialRequest calls the generic UpdateCurrentSenderCredential builder with application/json body
func NewUpdateCurrentSenderCredentialRequestWithBody ¶
func NewUpdateCurrentSenderCredentialRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateCurrentSenderCredentialRequestWithBody constructs an http.Request for the UpdateCurrentSenderCredential method, with any body, and a specified content type
Types ¶
type Client ¶
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
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CreateDeviceAuthorizationWithBody ¶
func (c *Client) CreateDeviceAuthorizationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateDeviceAuthorizationWithBody Start browser-assisted CLI account authorization.
Takes any type of body and a specified content type.
Corresponds with POST /device-authorizations (the `CreateDeviceAuthorization` operationId).
func (*Client) CreateDeviceAuthorizationWithFormdataBody ¶
func (c *Client) CreateDeviceAuthorizationWithFormdataBody(ctx context.Context, body CreateDeviceAuthorizationFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateDeviceAuthorizationWithFormdataBody Start browser-assisted CLI account authorization.
Takes a body of the `application/x-www-form-urlencoded` content type.
Corresponds with POST /device-authorizations (the `CreateDeviceAuthorization` operationId).
func (*Client) CreateMessage ¶
func (c *Client) CreateMessage(ctx context.Context, body CreateMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateMessage Accept a push message for delivery.
Takes a body of the `application/json` content type.
Corresponds with POST /messages (the `CreateMessage` operationId).
func (*Client) CreateMessageWithBody ¶
func (c *Client) CreateMessageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateMessageWithBody Accept a push message for delivery.
Takes any type of body and a specified content type.
Corresponds with POST /messages (the `CreateMessage` operationId).
func (*Client) CreatePairing ¶
func (c *Client) CreatePairing(ctx context.Context, body CreatePairingJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreatePairing Start pairing a CLI.
Takes a body of the `application/json` content type.
Corresponds with POST /pairings (the `CreatePairing` operationId).
func (*Client) CreatePairingWithBody ¶
func (c *Client) CreatePairingWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreatePairingWithBody Start pairing a CLI.
Takes any type of body and a specified content type.
Corresponds with POST /pairings (the `CreatePairing` operationId).
func (*Client) ExchangeDeviceCodeWithBody ¶
func (c *Client) ExchangeDeviceCodeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ExchangeDeviceCodeWithBody Exchange an approved device code for a CLI credential.
Takes any type of body and a specified content type.
Corresponds with POST /oauth/token (the `ExchangeDeviceCode` operationId).
func (*Client) ExchangeDeviceCodeWithFormdataBody ¶
func (c *Client) ExchangeDeviceCodeWithFormdataBody(ctx context.Context, body ExchangeDeviceCodeFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
ExchangeDeviceCodeWithFormdataBody Exchange an approved device code for a CLI credential.
Takes a body of the `application/x-www-form-urlencoded` content type.
Corresponds with POST /oauth/token (the `ExchangeDeviceCode` operationId).
func (*Client) GetCurrentSenderCredential ¶
func (c *Client) GetCurrentSenderCredential(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetCurrentSenderCredential Show the authenticated paired CLI.
Corresponds with GET /sender-credentials/current (the `GetCurrentSenderCredential` operationId).
func (*Client) GetOwnMessage ¶
func (c *Client) GetOwnMessage(ctx context.Context, messageId MessageId, reqEditors ...RequestEditorFn) (*http.Response, error)
GetOwnMessage Get one logical message and its retained revisions sent by the authenticated paired CLI.
Corresponds with GET /messages/{messageId} (the `GetOwnMessage` operationId).
func (*Client) GetPairing ¶
func (c *Client) GetPairing(ctx context.Context, pairingId PairingId, params *GetPairingParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetPairing Poll a pairing attempt.
Corresponds with GET /pairings/{pairingId} (the `GetPairing` operationId).
func (*Client) GetUsage ¶
func (c *Client) GetUsage(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetUsage Get current account send usage.
Corresponds with GET /usage (the `GetUsage` operationId).
func (*Client) ListDevices ¶
func (c *Client) ListDevices(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
ListDevices List receiving devices visible to the sender.
Corresponds with GET /devices (the `ListDevices` operationId).
func (*Client) ListOwnMessages ¶
func (c *Client) ListOwnMessages(ctx context.Context, params *ListOwnMessagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
ListOwnMessages List messages sent by the authenticated paired CLI.
Corresponds with GET /messages (the `ListOwnMessages` operationId).
func (*Client) RevokeCurrentSenderCredential ¶
func (c *Client) RevokeCurrentSenderCredential(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
RevokeCurrentSenderCredential Revoke the authenticated paired CLI.
Corresponds with DELETE /sender-credentials/current (the `RevokeCurrentSenderCredential` operationId).
func (*Client) UpdateCurrentSenderCredential ¶
func (c *Client) UpdateCurrentSenderCredential(ctx context.Context, body UpdateCurrentSenderCredentialJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateCurrentSenderCredential Rename the authenticated paired CLI.
Takes a body of the `application/json` content type.
Corresponds with PATCH /sender-credentials/current (the `UpdateCurrentSenderCredential` operationId).
func (*Client) UpdateCurrentSenderCredentialWithBody ¶
func (c *Client) UpdateCurrentSenderCredentialWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateCurrentSenderCredentialWithBody Rename the authenticated paired CLI.
Takes any type of body and a specified content type.
Corresponds with PATCH /sender-credentials/current (the `UpdateCurrentSenderCredential` operationId).
type ClientInterface ¶
type ClientInterface interface {
// CreateDeviceAuthorizationWithBody Start browser-assisted CLI account authorization.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /device-authorizations (the `CreateDeviceAuthorization` operationId).
CreateDeviceAuthorizationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateDeviceAuthorizationWithFormdataBody Start browser-assisted CLI account authorization.
//
// Takes a body of the `application/x-www-form-urlencoded` content type.
//
// Corresponds with POST /device-authorizations (the `CreateDeviceAuthorization` operationId).
CreateDeviceAuthorizationWithFormdataBody(ctx context.Context, body CreateDeviceAuthorizationFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListDevices List receiving devices visible to the sender.
//
// Corresponds with GET /devices (the `ListDevices` operationId).
ListDevices(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListOwnMessages List messages sent by the authenticated paired CLI.
//
// Corresponds with GET /messages (the `ListOwnMessages` operationId).
ListOwnMessages(ctx context.Context, params *ListOwnMessagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateMessageWithBody Accept a push message for delivery.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /messages (the `CreateMessage` operationId).
CreateMessageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateMessage Accept a push message for delivery.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /messages (the `CreateMessage` operationId).
CreateMessage(ctx context.Context, body CreateMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetOwnMessage Get one logical message and its retained revisions sent by the authenticated paired CLI.
//
// Corresponds with GET /messages/{messageId} (the `GetOwnMessage` operationId).
GetOwnMessage(ctx context.Context, messageId MessageId, reqEditors ...RequestEditorFn) (*http.Response, error)
// ExchangeDeviceCodeWithBody Exchange an approved device code for a CLI credential.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /oauth/token (the `ExchangeDeviceCode` operationId).
ExchangeDeviceCodeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// ExchangeDeviceCodeWithFormdataBody Exchange an approved device code for a CLI credential.
//
// Takes a body of the `application/x-www-form-urlencoded` content type.
//
// Corresponds with POST /oauth/token (the `ExchangeDeviceCode` operationId).
ExchangeDeviceCodeWithFormdataBody(ctx context.Context, body ExchangeDeviceCodeFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreatePairingWithBody Start pairing a CLI.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /pairings (the `CreatePairing` operationId).
CreatePairingWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreatePairing Start pairing a CLI.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /pairings (the `CreatePairing` operationId).
CreatePairing(ctx context.Context, body CreatePairingJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetPairing Poll a pairing attempt.
//
// Corresponds with GET /pairings/{pairingId} (the `GetPairing` operationId).
GetPairing(ctx context.Context, pairingId PairingId, params *GetPairingParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// RevokeCurrentSenderCredential Revoke the authenticated paired CLI.
//
// Corresponds with DELETE /sender-credentials/current (the `RevokeCurrentSenderCredential` operationId).
RevokeCurrentSenderCredential(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetCurrentSenderCredential Show the authenticated paired CLI.
//
// Corresponds with GET /sender-credentials/current (the `GetCurrentSenderCredential` operationId).
GetCurrentSenderCredential(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateCurrentSenderCredentialWithBody Rename the authenticated paired CLI.
//
// Takes any type of body and a specified content type.
//
// Corresponds with PATCH /sender-credentials/current (the `UpdateCurrentSenderCredential` operationId).
UpdateCurrentSenderCredentialWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateCurrentSenderCredential Rename the authenticated paired CLI.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with PATCH /sender-credentials/current (the `UpdateCurrentSenderCredential` operationId).
UpdateCurrentSenderCredential(ctx context.Context, body UpdateCurrentSenderCredentialJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetUsage Get current account send usage.
//
// Corresponds with GET /usage (the `GetUsage` operationId).
GetUsage(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreateDeviceAuthorizationWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateDeviceAuthorizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDeviceAuthorizationResponse, error)
CreateDeviceAuthorizationWithBodyWithResponse Start browser-assisted CLI account authorization.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /device-authorizations (the `CreateDeviceAuthorization` operationId).
func (*ClientWithResponses) CreateDeviceAuthorizationWithFormdataBodyWithResponse ¶
func (c *ClientWithResponses) CreateDeviceAuthorizationWithFormdataBodyWithResponse(ctx context.Context, body CreateDeviceAuthorizationFormdataRequestBody, reqEditors ...RequestEditorFn) (*CreateDeviceAuthorizationResponse, error)
CreateDeviceAuthorizationWithFormdataBodyWithResponse Start browser-assisted CLI account authorization.
Takes a body of the `application/x-www-form-urlencoded` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /device-authorizations (the `CreateDeviceAuthorization` operationId).
func (*ClientWithResponses) CreateMessageWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMessageResponse, error)
CreateMessageWithBodyWithResponse Accept a push message for delivery.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /messages (the `CreateMessage` operationId).
func (*ClientWithResponses) CreateMessageWithResponse ¶
func (c *ClientWithResponses) CreateMessageWithResponse(ctx context.Context, body CreateMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMessageResponse, error)
CreateMessageWithResponse Accept a push message for delivery.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /messages (the `CreateMessage` operationId).
func (*ClientWithResponses) CreatePairingWithBodyWithResponse ¶
func (c *ClientWithResponses) CreatePairingWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePairingResponse, error)
CreatePairingWithBodyWithResponse Start pairing a CLI.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /pairings (the `CreatePairing` operationId).
func (*ClientWithResponses) CreatePairingWithResponse ¶
func (c *ClientWithResponses) CreatePairingWithResponse(ctx context.Context, body CreatePairingJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePairingResponse, error)
CreatePairingWithResponse Start pairing a CLI.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /pairings (the `CreatePairing` operationId).
func (*ClientWithResponses) ExchangeDeviceCodeWithBodyWithResponse ¶
func (c *ClientWithResponses) ExchangeDeviceCodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ExchangeDeviceCodeResponse, error)
ExchangeDeviceCodeWithBodyWithResponse Exchange an approved device code for a CLI credential.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /oauth/token (the `ExchangeDeviceCode` operationId).
func (*ClientWithResponses) ExchangeDeviceCodeWithFormdataBodyWithResponse ¶
func (c *ClientWithResponses) ExchangeDeviceCodeWithFormdataBodyWithResponse(ctx context.Context, body ExchangeDeviceCodeFormdataRequestBody, reqEditors ...RequestEditorFn) (*ExchangeDeviceCodeResponse, error)
ExchangeDeviceCodeWithFormdataBodyWithResponse Exchange an approved device code for a CLI credential.
Takes a body of the `application/x-www-form-urlencoded` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /oauth/token (the `ExchangeDeviceCode` operationId).
func (*ClientWithResponses) GetCurrentSenderCredentialWithResponse ¶
func (c *ClientWithResponses) GetCurrentSenderCredentialWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentSenderCredentialResponse, error)
GetCurrentSenderCredentialWithResponse Show the authenticated paired CLI.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /sender-credentials/current (the `GetCurrentSenderCredential` operationId).
func (*ClientWithResponses) GetOwnMessageWithResponse ¶
func (c *ClientWithResponses) GetOwnMessageWithResponse(ctx context.Context, messageId MessageId, reqEditors ...RequestEditorFn) (*GetOwnMessageResponse, error)
GetOwnMessageWithResponse Get one logical message and its retained revisions sent by the authenticated paired CLI.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /messages/{messageId} (the `GetOwnMessage` operationId).
func (*ClientWithResponses) GetPairingWithResponse ¶
func (c *ClientWithResponses) GetPairingWithResponse(ctx context.Context, pairingId PairingId, params *GetPairingParams, reqEditors ...RequestEditorFn) (*GetPairingResponse, error)
GetPairingWithResponse Poll a pairing attempt.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /pairings/{pairingId} (the `GetPairing` operationId).
func (*ClientWithResponses) GetUsageWithResponse ¶
func (c *ClientWithResponses) GetUsageWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetUsageResponse, error)
GetUsageWithResponse Get current account send usage.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /usage (the `GetUsage` operationId).
func (*ClientWithResponses) ListDevicesWithResponse ¶
func (c *ClientWithResponses) ListDevicesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListDevicesResponse, error)
ListDevicesWithResponse List receiving devices visible to the sender.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /devices (the `ListDevices` operationId).
func (*ClientWithResponses) ListOwnMessagesWithResponse ¶
func (c *ClientWithResponses) ListOwnMessagesWithResponse(ctx context.Context, params *ListOwnMessagesParams, reqEditors ...RequestEditorFn) (*ListOwnMessagesResponse, error)
ListOwnMessagesWithResponse List messages sent by the authenticated paired CLI.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /messages (the `ListOwnMessages` operationId).
func (*ClientWithResponses) RevokeCurrentSenderCredentialWithResponse ¶
func (c *ClientWithResponses) RevokeCurrentSenderCredentialWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RevokeCurrentSenderCredentialResponse, error)
RevokeCurrentSenderCredentialWithResponse Revoke the authenticated paired CLI.
Returns a wrapper object for the known response body format(s).
Corresponds with DELETE /sender-credentials/current (the `RevokeCurrentSenderCredential` operationId).
func (*ClientWithResponses) UpdateCurrentSenderCredentialWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateCurrentSenderCredentialWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentSenderCredentialResponse, error)
UpdateCurrentSenderCredentialWithBodyWithResponse Rename the authenticated paired CLI.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with PATCH /sender-credentials/current (the `UpdateCurrentSenderCredential` operationId).
func (*ClientWithResponses) UpdateCurrentSenderCredentialWithResponse ¶
func (c *ClientWithResponses) UpdateCurrentSenderCredentialWithResponse(ctx context.Context, body UpdateCurrentSenderCredentialJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentSenderCredentialResponse, error)
UpdateCurrentSenderCredentialWithResponse Rename the authenticated paired CLI.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with PATCH /sender-credentials/current (the `UpdateCurrentSenderCredential` operationId).
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// CreateDeviceAuthorizationWithBodyWithResponse Start browser-assisted CLI account authorization.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /device-authorizations (the `CreateDeviceAuthorization` operationId).
CreateDeviceAuthorizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDeviceAuthorizationResponse, error)
// CreateDeviceAuthorizationWithFormdataBodyWithResponse Start browser-assisted CLI account authorization.
//
// Takes a body of the `application/x-www-form-urlencoded` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /device-authorizations (the `CreateDeviceAuthorization` operationId).
CreateDeviceAuthorizationWithFormdataBodyWithResponse(ctx context.Context, body CreateDeviceAuthorizationFormdataRequestBody, reqEditors ...RequestEditorFn) (*CreateDeviceAuthorizationResponse, error)
// ListDevicesWithResponse List receiving devices visible to the sender.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /devices (the `ListDevices` operationId).
ListDevicesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListDevicesResponse, error)
// ListOwnMessagesWithResponse List messages sent by the authenticated paired CLI.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /messages (the `ListOwnMessages` operationId).
ListOwnMessagesWithResponse(ctx context.Context, params *ListOwnMessagesParams, reqEditors ...RequestEditorFn) (*ListOwnMessagesResponse, error)
// CreateMessageWithBodyWithResponse Accept a push message for delivery.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /messages (the `CreateMessage` operationId).
CreateMessageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMessageResponse, error)
// CreateMessageWithResponse Accept a push message for delivery.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /messages (the `CreateMessage` operationId).
CreateMessageWithResponse(ctx context.Context, body CreateMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMessageResponse, error)
// GetOwnMessageWithResponse Get one logical message and its retained revisions sent by the authenticated paired CLI.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /messages/{messageId} (the `GetOwnMessage` operationId).
GetOwnMessageWithResponse(ctx context.Context, messageId MessageId, reqEditors ...RequestEditorFn) (*GetOwnMessageResponse, error)
// ExchangeDeviceCodeWithBodyWithResponse Exchange an approved device code for a CLI credential.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /oauth/token (the `ExchangeDeviceCode` operationId).
ExchangeDeviceCodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ExchangeDeviceCodeResponse, error)
// ExchangeDeviceCodeWithFormdataBodyWithResponse Exchange an approved device code for a CLI credential.
//
// Takes a body of the `application/x-www-form-urlencoded` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /oauth/token (the `ExchangeDeviceCode` operationId).
ExchangeDeviceCodeWithFormdataBodyWithResponse(ctx context.Context, body ExchangeDeviceCodeFormdataRequestBody, reqEditors ...RequestEditorFn) (*ExchangeDeviceCodeResponse, error)
// CreatePairingWithBodyWithResponse Start pairing a CLI.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /pairings (the `CreatePairing` operationId).
CreatePairingWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePairingResponse, error)
// CreatePairingWithResponse Start pairing a CLI.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /pairings (the `CreatePairing` operationId).
CreatePairingWithResponse(ctx context.Context, body CreatePairingJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePairingResponse, error)
// GetPairingWithResponse Poll a pairing attempt.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /pairings/{pairingId} (the `GetPairing` operationId).
GetPairingWithResponse(ctx context.Context, pairingId PairingId, params *GetPairingParams, reqEditors ...RequestEditorFn) (*GetPairingResponse, error)
// RevokeCurrentSenderCredentialWithResponse Revoke the authenticated paired CLI.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with DELETE /sender-credentials/current (the `RevokeCurrentSenderCredential` operationId).
RevokeCurrentSenderCredentialWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RevokeCurrentSenderCredentialResponse, error)
// GetCurrentSenderCredentialWithResponse Show the authenticated paired CLI.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /sender-credentials/current (the `GetCurrentSenderCredential` operationId).
GetCurrentSenderCredentialWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentSenderCredentialResponse, error)
// UpdateCurrentSenderCredentialWithBodyWithResponse Rename the authenticated paired CLI.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PATCH /sender-credentials/current (the `UpdateCurrentSenderCredential` operationId).
UpdateCurrentSenderCredentialWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentSenderCredentialResponse, error)
// UpdateCurrentSenderCredentialWithResponse Rename the authenticated paired CLI.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PATCH /sender-credentials/current (the `UpdateCurrentSenderCredential` operationId).
UpdateCurrentSenderCredentialWithResponse(ctx context.Context, body UpdateCurrentSenderCredentialJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentSenderCredentialResponse, error)
// GetUsageWithResponse Get current account send usage.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /usage (the `GetUsage` operationId).
GetUsageWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetUsageResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateDeviceAuthorizationFormdataBody ¶
type CreateDeviceAuthorizationFormdataBody struct {
ClientId CreateDeviceAuthorizationFormdataBodyClientId `form:"client_id" json:"client_id"`
Platform CreateDeviceAuthorizationFormdataBodyPlatform `form:"platform" json:"platform"`
Scope *CreateDeviceAuthorizationFormdataBodyScope `form:"scope,omitempty" json:"scope,omitempty"`
SuggestedName string `form:"suggested_name" json:"suggested_name"`
}
CreateDeviceAuthorizationFormdataBody defines parameters for CreateDeviceAuthorization.
type CreateDeviceAuthorizationFormdataBodyClientId ¶
type CreateDeviceAuthorizationFormdataBodyClientId string
CreateDeviceAuthorizationFormdataBodyClientId defines parameters for CreateDeviceAuthorization.
const (
CreateDeviceAuthorizationFormdataBodyClientIdPushmanCli CreateDeviceAuthorizationFormdataBodyClientId = "pushman-cli"
)
Defines values for CreateDeviceAuthorizationFormdataBodyClientId.
func (CreateDeviceAuthorizationFormdataBodyClientId) Valid ¶
func (e CreateDeviceAuthorizationFormdataBodyClientId) Valid() bool
Valid indicates whether the value is a known member of the CreateDeviceAuthorizationFormdataBodyClientId enum.
type CreateDeviceAuthorizationFormdataBodyPlatform ¶
type CreateDeviceAuthorizationFormdataBodyPlatform string
CreateDeviceAuthorizationFormdataBodyPlatform defines parameters for CreateDeviceAuthorization.
const ( CreateDeviceAuthorizationFormdataBodyPlatformDarwin CreateDeviceAuthorizationFormdataBodyPlatform = "darwin" CreateDeviceAuthorizationFormdataBodyPlatformLinux CreateDeviceAuthorizationFormdataBodyPlatform = "linux" CreateDeviceAuthorizationFormdataBodyPlatformWindows CreateDeviceAuthorizationFormdataBodyPlatform = "windows" )
Defines values for CreateDeviceAuthorizationFormdataBodyPlatform.
func (CreateDeviceAuthorizationFormdataBodyPlatform) Valid ¶
func (e CreateDeviceAuthorizationFormdataBodyPlatform) Valid() bool
Valid indicates whether the value is a known member of the CreateDeviceAuthorizationFormdataBodyPlatform enum.
type CreateDeviceAuthorizationFormdataBodyScope ¶
type CreateDeviceAuthorizationFormdataBodyScope string
CreateDeviceAuthorizationFormdataBodyScope defines parameters for CreateDeviceAuthorization.
const (
CreateDeviceAuthorizationFormdataBodyScopePushDevicesReadHistoryReadUsageRead CreateDeviceAuthorizationFormdataBodyScope = "push devices:read history:read usage:read"
)
Defines values for CreateDeviceAuthorizationFormdataBodyScope.
func (CreateDeviceAuthorizationFormdataBodyScope) Valid ¶
func (e CreateDeviceAuthorizationFormdataBodyScope) Valid() bool
Valid indicates whether the value is a known member of the CreateDeviceAuthorizationFormdataBodyScope enum.
type CreateDeviceAuthorizationFormdataRequestBody ¶
type CreateDeviceAuthorizationFormdataRequestBody CreateDeviceAuthorizationFormdataBody
CreateDeviceAuthorizationFormdataRequestBody defines body for CreateDeviceAuthorization for application/x-www-form-urlencoded ContentType.
type CreateDeviceAuthorizationResponse ¶
type CreateDeviceAuthorizationResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *DeviceAuthorization
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *APIError
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *CreateDeviceAuthorizationResponseDefaultHeaders
}
func ParseCreateDeviceAuthorizationResponse ¶
func ParseCreateDeviceAuthorizationResponse(rsp *http.Response) (*CreateDeviceAuthorizationResponse, error)
ParseCreateDeviceAuthorizationResponse parses an HTTP response from a CreateDeviceAuthorizationWithResponse call
func (CreateDeviceAuthorizationResponse) ContentType ¶
func (r CreateDeviceAuthorizationResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateDeviceAuthorizationResponse) GetBody ¶
func (r CreateDeviceAuthorizationResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CreateDeviceAuthorizationResponse) GetJSON200 ¶
func (r CreateDeviceAuthorizationResponse) GetJSON200() *DeviceAuthorization
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (CreateDeviceAuthorizationResponse) GetJSONDefault ¶
func (r CreateDeviceAuthorizationResponse) GetJSONDefault() *APIError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (CreateDeviceAuthorizationResponse) Status ¶
func (r CreateDeviceAuthorizationResponse) Status() string
Status returns HTTPResponse.Status
func (CreateDeviceAuthorizationResponse) StatusCode ¶
func (r CreateDeviceAuthorizationResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateDeviceAuthorizationResponseDefaultHeaders ¶
CreateDeviceAuthorizationResponseDefaultHeaders the declared response headers of an HTTP default response for CreateDeviceAuthorization
type CreateMessageJSONRequestBody ¶
type CreateMessageJSONRequestBody = MessageInput
CreateMessageJSONRequestBody defines body for CreateMessage for application/json ContentType.
type CreateMessageResponse ¶
type CreateMessageResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON202 the response for an HTTP 202 `application/json` response
JSON202 *MessageAccepted
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *APIError
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *CreateMessageResponseDefaultHeaders
}
func ParseCreateMessageResponse ¶
func ParseCreateMessageResponse(rsp *http.Response) (*CreateMessageResponse, error)
ParseCreateMessageResponse parses an HTTP response from a CreateMessageWithResponse call
func (CreateMessageResponse) ContentType ¶
func (r CreateMessageResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateMessageResponse) GetBody ¶
func (r CreateMessageResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CreateMessageResponse) GetJSON202 ¶
func (r CreateMessageResponse) GetJSON202() *MessageAccepted
GetJSON202 returns the response for an HTTP 202 `application/json` response
func (CreateMessageResponse) GetJSONDefault ¶
func (r CreateMessageResponse) GetJSONDefault() *APIError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (CreateMessageResponse) Status ¶
func (r CreateMessageResponse) Status() string
Status returns HTTPResponse.Status
func (CreateMessageResponse) StatusCode ¶
func (r CreateMessageResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateMessageResponseDefaultHeaders ¶
CreateMessageResponseDefaultHeaders the declared response headers of an HTTP default response for CreateMessage
type CreatePairingJSONBody ¶
type CreatePairingJSONBody struct {
Platform CreatePairingJSONBodyPlatform `json:"platform"`
SuggestedName string `json:"suggestedName"`
}
CreatePairingJSONBody defines parameters for CreatePairing.
type CreatePairingJSONBodyPlatform ¶
type CreatePairingJSONBodyPlatform string
CreatePairingJSONBodyPlatform defines parameters for CreatePairing.
const ( CreatePairingJSONBodyPlatformDarwin CreatePairingJSONBodyPlatform = "darwin" CreatePairingJSONBodyPlatformLinux CreatePairingJSONBodyPlatform = "linux" CreatePairingJSONBodyPlatformWindows CreatePairingJSONBodyPlatform = "windows" )
Defines values for CreatePairingJSONBodyPlatform.
func (CreatePairingJSONBodyPlatform) Valid ¶
func (e CreatePairingJSONBodyPlatform) Valid() bool
Valid indicates whether the value is a known member of the CreatePairingJSONBodyPlatform enum.
type CreatePairingJSONRequestBody ¶
type CreatePairingJSONRequestBody CreatePairingJSONBody
CreatePairingJSONRequestBody defines body for CreatePairing for application/json ContentType.
type CreatePairingResponse ¶
type CreatePairingResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON201 the response for an HTTP 201 `application/json` response
JSON201 *PairingCreated
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *APIError
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *CreatePairingResponseDefaultHeaders
}
func ParseCreatePairingResponse ¶
func ParseCreatePairingResponse(rsp *http.Response) (*CreatePairingResponse, error)
ParseCreatePairingResponse parses an HTTP response from a CreatePairingWithResponse call
func (CreatePairingResponse) ContentType ¶
func (r CreatePairingResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreatePairingResponse) GetBody ¶
func (r CreatePairingResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CreatePairingResponse) GetJSON201 ¶
func (r CreatePairingResponse) GetJSON201() *PairingCreated
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (CreatePairingResponse) GetJSONDefault ¶
func (r CreatePairingResponse) GetJSONDefault() *APIError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (CreatePairingResponse) Status ¶
func (r CreatePairingResponse) Status() string
Status returns HTTPResponse.Status
func (CreatePairingResponse) StatusCode ¶
func (r CreatePairingResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreatePairingResponseDefaultHeaders ¶
CreatePairingResponseDefaultHeaders the declared response headers of an HTTP default response for CreatePairing
type DeliveryState ¶
type DeliveryState string
DeliveryState defines model for DeliveryState.
const ( Accepted DeliveryState = "accepted" Failed DeliveryState = "failed" Sent DeliveryState = "sent" )
Defines values for DeliveryState.
func (DeliveryState) Valid ¶
func (e DeliveryState) Valid() bool
Valid indicates whether the value is a known member of the DeliveryState enum.
type Device ¶
type Device struct {
Eligible bool `json:"eligible"`
Id DeviceId `json:"id"`
Name string `json:"name"`
NotificationStatus DeviceNotificationStatus `json:"notificationStatus"`
Platform DevicePlatform `json:"platform"`
}
Device defines model for Device.
type DeviceAuthorization ¶
type DeviceAuthorization struct {
// DeviceCode High-entropy polling secret that must never be displayed or put in a URL.
DeviceCode string `json:"device_code"`
ExpiresIn int `json:"expires_in"`
Interval int `json:"interval"`
UserCode string `json:"user_code"`
VerificationUri string `json:"verification_uri"`
VerificationUriComplete string `json:"verification_uri_complete"`
}
DeviceAuthorization defines model for DeviceAuthorization.
type DeviceNotificationStatus ¶
type DeviceNotificationStatus string
DeviceNotificationStatus defines model for Device.NotificationStatus.
const ( Disabled DeviceNotificationStatus = "disabled" Enabled DeviceNotificationStatus = "enabled" Unknown DeviceNotificationStatus = "unknown" )
Defines values for DeviceNotificationStatus.
func (DeviceNotificationStatus) Valid ¶
func (e DeviceNotificationStatus) Valid() bool
Valid indicates whether the value is a known member of the DeviceNotificationStatus enum.
type DevicePlatform ¶
type DevicePlatform string
DevicePlatform defines model for Device.Platform.
const (
Ios DevicePlatform = "ios"
)
Defines values for DevicePlatform.
func (DevicePlatform) Valid ¶
func (e DevicePlatform) Valid() bool
Valid indicates whether the value is a known member of the DevicePlatform enum.
type DeviceToken ¶
type DeviceToken struct {
AccessToken string `json:"access_token"`
Scope DeviceTokenScope `json:"scope"`
SenderName string `json:"sender_name"`
TokenType DeviceTokenTokenType `json:"token_type"`
}
DeviceToken defines model for DeviceToken.
type DeviceTokenScope ¶
type DeviceTokenScope string
DeviceTokenScope defines model for DeviceToken.Scope.
const (
DeviceTokenScopePushDevicesReadHistoryReadUsageRead DeviceTokenScope = "push devices:read history:read usage:read"
)
Defines values for DeviceTokenScope.
func (DeviceTokenScope) Valid ¶
func (e DeviceTokenScope) Valid() bool
Valid indicates whether the value is a known member of the DeviceTokenScope enum.
type DeviceTokenTokenType ¶
type DeviceTokenTokenType string
DeviceTokenTokenType defines model for DeviceToken.TokenType.
const (
Bearer DeviceTokenTokenType = "Bearer"
)
Defines values for DeviceTokenTokenType.
func (DeviceTokenTokenType) Valid ¶
func (e DeviceTokenTokenType) Valid() bool
Valid indicates whether the value is a known member of the DeviceTokenTokenType enum.
type Error ¶
type Error struct {
Code string `json:"code"`
Message string `json:"message"`
RequestId string `json:"requestId"`
// RetryAfter Seconds until a retry is permitted.
RetryAfter *int `json:"retryAfter,omitempty"`
}
Error defines model for Error.
type ErrorResponse ¶
type ErrorResponse struct {
Error Error `json:"error"`
}
ErrorResponse defines model for ErrorResponse.
type ExchangeDeviceCodeFormdataBody ¶
type ExchangeDeviceCodeFormdataBody struct {
ClientId ExchangeDeviceCodeFormdataBodyClientId `form:"client_id" json:"client_id"`
DeviceCode string `form:"device_code" json:"device_code"`
GrantType ExchangeDeviceCodeFormdataBodyGrantType `form:"grant_type" json:"grant_type"`
}
ExchangeDeviceCodeFormdataBody defines parameters for ExchangeDeviceCode.
type ExchangeDeviceCodeFormdataBodyClientId ¶
type ExchangeDeviceCodeFormdataBodyClientId string
ExchangeDeviceCodeFormdataBodyClientId defines parameters for ExchangeDeviceCode.
const (
ExchangeDeviceCodeFormdataBodyClientIdPushmanCli ExchangeDeviceCodeFormdataBodyClientId = "pushman-cli"
)
Defines values for ExchangeDeviceCodeFormdataBodyClientId.
func (ExchangeDeviceCodeFormdataBodyClientId) Valid ¶
func (e ExchangeDeviceCodeFormdataBodyClientId) Valid() bool
Valid indicates whether the value is a known member of the ExchangeDeviceCodeFormdataBodyClientId enum.
type ExchangeDeviceCodeFormdataBodyGrantType ¶
type ExchangeDeviceCodeFormdataBodyGrantType string
ExchangeDeviceCodeFormdataBodyGrantType defines parameters for ExchangeDeviceCode.
const (
UrnIetfParamsOauthGrantTypeDeviceCode ExchangeDeviceCodeFormdataBodyGrantType = "urn:ietf:params:oauth:grant-type:device_code"
)
Defines values for ExchangeDeviceCodeFormdataBodyGrantType.
func (ExchangeDeviceCodeFormdataBodyGrantType) Valid ¶
func (e ExchangeDeviceCodeFormdataBodyGrantType) Valid() bool
Valid indicates whether the value is a known member of the ExchangeDeviceCodeFormdataBodyGrantType enum.
type ExchangeDeviceCodeFormdataRequestBody ¶
type ExchangeDeviceCodeFormdataRequestBody ExchangeDeviceCodeFormdataBody
ExchangeDeviceCodeFormdataRequestBody defines body for ExchangeDeviceCode for application/x-www-form-urlencoded ContentType.
type ExchangeDeviceCodeResponse ¶
type ExchangeDeviceCodeResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *DeviceToken
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *OAuthError
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *APIError
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *ExchangeDeviceCodeResponseDefaultHeaders
}
func ParseExchangeDeviceCodeResponse ¶
func ParseExchangeDeviceCodeResponse(rsp *http.Response) (*ExchangeDeviceCodeResponse, error)
ParseExchangeDeviceCodeResponse parses an HTTP response from a ExchangeDeviceCodeWithResponse call
func (ExchangeDeviceCodeResponse) ContentType ¶
func (r ExchangeDeviceCodeResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ExchangeDeviceCodeResponse) GetBody ¶
func (r ExchangeDeviceCodeResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ExchangeDeviceCodeResponse) GetJSON200 ¶
func (r ExchangeDeviceCodeResponse) GetJSON200() *DeviceToken
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ExchangeDeviceCodeResponse) GetJSON400 ¶
func (r ExchangeDeviceCodeResponse) GetJSON400() *OAuthError
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (ExchangeDeviceCodeResponse) GetJSONDefault ¶
func (r ExchangeDeviceCodeResponse) GetJSONDefault() *APIError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (ExchangeDeviceCodeResponse) Status ¶
func (r ExchangeDeviceCodeResponse) Status() string
Status returns HTTPResponse.Status
func (ExchangeDeviceCodeResponse) StatusCode ¶
func (r ExchangeDeviceCodeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ExchangeDeviceCodeResponseDefaultHeaders ¶
ExchangeDeviceCodeResponseDefaultHeaders the declared response headers of an HTTP default response for ExchangeDeviceCode
type GetCurrentSenderCredentialResponse ¶
type GetCurrentSenderCredentialResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *SenderCredential
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *APIError
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *GetCurrentSenderCredentialResponseDefaultHeaders
}
func ParseGetCurrentSenderCredentialResponse ¶
func ParseGetCurrentSenderCredentialResponse(rsp *http.Response) (*GetCurrentSenderCredentialResponse, error)
ParseGetCurrentSenderCredentialResponse parses an HTTP response from a GetCurrentSenderCredentialWithResponse call
func (GetCurrentSenderCredentialResponse) ContentType ¶
func (r GetCurrentSenderCredentialResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetCurrentSenderCredentialResponse) GetBody ¶
func (r GetCurrentSenderCredentialResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetCurrentSenderCredentialResponse) GetJSON200 ¶
func (r GetCurrentSenderCredentialResponse) GetJSON200() *SenderCredential
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetCurrentSenderCredentialResponse) GetJSONDefault ¶
func (r GetCurrentSenderCredentialResponse) GetJSONDefault() *APIError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetCurrentSenderCredentialResponse) Status ¶
func (r GetCurrentSenderCredentialResponse) Status() string
Status returns HTTPResponse.Status
func (GetCurrentSenderCredentialResponse) StatusCode ¶
func (r GetCurrentSenderCredentialResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetCurrentSenderCredentialResponseDefaultHeaders ¶
GetCurrentSenderCredentialResponseDefaultHeaders the declared response headers of an HTTP default response for GetCurrentSenderCredential
type GetOwnMessageResponse ¶
type GetOwnMessageResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *MessageDetail
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *APIError
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *GetOwnMessageResponseDefaultHeaders
}
func ParseGetOwnMessageResponse ¶
func ParseGetOwnMessageResponse(rsp *http.Response) (*GetOwnMessageResponse, error)
ParseGetOwnMessageResponse parses an HTTP response from a GetOwnMessageWithResponse call
func (GetOwnMessageResponse) ContentType ¶
func (r GetOwnMessageResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetOwnMessageResponse) GetBody ¶
func (r GetOwnMessageResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetOwnMessageResponse) GetJSON200 ¶
func (r GetOwnMessageResponse) GetJSON200() *MessageDetail
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetOwnMessageResponse) GetJSONDefault ¶
func (r GetOwnMessageResponse) GetJSONDefault() *APIError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetOwnMessageResponse) Status ¶
func (r GetOwnMessageResponse) Status() string
Status returns HTTPResponse.Status
func (GetOwnMessageResponse) StatusCode ¶
func (r GetOwnMessageResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetOwnMessageResponseDefaultHeaders ¶
GetOwnMessageResponseDefaultHeaders the declared response headers of an HTTP default response for GetOwnMessage
type GetPairingParams ¶
type GetPairingParams struct {
// PairingSecret One-time secret returned out of band when pairing is created.
PairingSecret string `json:"pairingSecret"`
}
GetPairingParams defines parameters for GetPairing.
type GetPairingResponse ¶
type GetPairingResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Pairing
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *APIError
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *GetPairingResponseDefaultHeaders
}
func ParseGetPairingResponse ¶
func ParseGetPairingResponse(rsp *http.Response) (*GetPairingResponse, error)
ParseGetPairingResponse parses an HTTP response from a GetPairingWithResponse call
func (GetPairingResponse) ContentType ¶
func (r GetPairingResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetPairingResponse) GetBody ¶
func (r GetPairingResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetPairingResponse) GetJSON200 ¶
func (r GetPairingResponse) GetJSON200() *Pairing
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetPairingResponse) GetJSONDefault ¶
func (r GetPairingResponse) GetJSONDefault() *APIError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetPairingResponse) Status ¶
func (r GetPairingResponse) Status() string
Status returns HTTPResponse.Status
func (GetPairingResponse) StatusCode ¶
func (r GetPairingResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetPairingResponseDefaultHeaders ¶
GetPairingResponseDefaultHeaders the declared response headers of an HTTP default response for GetPairing
type GetUsageResponse ¶
type GetUsageResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Usage
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *APIError
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *GetUsageResponseDefaultHeaders
}
func ParseGetUsageResponse ¶
func ParseGetUsageResponse(rsp *http.Response) (*GetUsageResponse, error)
ParseGetUsageResponse parses an HTTP response from a GetUsageWithResponse call
func (GetUsageResponse) ContentType ¶
func (r GetUsageResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetUsageResponse) GetBody ¶
func (r GetUsageResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetUsageResponse) GetJSON200 ¶
func (r GetUsageResponse) GetJSON200() *Usage
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetUsageResponse) GetJSONDefault ¶
func (r GetUsageResponse) GetJSONDefault() *APIError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetUsageResponse) Status ¶
func (r GetUsageResponse) Status() string
Status returns HTTPResponse.Status
func (GetUsageResponse) StatusCode ¶
func (r GetUsageResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetUsageResponseDefaultHeaders ¶
GetUsageResponseDefaultHeaders the declared response headers of an HTTP default response for GetUsage
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type IssuedCredential ¶
IssuedCredential Returned once after pairing approval or token creation.
type ListDevicesResponse ¶
type ListDevicesResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *struct {
Items []Device `json:"items"`
}
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *APIError
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *ListDevicesResponseDefaultHeaders
}
func ParseListDevicesResponse ¶
func ParseListDevicesResponse(rsp *http.Response) (*ListDevicesResponse, error)
ParseListDevicesResponse parses an HTTP response from a ListDevicesWithResponse call
func (ListDevicesResponse) ContentType ¶
func (r ListDevicesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListDevicesResponse) GetBody ¶
func (r ListDevicesResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListDevicesResponse) GetJSON200 ¶
func (r ListDevicesResponse) GetJSON200() *struct { Items []Device `json:"items"` }
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListDevicesResponse) GetJSONDefault ¶
func (r ListDevicesResponse) GetJSONDefault() *APIError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (ListDevicesResponse) Status ¶
func (r ListDevicesResponse) Status() string
Status returns HTTPResponse.Status
func (ListDevicesResponse) StatusCode ¶
func (r ListDevicesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListDevicesResponseDefaultHeaders ¶
ListDevicesResponseDefaultHeaders the declared response headers of an HTTP default response for ListDevices
type ListOwnMessagesParams ¶
type ListOwnMessagesParams struct {
Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
}
ListOwnMessagesParams defines parameters for ListOwnMessages.
type ListOwnMessagesResponse ¶
type ListOwnMessagesResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *MessagePage
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *APIError
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *ListOwnMessagesResponseDefaultHeaders
}
func ParseListOwnMessagesResponse ¶
func ParseListOwnMessagesResponse(rsp *http.Response) (*ListOwnMessagesResponse, error)
ParseListOwnMessagesResponse parses an HTTP response from a ListOwnMessagesWithResponse call
func (ListOwnMessagesResponse) ContentType ¶
func (r ListOwnMessagesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListOwnMessagesResponse) GetBody ¶
func (r ListOwnMessagesResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListOwnMessagesResponse) GetJSON200 ¶
func (r ListOwnMessagesResponse) GetJSON200() *MessagePage
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListOwnMessagesResponse) GetJSONDefault ¶
func (r ListOwnMessagesResponse) GetJSONDefault() *APIError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (ListOwnMessagesResponse) Status ¶
func (r ListOwnMessagesResponse) Status() string
Status returns HTTPResponse.Status
func (ListOwnMessagesResponse) StatusCode ¶
func (r ListOwnMessagesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListOwnMessagesResponseDefaultHeaders ¶
ListOwnMessagesResponseDefaultHeaders the declared response headers of an HTTP default response for ListOwnMessages
type LogicalMessageId ¶
type LogicalMessageId = string
LogicalMessageId defines model for LogicalMessageId.
type MessageAccepted ¶
type MessageAccepted struct {
AcceptedAt time.Time `json:"acceptedAt"`
Id MessageId `json:"id"`
LogicalMessageId string `json:"logicalMessageId"`
TargetCount int `json:"targetCount"`
}
MessageAccepted defines model for MessageAccepted.
type MessageDelivery ¶
type MessageDelivery struct {
DeviceId DeviceId `json:"deviceId"`
DeviceName string `json:"deviceName"`
FailureCode *string `json:"failureCode,omitempty"`
State DeliveryState `json:"state"`
}
MessageDelivery defines model for MessageDelivery.
type MessageDetail ¶
type MessageDetail struct {
LogicalMessageId LogicalMessageId `json:"logicalMessageId"`
Read bool `json:"read"`
Revisions []MessageRevision `json:"revisions"`
}
MessageDetail defines model for MessageDetail.
type MessageInput ¶
type MessageInput struct {
Body string `json:"body"`
// Devices Receiving-device nicknames. Omit to target all eligible devices.
Devices *[]string `json:"devices,omitempty"`
Format *MessageInputFormat `json:"format,omitempty"`
Group *RestrictedIdentifier `json:"group,omitempty"`
Image *string `json:"image,omitempty"`
Key *RestrictedIdentifier `json:"key,omitempty"`
Sound *MessageInputSound `json:"sound,omitempty"`
Subtitle *string `json:"subtitle,omitempty"`
Title *string `json:"title,omitempty"`
Url *string `json:"url,omitempty"`
}
MessageInput defines model for MessageInput.
type MessageInputFormat ¶
type MessageInputFormat string
MessageInputFormat defines model for MessageInput.Format.
const ( MessageInputFormatMonospace MessageInputFormat = "monospace" MessageInputFormatPlain MessageInputFormat = "plain" )
Defines values for MessageInputFormat.
func (MessageInputFormat) Valid ¶
func (e MessageInputFormat) Valid() bool
Valid indicates whether the value is a known member of the MessageInputFormat enum.
type MessageInputSound ¶
type MessageInputSound string
MessageInputSound defines model for MessageInput.Sound.
const ( MessageInputSoundDefault MessageInputSound = "default" MessageInputSoundNone MessageInputSound = "none" )
Defines values for MessageInputSound.
func (MessageInputSound) Valid ¶
func (e MessageInputSound) Valid() bool
Valid indicates whether the value is a known member of the MessageInputSound enum.
type MessagePage ¶
type MessagePage struct {
Items []MessageSummary `json:"items"`
NextCursor *string `json:"nextCursor,omitempty"`
}
MessagePage defines model for MessagePage.
type MessageRevision ¶
type MessageRevision struct {
AcceptedAt time.Time `json:"acceptedAt"`
Body string `json:"body"`
Deliveries []MessageDelivery `json:"deliveries"`
Format MessageRevisionFormat `json:"format"`
Group *RestrictedIdentifier `json:"group,omitempty"`
Id MessageId `json:"id"`
Image *string `json:"image,omitempty"`
SenderName string `json:"senderName"`
Sound MessageRevisionSound `json:"sound"`
Subtitle *string `json:"subtitle,omitempty"`
Title string `json:"title"`
Url *string `json:"url,omitempty"`
}
MessageRevision defines model for MessageRevision.
type MessageRevisionFormat ¶
type MessageRevisionFormat string
MessageRevisionFormat defines model for MessageRevision.Format.
const ( MessageRevisionFormatMonospace MessageRevisionFormat = "monospace" MessageRevisionFormatPlain MessageRevisionFormat = "plain" )
Defines values for MessageRevisionFormat.
func (MessageRevisionFormat) Valid ¶
func (e MessageRevisionFormat) Valid() bool
Valid indicates whether the value is a known member of the MessageRevisionFormat enum.
type MessageRevisionSound ¶
type MessageRevisionSound string
MessageRevisionSound defines model for MessageRevision.Sound.
const ( MessageRevisionSoundDefault MessageRevisionSound = "default" MessageRevisionSoundNone MessageRevisionSound = "none" )
Defines values for MessageRevisionSound.
func (MessageRevisionSound) Valid ¶
func (e MessageRevisionSound) Valid() bool
Valid indicates whether the value is a known member of the MessageRevisionSound enum.
type MessageSummary ¶
type MessageSummary struct {
AcceptedAt time.Time `json:"acceptedAt"`
Body string `json:"body"`
DeliveryState DeliveryState `json:"deliveryState"`
Id MessageId `json:"id"`
LogicalMessageId LogicalMessageId `json:"logicalMessageId"`
Read bool `json:"read"`
SenderName string `json:"senderName"`
Subtitle *string `json:"subtitle,omitempty"`
Title string `json:"title"`
UpdateCount int `json:"updateCount"`
}
MessageSummary defines model for MessageSummary.
type OAuthError ¶
type OAuthError struct {
Error OAuthErrorError `json:"error"`
ErrorDescription *string `json:"error_description,omitempty"`
}
OAuthError defines model for OAuthError.
type OAuthErrorError ¶
type OAuthErrorError string
OAuthErrorError defines model for OAuthError.Error.
const ( AccessDenied OAuthErrorError = "access_denied" AuthorizationPending OAuthErrorError = "authorization_pending" ExpiredToken OAuthErrorError = "expired_token" InvalidGrant OAuthErrorError = "invalid_grant" InvalidRequest OAuthErrorError = "invalid_request" SlowDown OAuthErrorError = "slow_down" )
Defines values for OAuthErrorError.
func (OAuthErrorError) Valid ¶
func (e OAuthErrorError) Valid() bool
Valid indicates whether the value is a known member of the OAuthErrorError enum.
type Pairing ¶
type Pairing struct {
// Credential Returned once after pairing approval or token creation.
Credential *IssuedCredential `json:"credential,omitempty"`
ExpiresAt time.Time `json:"expiresAt"`
Id PairingId `json:"id"`
// Interval Minimum polling interval in seconds.
Interval int `json:"interval"`
Status PairingStatus `json:"status"`
UserCode string `json:"userCode"`
VerificationUri string `json:"verificationUri"`
}
Pairing defines model for Pairing.
type PairingCreated ¶
type PairingCreated struct {
ExpiresAt time.Time `json:"expiresAt"`
Id PairingId `json:"id"`
Interval int `json:"interval"`
// PairingSecret One-time polling secret; never put it in a URL.
PairingSecret string `json:"pairingSecret"`
Status PairingCreatedStatus `json:"status"`
UserCode string `json:"userCode"`
VerificationUri string `json:"verificationUri"`
}
PairingCreated defines model for PairingCreated.
type PairingCreatedStatus ¶
type PairingCreatedStatus string
PairingCreatedStatus defines model for PairingCreated.Status.
const (
PairingCreatedStatusPending PairingCreatedStatus = "pending"
)
Defines values for PairingCreatedStatus.
func (PairingCreatedStatus) Valid ¶
func (e PairingCreatedStatus) Valid() bool
Valid indicates whether the value is a known member of the PairingCreatedStatus enum.
type PairingStatus ¶
type PairingStatus string
PairingStatus defines model for Pairing.Status.
const ( PairingStatusApproved PairingStatus = "approved" PairingStatusDenied PairingStatus = "denied" PairingStatusExpired PairingStatus = "expired" PairingStatusPending PairingStatus = "pending" )
Defines values for PairingStatus.
func (PairingStatus) Valid ¶
func (e PairingStatus) Valid() bool
Valid indicates whether the value is a known member of the PairingStatus enum.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RestrictedIdentifier ¶
type RestrictedIdentifier = string
RestrictedIdentifier defines model for RestrictedIdentifier.
type RevokeCurrentSenderCredentialResponse ¶
type RevokeCurrentSenderCredentialResponse struct {
Body []byte
HTTPResponse *http.Response
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *APIError
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *RevokeCurrentSenderCredentialResponseDefaultHeaders
}
func ParseRevokeCurrentSenderCredentialResponse ¶
func ParseRevokeCurrentSenderCredentialResponse(rsp *http.Response) (*RevokeCurrentSenderCredentialResponse, error)
ParseRevokeCurrentSenderCredentialResponse parses an HTTP response from a RevokeCurrentSenderCredentialWithResponse call
func (RevokeCurrentSenderCredentialResponse) ContentType ¶
func (r RevokeCurrentSenderCredentialResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (RevokeCurrentSenderCredentialResponse) GetBody ¶
func (r RevokeCurrentSenderCredentialResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (RevokeCurrentSenderCredentialResponse) GetJSONDefault ¶
func (r RevokeCurrentSenderCredentialResponse) GetJSONDefault() *APIError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (RevokeCurrentSenderCredentialResponse) Status ¶
func (r RevokeCurrentSenderCredentialResponse) Status() string
Status returns HTTPResponse.Status
func (RevokeCurrentSenderCredentialResponse) StatusCode ¶
func (r RevokeCurrentSenderCredentialResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RevokeCurrentSenderCredentialResponseDefaultHeaders ¶
type RevokeCurrentSenderCredentialResponseDefaultHeaders struct {
RetryAfter *int
XRequestID *string
}
RevokeCurrentSenderCredentialResponseDefaultHeaders the declared response headers of an HTTP default response for RevokeCurrentSenderCredential
type SenderCredential ¶
type SenderCredential struct {
// AuthorizationMethod Approval path for CLI credentials; omitted for automation tokens.
AuthorizationMethod *SenderCredentialAuthorizationMethod `json:"authorizationMethod,omitempty"`
CreatedAt time.Time `json:"createdAt"`
Id string `json:"id"`
Kind SenderCredentialKind `json:"kind"`
LastUsedAt *time.Time `json:"lastUsedAt,omitempty"`
Name string `json:"name"`
}
SenderCredential defines model for SenderCredential.
type SenderCredentialAuthorizationMethod ¶
type SenderCredentialAuthorizationMethod string
SenderCredentialAuthorizationMethod Approval path for CLI credentials; omitted for automation tokens.
const ( AppPair SenderCredentialAuthorizationMethod = "app_pair" WebLogin SenderCredentialAuthorizationMethod = "web_login" )
Defines values for SenderCredentialAuthorizationMethod.
func (SenderCredentialAuthorizationMethod) Valid ¶
func (e SenderCredentialAuthorizationMethod) Valid() bool
Valid indicates whether the value is a known member of the SenderCredentialAuthorizationMethod enum.
type SenderCredentialKind ¶
type SenderCredentialKind string
SenderCredentialKind defines model for SenderCredential.Kind.
const ( Automation SenderCredentialKind = "automation" PairedCli SenderCredentialKind = "paired_cli" )
Defines values for SenderCredentialKind.
func (SenderCredentialKind) Valid ¶
func (e SenderCredentialKind) Valid() bool
Valid indicates whether the value is a known member of the SenderCredentialKind enum.
type UpdateCurrentSenderCredentialJSONBody ¶
type UpdateCurrentSenderCredentialJSONBody struct {
Name string `json:"name"`
}
UpdateCurrentSenderCredentialJSONBody defines parameters for UpdateCurrentSenderCredential.
type UpdateCurrentSenderCredentialJSONRequestBody ¶
type UpdateCurrentSenderCredentialJSONRequestBody UpdateCurrentSenderCredentialJSONBody
UpdateCurrentSenderCredentialJSONRequestBody defines body for UpdateCurrentSenderCredential for application/json ContentType.
type UpdateCurrentSenderCredentialResponse ¶
type UpdateCurrentSenderCredentialResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *SenderCredential
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *APIError
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *UpdateCurrentSenderCredentialResponseDefaultHeaders
}
func ParseUpdateCurrentSenderCredentialResponse ¶
func ParseUpdateCurrentSenderCredentialResponse(rsp *http.Response) (*UpdateCurrentSenderCredentialResponse, error)
ParseUpdateCurrentSenderCredentialResponse parses an HTTP response from a UpdateCurrentSenderCredentialWithResponse call
func (UpdateCurrentSenderCredentialResponse) ContentType ¶
func (r UpdateCurrentSenderCredentialResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UpdateCurrentSenderCredentialResponse) GetBody ¶
func (r UpdateCurrentSenderCredentialResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (UpdateCurrentSenderCredentialResponse) GetJSON200 ¶
func (r UpdateCurrentSenderCredentialResponse) GetJSON200() *SenderCredential
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (UpdateCurrentSenderCredentialResponse) GetJSONDefault ¶
func (r UpdateCurrentSenderCredentialResponse) GetJSONDefault() *APIError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (UpdateCurrentSenderCredentialResponse) Status ¶
func (r UpdateCurrentSenderCredentialResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateCurrentSenderCredentialResponse) StatusCode ¶
func (r UpdateCurrentSenderCredentialResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateCurrentSenderCredentialResponseDefaultHeaders ¶
type UpdateCurrentSenderCredentialResponseDefaultHeaders struct {
RetryAfter *int
XRequestID *string
}
UpdateCurrentSenderCredentialResponseDefaultHeaders the declared response headers of an HTTP default response for UpdateCurrentSenderCredential