api

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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

func NewGetCurrentSenderCredentialRequest(server string) (*http.Request, error)

NewGetCurrentSenderCredentialRequest constructs an http.Request for the GetCurrentSenderCredential method

func NewGetOwnMessageRequest

func NewGetOwnMessageRequest(server string, messageId MessageId) (*http.Request, error)

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

func NewGetUsageRequest(server string) (*http.Request, error)

NewGetUsageRequest constructs an http.Request for the GetUsage method

func NewListDevicesRequest

func NewListDevicesRequest(server string) (*http.Request, error)

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

func NewRevokeCurrentSenderCredentialRequest(server string) (*http.Request, error)

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 APIError

type APIError = ErrorResponse

APIError defines model for APIError.

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

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

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

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

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

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

GetBody returns the raw response body bytes

func (CreateDeviceAuthorizationResponse) GetJSON200

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

Status returns HTTPResponse.Status

func (CreateDeviceAuthorizationResponse) StatusCode

func (r CreateDeviceAuthorizationResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateDeviceAuthorizationResponseDefaultHeaders

type CreateDeviceAuthorizationResponseDefaultHeaders struct {
	RetryAfter *int
	XRequestID *string
}

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

type CreateMessageResponseDefaultHeaders struct {
	RetryAfter *int
	XRequestID *string
}

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

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

type CreatePairingResponseDefaultHeaders struct {
	RetryAfter *int
	XRequestID *string
}

CreatePairingResponseDefaultHeaders the declared response headers of an HTTP default response for CreatePairing

type Cursor

type Cursor = string

Cursor defines model for Cursor.

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 DeviceId

type DeviceId = string

DeviceId defines model for DeviceId.

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

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

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

Status returns HTTPResponse.Status

func (ExchangeDeviceCodeResponse) StatusCode

func (r ExchangeDeviceCodeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ExchangeDeviceCodeResponseDefaultHeaders

type ExchangeDeviceCodeResponseDefaultHeaders struct {
	RetryAfter *int
	XRequestID *string
}

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

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetCurrentSenderCredentialResponse) GetBody

GetBody returns the raw response body bytes

func (GetCurrentSenderCredentialResponse) GetJSON200

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

Status returns HTTPResponse.Status

func (GetCurrentSenderCredentialResponse) StatusCode

func (r GetCurrentSenderCredentialResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCurrentSenderCredentialResponseDefaultHeaders

type GetCurrentSenderCredentialResponseDefaultHeaders struct {
	RetryAfter *int
	XRequestID *string
}

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

type GetOwnMessageResponseDefaultHeaders struct {
	RetryAfter *int
	XRequestID *string
}

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

type GetPairingResponseDefaultHeaders struct {
	RetryAfter *int
	XRequestID *string
}

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

type GetUsageResponseDefaultHeaders struct {
	RetryAfter *int
	XRequestID *string
}

GetUsageResponseDefaultHeaders the declared response headers of an HTTP default response for GetUsage

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type IssuedCredential

type IssuedCredential struct {
	Name  string `json:"name"`
	Token string `json:"token"`
}

IssuedCredential Returned once after pairing approval or token creation.

type Limit

type Limit = int

Limit defines model for Limit.

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

type ListDevicesResponseDefaultHeaders struct {
	RetryAfter *int
	XRequestID *string
}

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

type ListOwnMessagesResponseDefaultHeaders struct {
	RetryAfter *int
	XRequestID *string
}

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 MessageId

type MessageId = string

MessageId defines model for MessageId.

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 PairingId

type PairingId = string

PairingId defines model for PairingId.

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

type RequestEditorFn func(ctx context.Context, req *http.Request) error

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

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (RevokeCurrentSenderCredentialResponse) GetBody

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

Status returns HTTPResponse.Status

func (RevokeCurrentSenderCredentialResponse) StatusCode

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

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

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (UpdateCurrentSenderCredentialResponse) GetBody

GetBody returns the raw response body bytes

func (UpdateCurrentSenderCredentialResponse) GetJSON200

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

Status returns HTTPResponse.Status

func (UpdateCurrentSenderCredentialResponse) StatusCode

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

type Usage

type Usage struct {
	Limit       int       `json:"limit"`
	PeriodEnd   time.Time `json:"periodEnd"`
	PeriodStart time.Time `json:"periodStart"`
	Used        int       `json:"used"`
}

Usage defines model for Usage.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL