api

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 11 Imported by: 0

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 NewApproveDeviceCodeRequest

func NewApproveDeviceCodeRequest(server string, userCode UserCode) (*http.Request, error)

NewApproveDeviceCodeRequest constructs an http.Request for the ApproveDeviceCode method

func NewCreateDeviceCodeRequest

func NewCreateDeviceCodeRequest(server string, body CreateDeviceCodeJSONRequestBody) (*http.Request, error)

NewCreateDeviceCodeRequest calls the generic CreateDeviceCode builder with application/json body

func NewCreateDeviceCodeRequestWithBody

func NewCreateDeviceCodeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateDeviceCodeRequestWithBody constructs an http.Request for the CreateDeviceCode method, with any body, and a specified content type

func NewCreateNetworkDeviceRequest

func NewCreateNetworkDeviceRequest(server string, body CreateNetworkDeviceJSONRequestBody) (*http.Request, error)

NewCreateNetworkDeviceRequest calls the generic CreateNetworkDevice builder with application/json body

func NewCreateNetworkDeviceRequestWithBody

func NewCreateNetworkDeviceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateNetworkDeviceRequestWithBody constructs an http.Request for the CreateNetworkDevice method, with any body, and a specified content type

func NewCreateVlanRequest

func NewCreateVlanRequest(server string, body CreateVlanJSONRequestBody) (*http.Request, error)

NewCreateVlanRequest calls the generic CreateVlan builder with application/json body

func NewCreateVlanRequestWithBody

func NewCreateVlanRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateVlanRequestWithBody constructs an http.Request for the CreateVlan method, with any body, and a specified content type

func NewDeleteNetworkDeviceRequest

func NewDeleteNetworkDeviceRequest(server string, id DeviceId) (*http.Request, error)

NewDeleteNetworkDeviceRequest constructs an http.Request for the DeleteNetworkDevice method

func NewDeleteVlanRequest

func NewDeleteVlanRequest(server string, vlanId VlanId) (*http.Request, error)

NewDeleteVlanRequest constructs an http.Request for the DeleteVlan method

func NewDenyDeviceCodeRequest

func NewDenyDeviceCodeRequest(server string, userCode UserCode) (*http.Request, error)

NewDenyDeviceCodeRequest constructs an http.Request for the DenyDeviceCode method

func NewExchangeDeviceCodeRequest

func NewExchangeDeviceCodeRequest(server string, body ExchangeDeviceCodeJSONRequestBody) (*http.Request, error)

NewExchangeDeviceCodeRequest calls the generic ExchangeDeviceCode builder with application/json body

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 NewGetNetworkDeviceRequest

func NewGetNetworkDeviceRequest(server string, id DeviceId) (*http.Request, error)

NewGetNetworkDeviceRequest constructs an http.Request for the GetNetworkDevice method

func NewGetProfileRequest

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

NewGetProfileRequest constructs an http.Request for the GetProfile method

func NewGetVlanRequest

func NewGetVlanRequest(server string, vlanId VlanId) (*http.Request, error)

NewGetVlanRequest constructs an http.Request for the GetVlan method

func NewListAdminAuditLogsRequest

func NewListAdminAuditLogsRequest(server string, params *ListAdminAuditLogsParams) (*http.Request, error)

NewListAdminAuditLogsRequest constructs an http.Request for the ListAdminAuditLogs method

func NewListAdminAuthSessionsRequest

func NewListAdminAuthSessionsRequest(server string, params *ListAdminAuthSessionsParams) (*http.Request, error)

NewListAdminAuthSessionsRequest constructs an http.Request for the ListAdminAuthSessions method

func NewListNetworkDevicesRequest

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

NewListNetworkDevicesRequest constructs an http.Request for the ListNetworkDevices method

func NewListProfileSessionsRequest

func NewListProfileSessionsRequest(server string, params *ListProfileSessionsParams) (*http.Request, error)

NewListProfileSessionsRequest constructs an http.Request for the ListProfileSessions method

func NewListVlansRequest

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

NewListVlansRequest constructs an http.Request for the ListVlans method

func NewLogoutSessionRequest

func NewLogoutSessionRequest(server string, body LogoutSessionJSONRequestBody) (*http.Request, error)

NewLogoutSessionRequest calls the generic LogoutSession builder with application/json body

func NewLogoutSessionRequestWithBody

func NewLogoutSessionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewLogoutSessionRequestWithBody constructs an http.Request for the LogoutSession method, with any body, and a specified content type

func NewPatchNetworkDeviceRequest

func NewPatchNetworkDeviceRequest(server string, id DeviceId, body PatchNetworkDeviceJSONRequestBody) (*http.Request, error)

NewPatchNetworkDeviceRequest calls the generic PatchNetworkDevice builder with application/json body

func NewPatchNetworkDeviceRequestWithBody

func NewPatchNetworkDeviceRequestWithBody(server string, id DeviceId, contentType string, body io.Reader) (*http.Request, error)

NewPatchNetworkDeviceRequestWithBody constructs an http.Request for the PatchNetworkDevice method, with any body, and a specified content type

func NewPatchVlanRequest

func NewPatchVlanRequest(server string, vlanId VlanId, body PatchVlanJSONRequestBody) (*http.Request, error)

NewPatchVlanRequest calls the generic PatchVlan builder with application/json body

func NewPatchVlanRequestWithBody

func NewPatchVlanRequestWithBody(server string, vlanId VlanId, contentType string, body io.Reader) (*http.Request, error)

NewPatchVlanRequestWithBody constructs an http.Request for the PatchVlan method, with any body, and a specified content type

func NewRefreshAccessTokenRequest

func NewRefreshAccessTokenRequest(server string, body RefreshAccessTokenJSONRequestBody) (*http.Request, error)

NewRefreshAccessTokenRequest calls the generic RefreshAccessToken builder with application/json body

func NewRefreshAccessTokenRequestWithBody

func NewRefreshAccessTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewRefreshAccessTokenRequestWithBody constructs an http.Request for the RefreshAccessToken method, with any body, and a specified content type

func NewRevokeAdminAuthSessionRequest

func NewRevokeAdminAuthSessionRequest(server string, id SessionId) (*http.Request, error)

NewRevokeAdminAuthSessionRequest constructs an http.Request for the RevokeAdminAuthSession method

func NewRevokeAllAdminAuthSessionsRequest

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

NewRevokeAllAdminAuthSessionsRequest constructs an http.Request for the RevokeAllAdminAuthSessions method

func NewRevokeOtherProfileSessionsRequest

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

NewRevokeOtherProfileSessionsRequest constructs an http.Request for the RevokeOtherProfileSessions method

func NewRevokeProfileSessionRequest

func NewRevokeProfileSessionRequest(server string, id SessionId) (*http.Request, error)

NewRevokeProfileSessionRequest constructs an http.Request for the RevokeProfileSession method

Types

type ApproveDeviceCodeResponse

type ApproveDeviceCodeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *Conflict
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *TooManyRequests
}

func ParseApproveDeviceCodeResponse

func ParseApproveDeviceCodeResponse(rsp *http.Response) (*ApproveDeviceCodeResponse, error)

ParseApproveDeviceCodeResponse parses an HTTP response from a ApproveDeviceCodeWithResponse call

func (ApproveDeviceCodeResponse) ContentType

func (r ApproveDeviceCodeResponse) ContentType() string

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

func (ApproveDeviceCodeResponse) GetBody

func (r ApproveDeviceCodeResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ApproveDeviceCodeResponse) GetJSON400

func (r ApproveDeviceCodeResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (ApproveDeviceCodeResponse) GetJSON401

func (r ApproveDeviceCodeResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ApproveDeviceCodeResponse) GetJSON404

func (r ApproveDeviceCodeResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (ApproveDeviceCodeResponse) GetJSON409

func (r ApproveDeviceCodeResponse) GetJSON409() *Conflict

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (ApproveDeviceCodeResponse) GetJSON429

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (ApproveDeviceCodeResponse) Status

func (r ApproveDeviceCodeResponse) Status() string

Status returns HTTPResponse.Status

func (ApproveDeviceCodeResponse) StatusCode

func (r ApproveDeviceCodeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AuditLogEntry

type AuditLogEntry struct {
	Action        string                 `json:"action"`
	ActorUsername string                 `json:"actor_username"`
	CreatedAt     time.Time              `json:"created_at"`
	Id            openapi_types.UUID     `json:"id"`
	Metadata      map[string]interface{} `json:"metadata"`
	ResourceId    string                 `json:"resource_id"`
	ResourceType  string                 `json:"resource_type"`
}

AuditLogEntry defines model for AuditLogEntry.

type AuditLogList

type AuditLogList struct {
	Items      []AuditLogEntry    `json:"items"`
	Pagination AuditLogPagination `json:"pagination"`
}

AuditLogList defines model for AuditLogList.

type AuditLogPagination

type AuditLogPagination struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
	Total  int64 `json:"total"`
}

AuditLogPagination defines model for AuditLogPagination.

type AuthSession

type AuthSession struct {
	ClientName    string             `json:"client_name"`
	CreatedAt     time.Time          `json:"created_at"`
	ExpiresAt     time.Time          `json:"expires_at"`
	Id            openapi_types.UUID `json:"id"`
	IdleExpiresAt time.Time          `json:"idle_expires_at"`
	IsCurrent     bool               `json:"is_current"`
	LastUsedAt    *time.Time         `json:"last_used_at,omitempty"`
	Username      string             `json:"username"`
}

AuthSession defines model for AuthSession.

type AuthSessionPage

type AuthSessionPage struct {
	Items      []AuthSession         `json:"items"`
	Pagination AuthSessionPagination `json:"pagination"`
}

AuthSessionPage defines model for AuthSessionPage.

type AuthSessionPagination

type AuthSessionPagination struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
	Total  int64 `json:"total"`
}

AuthSessionPagination defines model for AuthSessionPagination.

type BadRequest

type BadRequest = ErrorResponse

BadRequest defines model for BadRequest.

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) ApproveDeviceCode

func (c *Client) ApproveDeviceCode(ctx context.Context, userCode UserCode, reqEditors ...RequestEditorFn) (*http.Response, error)

ApproveDeviceCode Approve a pending device code request for the current authenticated user.

Corresponds with POST /api/v1/auth/device_codes/{user_code}/approve (the `ApproveDeviceCode` operationId).

func (*Client) CreateDeviceCode

func (c *Client) CreateDeviceCode(ctx context.Context, body CreateDeviceCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateDeviceCode Create a new device code request for a public client.

Takes a body of the `application/json` content type.

Corresponds with POST /api/v1/auth/device_codes (the `CreateDeviceCode` operationId).

func (*Client) CreateDeviceCodeWithBody

func (c *Client) CreateDeviceCodeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateDeviceCodeWithBody Create a new device code request for a public client.

Takes any type of body and a specified content type.

Corresponds with POST /api/v1/auth/device_codes (the `CreateDeviceCode` operationId).

func (*Client) CreateNetworkDevice

func (c *Client) CreateNetworkDevice(ctx context.Context, body CreateNetworkDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateNetworkDevice Create a network device.

Takes a body of the `application/json` content type.

Corresponds with POST /api/v1/networks/devices (the `CreateNetworkDevice` operationId).

func (*Client) CreateNetworkDeviceWithBody

func (c *Client) CreateNetworkDeviceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateNetworkDeviceWithBody Create a network device.

Takes any type of body and a specified content type.

Corresponds with POST /api/v1/networks/devices (the `CreateNetworkDevice` operationId).

func (*Client) CreateVlan

func (c *Client) CreateVlan(ctx context.Context, body CreateVlanJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateVlan Create a VLAN definition.

Takes a body of the `application/json` content type.

Corresponds with POST /api/v1/networks/vlans (the `CreateVlan` operationId).

func (*Client) CreateVlanWithBody

func (c *Client) CreateVlanWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateVlanWithBody Create a VLAN definition.

Takes any type of body and a specified content type.

Corresponds with POST /api/v1/networks/vlans (the `CreateVlan` operationId).

func (*Client) DeleteNetworkDevice

func (c *Client) DeleteNetworkDevice(ctx context.Context, id DeviceId, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteNetworkDevice Delete a network device.

Corresponds with DELETE /api/v1/networks/devices/{id} (the `DeleteNetworkDevice` operationId).

func (*Client) DeleteVlan

func (c *Client) DeleteVlan(ctx context.Context, vlanId VlanId, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteVlan Delete a VLAN definition by VLAN number.

Corresponds with DELETE /api/v1/networks/vlans/{vlan_id} (the `DeleteVlan` operationId).

func (*Client) DenyDeviceCode

func (c *Client) DenyDeviceCode(ctx context.Context, userCode UserCode, reqEditors ...RequestEditorFn) (*http.Response, error)

DenyDeviceCode Deny a pending device code request for the current authenticated user.

Corresponds with POST /api/v1/auth/device_codes/{user_code}/deny (the `DenyDeviceCode` operationId).

func (*Client) ExchangeDeviceCode

func (c *Client) ExchangeDeviceCode(ctx context.Context, body ExchangeDeviceCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

ExchangeDeviceCode Exchange an approved device code for access and refresh tokens.

Takes a body of the `application/json` content type.

Corresponds with POST /api/v1/auth/tokens (the `ExchangeDeviceCode` 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 access and refresh tokens.

Takes any type of body and a specified content type.

Corresponds with POST /api/v1/auth/tokens (the `ExchangeDeviceCode` operationId).

func (*Client) GetNetworkDevice

func (c *Client) GetNetworkDevice(ctx context.Context, id DeviceId, reqEditors ...RequestEditorFn) (*http.Response, error)

GetNetworkDevice Get one network device.

Corresponds with GET /api/v1/networks/devices/{id} (the `GetNetworkDevice` operationId).

func (*Client) GetProfile

func (c *Client) GetProfile(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

GetProfile Get the current authenticated user's profile.

Returns the current user's identity and group membership after the API resolves the caller from either trusted forward-auth headers or a bearer JWT.

Corresponds with GET /api/v1/profile (the `GetProfile` operationId).

func (*Client) GetVlan

func (c *Client) GetVlan(ctx context.Context, vlanId VlanId, reqEditors ...RequestEditorFn) (*http.Response, error)

GetVlan Get one VLAN definition by VLAN number.

Corresponds with GET /api/v1/networks/vlans/{vlan_id} (the `GetVlan` operationId).

func (*Client) ListAdminAuditLogs

func (c *Client) ListAdminAuditLogs(ctx context.Context, params *ListAdminAuditLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

ListAdminAuditLogs List audit logs across the platform.

Corresponds with GET /api/v1/admin/audit_logs (the `ListAdminAuditLogs` operationId).

func (*Client) ListAdminAuthSessions

func (c *Client) ListAdminAuthSessions(ctx context.Context, params *ListAdminAuthSessionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

ListAdminAuthSessions List active auth sessions across users.

Corresponds with GET /api/v1/admin/auth/sessions (the `ListAdminAuthSessions` operationId).

func (*Client) ListNetworkDevices

func (c *Client) ListNetworkDevices(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

ListNetworkDevices List network devices.

Corresponds with GET /api/v1/networks/devices (the `ListNetworkDevices` operationId).

func (*Client) ListProfileSessions

func (c *Client) ListProfileSessions(ctx context.Context, params *ListProfileSessionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

ListProfileSessions List active auth sessions for the current user.

Corresponds with GET /api/v1/profile/sessions (the `ListProfileSessions` operationId).

func (*Client) ListVlans

func (c *Client) ListVlans(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

ListVlans List VLAN definitions.

Corresponds with GET /api/v1/networks/vlans (the `ListVlans` operationId).

func (*Client) LogoutSession

func (c *Client) LogoutSession(ctx context.Context, body LogoutSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

LogoutSession Revoke the presented refresh session.

Takes a body of the `application/json` content type.

Corresponds with POST /api/v1/auth/logout (the `LogoutSession` operationId).

func (*Client) LogoutSessionWithBody

func (c *Client) LogoutSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

LogoutSessionWithBody Revoke the presented refresh session.

Takes any type of body and a specified content type.

Corresponds with POST /api/v1/auth/logout (the `LogoutSession` operationId).

func (*Client) PatchNetworkDevice

func (c *Client) PatchNetworkDevice(ctx context.Context, id DeviceId, body PatchNetworkDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

PatchNetworkDevice Update a network device.

Takes a body of the `application/json` content type.

Corresponds with PATCH /api/v1/networks/devices/{id} (the `PatchNetworkDevice` operationId).

func (*Client) PatchNetworkDeviceWithBody

func (c *Client) PatchNetworkDeviceWithBody(ctx context.Context, id DeviceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

PatchNetworkDeviceWithBody Update a network device.

Takes any type of body and a specified content type.

Corresponds with PATCH /api/v1/networks/devices/{id} (the `PatchNetworkDevice` operationId).

func (*Client) PatchVlan

func (c *Client) PatchVlan(ctx context.Context, vlanId VlanId, body PatchVlanJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

PatchVlan Update a VLAN definition by VLAN number.

Takes a body of the `application/json` content type.

Corresponds with PATCH /api/v1/networks/vlans/{vlan_id} (the `PatchVlan` operationId).

func (*Client) PatchVlanWithBody

func (c *Client) PatchVlanWithBody(ctx context.Context, vlanId VlanId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

PatchVlanWithBody Update a VLAN definition by VLAN number.

Takes any type of body and a specified content type.

Corresponds with PATCH /api/v1/networks/vlans/{vlan_id} (the `PatchVlan` operationId).

func (*Client) RefreshAccessToken

func (c *Client) RefreshAccessToken(ctx context.Context, body RefreshAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

RefreshAccessToken Rotate the refresh token and mint a new access token.

Takes a body of the `application/json` content type.

Corresponds with POST /api/v1/auth/tokens/refresh (the `RefreshAccessToken` operationId).

func (*Client) RefreshAccessTokenWithBody

func (c *Client) RefreshAccessTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

RefreshAccessTokenWithBody Rotate the refresh token and mint a new access token.

Takes any type of body and a specified content type.

Corresponds with POST /api/v1/auth/tokens/refresh (the `RefreshAccessToken` operationId).

func (*Client) RevokeAdminAuthSession

func (c *Client) RevokeAdminAuthSession(ctx context.Context, id SessionId, reqEditors ...RequestEditorFn) (*http.Response, error)

RevokeAdminAuthSession Revoke a session as an administrator.

Corresponds with POST /api/v1/admin/auth/sessions/{id}/revoke (the `RevokeAdminAuthSession` operationId).

func (*Client) RevokeAllAdminAuthSessions

func (c *Client) RevokeAllAdminAuthSessions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

RevokeAllAdminAuthSessions Revoke all active auth sessions as an administrator.

Revokes all active API/client sessions across all users, including the administrator's own API/client sessions. Browser forward-auth sessions are not affected.

Corresponds with POST /api/v1/admin/auth/sessions/revoke_all (the `RevokeAllAdminAuthSessions` operationId).

func (*Client) RevokeOtherProfileSessions

func (c *Client) RevokeOtherProfileSessions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

RevokeOtherProfileSessions Revoke all other active sessions for the current user.

For bearer-authenticated callers, the current bearer session is kept and other active API sessions are revoked. For forward-auth browser callers, all active API sessions for the user are revoked.

Corresponds with POST /api/v1/profile/sessions/revoke_others (the `RevokeOtherProfileSessions` operationId).

func (*Client) RevokeProfileSession

func (c *Client) RevokeProfileSession(ctx context.Context, id SessionId, reqEditors ...RequestEditorFn) (*http.Response, error)

RevokeProfileSession Revoke one active session belonging to the current user.

Corresponds with POST /api/v1/profile/sessions/{id}/revoke (the `RevokeProfileSession` operationId).

type ClientAuthError

type ClientAuthError struct {
	Error            ClientAuthErrorError `json:"error"`
	ErrorDescription string               `json:"error_description"`
}

ClientAuthError defines model for ClientAuthError.

type ClientAuthErrorError

type ClientAuthErrorError string

ClientAuthErrorError defines model for ClientAuthError.Error.

const (
	AccessDenied         ClientAuthErrorError = "access_denied"
	AuthorizationPending ClientAuthErrorError = "authorization_pending"
	ExpiredToken         ClientAuthErrorError = "expired_token"
	InvalidRequest       ClientAuthErrorError = "invalid_request"
	SlowDown             ClientAuthErrorError = "slow_down"
)

Defines values for ClientAuthErrorError.

func (ClientAuthErrorError) Valid

func (e ClientAuthErrorError) Valid() bool

Valid indicates whether the value is a known member of the ClientAuthErrorError enum.

type ClientInterface

type ClientInterface interface {

	// ListAdminAuditLogs List audit logs across the platform.
	//
	// Corresponds with GET /api/v1/admin/audit_logs (the `ListAdminAuditLogs` operationId).
	ListAdminAuditLogs(ctx context.Context, params *ListAdminAuditLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListAdminAuthSessions List active auth sessions across users.
	//
	// Corresponds with GET /api/v1/admin/auth/sessions (the `ListAdminAuthSessions` operationId).
	ListAdminAuthSessions(ctx context.Context, params *ListAdminAuthSessionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RevokeAllAdminAuthSessions Revoke all active auth sessions as an administrator.
	//
	// Revokes all active API/client sessions across all users, including the administrator's own API/client sessions. Browser forward-auth sessions are not affected.
	//
	// Corresponds with POST /api/v1/admin/auth/sessions/revoke_all (the `RevokeAllAdminAuthSessions` operationId).
	RevokeAllAdminAuthSessions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RevokeAdminAuthSession Revoke a session as an administrator.
	//
	// Corresponds with POST /api/v1/admin/auth/sessions/{id}/revoke (the `RevokeAdminAuthSession` operationId).
	RevokeAdminAuthSession(ctx context.Context, id SessionId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateDeviceCodeWithBody Create a new device code request for a public client.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/v1/auth/device_codes (the `CreateDeviceCode` operationId).
	CreateDeviceCodeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateDeviceCode Create a new device code request for a public client.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/v1/auth/device_codes (the `CreateDeviceCode` operationId).
	CreateDeviceCode(ctx context.Context, body CreateDeviceCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ApproveDeviceCode Approve a pending device code request for the current authenticated user.
	//
	// Corresponds with POST /api/v1/auth/device_codes/{user_code}/approve (the `ApproveDeviceCode` operationId).
	ApproveDeviceCode(ctx context.Context, userCode UserCode, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DenyDeviceCode Deny a pending device code request for the current authenticated user.
	//
	// Corresponds with POST /api/v1/auth/device_codes/{user_code}/deny (the `DenyDeviceCode` operationId).
	DenyDeviceCode(ctx context.Context, userCode UserCode, reqEditors ...RequestEditorFn) (*http.Response, error)

	// LogoutSessionWithBody Revoke the presented refresh session.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/v1/auth/logout (the `LogoutSession` operationId).
	LogoutSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// LogoutSession Revoke the presented refresh session.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/v1/auth/logout (the `LogoutSession` operationId).
	LogoutSession(ctx context.Context, body LogoutSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ExchangeDeviceCodeWithBody Exchange an approved device code for access and refresh tokens.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/v1/auth/tokens (the `ExchangeDeviceCode` operationId).
	ExchangeDeviceCodeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ExchangeDeviceCode Exchange an approved device code for access and refresh tokens.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/v1/auth/tokens (the `ExchangeDeviceCode` operationId).
	ExchangeDeviceCode(ctx context.Context, body ExchangeDeviceCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RefreshAccessTokenWithBody Rotate the refresh token and mint a new access token.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/v1/auth/tokens/refresh (the `RefreshAccessToken` operationId).
	RefreshAccessTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RefreshAccessToken Rotate the refresh token and mint a new access token.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/v1/auth/tokens/refresh (the `RefreshAccessToken` operationId).
	RefreshAccessToken(ctx context.Context, body RefreshAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListNetworkDevices List network devices.
	//
	// Corresponds with GET /api/v1/networks/devices (the `ListNetworkDevices` operationId).
	ListNetworkDevices(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateNetworkDeviceWithBody Create a network device.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/v1/networks/devices (the `CreateNetworkDevice` operationId).
	CreateNetworkDeviceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateNetworkDevice Create a network device.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/v1/networks/devices (the `CreateNetworkDevice` operationId).
	CreateNetworkDevice(ctx context.Context, body CreateNetworkDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteNetworkDevice Delete a network device.
	//
	// Corresponds with DELETE /api/v1/networks/devices/{id} (the `DeleteNetworkDevice` operationId).
	DeleteNetworkDevice(ctx context.Context, id DeviceId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetNetworkDevice Get one network device.
	//
	// Corresponds with GET /api/v1/networks/devices/{id} (the `GetNetworkDevice` operationId).
	GetNetworkDevice(ctx context.Context, id DeviceId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PatchNetworkDeviceWithBody Update a network device.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PATCH /api/v1/networks/devices/{id} (the `PatchNetworkDevice` operationId).
	PatchNetworkDeviceWithBody(ctx context.Context, id DeviceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PatchNetworkDevice Update a network device.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PATCH /api/v1/networks/devices/{id} (the `PatchNetworkDevice` operationId).
	PatchNetworkDevice(ctx context.Context, id DeviceId, body PatchNetworkDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListVlans List VLAN definitions.
	//
	// Corresponds with GET /api/v1/networks/vlans (the `ListVlans` operationId).
	ListVlans(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateVlanWithBody Create a VLAN definition.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/v1/networks/vlans (the `CreateVlan` operationId).
	CreateVlanWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateVlan Create a VLAN definition.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/v1/networks/vlans (the `CreateVlan` operationId).
	CreateVlan(ctx context.Context, body CreateVlanJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteVlan Delete a VLAN definition by VLAN number.
	//
	// Corresponds with DELETE /api/v1/networks/vlans/{vlan_id} (the `DeleteVlan` operationId).
	DeleteVlan(ctx context.Context, vlanId VlanId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetVlan Get one VLAN definition by VLAN number.
	//
	// Corresponds with GET /api/v1/networks/vlans/{vlan_id} (the `GetVlan` operationId).
	GetVlan(ctx context.Context, vlanId VlanId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PatchVlanWithBody Update a VLAN definition by VLAN number.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PATCH /api/v1/networks/vlans/{vlan_id} (the `PatchVlan` operationId).
	PatchVlanWithBody(ctx context.Context, vlanId VlanId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PatchVlan Update a VLAN definition by VLAN number.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PATCH /api/v1/networks/vlans/{vlan_id} (the `PatchVlan` operationId).
	PatchVlan(ctx context.Context, vlanId VlanId, body PatchVlanJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetProfile Get the current authenticated user's profile.
	//
	// Returns the current user's identity and group membership after the API resolves the caller from either trusted forward-auth headers or a bearer JWT.
	//
	// Corresponds with GET /api/v1/profile (the `GetProfile` operationId).
	GetProfile(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListProfileSessions List active auth sessions for the current user.
	//
	// Corresponds with GET /api/v1/profile/sessions (the `ListProfileSessions` operationId).
	ListProfileSessions(ctx context.Context, params *ListProfileSessionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RevokeOtherProfileSessions Revoke all other active sessions for the current user.
	//
	// For bearer-authenticated callers, the current bearer session is kept and other active API sessions are revoked. For forward-auth browser callers, all active API sessions for the user are revoked.
	//
	// Corresponds with POST /api/v1/profile/sessions/revoke_others (the `RevokeOtherProfileSessions` operationId).
	RevokeOtherProfileSessions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RevokeProfileSession Revoke one active session belonging to the current user.
	//
	// Corresponds with POST /api/v1/profile/sessions/{id}/revoke (the `RevokeProfileSession` operationId).
	RevokeProfileSession(ctx context.Context, id SessionId, 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) ApproveDeviceCodeWithResponse

func (c *ClientWithResponses) ApproveDeviceCodeWithResponse(ctx context.Context, userCode UserCode, reqEditors ...RequestEditorFn) (*ApproveDeviceCodeResponse, error)

ApproveDeviceCodeWithResponse Approve a pending device code request for the current authenticated user.

Returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/auth/device_codes/{user_code}/approve (the `ApproveDeviceCode` operationId).

func (*ClientWithResponses) CreateDeviceCodeWithBodyWithResponse

func (c *ClientWithResponses) CreateDeviceCodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDeviceCodeResponse, error)

CreateDeviceCodeWithBodyWithResponse Create a new device code request for a public client.

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 /api/v1/auth/device_codes (the `CreateDeviceCode` operationId).

func (*ClientWithResponses) CreateDeviceCodeWithResponse

func (c *ClientWithResponses) CreateDeviceCodeWithResponse(ctx context.Context, body CreateDeviceCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDeviceCodeResponse, error)

CreateDeviceCodeWithResponse Create a new device code request for a public client.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/auth/device_codes (the `CreateDeviceCode` operationId).

func (*ClientWithResponses) CreateNetworkDeviceWithBodyWithResponse

func (c *ClientWithResponses) CreateNetworkDeviceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateNetworkDeviceResponse, error)

CreateNetworkDeviceWithBodyWithResponse Create a network device.

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 /api/v1/networks/devices (the `CreateNetworkDevice` operationId).

func (*ClientWithResponses) CreateNetworkDeviceWithResponse

func (c *ClientWithResponses) CreateNetworkDeviceWithResponse(ctx context.Context, body CreateNetworkDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateNetworkDeviceResponse, error)

CreateNetworkDeviceWithResponse Create a network device.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/networks/devices (the `CreateNetworkDevice` operationId).

func (*ClientWithResponses) CreateVlanWithBodyWithResponse

func (c *ClientWithResponses) CreateVlanWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateVlanResponse, error)

CreateVlanWithBodyWithResponse Create a VLAN definition.

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 /api/v1/networks/vlans (the `CreateVlan` operationId).

func (*ClientWithResponses) CreateVlanWithResponse

func (c *ClientWithResponses) CreateVlanWithResponse(ctx context.Context, body CreateVlanJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateVlanResponse, error)

CreateVlanWithResponse Create a VLAN definition.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/networks/vlans (the `CreateVlan` operationId).

func (*ClientWithResponses) DeleteNetworkDeviceWithResponse

func (c *ClientWithResponses) DeleteNetworkDeviceWithResponse(ctx context.Context, id DeviceId, reqEditors ...RequestEditorFn) (*DeleteNetworkDeviceResponse, error)

DeleteNetworkDeviceWithResponse Delete a network device.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /api/v1/networks/devices/{id} (the `DeleteNetworkDevice` operationId).

func (*ClientWithResponses) DeleteVlanWithResponse

func (c *ClientWithResponses) DeleteVlanWithResponse(ctx context.Context, vlanId VlanId, reqEditors ...RequestEditorFn) (*DeleteVlanResponse, error)

DeleteVlanWithResponse Delete a VLAN definition by VLAN number.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /api/v1/networks/vlans/{vlan_id} (the `DeleteVlan` operationId).

func (*ClientWithResponses) DenyDeviceCodeWithResponse

func (c *ClientWithResponses) DenyDeviceCodeWithResponse(ctx context.Context, userCode UserCode, reqEditors ...RequestEditorFn) (*DenyDeviceCodeResponse, error)

DenyDeviceCodeWithResponse Deny a pending device code request for the current authenticated user.

Returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/auth/device_codes/{user_code}/deny (the `DenyDeviceCode` 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 access and refresh tokens.

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 /api/v1/auth/tokens (the `ExchangeDeviceCode` operationId).

func (*ClientWithResponses) ExchangeDeviceCodeWithResponse

func (c *ClientWithResponses) ExchangeDeviceCodeWithResponse(ctx context.Context, body ExchangeDeviceCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*ExchangeDeviceCodeResponse, error)

ExchangeDeviceCodeWithResponse Exchange an approved device code for access and refresh tokens.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/auth/tokens (the `ExchangeDeviceCode` operationId).

func (*ClientWithResponses) GetNetworkDeviceWithResponse

func (c *ClientWithResponses) GetNetworkDeviceWithResponse(ctx context.Context, id DeviceId, reqEditors ...RequestEditorFn) (*GetNetworkDeviceResponse, error)

GetNetworkDeviceWithResponse Get one network device.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/networks/devices/{id} (the `GetNetworkDevice` operationId).

func (*ClientWithResponses) GetProfileWithResponse

func (c *ClientWithResponses) GetProfileWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetProfileResponse, error)

GetProfileWithResponse Get the current authenticated user's profile.

Returns the current user's identity and group membership after the API resolves the caller from either trusted forward-auth headers or a bearer JWT.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/profile (the `GetProfile` operationId).

func (*ClientWithResponses) GetVlanWithResponse

func (c *ClientWithResponses) GetVlanWithResponse(ctx context.Context, vlanId VlanId, reqEditors ...RequestEditorFn) (*GetVlanResponse, error)

GetVlanWithResponse Get one VLAN definition by VLAN number.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/networks/vlans/{vlan_id} (the `GetVlan` operationId).

func (*ClientWithResponses) ListAdminAuditLogsWithResponse

func (c *ClientWithResponses) ListAdminAuditLogsWithResponse(ctx context.Context, params *ListAdminAuditLogsParams, reqEditors ...RequestEditorFn) (*ListAdminAuditLogsResponse, error)

ListAdminAuditLogsWithResponse List audit logs across the platform.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/admin/audit_logs (the `ListAdminAuditLogs` operationId).

func (*ClientWithResponses) ListAdminAuthSessionsWithResponse

func (c *ClientWithResponses) ListAdminAuthSessionsWithResponse(ctx context.Context, params *ListAdminAuthSessionsParams, reqEditors ...RequestEditorFn) (*ListAdminAuthSessionsResponse, error)

ListAdminAuthSessionsWithResponse List active auth sessions across users.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/admin/auth/sessions (the `ListAdminAuthSessions` operationId).

func (*ClientWithResponses) ListNetworkDevicesWithResponse

func (c *ClientWithResponses) ListNetworkDevicesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListNetworkDevicesResponse, error)

ListNetworkDevicesWithResponse List network devices.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/networks/devices (the `ListNetworkDevices` operationId).

func (*ClientWithResponses) ListProfileSessionsWithResponse

func (c *ClientWithResponses) ListProfileSessionsWithResponse(ctx context.Context, params *ListProfileSessionsParams, reqEditors ...RequestEditorFn) (*ListProfileSessionsResponse, error)

ListProfileSessionsWithResponse List active auth sessions for the current user.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/profile/sessions (the `ListProfileSessions` operationId).

func (*ClientWithResponses) ListVlansWithResponse

func (c *ClientWithResponses) ListVlansWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListVlansResponse, error)

ListVlansWithResponse List VLAN definitions.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/networks/vlans (the `ListVlans` operationId).

func (*ClientWithResponses) LogoutSessionWithBodyWithResponse

func (c *ClientWithResponses) LogoutSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LogoutSessionResponse, error)

LogoutSessionWithBodyWithResponse Revoke the presented refresh session.

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 /api/v1/auth/logout (the `LogoutSession` operationId).

func (*ClientWithResponses) LogoutSessionWithResponse

func (c *ClientWithResponses) LogoutSessionWithResponse(ctx context.Context, body LogoutSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*LogoutSessionResponse, error)

LogoutSessionWithResponse Revoke the presented refresh session.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/auth/logout (the `LogoutSession` operationId).

func (*ClientWithResponses) PatchNetworkDeviceWithBodyWithResponse

func (c *ClientWithResponses) PatchNetworkDeviceWithBodyWithResponse(ctx context.Context, id DeviceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchNetworkDeviceResponse, error)

PatchNetworkDeviceWithBodyWithResponse Update a network device.

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 /api/v1/networks/devices/{id} (the `PatchNetworkDevice` operationId).

func (*ClientWithResponses) PatchNetworkDeviceWithResponse

func (c *ClientWithResponses) PatchNetworkDeviceWithResponse(ctx context.Context, id DeviceId, body PatchNetworkDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworkDeviceResponse, error)

PatchNetworkDeviceWithResponse Update a network device.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with PATCH /api/v1/networks/devices/{id} (the `PatchNetworkDevice` operationId).

func (*ClientWithResponses) PatchVlanWithBodyWithResponse

func (c *ClientWithResponses) PatchVlanWithBodyWithResponse(ctx context.Context, vlanId VlanId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchVlanResponse, error)

PatchVlanWithBodyWithResponse Update a VLAN definition by VLAN number.

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 /api/v1/networks/vlans/{vlan_id} (the `PatchVlan` operationId).

func (*ClientWithResponses) PatchVlanWithResponse

func (c *ClientWithResponses) PatchVlanWithResponse(ctx context.Context, vlanId VlanId, body PatchVlanJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchVlanResponse, error)

PatchVlanWithResponse Update a VLAN definition by VLAN number.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with PATCH /api/v1/networks/vlans/{vlan_id} (the `PatchVlan` operationId).

func (*ClientWithResponses) RefreshAccessTokenWithBodyWithResponse

func (c *ClientWithResponses) RefreshAccessTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RefreshAccessTokenResponse, error)

RefreshAccessTokenWithBodyWithResponse Rotate the refresh token and mint a new access token.

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 /api/v1/auth/tokens/refresh (the `RefreshAccessToken` operationId).

func (*ClientWithResponses) RefreshAccessTokenWithResponse

func (c *ClientWithResponses) RefreshAccessTokenWithResponse(ctx context.Context, body RefreshAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*RefreshAccessTokenResponse, error)

RefreshAccessTokenWithResponse Rotate the refresh token and mint a new access token.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/auth/tokens/refresh (the `RefreshAccessToken` operationId).

func (*ClientWithResponses) RevokeAdminAuthSessionWithResponse

func (c *ClientWithResponses) RevokeAdminAuthSessionWithResponse(ctx context.Context, id SessionId, reqEditors ...RequestEditorFn) (*RevokeAdminAuthSessionResponse, error)

RevokeAdminAuthSessionWithResponse Revoke a session as an administrator.

Returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/admin/auth/sessions/{id}/revoke (the `RevokeAdminAuthSession` operationId).

func (*ClientWithResponses) RevokeAllAdminAuthSessionsWithResponse

func (c *ClientWithResponses) RevokeAllAdminAuthSessionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RevokeAllAdminAuthSessionsResponse, error)

RevokeAllAdminAuthSessionsWithResponse Revoke all active auth sessions as an administrator.

Revokes all active API/client sessions across all users, including the administrator's own API/client sessions. Browser forward-auth sessions are not affected.

Returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/admin/auth/sessions/revoke_all (the `RevokeAllAdminAuthSessions` operationId).

func (*ClientWithResponses) RevokeOtherProfileSessionsWithResponse

func (c *ClientWithResponses) RevokeOtherProfileSessionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RevokeOtherProfileSessionsResponse, error)

RevokeOtherProfileSessionsWithResponse Revoke all other active sessions for the current user.

For bearer-authenticated callers, the current bearer session is kept and other active API sessions are revoked. For forward-auth browser callers, all active API sessions for the user are revoked.

Returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/profile/sessions/revoke_others (the `RevokeOtherProfileSessions` operationId).

func (*ClientWithResponses) RevokeProfileSessionWithResponse

func (c *ClientWithResponses) RevokeProfileSessionWithResponse(ctx context.Context, id SessionId, reqEditors ...RequestEditorFn) (*RevokeProfileSessionResponse, error)

RevokeProfileSessionWithResponse Revoke one active session belonging to the current user.

Returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/profile/sessions/{id}/revoke (the `RevokeProfileSession` operationId).

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {

	// ListAdminAuditLogsWithResponse List audit logs across the platform.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/admin/audit_logs (the `ListAdminAuditLogs` operationId).
	ListAdminAuditLogsWithResponse(ctx context.Context, params *ListAdminAuditLogsParams, reqEditors ...RequestEditorFn) (*ListAdminAuditLogsResponse, error)

	// ListAdminAuthSessionsWithResponse List active auth sessions across users.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/admin/auth/sessions (the `ListAdminAuthSessions` operationId).
	ListAdminAuthSessionsWithResponse(ctx context.Context, params *ListAdminAuthSessionsParams, reqEditors ...RequestEditorFn) (*ListAdminAuthSessionsResponse, error)

	// RevokeAllAdminAuthSessionsWithResponse Revoke all active auth sessions as an administrator.
	//
	// Revokes all active API/client sessions across all users, including the administrator's own API/client sessions. Browser forward-auth sessions are not affected.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/admin/auth/sessions/revoke_all (the `RevokeAllAdminAuthSessions` operationId).
	RevokeAllAdminAuthSessionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RevokeAllAdminAuthSessionsResponse, error)

	// RevokeAdminAuthSessionWithResponse Revoke a session as an administrator.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/admin/auth/sessions/{id}/revoke (the `RevokeAdminAuthSession` operationId).
	RevokeAdminAuthSessionWithResponse(ctx context.Context, id SessionId, reqEditors ...RequestEditorFn) (*RevokeAdminAuthSessionResponse, error)

	// CreateDeviceCodeWithBodyWithResponse Create a new device code request for a public client.
	//
	// 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 /api/v1/auth/device_codes (the `CreateDeviceCode` operationId).
	CreateDeviceCodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDeviceCodeResponse, error)

	// CreateDeviceCodeWithResponse Create a new device code request for a public client.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/auth/device_codes (the `CreateDeviceCode` operationId).
	CreateDeviceCodeWithResponse(ctx context.Context, body CreateDeviceCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDeviceCodeResponse, error)

	// ApproveDeviceCodeWithResponse Approve a pending device code request for the current authenticated user.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/auth/device_codes/{user_code}/approve (the `ApproveDeviceCode` operationId).
	ApproveDeviceCodeWithResponse(ctx context.Context, userCode UserCode, reqEditors ...RequestEditorFn) (*ApproveDeviceCodeResponse, error)

	// DenyDeviceCodeWithResponse Deny a pending device code request for the current authenticated user.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/auth/device_codes/{user_code}/deny (the `DenyDeviceCode` operationId).
	DenyDeviceCodeWithResponse(ctx context.Context, userCode UserCode, reqEditors ...RequestEditorFn) (*DenyDeviceCodeResponse, error)

	// LogoutSessionWithBodyWithResponse Revoke the presented refresh session.
	//
	// 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 /api/v1/auth/logout (the `LogoutSession` operationId).
	LogoutSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LogoutSessionResponse, error)

	// LogoutSessionWithResponse Revoke the presented refresh session.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/auth/logout (the `LogoutSession` operationId).
	LogoutSessionWithResponse(ctx context.Context, body LogoutSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*LogoutSessionResponse, error)

	// ExchangeDeviceCodeWithBodyWithResponse Exchange an approved device code for access and refresh tokens.
	//
	// 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 /api/v1/auth/tokens (the `ExchangeDeviceCode` operationId).
	ExchangeDeviceCodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ExchangeDeviceCodeResponse, error)

	// ExchangeDeviceCodeWithResponse Exchange an approved device code for access and refresh tokens.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/auth/tokens (the `ExchangeDeviceCode` operationId).
	ExchangeDeviceCodeWithResponse(ctx context.Context, body ExchangeDeviceCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*ExchangeDeviceCodeResponse, error)

	// RefreshAccessTokenWithBodyWithResponse Rotate the refresh token and mint a new access token.
	//
	// 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 /api/v1/auth/tokens/refresh (the `RefreshAccessToken` operationId).
	RefreshAccessTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RefreshAccessTokenResponse, error)

	// RefreshAccessTokenWithResponse Rotate the refresh token and mint a new access token.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/auth/tokens/refresh (the `RefreshAccessToken` operationId).
	RefreshAccessTokenWithResponse(ctx context.Context, body RefreshAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*RefreshAccessTokenResponse, error)

	// ListNetworkDevicesWithResponse List network devices.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/networks/devices (the `ListNetworkDevices` operationId).
	ListNetworkDevicesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListNetworkDevicesResponse, error)

	// CreateNetworkDeviceWithBodyWithResponse Create a network device.
	//
	// 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 /api/v1/networks/devices (the `CreateNetworkDevice` operationId).
	CreateNetworkDeviceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateNetworkDeviceResponse, error)

	// CreateNetworkDeviceWithResponse Create a network device.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/networks/devices (the `CreateNetworkDevice` operationId).
	CreateNetworkDeviceWithResponse(ctx context.Context, body CreateNetworkDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateNetworkDeviceResponse, error)

	// DeleteNetworkDeviceWithResponse Delete a network device.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /api/v1/networks/devices/{id} (the `DeleteNetworkDevice` operationId).
	DeleteNetworkDeviceWithResponse(ctx context.Context, id DeviceId, reqEditors ...RequestEditorFn) (*DeleteNetworkDeviceResponse, error)

	// GetNetworkDeviceWithResponse Get one network device.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/networks/devices/{id} (the `GetNetworkDevice` operationId).
	GetNetworkDeviceWithResponse(ctx context.Context, id DeviceId, reqEditors ...RequestEditorFn) (*GetNetworkDeviceResponse, error)

	// PatchNetworkDeviceWithBodyWithResponse Update a network device.
	//
	// 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 /api/v1/networks/devices/{id} (the `PatchNetworkDevice` operationId).
	PatchNetworkDeviceWithBodyWithResponse(ctx context.Context, id DeviceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchNetworkDeviceResponse, error)

	// PatchNetworkDeviceWithResponse Update a network device.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PATCH /api/v1/networks/devices/{id} (the `PatchNetworkDevice` operationId).
	PatchNetworkDeviceWithResponse(ctx context.Context, id DeviceId, body PatchNetworkDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchNetworkDeviceResponse, error)

	// ListVlansWithResponse List VLAN definitions.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/networks/vlans (the `ListVlans` operationId).
	ListVlansWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListVlansResponse, error)

	// CreateVlanWithBodyWithResponse Create a VLAN definition.
	//
	// 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 /api/v1/networks/vlans (the `CreateVlan` operationId).
	CreateVlanWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateVlanResponse, error)

	// CreateVlanWithResponse Create a VLAN definition.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/networks/vlans (the `CreateVlan` operationId).
	CreateVlanWithResponse(ctx context.Context, body CreateVlanJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateVlanResponse, error)

	// DeleteVlanWithResponse Delete a VLAN definition by VLAN number.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /api/v1/networks/vlans/{vlan_id} (the `DeleteVlan` operationId).
	DeleteVlanWithResponse(ctx context.Context, vlanId VlanId, reqEditors ...RequestEditorFn) (*DeleteVlanResponse, error)

	// GetVlanWithResponse Get one VLAN definition by VLAN number.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/networks/vlans/{vlan_id} (the `GetVlan` operationId).
	GetVlanWithResponse(ctx context.Context, vlanId VlanId, reqEditors ...RequestEditorFn) (*GetVlanResponse, error)

	// PatchVlanWithBodyWithResponse Update a VLAN definition by VLAN number.
	//
	// 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 /api/v1/networks/vlans/{vlan_id} (the `PatchVlan` operationId).
	PatchVlanWithBodyWithResponse(ctx context.Context, vlanId VlanId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchVlanResponse, error)

	// PatchVlanWithResponse Update a VLAN definition by VLAN number.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PATCH /api/v1/networks/vlans/{vlan_id} (the `PatchVlan` operationId).
	PatchVlanWithResponse(ctx context.Context, vlanId VlanId, body PatchVlanJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchVlanResponse, error)

	// GetProfileWithResponse Get the current authenticated user's profile.
	//
	// Returns the current user's identity and group membership after the API resolves the caller from either trusted forward-auth headers or a bearer JWT.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/profile (the `GetProfile` operationId).
	GetProfileWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetProfileResponse, error)

	// ListProfileSessionsWithResponse List active auth sessions for the current user.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/profile/sessions (the `ListProfileSessions` operationId).
	ListProfileSessionsWithResponse(ctx context.Context, params *ListProfileSessionsParams, reqEditors ...RequestEditorFn) (*ListProfileSessionsResponse, error)

	// RevokeOtherProfileSessionsWithResponse Revoke all other active sessions for the current user.
	//
	// For bearer-authenticated callers, the current bearer session is kept and other active API sessions are revoked. For forward-auth browser callers, all active API sessions for the user are revoked.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/profile/sessions/revoke_others (the `RevokeOtherProfileSessions` operationId).
	RevokeOtherProfileSessionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RevokeOtherProfileSessionsResponse, error)

	// RevokeProfileSessionWithResponse Revoke one active session belonging to the current user.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/profile/sessions/{id}/revoke (the `RevokeProfileSession` operationId).
	RevokeProfileSessionWithResponse(ctx context.Context, id SessionId, reqEditors ...RequestEditorFn) (*RevokeProfileSessionResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type Conflict

type Conflict = ErrorResponse

Conflict defines model for Conflict.

type CreateDeviceCodeJSONRequestBody

type CreateDeviceCodeJSONRequestBody = DeviceCodeCreateRequest

CreateDeviceCodeJSONRequestBody defines body for CreateDeviceCode for application/json ContentType.

type CreateDeviceCodeResponse

type CreateDeviceCodeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *DeviceCode
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *TooManyRequests
}

func ParseCreateDeviceCodeResponse

func ParseCreateDeviceCodeResponse(rsp *http.Response) (*CreateDeviceCodeResponse, error)

ParseCreateDeviceCodeResponse parses an HTTP response from a CreateDeviceCodeWithResponse call

func (CreateDeviceCodeResponse) ContentType

func (r CreateDeviceCodeResponse) ContentType() string

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

func (CreateDeviceCodeResponse) GetBody

func (r CreateDeviceCodeResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (CreateDeviceCodeResponse) GetJSON201

func (r CreateDeviceCodeResponse) GetJSON201() *DeviceCode

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (CreateDeviceCodeResponse) GetJSON429

func (r CreateDeviceCodeResponse) GetJSON429() *TooManyRequests

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (CreateDeviceCodeResponse) Status

func (r CreateDeviceCodeResponse) Status() string

Status returns HTTPResponse.Status

func (CreateDeviceCodeResponse) StatusCode

func (r CreateDeviceCodeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateNetworkDeviceJSONRequestBody

type CreateNetworkDeviceJSONRequestBody = NetworkDeviceWrite

CreateNetworkDeviceJSONRequestBody defines body for CreateNetworkDevice for application/json ContentType.

type CreateNetworkDeviceResponse

type CreateNetworkDeviceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *NetworkDevice
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *Conflict
}

func ParseCreateNetworkDeviceResponse

func ParseCreateNetworkDeviceResponse(rsp *http.Response) (*CreateNetworkDeviceResponse, error)

ParseCreateNetworkDeviceResponse parses an HTTP response from a CreateNetworkDeviceWithResponse call

func (CreateNetworkDeviceResponse) ContentType

func (r CreateNetworkDeviceResponse) ContentType() string

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

func (CreateNetworkDeviceResponse) GetBody

func (r CreateNetworkDeviceResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (CreateNetworkDeviceResponse) GetJSON201

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (CreateNetworkDeviceResponse) GetJSON400

func (r CreateNetworkDeviceResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (CreateNetworkDeviceResponse) GetJSON401

func (r CreateNetworkDeviceResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (CreateNetworkDeviceResponse) GetJSON403

func (r CreateNetworkDeviceResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (CreateNetworkDeviceResponse) GetJSON409

func (r CreateNetworkDeviceResponse) GetJSON409() *Conflict

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (CreateNetworkDeviceResponse) Status

Status returns HTTPResponse.Status

func (CreateNetworkDeviceResponse) StatusCode

func (r CreateNetworkDeviceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateVlanJSONRequestBody

type CreateVlanJSONRequestBody = VlanWrite

CreateVlanJSONRequestBody defines body for CreateVlan for application/json ContentType.

type CreateVlanResponse

type CreateVlanResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *Vlan
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *Conflict
}

func ParseCreateVlanResponse

func ParseCreateVlanResponse(rsp *http.Response) (*CreateVlanResponse, error)

ParseCreateVlanResponse parses an HTTP response from a CreateVlanWithResponse call

func (CreateVlanResponse) ContentType

func (r CreateVlanResponse) ContentType() string

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

func (CreateVlanResponse) GetBody

func (r CreateVlanResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (CreateVlanResponse) GetJSON201

func (r CreateVlanResponse) GetJSON201() *Vlan

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (CreateVlanResponse) GetJSON400

func (r CreateVlanResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (CreateVlanResponse) GetJSON401

func (r CreateVlanResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (CreateVlanResponse) GetJSON403

func (r CreateVlanResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (CreateVlanResponse) GetJSON409

func (r CreateVlanResponse) GetJSON409() *Conflict

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (CreateVlanResponse) Status

func (r CreateVlanResponse) Status() string

Status returns HTTPResponse.Status

func (CreateVlanResponse) StatusCode

func (r CreateVlanResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteNetworkDeviceResponse

type DeleteNetworkDeviceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
}

func ParseDeleteNetworkDeviceResponse

func ParseDeleteNetworkDeviceResponse(rsp *http.Response) (*DeleteNetworkDeviceResponse, error)

ParseDeleteNetworkDeviceResponse parses an HTTP response from a DeleteNetworkDeviceWithResponse call

func (DeleteNetworkDeviceResponse) ContentType

func (r DeleteNetworkDeviceResponse) ContentType() string

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

func (DeleteNetworkDeviceResponse) GetBody

func (r DeleteNetworkDeviceResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteNetworkDeviceResponse) GetJSON400

func (r DeleteNetworkDeviceResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (DeleteNetworkDeviceResponse) GetJSON401

func (r DeleteNetworkDeviceResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (DeleteNetworkDeviceResponse) GetJSON403

func (r DeleteNetworkDeviceResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (DeleteNetworkDeviceResponse) Status

Status returns HTTPResponse.Status

func (DeleteNetworkDeviceResponse) StatusCode

func (r DeleteNetworkDeviceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteVlanResponse

type DeleteVlanResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *Conflict
}

func ParseDeleteVlanResponse

func ParseDeleteVlanResponse(rsp *http.Response) (*DeleteVlanResponse, error)

ParseDeleteVlanResponse parses an HTTP response from a DeleteVlanWithResponse call

func (DeleteVlanResponse) ContentType

func (r DeleteVlanResponse) ContentType() string

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

func (DeleteVlanResponse) GetBody

func (r DeleteVlanResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteVlanResponse) GetJSON400

func (r DeleteVlanResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (DeleteVlanResponse) GetJSON401

func (r DeleteVlanResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (DeleteVlanResponse) GetJSON403

func (r DeleteVlanResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (DeleteVlanResponse) GetJSON409

func (r DeleteVlanResponse) GetJSON409() *Conflict

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (DeleteVlanResponse) Status

func (r DeleteVlanResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteVlanResponse) StatusCode

func (r DeleteVlanResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DenyDeviceCodeResponse

type DenyDeviceCodeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *Conflict
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *TooManyRequests
}

func ParseDenyDeviceCodeResponse

func ParseDenyDeviceCodeResponse(rsp *http.Response) (*DenyDeviceCodeResponse, error)

ParseDenyDeviceCodeResponse parses an HTTP response from a DenyDeviceCodeWithResponse call

func (DenyDeviceCodeResponse) ContentType

func (r DenyDeviceCodeResponse) ContentType() string

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

func (DenyDeviceCodeResponse) GetBody

func (r DenyDeviceCodeResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DenyDeviceCodeResponse) GetJSON400

func (r DenyDeviceCodeResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (DenyDeviceCodeResponse) GetJSON401

func (r DenyDeviceCodeResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (DenyDeviceCodeResponse) GetJSON404

func (r DenyDeviceCodeResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (DenyDeviceCodeResponse) GetJSON409

func (r DenyDeviceCodeResponse) GetJSON409() *Conflict

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (DenyDeviceCodeResponse) GetJSON429

func (r DenyDeviceCodeResponse) GetJSON429() *TooManyRequests

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (DenyDeviceCodeResponse) Status

func (r DenyDeviceCodeResponse) Status() string

Status returns HTTPResponse.Status

func (DenyDeviceCodeResponse) StatusCode

func (r DenyDeviceCodeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeviceCode

type DeviceCode struct {
	DeviceCode              string `json:"device_code"`
	ExpiresIn               int32  `json:"expires_in"`
	Interval                int32  `json:"interval"`
	UserCode                string `json:"user_code"`
	VerificationUri         string `json:"verification_uri"`
	VerificationUriComplete string `json:"verification_uri_complete"`
}

DeviceCode defines model for DeviceCode.

type DeviceCodeCreateRequest

type DeviceCodeCreateRequest struct {
	ClientName *string `json:"client_name,omitempty"`
}

DeviceCodeCreateRequest defines model for DeviceCodeCreateRequest.

type DeviceCodeTokenRequest

type DeviceCodeTokenRequest struct {
	DeviceCode string `json:"device_code"`
}

DeviceCodeTokenRequest defines model for DeviceCodeTokenRequest.

type DeviceId

type DeviceId = openapi_types.UUID

DeviceId defines model for DeviceId.

type ErrorResponse

type ErrorResponse struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

ErrorResponse defines model for ErrorResponse.

type ExchangeDeviceCodeJSONRequestBody

type ExchangeDeviceCodeJSONRequestBody = DeviceCodeTokenRequest

ExchangeDeviceCodeJSONRequestBody defines body for ExchangeDeviceCode for application/json ContentType.

type ExchangeDeviceCodeResponse

type ExchangeDeviceCodeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *TokenResponse
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *ClientAuthError
	// JSON428 the response for an HTTP 428 `application/json` response
	JSON428 *ClientAuthError
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *TooManyRequests
}

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() *TokenResponse

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ExchangeDeviceCodeResponse) GetJSON400

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (ExchangeDeviceCodeResponse) GetJSON428

GetJSON428 returns the response for an HTTP 428 `application/json` response

func (ExchangeDeviceCodeResponse) GetJSON429

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (ExchangeDeviceCodeResponse) Status

Status returns HTTPResponse.Status

func (ExchangeDeviceCodeResponse) StatusCode

func (r ExchangeDeviceCodeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Forbidden

type Forbidden = ErrorResponse

Forbidden defines model for Forbidden.

type GetNetworkDeviceResponse

type GetNetworkDeviceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *NetworkDevice
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
}

func ParseGetNetworkDeviceResponse

func ParseGetNetworkDeviceResponse(rsp *http.Response) (*GetNetworkDeviceResponse, error)

ParseGetNetworkDeviceResponse parses an HTTP response from a GetNetworkDeviceWithResponse call

func (GetNetworkDeviceResponse) ContentType

func (r GetNetworkDeviceResponse) ContentType() string

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

func (GetNetworkDeviceResponse) GetBody

func (r GetNetworkDeviceResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetNetworkDeviceResponse) GetJSON200

func (r GetNetworkDeviceResponse) GetJSON200() *NetworkDevice

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetNetworkDeviceResponse) GetJSON400

func (r GetNetworkDeviceResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (GetNetworkDeviceResponse) GetJSON401

func (r GetNetworkDeviceResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetNetworkDeviceResponse) GetJSON403

func (r GetNetworkDeviceResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetNetworkDeviceResponse) GetJSON404

func (r GetNetworkDeviceResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetNetworkDeviceResponse) Status

func (r GetNetworkDeviceResponse) Status() string

Status returns HTTPResponse.Status

func (GetNetworkDeviceResponse) StatusCode

func (r GetNetworkDeviceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetProfileResponse

type GetProfileResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Profile
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
}

func ParseGetProfileResponse

func ParseGetProfileResponse(rsp *http.Response) (*GetProfileResponse, error)

ParseGetProfileResponse parses an HTTP response from a GetProfileWithResponse call

func (GetProfileResponse) ContentType

func (r GetProfileResponse) ContentType() string

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

func (GetProfileResponse) GetBody

func (r GetProfileResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetProfileResponse) GetJSON200

func (r GetProfileResponse) GetJSON200() *Profile

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetProfileResponse) GetJSON401

func (r GetProfileResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetProfileResponse) Status

func (r GetProfileResponse) Status() string

Status returns HTTPResponse.Status

func (GetProfileResponse) StatusCode

func (r GetProfileResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetVlanResponse

type GetVlanResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Vlan
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
}

func ParseGetVlanResponse

func ParseGetVlanResponse(rsp *http.Response) (*GetVlanResponse, error)

ParseGetVlanResponse parses an HTTP response from a GetVlanWithResponse call

func (GetVlanResponse) ContentType

func (r GetVlanResponse) ContentType() string

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

func (GetVlanResponse) GetBody

func (r GetVlanResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetVlanResponse) GetJSON200

func (r GetVlanResponse) GetJSON200() *Vlan

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetVlanResponse) GetJSON400

func (r GetVlanResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (GetVlanResponse) GetJSON401

func (r GetVlanResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetVlanResponse) GetJSON403

func (r GetVlanResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetVlanResponse) GetJSON404

func (r GetVlanResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetVlanResponse) Status

func (r GetVlanResponse) Status() string

Status returns HTTPResponse.Status

func (GetVlanResponse) StatusCode

func (r GetVlanResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type ListAdminAuditLogsParams

type ListAdminAuditLogsParams struct {
	Action        *string `form:"action,omitempty" json:"action,omitempty"`
	ResourceType  *string `form:"resource_type,omitempty" json:"resource_type,omitempty"`
	ResourceId    *string `form:"resource_id,omitempty" json:"resource_id,omitempty"`
	ActorUsername *string `form:"actor_username,omitempty" json:"actor_username,omitempty"`
	Limit         *int32  `form:"limit,omitempty" json:"limit,omitempty"`
	Offset        *int32  `form:"offset,omitempty" json:"offset,omitempty"`
}

ListAdminAuditLogsParams defines parameters for ListAdminAuditLogs.

type ListAdminAuditLogsResponse

type ListAdminAuditLogsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *AuditLogList
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
}

func ParseListAdminAuditLogsResponse

func ParseListAdminAuditLogsResponse(rsp *http.Response) (*ListAdminAuditLogsResponse, error)

ParseListAdminAuditLogsResponse parses an HTTP response from a ListAdminAuditLogsWithResponse call

func (ListAdminAuditLogsResponse) ContentType

func (r ListAdminAuditLogsResponse) ContentType() string

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

func (ListAdminAuditLogsResponse) GetBody

func (r ListAdminAuditLogsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListAdminAuditLogsResponse) GetJSON200

func (r ListAdminAuditLogsResponse) GetJSON200() *AuditLogList

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListAdminAuditLogsResponse) GetJSON400

func (r ListAdminAuditLogsResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (ListAdminAuditLogsResponse) GetJSON401

func (r ListAdminAuditLogsResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ListAdminAuditLogsResponse) GetJSON403

func (r ListAdminAuditLogsResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ListAdminAuditLogsResponse) Status

Status returns HTTPResponse.Status

func (ListAdminAuditLogsResponse) StatusCode

func (r ListAdminAuditLogsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListAdminAuthSessionsParams

type ListAdminAuthSessionsParams struct {
	Limit  *int32 `form:"limit,omitempty" json:"limit,omitempty"`
	Offset *int32 `form:"offset,omitempty" json:"offset,omitempty"`
}

ListAdminAuthSessionsParams defines parameters for ListAdminAuthSessions.

type ListAdminAuthSessionsResponse

type ListAdminAuthSessionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *AuthSessionPage
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
}

func ParseListAdminAuthSessionsResponse

func ParseListAdminAuthSessionsResponse(rsp *http.Response) (*ListAdminAuthSessionsResponse, error)

ParseListAdminAuthSessionsResponse parses an HTTP response from a ListAdminAuthSessionsWithResponse call

func (ListAdminAuthSessionsResponse) ContentType

func (r ListAdminAuthSessionsResponse) ContentType() string

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

func (ListAdminAuthSessionsResponse) GetBody

func (r ListAdminAuthSessionsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListAdminAuthSessionsResponse) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListAdminAuthSessionsResponse) GetJSON401

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ListAdminAuthSessionsResponse) GetJSON403

func (r ListAdminAuthSessionsResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ListAdminAuthSessionsResponse) Status

Status returns HTTPResponse.Status

func (ListAdminAuthSessionsResponse) StatusCode

func (r ListAdminAuthSessionsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListNetworkDevicesResponse

type ListNetworkDevicesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *NetworkDeviceList
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
}

func ParseListNetworkDevicesResponse

func ParseListNetworkDevicesResponse(rsp *http.Response) (*ListNetworkDevicesResponse, error)

ParseListNetworkDevicesResponse parses an HTTP response from a ListNetworkDevicesWithResponse call

func (ListNetworkDevicesResponse) ContentType

func (r ListNetworkDevicesResponse) ContentType() string

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

func (ListNetworkDevicesResponse) GetBody

func (r ListNetworkDevicesResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListNetworkDevicesResponse) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListNetworkDevicesResponse) GetJSON401

func (r ListNetworkDevicesResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ListNetworkDevicesResponse) GetJSON403

func (r ListNetworkDevicesResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ListNetworkDevicesResponse) Status

Status returns HTTPResponse.Status

func (ListNetworkDevicesResponse) StatusCode

func (r ListNetworkDevicesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListProfileSessionsParams

type ListProfileSessionsParams struct {
	Limit  *int32 `form:"limit,omitempty" json:"limit,omitempty"`
	Offset *int32 `form:"offset,omitempty" json:"offset,omitempty"`
}

ListProfileSessionsParams defines parameters for ListProfileSessions.

type ListProfileSessionsResponse

type ListProfileSessionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *AuthSessionPage
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
}

func ParseListProfileSessionsResponse

func ParseListProfileSessionsResponse(rsp *http.Response) (*ListProfileSessionsResponse, error)

ParseListProfileSessionsResponse parses an HTTP response from a ListProfileSessionsWithResponse call

func (ListProfileSessionsResponse) ContentType

func (r ListProfileSessionsResponse) ContentType() string

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

func (ListProfileSessionsResponse) GetBody

func (r ListProfileSessionsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListProfileSessionsResponse) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListProfileSessionsResponse) GetJSON401

func (r ListProfileSessionsResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ListProfileSessionsResponse) Status

Status returns HTTPResponse.Status

func (ListProfileSessionsResponse) StatusCode

func (r ListProfileSessionsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListVlansResponse

type ListVlansResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *VlanList
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
}

func ParseListVlansResponse

func ParseListVlansResponse(rsp *http.Response) (*ListVlansResponse, error)

ParseListVlansResponse parses an HTTP response from a ListVlansWithResponse call

func (ListVlansResponse) ContentType

func (r ListVlansResponse) ContentType() string

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

func (ListVlansResponse) GetBody

func (r ListVlansResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListVlansResponse) GetJSON200

func (r ListVlansResponse) GetJSON200() *VlanList

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListVlansResponse) GetJSON401

func (r ListVlansResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ListVlansResponse) GetJSON403

func (r ListVlansResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ListVlansResponse) Status

func (r ListVlansResponse) Status() string

Status returns HTTPResponse.Status

func (ListVlansResponse) StatusCode

func (r ListVlansResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LogoutRequest

type LogoutRequest struct {
	RefreshToken string `json:"refresh_token"`
}

LogoutRequest defines model for LogoutRequest.

type LogoutSessionJSONRequestBody

type LogoutSessionJSONRequestBody = LogoutRequest

LogoutSessionJSONRequestBody defines body for LogoutSession for application/json ContentType.

type LogoutSessionResponse

type LogoutSessionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
}

func ParseLogoutSessionResponse

func ParseLogoutSessionResponse(rsp *http.Response) (*LogoutSessionResponse, error)

ParseLogoutSessionResponse parses an HTTP response from a LogoutSessionWithResponse call

func (LogoutSessionResponse) ContentType

func (r LogoutSessionResponse) ContentType() string

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

func (LogoutSessionResponse) GetBody

func (r LogoutSessionResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (LogoutSessionResponse) GetJSON400

func (r LogoutSessionResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (LogoutSessionResponse) Status

func (r LogoutSessionResponse) Status() string

Status returns HTTPResponse.Status

func (LogoutSessionResponse) StatusCode

func (r LogoutSessionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type NetworkDevice

type NetworkDevice struct {
	CreatedAt       time.Time           `json:"created_at"`
	CreatedByUserId *openapi_types.UUID `json:"created_by_user_id,omitempty"`
	Disabled        bool                `json:"disabled"`
	DisplayName     string              `json:"display_name"`
	Id              openapi_types.UUID  `json:"id"`

	// MacAddress Example: aa:bb:cc:dd:ee:ff
	MacAddress      string              `json:"mac_address"`
	UpdatedAt       time.Time           `json:"updated_at"`
	UpdatedByUserId *openapi_types.UUID `json:"updated_by_user_id,omitempty"`
	Vlan            VlanRef             `json:"vlan"`
}

NetworkDevice defines model for NetworkDevice.

type NetworkDeviceList

type NetworkDeviceList struct {
	Items []NetworkDevice `json:"items"`
}

NetworkDeviceList defines model for NetworkDeviceList.

type NetworkDevicePatch

type NetworkDevicePatch struct {
	Disabled    *bool   `json:"disabled,omitempty"`
	DisplayName *string `json:"display_name,omitempty"`

	// MacAddress Example: aa:bb:cc:dd:ee:ff
	MacAddress *string `json:"mac_address,omitempty"`
	VlanId     *int32  `json:"vlan_id,omitempty"`
}

NetworkDevicePatch defines model for NetworkDevicePatch.

type NetworkDeviceWrite

type NetworkDeviceWrite struct {
	Disabled    *bool  `json:"disabled,omitempty"`
	DisplayName string `json:"display_name"`

	// MacAddress Example: aa:bb:cc:dd:ee:ff
	MacAddress string `json:"mac_address"`
	VlanId     int32  `json:"vlan_id"`
}

NetworkDeviceWrite defines model for NetworkDeviceWrite.

type NotFound

type NotFound = ErrorResponse

NotFound defines model for NotFound.

type PatchNetworkDeviceJSONRequestBody

type PatchNetworkDeviceJSONRequestBody = NetworkDevicePatch

PatchNetworkDeviceJSONRequestBody defines body for PatchNetworkDevice for application/json ContentType.

type PatchNetworkDeviceResponse

type PatchNetworkDeviceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *NetworkDevice
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *Conflict
}

func ParsePatchNetworkDeviceResponse

func ParsePatchNetworkDeviceResponse(rsp *http.Response) (*PatchNetworkDeviceResponse, error)

ParsePatchNetworkDeviceResponse parses an HTTP response from a PatchNetworkDeviceWithResponse call

func (PatchNetworkDeviceResponse) ContentType

func (r PatchNetworkDeviceResponse) ContentType() string

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

func (PatchNetworkDeviceResponse) GetBody

func (r PatchNetworkDeviceResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (PatchNetworkDeviceResponse) GetJSON200

func (r PatchNetworkDeviceResponse) GetJSON200() *NetworkDevice

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (PatchNetworkDeviceResponse) GetJSON400

func (r PatchNetworkDeviceResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (PatchNetworkDeviceResponse) GetJSON401

func (r PatchNetworkDeviceResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (PatchNetworkDeviceResponse) GetJSON403

func (r PatchNetworkDeviceResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (PatchNetworkDeviceResponse) GetJSON404

func (r PatchNetworkDeviceResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (PatchNetworkDeviceResponse) GetJSON409

func (r PatchNetworkDeviceResponse) GetJSON409() *Conflict

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (PatchNetworkDeviceResponse) Status

Status returns HTTPResponse.Status

func (PatchNetworkDeviceResponse) StatusCode

func (r PatchNetworkDeviceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PatchVlanJSONRequestBody

type PatchVlanJSONRequestBody = VlanPatch

PatchVlanJSONRequestBody defines body for PatchVlan for application/json ContentType.

type PatchVlanResponse

type PatchVlanResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Vlan
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *Conflict
}

func ParsePatchVlanResponse

func ParsePatchVlanResponse(rsp *http.Response) (*PatchVlanResponse, error)

ParsePatchVlanResponse parses an HTTP response from a PatchVlanWithResponse call

func (PatchVlanResponse) ContentType

func (r PatchVlanResponse) ContentType() string

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

func (PatchVlanResponse) GetBody

func (r PatchVlanResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (PatchVlanResponse) GetJSON200

func (r PatchVlanResponse) GetJSON200() *Vlan

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (PatchVlanResponse) GetJSON400

func (r PatchVlanResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (PatchVlanResponse) GetJSON401

func (r PatchVlanResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (PatchVlanResponse) GetJSON403

func (r PatchVlanResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (PatchVlanResponse) GetJSON404

func (r PatchVlanResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (PatchVlanResponse) GetJSON409

func (r PatchVlanResponse) GetJSON409() *Conflict

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (PatchVlanResponse) Status

func (r PatchVlanResponse) Status() string

Status returns HTTPResponse.Status

func (PatchVlanResponse) StatusCode

func (r PatchVlanResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Profile

type Profile struct {
	Email    openapi_types.Email `json:"email"`
	Groups   []string            `json:"groups"`
	IsAdmin  bool                `json:"is_admin"`
	Name     string              `json:"name"`
	Username string              `json:"username"`
}

Profile defines model for Profile.

type RefreshAccessTokenJSONRequestBody

type RefreshAccessTokenJSONRequestBody = RefreshTokenRequest

RefreshAccessTokenJSONRequestBody defines body for RefreshAccessToken for application/json ContentType.

type RefreshAccessTokenResponse

type RefreshAccessTokenResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *TokenResponse
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *TooManyRequests
}

func ParseRefreshAccessTokenResponse

func ParseRefreshAccessTokenResponse(rsp *http.Response) (*RefreshAccessTokenResponse, error)

ParseRefreshAccessTokenResponse parses an HTTP response from a RefreshAccessTokenWithResponse call

func (RefreshAccessTokenResponse) ContentType

func (r RefreshAccessTokenResponse) ContentType() string

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

func (RefreshAccessTokenResponse) GetBody

func (r RefreshAccessTokenResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (RefreshAccessTokenResponse) GetJSON200

func (r RefreshAccessTokenResponse) GetJSON200() *TokenResponse

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (RefreshAccessTokenResponse) GetJSON400

func (r RefreshAccessTokenResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (RefreshAccessTokenResponse) GetJSON401

func (r RefreshAccessTokenResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (RefreshAccessTokenResponse) GetJSON429

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (RefreshAccessTokenResponse) Status

Status returns HTTPResponse.Status

func (RefreshAccessTokenResponse) StatusCode

func (r RefreshAccessTokenResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RefreshTokenRequest

type RefreshTokenRequest struct {
	RefreshToken string `json:"refresh_token"`
}

RefreshTokenRequest defines model for RefreshTokenRequest.

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type RevokeAdminAuthSessionResponse

type RevokeAdminAuthSessionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
}

func ParseRevokeAdminAuthSessionResponse

func ParseRevokeAdminAuthSessionResponse(rsp *http.Response) (*RevokeAdminAuthSessionResponse, error)

ParseRevokeAdminAuthSessionResponse parses an HTTP response from a RevokeAdminAuthSessionWithResponse call

func (RevokeAdminAuthSessionResponse) ContentType

func (r RevokeAdminAuthSessionResponse) ContentType() string

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

func (RevokeAdminAuthSessionResponse) GetBody

func (r RevokeAdminAuthSessionResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (RevokeAdminAuthSessionResponse) GetJSON400

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (RevokeAdminAuthSessionResponse) GetJSON401

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (RevokeAdminAuthSessionResponse) GetJSON403

func (r RevokeAdminAuthSessionResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (RevokeAdminAuthSessionResponse) Status

Status returns HTTPResponse.Status

func (RevokeAdminAuthSessionResponse) StatusCode

func (r RevokeAdminAuthSessionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RevokeAllAdminAuthSessionsResponse

type RevokeAllAdminAuthSessionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
}

func ParseRevokeAllAdminAuthSessionsResponse

func ParseRevokeAllAdminAuthSessionsResponse(rsp *http.Response) (*RevokeAllAdminAuthSessionsResponse, error)

ParseRevokeAllAdminAuthSessionsResponse parses an HTTP response from a RevokeAllAdminAuthSessionsWithResponse call

func (RevokeAllAdminAuthSessionsResponse) ContentType

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

func (RevokeAllAdminAuthSessionsResponse) GetBody

GetBody returns the raw response body bytes

func (RevokeAllAdminAuthSessionsResponse) GetJSON401

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (RevokeAllAdminAuthSessionsResponse) GetJSON403

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (RevokeAllAdminAuthSessionsResponse) Status

Status returns HTTPResponse.Status

func (RevokeAllAdminAuthSessionsResponse) StatusCode

func (r RevokeAllAdminAuthSessionsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RevokeOtherProfileSessionsResponse

type RevokeOtherProfileSessionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
}

func ParseRevokeOtherProfileSessionsResponse

func ParseRevokeOtherProfileSessionsResponse(rsp *http.Response) (*RevokeOtherProfileSessionsResponse, error)

ParseRevokeOtherProfileSessionsResponse parses an HTTP response from a RevokeOtherProfileSessionsWithResponse call

func (RevokeOtherProfileSessionsResponse) ContentType

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

func (RevokeOtherProfileSessionsResponse) GetBody

GetBody returns the raw response body bytes

func (RevokeOtherProfileSessionsResponse) GetJSON401

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (RevokeOtherProfileSessionsResponse) Status

Status returns HTTPResponse.Status

func (RevokeOtherProfileSessionsResponse) StatusCode

func (r RevokeOtherProfileSessionsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RevokeProfileSessionResponse

type RevokeProfileSessionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *TooManyRequests
}

func ParseRevokeProfileSessionResponse

func ParseRevokeProfileSessionResponse(rsp *http.Response) (*RevokeProfileSessionResponse, error)

ParseRevokeProfileSessionResponse parses an HTTP response from a RevokeProfileSessionWithResponse call

func (RevokeProfileSessionResponse) ContentType

func (r RevokeProfileSessionResponse) ContentType() string

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

func (RevokeProfileSessionResponse) GetBody

func (r RevokeProfileSessionResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (RevokeProfileSessionResponse) GetJSON400

func (r RevokeProfileSessionResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (RevokeProfileSessionResponse) GetJSON401

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (RevokeProfileSessionResponse) GetJSON429

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (RevokeProfileSessionResponse) Status

Status returns HTTPResponse.Status

func (RevokeProfileSessionResponse) StatusCode

func (r RevokeProfileSessionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SessionId

type SessionId = openapi_types.UUID

SessionId defines model for SessionId.

type TokenResponse

type TokenResponse struct {
	AccessToken      string `json:"access_token"`
	ExpiresInSeconds int32  `json:"expires_in_seconds"`
	RefreshToken     string `json:"refresh_token"`

	// TokenType Example: Bearer
	TokenType string `json:"token_type"`
}

TokenResponse defines model for TokenResponse.

type TooManyRequests

type TooManyRequests = ErrorResponse

TooManyRequests defines model for TooManyRequests.

type Unauthorized

type Unauthorized = ErrorResponse

Unauthorized defines model for Unauthorized.

type UserCode

type UserCode = string

UserCode defines model for UserCode.

type Vlan

type Vlan struct {
	CreatedAt   time.Time `json:"created_at"`
	Description string    `json:"description"`
	Name        string    `json:"name"`
	UpdatedAt   time.Time `json:"updated_at"`
	VlanId      int32     `json:"vlan_id"`
}

Vlan defines model for Vlan.

type VlanId

type VlanId = int32

VlanId defines model for VlanId.

type VlanList

type VlanList struct {
	Items []Vlan `json:"items"`
}

VlanList defines model for VlanList.

type VlanPatch

type VlanPatch struct {
	Description *string `json:"description,omitempty"`
	Name        *string `json:"name,omitempty"`
	VlanId      *int32  `json:"vlan_id,omitempty"`
}

VlanPatch defines model for VlanPatch.

type VlanRef

type VlanRef struct {
	Name   string `json:"name"`
	VlanId int32  `json:"vlan_id"`
}

VlanRef defines model for VlanRef.

type VlanWrite

type VlanWrite struct {
	Description *string `json:"description,omitempty"`
	Name        string  `json:"name"`
	VlanId      int32   `json:"vlan_id"`
}

VlanWrite defines model for VlanWrite.

Jump to

Keyboard shortcuts

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