diff --git a/gen/client/v1/client.gen.go b/gen/client/v1/client.gen.go index f2b120a4..359d82d9 100644 --- a/gen/client/v1/client.gen.go +++ b/gen/client/v1/client.gen.go @@ -1,6 +1,6 @@ // Package clientv1 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.1 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT. package clientv1 import ( @@ -17,10 +17,6 @@ import ( "github.com/oapi-codegen/runtime" ) -const ( - BearerScopes bearerContextKey = "bearer.Scopes" -) - // Defines values for NodeRegisterMethod. const ( REGISTERMETHODAUTHKEY NodeRegisterMethod = "REGISTER_METHOD_AUTH_KEY" @@ -151,21 +147,31 @@ type ErrorDetail struct { // ErrorModel defines model for ErrorModel. type ErrorModel struct { // Detail A human-readable explanation specific to this occurrence of the problem. + // + // Example: Property foo is required but is missing. Detail *string `json:"detail,omitempty"` // Errors Optional list of individual error details Errors *[]ErrorDetail `json:"errors,omitempty"` // Instance A URI reference that identifies the specific occurrence of the problem. + // + // Example: https://example.com/error-log/abc123 Instance *string `json:"instance,omitempty"` // Status HTTP status code + // + // Example: 400 Status *int64 `json:"status,omitempty"` // Title A short, human-readable summary of the problem type. This value should not change between occurrences of the error. + // + // Example: Bad Request Title *string `json:"title,omitempty"` // Type A URI reference to human-readable documentation for the error. + // + // Example: https://example.com/errors/example Type *string `json:"type,omitempty"` } @@ -316,9 +322,6 @@ type UserOutputBody struct { User User `json:"user"` } -// bearerContextKey is the context key for bearer security scheme -type bearerContextKey string - // DeleteApiKeyParams defines parameters for DeleteApiKey. type DeleteApiKeyParams struct { Id *string `form:"id,omitempty" json:"id,omitempty"` @@ -394,7 +397,7 @@ type ExpirePreAuthKeyJSONRequestBody = ExpirePreAuthKeyRequestBody // CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType. type CreateUserJSONRequestBody = CreateUserRequestBody -// RequestEditorFn is the function signature for the RequestEditor callback function +// RequestEditorFn is the function signature for the RequestEditor callback function type RequestEditorFn func(ctx context.Context, req *http.Request) error // Doer performs HTTP requests. @@ -467,122 +470,288 @@ func WithRequestEditorFn(fn RequestEditorFn) ClientOption { // The interface specification for the client above. type ClientInterface interface { - // ListApiKeys request + + // ListApiKeys List API keys + // + // Corresponds with GET /api/v1/apikey (the `ListApiKeys` operationId). ListApiKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateApiKeyWithBody request with any body + // CreateApiKeyWithBody Create API key + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /api/v1/apikey (the `CreateApiKey` operationId). CreateApiKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateApiKey Create API key + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /api/v1/apikey (the `CreateApiKey` operationId). CreateApiKey(ctx context.Context, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ExpireApiKeyWithBody request with any body + // ExpireApiKeyWithBody Expire API key + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /api/v1/apikey/expire (the `ExpireApiKey` operationId). ExpireApiKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // ExpireApiKey Expire API key + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /api/v1/apikey/expire (the `ExpireApiKey` operationId). ExpireApiKey(ctx context.Context, body ExpireApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteApiKey request + // DeleteApiKey Delete API key + // + // Corresponds with DELETE /api/v1/apikey/{prefix} (the `DeleteApiKey` operationId). DeleteApiKey(ctx context.Context, prefix string, params *DeleteApiKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // AuthApproveWithBody request with any body + // AuthApproveWithBody Approve a pending auth session + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /api/v1/auth/approve (the `AuthApprove` operationId). AuthApproveWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // AuthApprove Approve a pending auth session + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /api/v1/auth/approve (the `AuthApprove` operationId). AuthApprove(ctx context.Context, body AuthApproveJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // AuthRegisterWithBody request with any body + // AuthRegisterWithBody Register node via auth flow + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /api/v1/auth/register (the `AuthRegister` operationId). AuthRegisterWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // AuthRegister Register node via auth flow + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /api/v1/auth/register (the `AuthRegister` operationId). AuthRegister(ctx context.Context, body AuthRegisterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // AuthRejectWithBody request with any body + // AuthRejectWithBody Reject a pending auth session + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /api/v1/auth/reject (the `AuthReject` operationId). AuthRejectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // AuthReject Reject a pending auth session + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /api/v1/auth/reject (the `AuthReject` operationId). AuthReject(ctx context.Context, body AuthRejectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // DebugCreateNodeWithBody request with any body + // DebugCreateNodeWithBody Debug create node + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /api/v1/debug/node (the `DebugCreateNode` operationId). DebugCreateNodeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // DebugCreateNode Debug create node + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /api/v1/debug/node (the `DebugCreateNode` operationId). DebugCreateNode(ctx context.Context, body DebugCreateNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // Health request + // Health Health check + // + // Reports server health, including database connectivity. + // + // Corresponds with GET /api/v1/health (the `Health` operationId). Health(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListNodes request + // ListNodes List nodes + // + // Corresponds with GET /api/v1/node (the `ListNodes` operationId). ListNodes(ctx context.Context, params *ListNodesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // BackfillNodeIPs request + // BackfillNodeIPs Backfill node IPs + // + // Corresponds with POST /api/v1/node/backfillips (the `BackfillNodeIPs` operationId). BackfillNodeIPs(ctx context.Context, params *BackfillNodeIPsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // RegisterNode request + // RegisterNode Register node + // + // Corresponds with POST /api/v1/node/register (the `RegisterNode` operationId). RegisterNode(ctx context.Context, params *RegisterNodeParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteNode request + // DeleteNode Delete node + // + // Corresponds with DELETE /api/v1/node/{nodeId} (the `DeleteNode` operationId). DeleteNode(ctx context.Context, nodeId string, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetNode request + // GetNode Get node + // + // Corresponds with GET /api/v1/node/{nodeId} (the `GetNode` operationId). GetNode(ctx context.Context, nodeId string, reqEditors ...RequestEditorFn) (*http.Response, error) - // SetApprovedRoutesWithBody request with any body + // SetApprovedRoutesWithBody Set approved routes + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /api/v1/node/{nodeId}/approve_routes (the `SetApprovedRoutes` operationId). SetApprovedRoutesWithBody(ctx context.Context, nodeId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // SetApprovedRoutes Set approved routes + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /api/v1/node/{nodeId}/approve_routes (the `SetApprovedRoutes` operationId). SetApprovedRoutes(ctx context.Context, nodeId string, body SetApprovedRoutesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ExpireNodeWithBody request with any body + // ExpireNodeWithBody Expire node + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /api/v1/node/{nodeId}/expire (the `ExpireNode` operationId). ExpireNodeWithBody(ctx context.Context, nodeId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // ExpireNode Expire node + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /api/v1/node/{nodeId}/expire (the `ExpireNode` operationId). ExpireNode(ctx context.Context, nodeId string, body ExpireNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // RenameNode request + // RenameNode Rename node + // + // Corresponds with POST /api/v1/node/{nodeId}/rename/{newName} (the `RenameNode` operationId). RenameNode(ctx context.Context, nodeId string, newName string, reqEditors ...RequestEditorFn) (*http.Response, error) - // SetTagsWithBody request with any body + // SetTagsWithBody Set tags + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /api/v1/node/{nodeId}/tags (the `SetTags` operationId). SetTagsWithBody(ctx context.Context, nodeId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // SetTags Set tags + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /api/v1/node/{nodeId}/tags (the `SetTags` operationId). SetTags(ctx context.Context, nodeId string, body SetTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetPolicy request + // GetPolicy Get policy + // + // Corresponds with GET /api/v1/policy (the `GetPolicy` operationId). GetPolicy(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - // SetPolicyWithBody request with any body + // SetPolicyWithBody Set policy + // + // Takes any type of body and a specified content type. + // + // Corresponds with PUT /api/v1/policy (the `SetPolicy` operationId). SetPolicyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // SetPolicy Set policy + // + // Takes a body of the `application/json` content type. + // + // Corresponds with PUT /api/v1/policy (the `SetPolicy` operationId). SetPolicy(ctx context.Context, body SetPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // CheckPolicyWithBody request with any body + // CheckPolicyWithBody Check policy + // + // Validates the given policy against the server's live users and nodes without persisting it. + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /api/v1/policy/check (the `CheckPolicy` operationId). CheckPolicyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // CheckPolicy Check policy + // + // Validates the given policy against the server's live users and nodes without persisting it. + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /api/v1/policy/check (the `CheckPolicy` operationId). CheckPolicy(ctx context.Context, body CheckPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeletePreAuthKey request + // DeletePreAuthKey Delete pre-auth key + // + // Corresponds with DELETE /api/v1/preauthkey (the `DeletePreAuthKey` operationId). DeletePreAuthKey(ctx context.Context, params *DeletePreAuthKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListPreAuthKeys request + // ListPreAuthKeys List pre-auth keys + // + // Corresponds with GET /api/v1/preauthkey (the `ListPreAuthKeys` operationId). ListPreAuthKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreatePreAuthKeyWithBody request with any body + // CreatePreAuthKeyWithBody Create pre-auth key + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /api/v1/preauthkey (the `CreatePreAuthKey` operationId). CreatePreAuthKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreatePreAuthKey Create pre-auth key + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /api/v1/preauthkey (the `CreatePreAuthKey` operationId). CreatePreAuthKey(ctx context.Context, body CreatePreAuthKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ExpirePreAuthKeyWithBody request with any body + // ExpirePreAuthKeyWithBody Expire pre-auth key + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /api/v1/preauthkey/expire (the `ExpirePreAuthKey` operationId). ExpirePreAuthKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // ExpirePreAuthKey Expire pre-auth key + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /api/v1/preauthkey/expire (the `ExpirePreAuthKey` operationId). ExpirePreAuthKey(ctx context.Context, body ExpirePreAuthKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListUsers request + // ListUsers List users + // + // Corresponds with GET /api/v1/user (the `ListUsers` operationId). ListUsers(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateUserWithBody request with any body + // CreateUserWithBody Create user + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /api/v1/user (the `CreateUser` operationId). CreateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateUser Create user + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /api/v1/user (the `CreateUser` operationId). CreateUser(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteUser request + // DeleteUser Delete user + // + // Corresponds with DELETE /api/v1/user/{id} (the `DeleteUser` operationId). DeleteUser(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) - // RenameUser request + // RenameUser Rename user + // + // Corresponds with POST /api/v1/user/{oldId}/rename/{newName} (the `RenameUser` operationId). RenameUser(ctx context.Context, oldId string, newName string, reqEditors ...RequestEditorFn) (*http.Response, error) } +// ListApiKeys List API keys +// +// Corresponds with GET /api/v1/apikey (the `ListApiKeys` operationId). func (c *Client) ListApiKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListApiKeysRequest(c.Server) if err != nil { @@ -595,6 +764,11 @@ func (c *Client) ListApiKeys(ctx context.Context, reqEditors ...RequestEditorFn) return c.Client.Do(req) } +// CreateApiKeyWithBody Create API key +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /api/v1/apikey (the `CreateApiKey` operationId). func (c *Client) CreateApiKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCreateApiKeyRequestWithBody(c.Server, contentType, body) if err != nil { @@ -607,6 +781,11 @@ func (c *Client) CreateApiKeyWithBody(ctx context.Context, contentType string, b return c.Client.Do(req) } +// CreateApiKey Create API key +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /api/v1/apikey (the `CreateApiKey` operationId). func (c *Client) CreateApiKey(ctx context.Context, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCreateApiKeyRequest(c.Server, body) if err != nil { @@ -619,6 +798,11 @@ func (c *Client) CreateApiKey(ctx context.Context, body CreateApiKeyJSONRequestB return c.Client.Do(req) } +// ExpireApiKeyWithBody Expire API key +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /api/v1/apikey/expire (the `ExpireApiKey` operationId). func (c *Client) ExpireApiKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewExpireApiKeyRequestWithBody(c.Server, contentType, body) if err != nil { @@ -631,6 +815,11 @@ func (c *Client) ExpireApiKeyWithBody(ctx context.Context, contentType string, b return c.Client.Do(req) } +// ExpireApiKey Expire API key +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /api/v1/apikey/expire (the `ExpireApiKey` operationId). func (c *Client) ExpireApiKey(ctx context.Context, body ExpireApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewExpireApiKeyRequest(c.Server, body) if err != nil { @@ -643,6 +832,9 @@ func (c *Client) ExpireApiKey(ctx context.Context, body ExpireApiKeyJSONRequestB return c.Client.Do(req) } +// DeleteApiKey Delete API key +// +// Corresponds with DELETE /api/v1/apikey/{prefix} (the `DeleteApiKey` operationId). func (c *Client) DeleteApiKey(ctx context.Context, prefix string, params *DeleteApiKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteApiKeyRequest(c.Server, prefix, params) if err != nil { @@ -655,6 +847,11 @@ func (c *Client) DeleteApiKey(ctx context.Context, prefix string, params *Delete return c.Client.Do(req) } +// AuthApproveWithBody Approve a pending auth session +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /api/v1/auth/approve (the `AuthApprove` operationId). func (c *Client) AuthApproveWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewAuthApproveRequestWithBody(c.Server, contentType, body) if err != nil { @@ -667,6 +864,11 @@ func (c *Client) AuthApproveWithBody(ctx context.Context, contentType string, bo return c.Client.Do(req) } +// AuthApprove Approve a pending auth session +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /api/v1/auth/approve (the `AuthApprove` operationId). func (c *Client) AuthApprove(ctx context.Context, body AuthApproveJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewAuthApproveRequest(c.Server, body) if err != nil { @@ -679,6 +881,11 @@ func (c *Client) AuthApprove(ctx context.Context, body AuthApproveJSONRequestBod return c.Client.Do(req) } +// AuthRegisterWithBody Register node via auth flow +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /api/v1/auth/register (the `AuthRegister` operationId). func (c *Client) AuthRegisterWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewAuthRegisterRequestWithBody(c.Server, contentType, body) if err != nil { @@ -691,6 +898,11 @@ func (c *Client) AuthRegisterWithBody(ctx context.Context, contentType string, b return c.Client.Do(req) } +// AuthRegister Register node via auth flow +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /api/v1/auth/register (the `AuthRegister` operationId). func (c *Client) AuthRegister(ctx context.Context, body AuthRegisterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewAuthRegisterRequest(c.Server, body) if err != nil { @@ -703,6 +915,11 @@ func (c *Client) AuthRegister(ctx context.Context, body AuthRegisterJSONRequestB return c.Client.Do(req) } +// AuthRejectWithBody Reject a pending auth session +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /api/v1/auth/reject (the `AuthReject` operationId). func (c *Client) AuthRejectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewAuthRejectRequestWithBody(c.Server, contentType, body) if err != nil { @@ -715,6 +932,11 @@ func (c *Client) AuthRejectWithBody(ctx context.Context, contentType string, bod return c.Client.Do(req) } +// AuthReject Reject a pending auth session +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /api/v1/auth/reject (the `AuthReject` operationId). func (c *Client) AuthReject(ctx context.Context, body AuthRejectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewAuthRejectRequest(c.Server, body) if err != nil { @@ -727,6 +949,11 @@ func (c *Client) AuthReject(ctx context.Context, body AuthRejectJSONRequestBody, return c.Client.Do(req) } +// DebugCreateNodeWithBody Debug create node +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /api/v1/debug/node (the `DebugCreateNode` operationId). func (c *Client) DebugCreateNodeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDebugCreateNodeRequestWithBody(c.Server, contentType, body) if err != nil { @@ -739,6 +966,11 @@ func (c *Client) DebugCreateNodeWithBody(ctx context.Context, contentType string return c.Client.Do(req) } +// DebugCreateNode Debug create node +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /api/v1/debug/node (the `DebugCreateNode` operationId). func (c *Client) DebugCreateNode(ctx context.Context, body DebugCreateNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDebugCreateNodeRequest(c.Server, body) if err != nil { @@ -751,6 +983,11 @@ func (c *Client) DebugCreateNode(ctx context.Context, body DebugCreateNodeJSONRe return c.Client.Do(req) } +// Health Health check +// +// Reports server health, including database connectivity. +// +// Corresponds with GET /api/v1/health (the `Health` operationId). func (c *Client) Health(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewHealthRequest(c.Server) if err != nil { @@ -763,6 +1000,9 @@ func (c *Client) Health(ctx context.Context, reqEditors ...RequestEditorFn) (*ht return c.Client.Do(req) } +// ListNodes List nodes +// +// Corresponds with GET /api/v1/node (the `ListNodes` operationId). func (c *Client) ListNodes(ctx context.Context, params *ListNodesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListNodesRequest(c.Server, params) if err != nil { @@ -775,6 +1015,9 @@ func (c *Client) ListNodes(ctx context.Context, params *ListNodesParams, reqEdit return c.Client.Do(req) } +// BackfillNodeIPs Backfill node IPs +// +// Corresponds with POST /api/v1/node/backfillips (the `BackfillNodeIPs` operationId). func (c *Client) BackfillNodeIPs(ctx context.Context, params *BackfillNodeIPsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewBackfillNodeIPsRequest(c.Server, params) if err != nil { @@ -787,6 +1030,9 @@ func (c *Client) BackfillNodeIPs(ctx context.Context, params *BackfillNodeIPsPar return c.Client.Do(req) } +// RegisterNode Register node +// +// Corresponds with POST /api/v1/node/register (the `RegisterNode` operationId). func (c *Client) RegisterNode(ctx context.Context, params *RegisterNodeParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewRegisterNodeRequest(c.Server, params) if err != nil { @@ -799,6 +1045,9 @@ func (c *Client) RegisterNode(ctx context.Context, params *RegisterNodeParams, r return c.Client.Do(req) } +// DeleteNode Delete node +// +// Corresponds with DELETE /api/v1/node/{nodeId} (the `DeleteNode` operationId). func (c *Client) DeleteNode(ctx context.Context, nodeId string, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteNodeRequest(c.Server, nodeId) if err != nil { @@ -811,6 +1060,9 @@ func (c *Client) DeleteNode(ctx context.Context, nodeId string, reqEditors ...Re return c.Client.Do(req) } +// GetNode Get node +// +// Corresponds with GET /api/v1/node/{nodeId} (the `GetNode` operationId). func (c *Client) GetNode(ctx context.Context, nodeId string, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetNodeRequest(c.Server, nodeId) if err != nil { @@ -823,6 +1075,11 @@ func (c *Client) GetNode(ctx context.Context, nodeId string, reqEditors ...Reque return c.Client.Do(req) } +// SetApprovedRoutesWithBody Set approved routes +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /api/v1/node/{nodeId}/approve_routes (the `SetApprovedRoutes` operationId). func (c *Client) SetApprovedRoutesWithBody(ctx context.Context, nodeId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewSetApprovedRoutesRequestWithBody(c.Server, nodeId, contentType, body) if err != nil { @@ -835,6 +1092,11 @@ func (c *Client) SetApprovedRoutesWithBody(ctx context.Context, nodeId string, c return c.Client.Do(req) } +// SetApprovedRoutes Set approved routes +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /api/v1/node/{nodeId}/approve_routes (the `SetApprovedRoutes` operationId). func (c *Client) SetApprovedRoutes(ctx context.Context, nodeId string, body SetApprovedRoutesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewSetApprovedRoutesRequest(c.Server, nodeId, body) if err != nil { @@ -847,6 +1109,11 @@ func (c *Client) SetApprovedRoutes(ctx context.Context, nodeId string, body SetA return c.Client.Do(req) } +// ExpireNodeWithBody Expire node +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /api/v1/node/{nodeId}/expire (the `ExpireNode` operationId). func (c *Client) ExpireNodeWithBody(ctx context.Context, nodeId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewExpireNodeRequestWithBody(c.Server, nodeId, contentType, body) if err != nil { @@ -859,6 +1126,11 @@ func (c *Client) ExpireNodeWithBody(ctx context.Context, nodeId string, contentT return c.Client.Do(req) } +// ExpireNode Expire node +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /api/v1/node/{nodeId}/expire (the `ExpireNode` operationId). func (c *Client) ExpireNode(ctx context.Context, nodeId string, body ExpireNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewExpireNodeRequest(c.Server, nodeId, body) if err != nil { @@ -871,6 +1143,9 @@ func (c *Client) ExpireNode(ctx context.Context, nodeId string, body ExpireNodeJ return c.Client.Do(req) } +// RenameNode Rename node +// +// Corresponds with POST /api/v1/node/{nodeId}/rename/{newName} (the `RenameNode` operationId). func (c *Client) RenameNode(ctx context.Context, nodeId string, newName string, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewRenameNodeRequest(c.Server, nodeId, newName) if err != nil { @@ -883,6 +1158,11 @@ func (c *Client) RenameNode(ctx context.Context, nodeId string, newName string, return c.Client.Do(req) } +// SetTagsWithBody Set tags +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /api/v1/node/{nodeId}/tags (the `SetTags` operationId). func (c *Client) SetTagsWithBody(ctx context.Context, nodeId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewSetTagsRequestWithBody(c.Server, nodeId, contentType, body) if err != nil { @@ -895,6 +1175,11 @@ func (c *Client) SetTagsWithBody(ctx context.Context, nodeId string, contentType return c.Client.Do(req) } +// SetTags Set tags +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /api/v1/node/{nodeId}/tags (the `SetTags` operationId). func (c *Client) SetTags(ctx context.Context, nodeId string, body SetTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewSetTagsRequest(c.Server, nodeId, body) if err != nil { @@ -907,6 +1192,9 @@ func (c *Client) SetTags(ctx context.Context, nodeId string, body SetTagsJSONReq return c.Client.Do(req) } +// GetPolicy Get policy +// +// Corresponds with GET /api/v1/policy (the `GetPolicy` operationId). func (c *Client) GetPolicy(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetPolicyRequest(c.Server) if err != nil { @@ -919,6 +1207,11 @@ func (c *Client) GetPolicy(ctx context.Context, reqEditors ...RequestEditorFn) ( return c.Client.Do(req) } +// SetPolicyWithBody Set policy +// +// Takes any type of body and a specified content type. +// +// Corresponds with PUT /api/v1/policy (the `SetPolicy` operationId). func (c *Client) SetPolicyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewSetPolicyRequestWithBody(c.Server, contentType, body) if err != nil { @@ -931,6 +1224,11 @@ func (c *Client) SetPolicyWithBody(ctx context.Context, contentType string, body return c.Client.Do(req) } +// SetPolicy Set policy +// +// Takes a body of the `application/json` content type. +// +// Corresponds with PUT /api/v1/policy (the `SetPolicy` operationId). func (c *Client) SetPolicy(ctx context.Context, body SetPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewSetPolicyRequest(c.Server, body) if err != nil { @@ -943,6 +1241,13 @@ func (c *Client) SetPolicy(ctx context.Context, body SetPolicyJSONRequestBody, r return c.Client.Do(req) } +// CheckPolicyWithBody Check policy +// +// Validates the given policy against the server's live users and nodes without persisting it. +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /api/v1/policy/check (the `CheckPolicy` operationId). func (c *Client) CheckPolicyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCheckPolicyRequestWithBody(c.Server, contentType, body) if err != nil { @@ -955,6 +1260,13 @@ func (c *Client) CheckPolicyWithBody(ctx context.Context, contentType string, bo return c.Client.Do(req) } +// CheckPolicy Check policy +// +// Validates the given policy against the server's live users and nodes without persisting it. +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /api/v1/policy/check (the `CheckPolicy` operationId). func (c *Client) CheckPolicy(ctx context.Context, body CheckPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCheckPolicyRequest(c.Server, body) if err != nil { @@ -967,6 +1279,9 @@ func (c *Client) CheckPolicy(ctx context.Context, body CheckPolicyJSONRequestBod return c.Client.Do(req) } +// DeletePreAuthKey Delete pre-auth key +// +// Corresponds with DELETE /api/v1/preauthkey (the `DeletePreAuthKey` operationId). func (c *Client) DeletePreAuthKey(ctx context.Context, params *DeletePreAuthKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeletePreAuthKeyRequest(c.Server, params) if err != nil { @@ -979,6 +1294,9 @@ func (c *Client) DeletePreAuthKey(ctx context.Context, params *DeletePreAuthKeyP return c.Client.Do(req) } +// ListPreAuthKeys List pre-auth keys +// +// Corresponds with GET /api/v1/preauthkey (the `ListPreAuthKeys` operationId). func (c *Client) ListPreAuthKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListPreAuthKeysRequest(c.Server) if err != nil { @@ -991,6 +1309,11 @@ func (c *Client) ListPreAuthKeys(ctx context.Context, reqEditors ...RequestEdito return c.Client.Do(req) } +// CreatePreAuthKeyWithBody Create pre-auth key +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /api/v1/preauthkey (the `CreatePreAuthKey` operationId). func (c *Client) CreatePreAuthKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCreatePreAuthKeyRequestWithBody(c.Server, contentType, body) if err != nil { @@ -1003,6 +1326,11 @@ func (c *Client) CreatePreAuthKeyWithBody(ctx context.Context, contentType strin return c.Client.Do(req) } +// CreatePreAuthKey Create pre-auth key +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /api/v1/preauthkey (the `CreatePreAuthKey` operationId). func (c *Client) CreatePreAuthKey(ctx context.Context, body CreatePreAuthKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCreatePreAuthKeyRequest(c.Server, body) if err != nil { @@ -1015,6 +1343,11 @@ func (c *Client) CreatePreAuthKey(ctx context.Context, body CreatePreAuthKeyJSON return c.Client.Do(req) } +// ExpirePreAuthKeyWithBody Expire pre-auth key +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /api/v1/preauthkey/expire (the `ExpirePreAuthKey` operationId). func (c *Client) ExpirePreAuthKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewExpirePreAuthKeyRequestWithBody(c.Server, contentType, body) if err != nil { @@ -1027,6 +1360,11 @@ func (c *Client) ExpirePreAuthKeyWithBody(ctx context.Context, contentType strin return c.Client.Do(req) } +// ExpirePreAuthKey Expire pre-auth key +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /api/v1/preauthkey/expire (the `ExpirePreAuthKey` operationId). func (c *Client) ExpirePreAuthKey(ctx context.Context, body ExpirePreAuthKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewExpirePreAuthKeyRequest(c.Server, body) if err != nil { @@ -1039,6 +1377,9 @@ func (c *Client) ExpirePreAuthKey(ctx context.Context, body ExpirePreAuthKeyJSON return c.Client.Do(req) } +// ListUsers List users +// +// Corresponds with GET /api/v1/user (the `ListUsers` operationId). func (c *Client) ListUsers(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListUsersRequest(c.Server, params) if err != nil { @@ -1051,6 +1392,11 @@ func (c *Client) ListUsers(ctx context.Context, params *ListUsersParams, reqEdit return c.Client.Do(req) } +// CreateUserWithBody Create user +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /api/v1/user (the `CreateUser` operationId). func (c *Client) CreateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCreateUserRequestWithBody(c.Server, contentType, body) if err != nil { @@ -1063,6 +1409,11 @@ func (c *Client) CreateUserWithBody(ctx context.Context, contentType string, bod return c.Client.Do(req) } +// CreateUser Create user +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /api/v1/user (the `CreateUser` operationId). func (c *Client) CreateUser(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCreateUserRequest(c.Server, body) if err != nil { @@ -1075,6 +1426,9 @@ func (c *Client) CreateUser(ctx context.Context, body CreateUserJSONRequestBody, return c.Client.Do(req) } +// DeleteUser Delete user +// +// Corresponds with DELETE /api/v1/user/{id} (the `DeleteUser` operationId). func (c *Client) DeleteUser(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteUserRequest(c.Server, id) if err != nil { @@ -1087,6 +1441,9 @@ func (c *Client) DeleteUser(ctx context.Context, id string, reqEditors ...Reques return c.Client.Do(req) } +// RenameUser Rename user +// +// Corresponds with POST /api/v1/user/{oldId}/rename/{newName} (the `RenameUser` operationId). func (c *Client) RenameUser(ctx context.Context, oldId string, newName string, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewRenameUserRequest(c.Server, oldId, newName) if err != nil { @@ -1099,7 +1456,7 @@ func (c *Client) RenameUser(ctx context.Context, oldId string, newName string, r return c.Client.Do(req) } -// NewListApiKeysRequest generates requests for ListApiKeys +// NewListApiKeysRequest constructs an http.Request for the ListApiKeys method func NewListApiKeysRequest(server string) (*http.Request, error) { var err error @@ -1137,7 +1494,7 @@ func NewCreateApiKeyRequest(server string, body CreateApiKeyJSONRequestBody) (*h return NewCreateApiKeyRequestWithBody(server, "application/json", bodyReader) } -// NewCreateApiKeyRequestWithBody generates requests for CreateApiKey with any type of body +// NewCreateApiKeyRequestWithBody constructs an http.Request for the CreateApiKey method, with any body, and a specified content type func NewCreateApiKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -1177,7 +1534,7 @@ func NewExpireApiKeyRequest(server string, body ExpireApiKeyJSONRequestBody) (*h return NewExpireApiKeyRequestWithBody(server, "application/json", bodyReader) } -// NewExpireApiKeyRequestWithBody generates requests for ExpireApiKey with any type of body +// NewExpireApiKeyRequestWithBody constructs an http.Request for the ExpireApiKey method, with any body, and a specified content type func NewExpireApiKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -1206,7 +1563,7 @@ func NewExpireApiKeyRequestWithBody(server string, contentType string, body io.R return req, nil } -// NewDeleteApiKeyRequest generates requests for DeleteApiKey +// NewDeleteApiKeyRequest constructs an http.Request for the DeleteApiKey method func NewDeleteApiKeyRequest(server string, prefix string, params *DeleteApiKeyParams) (*http.Request, error) { var err error @@ -1278,7 +1635,7 @@ func NewAuthApproveRequest(server string, body AuthApproveJSONRequestBody) (*htt return NewAuthApproveRequestWithBody(server, "application/json", bodyReader) } -// NewAuthApproveRequestWithBody generates requests for AuthApprove with any type of body +// NewAuthApproveRequestWithBody constructs an http.Request for the AuthApprove method, with any body, and a specified content type func NewAuthApproveRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -1318,7 +1675,7 @@ func NewAuthRegisterRequest(server string, body AuthRegisterJSONRequestBody) (*h return NewAuthRegisterRequestWithBody(server, "application/json", bodyReader) } -// NewAuthRegisterRequestWithBody generates requests for AuthRegister with any type of body +// NewAuthRegisterRequestWithBody constructs an http.Request for the AuthRegister method, with any body, and a specified content type func NewAuthRegisterRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -1358,7 +1715,7 @@ func NewAuthRejectRequest(server string, body AuthRejectJSONRequestBody) (*http. return NewAuthRejectRequestWithBody(server, "application/json", bodyReader) } -// NewAuthRejectRequestWithBody generates requests for AuthReject with any type of body +// NewAuthRejectRequestWithBody constructs an http.Request for the AuthReject method, with any body, and a specified content type func NewAuthRejectRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -1398,7 +1755,7 @@ func NewDebugCreateNodeRequest(server string, body DebugCreateNodeJSONRequestBod return NewDebugCreateNodeRequestWithBody(server, "application/json", bodyReader) } -// NewDebugCreateNodeRequestWithBody generates requests for DebugCreateNode with any type of body +// NewDebugCreateNodeRequestWithBody constructs an http.Request for the DebugCreateNode method, with any body, and a specified content type func NewDebugCreateNodeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -1427,7 +1784,7 @@ func NewDebugCreateNodeRequestWithBody(server string, contentType string, body i return req, nil } -// NewHealthRequest generates requests for Health +// NewHealthRequest constructs an http.Request for the Health method func NewHealthRequest(server string) (*http.Request, error) { var err error @@ -1454,7 +1811,7 @@ func NewHealthRequest(server string) (*http.Request, error) { return req, nil } -// NewListNodesRequest generates requests for ListNodes +// NewListNodesRequest constructs an http.Request for the ListNodes method func NewListNodesRequest(server string, params *ListNodesParams) (*http.Request, error) { var err error @@ -1508,7 +1865,7 @@ func NewListNodesRequest(server string, params *ListNodesParams) (*http.Request, return req, nil } -// NewBackfillNodeIPsRequest generates requests for BackfillNodeIPs +// NewBackfillNodeIPsRequest constructs an http.Request for the BackfillNodeIPs method func NewBackfillNodeIPsRequest(server string, params *BackfillNodeIPsParams) (*http.Request, error) { var err error @@ -1562,7 +1919,7 @@ func NewBackfillNodeIPsRequest(server string, params *BackfillNodeIPsParams) (*h return req, nil } -// NewRegisterNodeRequest generates requests for RegisterNode +// NewRegisterNodeRequest constructs an http.Request for the RegisterNode method func NewRegisterNodeRequest(server string, params *RegisterNodeParams) (*http.Request, error) { var err error @@ -1628,7 +1985,7 @@ func NewRegisterNodeRequest(server string, params *RegisterNodeParams) (*http.Re return req, nil } -// NewDeleteNodeRequest generates requests for DeleteNode +// NewDeleteNodeRequest constructs an http.Request for the DeleteNode method func NewDeleteNodeRequest(server string, nodeId string) (*http.Request, error) { var err error @@ -1662,7 +2019,7 @@ func NewDeleteNodeRequest(server string, nodeId string) (*http.Request, error) { return req, nil } -// NewGetNodeRequest generates requests for GetNode +// NewGetNodeRequest constructs an http.Request for the GetNode method func NewGetNodeRequest(server string, nodeId string) (*http.Request, error) { var err error @@ -1707,7 +2064,7 @@ func NewSetApprovedRoutesRequest(server string, nodeId string, body SetApprovedR return NewSetApprovedRoutesRequestWithBody(server, nodeId, "application/json", bodyReader) } -// NewSetApprovedRoutesRequestWithBody generates requests for SetApprovedRoutes with any type of body +// NewSetApprovedRoutesRequestWithBody constructs an http.Request for the SetApprovedRoutes method, with any body, and a specified content type func NewSetApprovedRoutesRequestWithBody(server string, nodeId string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -1754,7 +2111,7 @@ func NewExpireNodeRequest(server string, nodeId string, body ExpireNodeJSONReque return NewExpireNodeRequestWithBody(server, nodeId, "application/json", bodyReader) } -// NewExpireNodeRequestWithBody generates requests for ExpireNode with any type of body +// NewExpireNodeRequestWithBody constructs an http.Request for the ExpireNode method, with any body, and a specified content type func NewExpireNodeRequestWithBody(server string, nodeId string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -1790,7 +2147,7 @@ func NewExpireNodeRequestWithBody(server string, nodeId string, contentType stri return req, nil } -// NewRenameNodeRequest generates requests for RenameNode +// NewRenameNodeRequest constructs an http.Request for the RenameNode method func NewRenameNodeRequest(server string, nodeId string, newName string) (*http.Request, error) { var err error @@ -1842,7 +2199,7 @@ func NewSetTagsRequest(server string, nodeId string, body SetTagsJSONRequestBody return NewSetTagsRequestWithBody(server, nodeId, "application/json", bodyReader) } -// NewSetTagsRequestWithBody generates requests for SetTags with any type of body +// NewSetTagsRequestWithBody constructs an http.Request for the SetTags method, with any body, and a specified content type func NewSetTagsRequestWithBody(server string, nodeId string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -1878,7 +2235,7 @@ func NewSetTagsRequestWithBody(server string, nodeId string, contentType string, return req, nil } -// NewGetPolicyRequest generates requests for GetPolicy +// NewGetPolicyRequest constructs an http.Request for the GetPolicy method func NewGetPolicyRequest(server string) (*http.Request, error) { var err error @@ -1916,7 +2273,7 @@ func NewSetPolicyRequest(server string, body SetPolicyJSONRequestBody) (*http.Re return NewSetPolicyRequestWithBody(server, "application/json", bodyReader) } -// NewSetPolicyRequestWithBody generates requests for SetPolicy with any type of body +// NewSetPolicyRequestWithBody constructs an http.Request for the SetPolicy method, with any body, and a specified content type func NewSetPolicyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -1956,7 +2313,7 @@ func NewCheckPolicyRequest(server string, body CheckPolicyJSONRequestBody) (*htt return NewCheckPolicyRequestWithBody(server, "application/json", bodyReader) } -// NewCheckPolicyRequestWithBody generates requests for CheckPolicy with any type of body +// NewCheckPolicyRequestWithBody constructs an http.Request for the CheckPolicy method, with any body, and a specified content type func NewCheckPolicyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -1985,7 +2342,7 @@ func NewCheckPolicyRequestWithBody(server string, contentType string, body io.Re return req, nil } -// NewDeletePreAuthKeyRequest generates requests for DeletePreAuthKey +// NewDeletePreAuthKeyRequest constructs an http.Request for the DeletePreAuthKey method func NewDeletePreAuthKeyRequest(server string, params *DeletePreAuthKeyParams) (*http.Request, error) { var err error @@ -2039,7 +2396,7 @@ func NewDeletePreAuthKeyRequest(server string, params *DeletePreAuthKeyParams) ( return req, nil } -// NewListPreAuthKeysRequest generates requests for ListPreAuthKeys +// NewListPreAuthKeysRequest constructs an http.Request for the ListPreAuthKeys method func NewListPreAuthKeysRequest(server string) (*http.Request, error) { var err error @@ -2077,7 +2434,7 @@ func NewCreatePreAuthKeyRequest(server string, body CreatePreAuthKeyJSONRequestB return NewCreatePreAuthKeyRequestWithBody(server, "application/json", bodyReader) } -// NewCreatePreAuthKeyRequestWithBody generates requests for CreatePreAuthKey with any type of body +// NewCreatePreAuthKeyRequestWithBody constructs an http.Request for the CreatePreAuthKey method, with any body, and a specified content type func NewCreatePreAuthKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -2117,7 +2474,7 @@ func NewExpirePreAuthKeyRequest(server string, body ExpirePreAuthKeyJSONRequestB return NewExpirePreAuthKeyRequestWithBody(server, "application/json", bodyReader) } -// NewExpirePreAuthKeyRequestWithBody generates requests for ExpirePreAuthKey with any type of body +// NewExpirePreAuthKeyRequestWithBody constructs an http.Request for the ExpirePreAuthKey method, with any body, and a specified content type func NewExpirePreAuthKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -2146,7 +2503,7 @@ func NewExpirePreAuthKeyRequestWithBody(server string, contentType string, body return req, nil } -// NewListUsersRequest generates requests for ListUsers +// NewListUsersRequest constructs an http.Request for the ListUsers method func NewListUsersRequest(server string, params *ListUsersParams) (*http.Request, error) { var err error @@ -2235,7 +2592,7 @@ func NewCreateUserRequest(server string, body CreateUserJSONRequestBody) (*http. return NewCreateUserRequestWithBody(server, "application/json", bodyReader) } -// NewCreateUserRequestWithBody generates requests for CreateUser with any type of body +// NewCreateUserRequestWithBody constructs an http.Request for the CreateUser method, with any body, and a specified content type func NewCreateUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -2264,7 +2621,7 @@ func NewCreateUserRequestWithBody(server string, contentType string, body io.Rea return req, nil } -// NewDeleteUserRequest generates requests for DeleteUser +// NewDeleteUserRequest constructs an http.Request for the DeleteUser method func NewDeleteUserRequest(server string, id string) (*http.Request, error) { var err error @@ -2298,7 +2655,7 @@ func NewDeleteUserRequest(server string, id string) (*http.Request, error) { return req, nil } -// NewRenameUserRequest generates requests for RenameUser +// NewRenameUserRequest constructs an http.Request for the RenameUser method func NewRenameUserRequest(server string, oldId string, newName string) (*http.Request, error) { var err error @@ -2382,129 +2739,339 @@ func WithBaseURL(baseURL string) ClientOption { // ClientWithResponsesInterface is the interface specification for the client with responses above. type ClientWithResponsesInterface interface { - // ListApiKeysWithResponse request + + // ListApiKeysWithResponse List API keys + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /api/v1/apikey (the `ListApiKeys` operationId). ListApiKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListApiKeysResponse, error) - // CreateApiKeyWithBodyWithResponse request with any body + // CreateApiKeyWithBodyWithResponse Create API key + // + // 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/apikey (the `CreateApiKey` operationId). CreateApiKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error) + // CreateApiKeyWithResponse Create API key + // + // 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/apikey (the `CreateApiKey` operationId). CreateApiKeyWithResponse(ctx context.Context, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error) - // ExpireApiKeyWithBodyWithResponse request with any body + // ExpireApiKeyWithBodyWithResponse Expire API key + // + // 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/apikey/expire (the `ExpireApiKey` operationId). ExpireApiKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ExpireApiKeyResponse, error) + // ExpireApiKeyWithResponse Expire API key + // + // 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/apikey/expire (the `ExpireApiKey` operationId). ExpireApiKeyWithResponse(ctx context.Context, body ExpireApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*ExpireApiKeyResponse, error) - // DeleteApiKeyWithResponse request + // DeleteApiKeyWithResponse Delete API key + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /api/v1/apikey/{prefix} (the `DeleteApiKey` operationId). DeleteApiKeyWithResponse(ctx context.Context, prefix string, params *DeleteApiKeyParams, reqEditors ...RequestEditorFn) (*DeleteApiKeyResponse, error) - // AuthApproveWithBodyWithResponse request with any body + // AuthApproveWithBodyWithResponse Approve a pending auth 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/approve (the `AuthApprove` operationId). AuthApproveWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthApproveResponse, error) + // AuthApproveWithResponse Approve a pending auth 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/approve (the `AuthApprove` operationId). AuthApproveWithResponse(ctx context.Context, body AuthApproveJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthApproveResponse, error) - // AuthRegisterWithBodyWithResponse request with any body + // AuthRegisterWithBodyWithResponse Register node via auth flow + // + // 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/register (the `AuthRegister` operationId). AuthRegisterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthRegisterResponse, error) + // AuthRegisterWithResponse Register node via auth flow + // + // 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/register (the `AuthRegister` operationId). AuthRegisterWithResponse(ctx context.Context, body AuthRegisterJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthRegisterResponse, error) - // AuthRejectWithBodyWithResponse request with any body + // AuthRejectWithBodyWithResponse Reject a pending auth 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/reject (the `AuthReject` operationId). AuthRejectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthRejectResponse, error) + // AuthRejectWithResponse Reject a pending auth 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/reject (the `AuthReject` operationId). AuthRejectWithResponse(ctx context.Context, body AuthRejectJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthRejectResponse, error) - // DebugCreateNodeWithBodyWithResponse request with any body + // DebugCreateNodeWithBodyWithResponse Debug create node + // + // 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/debug/node (the `DebugCreateNode` operationId). DebugCreateNodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DebugCreateNodeResponse, error) + // DebugCreateNodeWithResponse Debug create node + // + // 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/debug/node (the `DebugCreateNode` operationId). DebugCreateNodeWithResponse(ctx context.Context, body DebugCreateNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*DebugCreateNodeResponse, error) - // HealthWithResponse request + // HealthWithResponse Health check + // + // Reports server health, including database connectivity. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /api/v1/health (the `Health` operationId). HealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthResponse, error) - // ListNodesWithResponse request + // ListNodesWithResponse List nodes + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /api/v1/node (the `ListNodes` operationId). ListNodesWithResponse(ctx context.Context, params *ListNodesParams, reqEditors ...RequestEditorFn) (*ListNodesResponse, error) - // BackfillNodeIPsWithResponse request + // BackfillNodeIPsWithResponse Backfill node IPs + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /api/v1/node/backfillips (the `BackfillNodeIPs` operationId). BackfillNodeIPsWithResponse(ctx context.Context, params *BackfillNodeIPsParams, reqEditors ...RequestEditorFn) (*BackfillNodeIPsResponse, error) - // RegisterNodeWithResponse request + // RegisterNodeWithResponse Register node + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /api/v1/node/register (the `RegisterNode` operationId). RegisterNodeWithResponse(ctx context.Context, params *RegisterNodeParams, reqEditors ...RequestEditorFn) (*RegisterNodeResponse, error) - // DeleteNodeWithResponse request + // DeleteNodeWithResponse Delete node + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /api/v1/node/{nodeId} (the `DeleteNode` operationId). DeleteNodeWithResponse(ctx context.Context, nodeId string, reqEditors ...RequestEditorFn) (*DeleteNodeResponse, error) - // GetNodeWithResponse request + // GetNodeWithResponse Get node + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /api/v1/node/{nodeId} (the `GetNode` operationId). GetNodeWithResponse(ctx context.Context, nodeId string, reqEditors ...RequestEditorFn) (*GetNodeResponse, error) - // SetApprovedRoutesWithBodyWithResponse request with any body + // SetApprovedRoutesWithBodyWithResponse Set approved routes + // + // 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/node/{nodeId}/approve_routes (the `SetApprovedRoutes` operationId). SetApprovedRoutesWithBodyWithResponse(ctx context.Context, nodeId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetApprovedRoutesResponse, error) + // SetApprovedRoutesWithResponse Set approved routes + // + // 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/node/{nodeId}/approve_routes (the `SetApprovedRoutes` operationId). SetApprovedRoutesWithResponse(ctx context.Context, nodeId string, body SetApprovedRoutesJSONRequestBody, reqEditors ...RequestEditorFn) (*SetApprovedRoutesResponse, error) - // ExpireNodeWithBodyWithResponse request with any body + // ExpireNodeWithBodyWithResponse Expire node + // + // 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/node/{nodeId}/expire (the `ExpireNode` operationId). ExpireNodeWithBodyWithResponse(ctx context.Context, nodeId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ExpireNodeResponse, error) + // ExpireNodeWithResponse Expire node + // + // 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/node/{nodeId}/expire (the `ExpireNode` operationId). ExpireNodeWithResponse(ctx context.Context, nodeId string, body ExpireNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*ExpireNodeResponse, error) - // RenameNodeWithResponse request + // RenameNodeWithResponse Rename node + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /api/v1/node/{nodeId}/rename/{newName} (the `RenameNode` operationId). RenameNodeWithResponse(ctx context.Context, nodeId string, newName string, reqEditors ...RequestEditorFn) (*RenameNodeResponse, error) - // SetTagsWithBodyWithResponse request with any body + // SetTagsWithBodyWithResponse Set tags + // + // 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/node/{nodeId}/tags (the `SetTags` operationId). SetTagsWithBodyWithResponse(ctx context.Context, nodeId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetTagsResponse, error) + // SetTagsWithResponse Set tags + // + // 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/node/{nodeId}/tags (the `SetTags` operationId). SetTagsWithResponse(ctx context.Context, nodeId string, body SetTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*SetTagsResponse, error) - // GetPolicyWithResponse request + // GetPolicyWithResponse Get policy + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /api/v1/policy (the `GetPolicy` operationId). GetPolicyWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPolicyResponse, error) - // SetPolicyWithBodyWithResponse request with any body + // SetPolicyWithBodyWithResponse Set policy + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PUT /api/v1/policy (the `SetPolicy` operationId). SetPolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetPolicyResponse, error) + // SetPolicyWithResponse Set policy + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with PUT /api/v1/policy (the `SetPolicy` operationId). SetPolicyWithResponse(ctx context.Context, body SetPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*SetPolicyResponse, error) - // CheckPolicyWithBodyWithResponse request with any body + // CheckPolicyWithBodyWithResponse Check policy + // + // Validates the given policy against the server's live users and nodes without persisting it. + // + // 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/policy/check (the `CheckPolicy` operationId). CheckPolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CheckPolicyResponse, error) + // CheckPolicyWithResponse Check policy + // + // Validates the given policy against the server's live users and nodes without persisting it. + // + // 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/policy/check (the `CheckPolicy` operationId). CheckPolicyWithResponse(ctx context.Context, body CheckPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*CheckPolicyResponse, error) - // DeletePreAuthKeyWithResponse request + // DeletePreAuthKeyWithResponse Delete pre-auth key + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /api/v1/preauthkey (the `DeletePreAuthKey` operationId). DeletePreAuthKeyWithResponse(ctx context.Context, params *DeletePreAuthKeyParams, reqEditors ...RequestEditorFn) (*DeletePreAuthKeyResponse, error) - // ListPreAuthKeysWithResponse request + // ListPreAuthKeysWithResponse List pre-auth keys + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /api/v1/preauthkey (the `ListPreAuthKeys` operationId). ListPreAuthKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListPreAuthKeysResponse, error) - // CreatePreAuthKeyWithBodyWithResponse request with any body + // CreatePreAuthKeyWithBodyWithResponse Create pre-auth key + // + // 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/preauthkey (the `CreatePreAuthKey` operationId). CreatePreAuthKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePreAuthKeyResponse, error) + // CreatePreAuthKeyWithResponse Create pre-auth key + // + // 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/preauthkey (the `CreatePreAuthKey` operationId). CreatePreAuthKeyWithResponse(ctx context.Context, body CreatePreAuthKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePreAuthKeyResponse, error) - // ExpirePreAuthKeyWithBodyWithResponse request with any body + // ExpirePreAuthKeyWithBodyWithResponse Expire pre-auth key + // + // 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/preauthkey/expire (the `ExpirePreAuthKey` operationId). ExpirePreAuthKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ExpirePreAuthKeyResponse, error) + // ExpirePreAuthKeyWithResponse Expire pre-auth key + // + // 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/preauthkey/expire (the `ExpirePreAuthKey` operationId). ExpirePreAuthKeyWithResponse(ctx context.Context, body ExpirePreAuthKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*ExpirePreAuthKeyResponse, error) - // ListUsersWithResponse request + // ListUsersWithResponse List users + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /api/v1/user (the `ListUsers` operationId). ListUsersWithResponse(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*ListUsersResponse, error) - // CreateUserWithBodyWithResponse request with any body + // CreateUserWithBodyWithResponse Create user + // + // 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/user (the `CreateUser` operationId). CreateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUserResponse, error) + // CreateUserWithResponse Create user + // + // 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/user (the `CreateUser` operationId). CreateUserWithResponse(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUserResponse, error) - // DeleteUserWithResponse request + // DeleteUserWithResponse Delete user + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /api/v1/user/{id} (the `DeleteUser` operationId). DeleteUserWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) - // RenameUserWithResponse request + // RenameUserWithResponse Rename user + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /api/v1/user/{oldId}/rename/{newName} (the `RenameUser` operationId). RenameUserWithResponse(ctx context.Context, oldId string, newName string, reqEditors ...RequestEditorFn) (*RenameUserResponse, error) } type ListApiKeysResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListApiKeysOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *ListApiKeysOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r ListApiKeysResponse) GetJSON200() *ListApiKeysOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r ListApiKeysResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r ListApiKeysResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r ListApiKeysResponse) Status() string { if r.HTTPResponse != nil { @@ -2530,12 +3097,29 @@ func (r ListApiKeysResponse) ContentType() string { } type CreateApiKeyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *CreateApiKeyOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *CreateApiKeyOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r CreateApiKeyResponse) GetJSON200() *CreateApiKeyOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r CreateApiKeyResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r CreateApiKeyResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r CreateApiKeyResponse) Status() string { if r.HTTPResponse != nil { @@ -2561,12 +3145,29 @@ func (r CreateApiKeyResponse) ContentType() string { } type ExpireApiKeyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ExpireApiKeyOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *ExpireApiKeyOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r ExpireApiKeyResponse) GetJSON200() *ExpireApiKeyOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r ExpireApiKeyResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r ExpireApiKeyResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r ExpireApiKeyResponse) Status() string { if r.HTTPResponse != nil { @@ -2592,12 +3193,29 @@ func (r ExpireApiKeyResponse) ContentType() string { } type DeleteApiKeyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *DeleteApiKeyOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *DeleteApiKeyOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r DeleteApiKeyResponse) GetJSON200() *DeleteApiKeyOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r DeleteApiKeyResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r DeleteApiKeyResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r DeleteApiKeyResponse) Status() string { if r.HTTPResponse != nil { @@ -2623,12 +3241,29 @@ func (r DeleteApiKeyResponse) ContentType() string { } type AuthApproveResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *AuthApproveOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *AuthApproveOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r AuthApproveResponse) GetJSON200() *AuthApproveOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r AuthApproveResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r AuthApproveResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r AuthApproveResponse) Status() string { if r.HTTPResponse != nil { @@ -2654,12 +3289,29 @@ func (r AuthApproveResponse) ContentType() string { } type AuthRegisterResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *AuthRegisterOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *AuthRegisterOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r AuthRegisterResponse) GetJSON200() *AuthRegisterOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r AuthRegisterResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r AuthRegisterResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r AuthRegisterResponse) Status() string { if r.HTTPResponse != nil { @@ -2685,12 +3337,29 @@ func (r AuthRegisterResponse) ContentType() string { } type AuthRejectResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *AuthRejectOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *AuthRejectOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r AuthRejectResponse) GetJSON200() *AuthRejectOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r AuthRejectResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r AuthRejectResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r AuthRejectResponse) Status() string { if r.HTTPResponse != nil { @@ -2716,12 +3385,29 @@ func (r AuthRejectResponse) ContentType() string { } type DebugCreateNodeResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *NodeOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *NodeOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r DebugCreateNodeResponse) GetJSON200() *NodeOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r DebugCreateNodeResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r DebugCreateNodeResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r DebugCreateNodeResponse) Status() string { if r.HTTPResponse != nil { @@ -2747,12 +3433,29 @@ func (r DebugCreateNodeResponse) ContentType() string { } type HealthResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *HealthResponseBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *HealthResponseBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r HealthResponse) GetJSON200() *HealthResponseBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r HealthResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r HealthResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r HealthResponse) Status() string { if r.HTTPResponse != nil { @@ -2778,12 +3481,29 @@ func (r HealthResponse) ContentType() string { } type ListNodesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListNodesOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *ListNodesOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r ListNodesResponse) GetJSON200() *ListNodesOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r ListNodesResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r ListNodesResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r ListNodesResponse) Status() string { if r.HTTPResponse != nil { @@ -2809,12 +3529,29 @@ func (r ListNodesResponse) ContentType() string { } type BackfillNodeIPsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *BackfillNodeIPsOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *BackfillNodeIPsOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r BackfillNodeIPsResponse) GetJSON200() *BackfillNodeIPsOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r BackfillNodeIPsResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r BackfillNodeIPsResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r BackfillNodeIPsResponse) Status() string { if r.HTTPResponse != nil { @@ -2840,12 +3577,29 @@ func (r BackfillNodeIPsResponse) ContentType() string { } type RegisterNodeResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *NodeOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *NodeOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r RegisterNodeResponse) GetJSON200() *NodeOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r RegisterNodeResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r RegisterNodeResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r RegisterNodeResponse) Status() string { if r.HTTPResponse != nil { @@ -2871,12 +3625,29 @@ func (r RegisterNodeResponse) ContentType() string { } type DeleteNodeResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *DeleteNodeOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *DeleteNodeOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r DeleteNodeResponse) GetJSON200() *DeleteNodeOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r DeleteNodeResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r DeleteNodeResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r DeleteNodeResponse) Status() string { if r.HTTPResponse != nil { @@ -2902,12 +3673,29 @@ func (r DeleteNodeResponse) ContentType() string { } type GetNodeResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *NodeOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *NodeOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r GetNodeResponse) GetJSON200() *NodeOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r GetNodeResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r GetNodeResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r GetNodeResponse) Status() string { if r.HTTPResponse != nil { @@ -2933,12 +3721,29 @@ func (r GetNodeResponse) ContentType() string { } type SetApprovedRoutesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *NodeOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *NodeOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r SetApprovedRoutesResponse) GetJSON200() *NodeOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r SetApprovedRoutesResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r SetApprovedRoutesResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r SetApprovedRoutesResponse) Status() string { if r.HTTPResponse != nil { @@ -2964,12 +3769,29 @@ func (r SetApprovedRoutesResponse) ContentType() string { } type ExpireNodeResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *NodeOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *NodeOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r ExpireNodeResponse) GetJSON200() *NodeOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r ExpireNodeResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r ExpireNodeResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r ExpireNodeResponse) Status() string { if r.HTTPResponse != nil { @@ -2995,12 +3817,29 @@ func (r ExpireNodeResponse) ContentType() string { } type RenameNodeResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *NodeOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *NodeOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r RenameNodeResponse) GetJSON200() *NodeOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r RenameNodeResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r RenameNodeResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r RenameNodeResponse) Status() string { if r.HTTPResponse != nil { @@ -3026,12 +3865,29 @@ func (r RenameNodeResponse) ContentType() string { } type SetTagsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *NodeOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *NodeOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r SetTagsResponse) GetJSON200() *NodeOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r SetTagsResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r SetTagsResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r SetTagsResponse) Status() string { if r.HTTPResponse != nil { @@ -3057,12 +3913,29 @@ func (r SetTagsResponse) ContentType() string { } type GetPolicyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *PolicyResponseBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *PolicyResponseBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r GetPolicyResponse) GetJSON200() *PolicyResponseBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r GetPolicyResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r GetPolicyResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r GetPolicyResponse) Status() string { if r.HTTPResponse != nil { @@ -3088,12 +3961,29 @@ func (r GetPolicyResponse) ContentType() string { } type SetPolicyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *PolicyResponseBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *PolicyResponseBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r SetPolicyResponse) GetJSON200() *PolicyResponseBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r SetPolicyResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r SetPolicyResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r SetPolicyResponse) Status() string { if r.HTTPResponse != nil { @@ -3119,12 +4009,29 @@ func (r SetPolicyResponse) ContentType() string { } type CheckPolicyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *CheckPolicyOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *CheckPolicyOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r CheckPolicyResponse) GetJSON200() *CheckPolicyOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r CheckPolicyResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r CheckPolicyResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r CheckPolicyResponse) Status() string { if r.HTTPResponse != nil { @@ -3150,12 +4057,29 @@ func (r CheckPolicyResponse) ContentType() string { } type DeletePreAuthKeyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *DeletePreAuthKeyOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *DeletePreAuthKeyOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r DeletePreAuthKeyResponse) GetJSON200() *DeletePreAuthKeyOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r DeletePreAuthKeyResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r DeletePreAuthKeyResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r DeletePreAuthKeyResponse) Status() string { if r.HTTPResponse != nil { @@ -3181,12 +4105,29 @@ func (r DeletePreAuthKeyResponse) ContentType() string { } type ListPreAuthKeysResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListPreAuthKeysOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *ListPreAuthKeysOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r ListPreAuthKeysResponse) GetJSON200() *ListPreAuthKeysOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r ListPreAuthKeysResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r ListPreAuthKeysResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r ListPreAuthKeysResponse) Status() string { if r.HTTPResponse != nil { @@ -3212,12 +4153,29 @@ func (r ListPreAuthKeysResponse) ContentType() string { } type CreatePreAuthKeyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *PreAuthKeyOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *PreAuthKeyOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r CreatePreAuthKeyResponse) GetJSON200() *PreAuthKeyOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r CreatePreAuthKeyResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r CreatePreAuthKeyResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r CreatePreAuthKeyResponse) Status() string { if r.HTTPResponse != nil { @@ -3243,12 +4201,29 @@ func (r CreatePreAuthKeyResponse) ContentType() string { } type ExpirePreAuthKeyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ExpirePreAuthKeyOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *ExpirePreAuthKeyOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r ExpirePreAuthKeyResponse) GetJSON200() *ExpirePreAuthKeyOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r ExpirePreAuthKeyResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r ExpirePreAuthKeyResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r ExpirePreAuthKeyResponse) Status() string { if r.HTTPResponse != nil { @@ -3274,12 +4249,29 @@ func (r ExpirePreAuthKeyResponse) ContentType() string { } type ListUsersResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListUsersOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *ListUsersOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r ListUsersResponse) GetJSON200() *ListUsersOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r ListUsersResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r ListUsersResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r ListUsersResponse) Status() string { if r.HTTPResponse != nil { @@ -3305,12 +4297,29 @@ func (r ListUsersResponse) ContentType() string { } type CreateUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UserOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *UserOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r CreateUserResponse) GetJSON200() *UserOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r CreateUserResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r CreateUserResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r CreateUserResponse) Status() string { if r.HTTPResponse != nil { @@ -3336,12 +4345,29 @@ func (r CreateUserResponse) ContentType() string { } type DeleteUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *DeleteUserOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *DeleteUserOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r DeleteUserResponse) GetJSON200() *DeleteUserOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r DeleteUserResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r DeleteUserResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r DeleteUserResponse) Status() string { if r.HTTPResponse != nil { @@ -3367,12 +4393,29 @@ func (r DeleteUserResponse) ContentType() string { } type RenameUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UserOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *UserOutputBody + // ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response ApplicationproblemJSONDefault *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r RenameUserResponse) GetJSON200() *UserOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response +func (r RenameUserResponse) GetApplicationproblemJSONDefault() *ErrorModel { + return r.ApplicationproblemJSONDefault +} + +// GetBody returns the raw response body bytes +func (r RenameUserResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r RenameUserResponse) Status() string { if r.HTTPResponse != nil { @@ -3397,7 +4440,11 @@ func (r RenameUserResponse) ContentType() string { return "" } -// ListApiKeysWithResponse request returning *ListApiKeysResponse +// ListApiKeysWithResponse List API keys +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /api/v1/apikey (the `ListApiKeys` operationId). func (c *ClientWithResponses) ListApiKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListApiKeysResponse, error) { rsp, err := c.ListApiKeys(ctx, reqEditors...) if err != nil { @@ -3406,7 +4453,11 @@ func (c *ClientWithResponses) ListApiKeysWithResponse(ctx context.Context, reqEd return ParseListApiKeysResponse(rsp) } -// CreateApiKeyWithBodyWithResponse request with arbitrary body returning *CreateApiKeyResponse +// CreateApiKeyWithBodyWithResponse Create API key +// +// 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/apikey (the `CreateApiKey` operationId). func (c *ClientWithResponses) CreateApiKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error) { rsp, err := c.CreateApiKeyWithBody(ctx, contentType, body, reqEditors...) if err != nil { @@ -3415,6 +4466,11 @@ func (c *ClientWithResponses) CreateApiKeyWithBodyWithResponse(ctx context.Conte return ParseCreateApiKeyResponse(rsp) } +// CreateApiKeyWithResponse Create API key +// +// 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/apikey (the `CreateApiKey` operationId). func (c *ClientWithResponses) CreateApiKeyWithResponse(ctx context.Context, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error) { rsp, err := c.CreateApiKey(ctx, body, reqEditors...) if err != nil { @@ -3423,7 +4479,11 @@ func (c *ClientWithResponses) CreateApiKeyWithResponse(ctx context.Context, body return ParseCreateApiKeyResponse(rsp) } -// ExpireApiKeyWithBodyWithResponse request with arbitrary body returning *ExpireApiKeyResponse +// ExpireApiKeyWithBodyWithResponse Expire API key +// +// 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/apikey/expire (the `ExpireApiKey` operationId). func (c *ClientWithResponses) ExpireApiKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ExpireApiKeyResponse, error) { rsp, err := c.ExpireApiKeyWithBody(ctx, contentType, body, reqEditors...) if err != nil { @@ -3432,6 +4492,11 @@ func (c *ClientWithResponses) ExpireApiKeyWithBodyWithResponse(ctx context.Conte return ParseExpireApiKeyResponse(rsp) } +// ExpireApiKeyWithResponse Expire API key +// +// 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/apikey/expire (the `ExpireApiKey` operationId). func (c *ClientWithResponses) ExpireApiKeyWithResponse(ctx context.Context, body ExpireApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*ExpireApiKeyResponse, error) { rsp, err := c.ExpireApiKey(ctx, body, reqEditors...) if err != nil { @@ -3440,7 +4505,11 @@ func (c *ClientWithResponses) ExpireApiKeyWithResponse(ctx context.Context, body return ParseExpireApiKeyResponse(rsp) } -// DeleteApiKeyWithResponse request returning *DeleteApiKeyResponse +// DeleteApiKeyWithResponse Delete API key +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with DELETE /api/v1/apikey/{prefix} (the `DeleteApiKey` operationId). func (c *ClientWithResponses) DeleteApiKeyWithResponse(ctx context.Context, prefix string, params *DeleteApiKeyParams, reqEditors ...RequestEditorFn) (*DeleteApiKeyResponse, error) { rsp, err := c.DeleteApiKey(ctx, prefix, params, reqEditors...) if err != nil { @@ -3449,7 +4518,11 @@ func (c *ClientWithResponses) DeleteApiKeyWithResponse(ctx context.Context, pref return ParseDeleteApiKeyResponse(rsp) } -// AuthApproveWithBodyWithResponse request with arbitrary body returning *AuthApproveResponse +// AuthApproveWithBodyWithResponse Approve a pending auth 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/approve (the `AuthApprove` operationId). func (c *ClientWithResponses) AuthApproveWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthApproveResponse, error) { rsp, err := c.AuthApproveWithBody(ctx, contentType, body, reqEditors...) if err != nil { @@ -3458,6 +4531,11 @@ func (c *ClientWithResponses) AuthApproveWithBodyWithResponse(ctx context.Contex return ParseAuthApproveResponse(rsp) } +// AuthApproveWithResponse Approve a pending auth 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/approve (the `AuthApprove` operationId). func (c *ClientWithResponses) AuthApproveWithResponse(ctx context.Context, body AuthApproveJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthApproveResponse, error) { rsp, err := c.AuthApprove(ctx, body, reqEditors...) if err != nil { @@ -3466,7 +4544,11 @@ func (c *ClientWithResponses) AuthApproveWithResponse(ctx context.Context, body return ParseAuthApproveResponse(rsp) } -// AuthRegisterWithBodyWithResponse request with arbitrary body returning *AuthRegisterResponse +// AuthRegisterWithBodyWithResponse Register node via auth flow +// +// 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/register (the `AuthRegister` operationId). func (c *ClientWithResponses) AuthRegisterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthRegisterResponse, error) { rsp, err := c.AuthRegisterWithBody(ctx, contentType, body, reqEditors...) if err != nil { @@ -3475,6 +4557,11 @@ func (c *ClientWithResponses) AuthRegisterWithBodyWithResponse(ctx context.Conte return ParseAuthRegisterResponse(rsp) } +// AuthRegisterWithResponse Register node via auth flow +// +// 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/register (the `AuthRegister` operationId). func (c *ClientWithResponses) AuthRegisterWithResponse(ctx context.Context, body AuthRegisterJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthRegisterResponse, error) { rsp, err := c.AuthRegister(ctx, body, reqEditors...) if err != nil { @@ -3483,7 +4570,11 @@ func (c *ClientWithResponses) AuthRegisterWithResponse(ctx context.Context, body return ParseAuthRegisterResponse(rsp) } -// AuthRejectWithBodyWithResponse request with arbitrary body returning *AuthRejectResponse +// AuthRejectWithBodyWithResponse Reject a pending auth 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/reject (the `AuthReject` operationId). func (c *ClientWithResponses) AuthRejectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthRejectResponse, error) { rsp, err := c.AuthRejectWithBody(ctx, contentType, body, reqEditors...) if err != nil { @@ -3492,6 +4583,11 @@ func (c *ClientWithResponses) AuthRejectWithBodyWithResponse(ctx context.Context return ParseAuthRejectResponse(rsp) } +// AuthRejectWithResponse Reject a pending auth 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/reject (the `AuthReject` operationId). func (c *ClientWithResponses) AuthRejectWithResponse(ctx context.Context, body AuthRejectJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthRejectResponse, error) { rsp, err := c.AuthReject(ctx, body, reqEditors...) if err != nil { @@ -3500,7 +4596,11 @@ func (c *ClientWithResponses) AuthRejectWithResponse(ctx context.Context, body A return ParseAuthRejectResponse(rsp) } -// DebugCreateNodeWithBodyWithResponse request with arbitrary body returning *DebugCreateNodeResponse +// DebugCreateNodeWithBodyWithResponse Debug create node +// +// 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/debug/node (the `DebugCreateNode` operationId). func (c *ClientWithResponses) DebugCreateNodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DebugCreateNodeResponse, error) { rsp, err := c.DebugCreateNodeWithBody(ctx, contentType, body, reqEditors...) if err != nil { @@ -3509,6 +4609,11 @@ func (c *ClientWithResponses) DebugCreateNodeWithBodyWithResponse(ctx context.Co return ParseDebugCreateNodeResponse(rsp) } +// DebugCreateNodeWithResponse Debug create node +// +// 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/debug/node (the `DebugCreateNode` operationId). func (c *ClientWithResponses) DebugCreateNodeWithResponse(ctx context.Context, body DebugCreateNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*DebugCreateNodeResponse, error) { rsp, err := c.DebugCreateNode(ctx, body, reqEditors...) if err != nil { @@ -3517,7 +4622,13 @@ func (c *ClientWithResponses) DebugCreateNodeWithResponse(ctx context.Context, b return ParseDebugCreateNodeResponse(rsp) } -// HealthWithResponse request returning *HealthResponse +// HealthWithResponse Health check +// +// Reports server health, including database connectivity. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /api/v1/health (the `Health` operationId). func (c *ClientWithResponses) HealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthResponse, error) { rsp, err := c.Health(ctx, reqEditors...) if err != nil { @@ -3526,7 +4637,11 @@ func (c *ClientWithResponses) HealthWithResponse(ctx context.Context, reqEditors return ParseHealthResponse(rsp) } -// ListNodesWithResponse request returning *ListNodesResponse +// ListNodesWithResponse List nodes +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /api/v1/node (the `ListNodes` operationId). func (c *ClientWithResponses) ListNodesWithResponse(ctx context.Context, params *ListNodesParams, reqEditors ...RequestEditorFn) (*ListNodesResponse, error) { rsp, err := c.ListNodes(ctx, params, reqEditors...) if err != nil { @@ -3535,7 +4650,11 @@ func (c *ClientWithResponses) ListNodesWithResponse(ctx context.Context, params return ParseListNodesResponse(rsp) } -// BackfillNodeIPsWithResponse request returning *BackfillNodeIPsResponse +// BackfillNodeIPsWithResponse Backfill node IPs +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with POST /api/v1/node/backfillips (the `BackfillNodeIPs` operationId). func (c *ClientWithResponses) BackfillNodeIPsWithResponse(ctx context.Context, params *BackfillNodeIPsParams, reqEditors ...RequestEditorFn) (*BackfillNodeIPsResponse, error) { rsp, err := c.BackfillNodeIPs(ctx, params, reqEditors...) if err != nil { @@ -3544,7 +4663,11 @@ func (c *ClientWithResponses) BackfillNodeIPsWithResponse(ctx context.Context, p return ParseBackfillNodeIPsResponse(rsp) } -// RegisterNodeWithResponse request returning *RegisterNodeResponse +// RegisterNodeWithResponse Register node +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with POST /api/v1/node/register (the `RegisterNode` operationId). func (c *ClientWithResponses) RegisterNodeWithResponse(ctx context.Context, params *RegisterNodeParams, reqEditors ...RequestEditorFn) (*RegisterNodeResponse, error) { rsp, err := c.RegisterNode(ctx, params, reqEditors...) if err != nil { @@ -3553,7 +4676,11 @@ func (c *ClientWithResponses) RegisterNodeWithResponse(ctx context.Context, para return ParseRegisterNodeResponse(rsp) } -// DeleteNodeWithResponse request returning *DeleteNodeResponse +// DeleteNodeWithResponse Delete node +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with DELETE /api/v1/node/{nodeId} (the `DeleteNode` operationId). func (c *ClientWithResponses) DeleteNodeWithResponse(ctx context.Context, nodeId string, reqEditors ...RequestEditorFn) (*DeleteNodeResponse, error) { rsp, err := c.DeleteNode(ctx, nodeId, reqEditors...) if err != nil { @@ -3562,7 +4689,11 @@ func (c *ClientWithResponses) DeleteNodeWithResponse(ctx context.Context, nodeId return ParseDeleteNodeResponse(rsp) } -// GetNodeWithResponse request returning *GetNodeResponse +// GetNodeWithResponse Get node +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /api/v1/node/{nodeId} (the `GetNode` operationId). func (c *ClientWithResponses) GetNodeWithResponse(ctx context.Context, nodeId string, reqEditors ...RequestEditorFn) (*GetNodeResponse, error) { rsp, err := c.GetNode(ctx, nodeId, reqEditors...) if err != nil { @@ -3571,7 +4702,11 @@ func (c *ClientWithResponses) GetNodeWithResponse(ctx context.Context, nodeId st return ParseGetNodeResponse(rsp) } -// SetApprovedRoutesWithBodyWithResponse request with arbitrary body returning *SetApprovedRoutesResponse +// SetApprovedRoutesWithBodyWithResponse Set approved routes +// +// 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/node/{nodeId}/approve_routes (the `SetApprovedRoutes` operationId). func (c *ClientWithResponses) SetApprovedRoutesWithBodyWithResponse(ctx context.Context, nodeId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetApprovedRoutesResponse, error) { rsp, err := c.SetApprovedRoutesWithBody(ctx, nodeId, contentType, body, reqEditors...) if err != nil { @@ -3580,6 +4715,11 @@ func (c *ClientWithResponses) SetApprovedRoutesWithBodyWithResponse(ctx context. return ParseSetApprovedRoutesResponse(rsp) } +// SetApprovedRoutesWithResponse Set approved routes +// +// 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/node/{nodeId}/approve_routes (the `SetApprovedRoutes` operationId). func (c *ClientWithResponses) SetApprovedRoutesWithResponse(ctx context.Context, nodeId string, body SetApprovedRoutesJSONRequestBody, reqEditors ...RequestEditorFn) (*SetApprovedRoutesResponse, error) { rsp, err := c.SetApprovedRoutes(ctx, nodeId, body, reqEditors...) if err != nil { @@ -3588,7 +4728,11 @@ func (c *ClientWithResponses) SetApprovedRoutesWithResponse(ctx context.Context, return ParseSetApprovedRoutesResponse(rsp) } -// ExpireNodeWithBodyWithResponse request with arbitrary body returning *ExpireNodeResponse +// ExpireNodeWithBodyWithResponse Expire node +// +// 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/node/{nodeId}/expire (the `ExpireNode` operationId). func (c *ClientWithResponses) ExpireNodeWithBodyWithResponse(ctx context.Context, nodeId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ExpireNodeResponse, error) { rsp, err := c.ExpireNodeWithBody(ctx, nodeId, contentType, body, reqEditors...) if err != nil { @@ -3597,6 +4741,11 @@ func (c *ClientWithResponses) ExpireNodeWithBodyWithResponse(ctx context.Context return ParseExpireNodeResponse(rsp) } +// ExpireNodeWithResponse Expire node +// +// 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/node/{nodeId}/expire (the `ExpireNode` operationId). func (c *ClientWithResponses) ExpireNodeWithResponse(ctx context.Context, nodeId string, body ExpireNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*ExpireNodeResponse, error) { rsp, err := c.ExpireNode(ctx, nodeId, body, reqEditors...) if err != nil { @@ -3605,7 +4754,11 @@ func (c *ClientWithResponses) ExpireNodeWithResponse(ctx context.Context, nodeId return ParseExpireNodeResponse(rsp) } -// RenameNodeWithResponse request returning *RenameNodeResponse +// RenameNodeWithResponse Rename node +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with POST /api/v1/node/{nodeId}/rename/{newName} (the `RenameNode` operationId). func (c *ClientWithResponses) RenameNodeWithResponse(ctx context.Context, nodeId string, newName string, reqEditors ...RequestEditorFn) (*RenameNodeResponse, error) { rsp, err := c.RenameNode(ctx, nodeId, newName, reqEditors...) if err != nil { @@ -3614,7 +4767,11 @@ func (c *ClientWithResponses) RenameNodeWithResponse(ctx context.Context, nodeId return ParseRenameNodeResponse(rsp) } -// SetTagsWithBodyWithResponse request with arbitrary body returning *SetTagsResponse +// SetTagsWithBodyWithResponse Set tags +// +// 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/node/{nodeId}/tags (the `SetTags` operationId). func (c *ClientWithResponses) SetTagsWithBodyWithResponse(ctx context.Context, nodeId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetTagsResponse, error) { rsp, err := c.SetTagsWithBody(ctx, nodeId, contentType, body, reqEditors...) if err != nil { @@ -3623,6 +4780,11 @@ func (c *ClientWithResponses) SetTagsWithBodyWithResponse(ctx context.Context, n return ParseSetTagsResponse(rsp) } +// SetTagsWithResponse Set tags +// +// 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/node/{nodeId}/tags (the `SetTags` operationId). func (c *ClientWithResponses) SetTagsWithResponse(ctx context.Context, nodeId string, body SetTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*SetTagsResponse, error) { rsp, err := c.SetTags(ctx, nodeId, body, reqEditors...) if err != nil { @@ -3631,7 +4793,11 @@ func (c *ClientWithResponses) SetTagsWithResponse(ctx context.Context, nodeId st return ParseSetTagsResponse(rsp) } -// GetPolicyWithResponse request returning *GetPolicyResponse +// GetPolicyWithResponse Get policy +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /api/v1/policy (the `GetPolicy` operationId). func (c *ClientWithResponses) GetPolicyWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPolicyResponse, error) { rsp, err := c.GetPolicy(ctx, reqEditors...) if err != nil { @@ -3640,7 +4806,11 @@ func (c *ClientWithResponses) GetPolicyWithResponse(ctx context.Context, reqEdit return ParseGetPolicyResponse(rsp) } -// SetPolicyWithBodyWithResponse request with arbitrary body returning *SetPolicyResponse +// SetPolicyWithBodyWithResponse Set policy +// +// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). +// +// Corresponds with PUT /api/v1/policy (the `SetPolicy` operationId). func (c *ClientWithResponses) SetPolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetPolicyResponse, error) { rsp, err := c.SetPolicyWithBody(ctx, contentType, body, reqEditors...) if err != nil { @@ -3649,6 +4819,11 @@ func (c *ClientWithResponses) SetPolicyWithBodyWithResponse(ctx context.Context, return ParseSetPolicyResponse(rsp) } +// SetPolicyWithResponse Set policy +// +// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). +// +// Corresponds with PUT /api/v1/policy (the `SetPolicy` operationId). func (c *ClientWithResponses) SetPolicyWithResponse(ctx context.Context, body SetPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*SetPolicyResponse, error) { rsp, err := c.SetPolicy(ctx, body, reqEditors...) if err != nil { @@ -3657,7 +4832,13 @@ func (c *ClientWithResponses) SetPolicyWithResponse(ctx context.Context, body Se return ParseSetPolicyResponse(rsp) } -// CheckPolicyWithBodyWithResponse request with arbitrary body returning *CheckPolicyResponse +// CheckPolicyWithBodyWithResponse Check policy +// +// Validates the given policy against the server's live users and nodes without persisting it. +// +// 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/policy/check (the `CheckPolicy` operationId). func (c *ClientWithResponses) CheckPolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CheckPolicyResponse, error) { rsp, err := c.CheckPolicyWithBody(ctx, contentType, body, reqEditors...) if err != nil { @@ -3666,6 +4847,13 @@ func (c *ClientWithResponses) CheckPolicyWithBodyWithResponse(ctx context.Contex return ParseCheckPolicyResponse(rsp) } +// CheckPolicyWithResponse Check policy +// +// Validates the given policy against the server's live users and nodes without persisting it. +// +// 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/policy/check (the `CheckPolicy` operationId). func (c *ClientWithResponses) CheckPolicyWithResponse(ctx context.Context, body CheckPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*CheckPolicyResponse, error) { rsp, err := c.CheckPolicy(ctx, body, reqEditors...) if err != nil { @@ -3674,7 +4862,11 @@ func (c *ClientWithResponses) CheckPolicyWithResponse(ctx context.Context, body return ParseCheckPolicyResponse(rsp) } -// DeletePreAuthKeyWithResponse request returning *DeletePreAuthKeyResponse +// DeletePreAuthKeyWithResponse Delete pre-auth key +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with DELETE /api/v1/preauthkey (the `DeletePreAuthKey` operationId). func (c *ClientWithResponses) DeletePreAuthKeyWithResponse(ctx context.Context, params *DeletePreAuthKeyParams, reqEditors ...RequestEditorFn) (*DeletePreAuthKeyResponse, error) { rsp, err := c.DeletePreAuthKey(ctx, params, reqEditors...) if err != nil { @@ -3683,7 +4875,11 @@ func (c *ClientWithResponses) DeletePreAuthKeyWithResponse(ctx context.Context, return ParseDeletePreAuthKeyResponse(rsp) } -// ListPreAuthKeysWithResponse request returning *ListPreAuthKeysResponse +// ListPreAuthKeysWithResponse List pre-auth keys +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /api/v1/preauthkey (the `ListPreAuthKeys` operationId). func (c *ClientWithResponses) ListPreAuthKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListPreAuthKeysResponse, error) { rsp, err := c.ListPreAuthKeys(ctx, reqEditors...) if err != nil { @@ -3692,7 +4888,11 @@ func (c *ClientWithResponses) ListPreAuthKeysWithResponse(ctx context.Context, r return ParseListPreAuthKeysResponse(rsp) } -// CreatePreAuthKeyWithBodyWithResponse request with arbitrary body returning *CreatePreAuthKeyResponse +// CreatePreAuthKeyWithBodyWithResponse Create pre-auth key +// +// 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/preauthkey (the `CreatePreAuthKey` operationId). func (c *ClientWithResponses) CreatePreAuthKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePreAuthKeyResponse, error) { rsp, err := c.CreatePreAuthKeyWithBody(ctx, contentType, body, reqEditors...) if err != nil { @@ -3701,6 +4901,11 @@ func (c *ClientWithResponses) CreatePreAuthKeyWithBodyWithResponse(ctx context.C return ParseCreatePreAuthKeyResponse(rsp) } +// CreatePreAuthKeyWithResponse Create pre-auth key +// +// 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/preauthkey (the `CreatePreAuthKey` operationId). func (c *ClientWithResponses) CreatePreAuthKeyWithResponse(ctx context.Context, body CreatePreAuthKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePreAuthKeyResponse, error) { rsp, err := c.CreatePreAuthKey(ctx, body, reqEditors...) if err != nil { @@ -3709,7 +4914,11 @@ func (c *ClientWithResponses) CreatePreAuthKeyWithResponse(ctx context.Context, return ParseCreatePreAuthKeyResponse(rsp) } -// ExpirePreAuthKeyWithBodyWithResponse request with arbitrary body returning *ExpirePreAuthKeyResponse +// ExpirePreAuthKeyWithBodyWithResponse Expire pre-auth key +// +// 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/preauthkey/expire (the `ExpirePreAuthKey` operationId). func (c *ClientWithResponses) ExpirePreAuthKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ExpirePreAuthKeyResponse, error) { rsp, err := c.ExpirePreAuthKeyWithBody(ctx, contentType, body, reqEditors...) if err != nil { @@ -3718,6 +4927,11 @@ func (c *ClientWithResponses) ExpirePreAuthKeyWithBodyWithResponse(ctx context.C return ParseExpirePreAuthKeyResponse(rsp) } +// ExpirePreAuthKeyWithResponse Expire pre-auth key +// +// 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/preauthkey/expire (the `ExpirePreAuthKey` operationId). func (c *ClientWithResponses) ExpirePreAuthKeyWithResponse(ctx context.Context, body ExpirePreAuthKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*ExpirePreAuthKeyResponse, error) { rsp, err := c.ExpirePreAuthKey(ctx, body, reqEditors...) if err != nil { @@ -3726,7 +4940,11 @@ func (c *ClientWithResponses) ExpirePreAuthKeyWithResponse(ctx context.Context, return ParseExpirePreAuthKeyResponse(rsp) } -// ListUsersWithResponse request returning *ListUsersResponse +// ListUsersWithResponse List users +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /api/v1/user (the `ListUsers` operationId). func (c *ClientWithResponses) ListUsersWithResponse(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*ListUsersResponse, error) { rsp, err := c.ListUsers(ctx, params, reqEditors...) if err != nil { @@ -3735,7 +4953,11 @@ func (c *ClientWithResponses) ListUsersWithResponse(ctx context.Context, params return ParseListUsersResponse(rsp) } -// CreateUserWithBodyWithResponse request with arbitrary body returning *CreateUserResponse +// CreateUserWithBodyWithResponse Create user +// +// 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/user (the `CreateUser` operationId). func (c *ClientWithResponses) CreateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUserResponse, error) { rsp, err := c.CreateUserWithBody(ctx, contentType, body, reqEditors...) if err != nil { @@ -3744,6 +4966,11 @@ func (c *ClientWithResponses) CreateUserWithBodyWithResponse(ctx context.Context return ParseCreateUserResponse(rsp) } +// CreateUserWithResponse Create user +// +// 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/user (the `CreateUser` operationId). func (c *ClientWithResponses) CreateUserWithResponse(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUserResponse, error) { rsp, err := c.CreateUser(ctx, body, reqEditors...) if err != nil { @@ -3752,7 +4979,11 @@ func (c *ClientWithResponses) CreateUserWithResponse(ctx context.Context, body C return ParseCreateUserResponse(rsp) } -// DeleteUserWithResponse request returning *DeleteUserResponse +// DeleteUserWithResponse Delete user +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with DELETE /api/v1/user/{id} (the `DeleteUser` operationId). func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) { rsp, err := c.DeleteUser(ctx, id, reqEditors...) if err != nil { @@ -3761,7 +4992,11 @@ func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, id str return ParseDeleteUserResponse(rsp) } -// RenameUserWithResponse request returning *RenameUserResponse +// RenameUserWithResponse Rename user +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with POST /api/v1/user/{oldId}/rename/{newName} (the `RenameUser` operationId). func (c *ClientWithResponses) RenameUserWithResponse(ctx context.Context, oldId string, newName string, reqEditors ...RequestEditorFn) (*RenameUserResponse, error) { rsp, err := c.RenameUser(ctx, oldId, newName, reqEditors...) if err != nil { diff --git a/gen/client/v2/client.gen.go b/gen/client/v2/client.gen.go index c31b47ab..07d886a9 100644 --- a/gen/client/v2/client.gen.go +++ b/gen/client/v2/client.gen.go @@ -1,6 +1,6 @@ // Package clientv2 provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.1 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT. package clientv2 import ( @@ -18,11 +18,6 @@ import ( openapi_types "github.com/oapi-codegen/runtime/types" ) -const ( - BasicAuthScopes basicAuthContextKey = "basicAuth.Scopes" - BearerAuthScopes bearerAuthContextKey = "bearerAuth.Scopes" -) - // CreateKeyRequest defines model for CreateKeyRequest. type CreateKeyRequest struct { Capabilities *KeyCapabilities `json:"capabilities,omitempty"` @@ -92,21 +87,31 @@ type ErrorDetail struct { // ErrorModel defines model for ErrorModel. type ErrorModel struct { // Detail A human-readable explanation specific to this occurrence of the problem. + // + // Example: Property foo is required but is missing. Detail *string `json:"detail,omitempty"` // Errors Optional list of individual error details Errors *[]ErrorDetail `json:"errors,omitempty"` // Instance A URI reference that identifies the specific occurrence of the problem. + // + // Example: https://example.com/error-log/abc123 Instance *string `json:"instance,omitempty"` // Status HTTP status code + // + // Example: 400 Status *int64 `json:"status,omitempty"` // Title A short, human-readable summary of the problem type. This value should not change between occurrences of the error. + // + // Example: Bad Request Title *string `json:"title,omitempty"` // Type A URI reference to human-readable documentation for the error. + // + // Example: https://example.com/errors/example Type *string `json:"type,omitempty"` } @@ -216,12 +221,6 @@ type User struct { Type string `json:"type"` } -// basicAuthContextKey is the context key for basicAuth security scheme -type basicAuthContextKey string - -// bearerAuthContextKey is the context key for bearerAuth security scheme -type bearerAuthContextKey string - // DeleteDeviceParams defines parameters for DeleteDevice. type DeleteDeviceParams struct { // Fields Set to "all" for route fields. @@ -303,7 +302,7 @@ type CreateKeyJSONRequestBody = CreateKeyRequest // UpdateTailnetSettingsJSONRequestBody defines body for UpdateTailnetSettings for application/json ContentType. type UpdateTailnetSettingsJSONRequestBody = UpdateTailnetSettingsJSONBody -// RequestEditorFn is the function signature for the RequestEditor callback function +// RequestEditorFn is the function signature for the RequestEditor callback function type RequestEditorFn func(ctx context.Context, req *http.Request) error // Doer performs HTTP requests. @@ -376,80 +375,234 @@ func WithRequestEditorFn(fn RequestEditorFn) ClientOption { // The interface specification for the client above. type ClientInterface interface { - // DeleteDevice request + + // DeleteDevice Delete a device + // + // Requires the `devices:core` OAuth scope (an admin API key is all-access). + // + // Corresponds with DELETE /api/v2/device/{id} (the `DeleteDevice` operationId). DeleteDevice(ctx context.Context, id string, params *DeleteDeviceParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetDevice request + // GetDevice Get a device + // + // Requires the `devices:core:read` OAuth scope (an admin API key is all-access). + // + // Corresponds with GET /api/v2/device/{id} (the `GetDevice` operationId). GetDevice(ctx context.Context, id string, params *GetDeviceParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // AuthorizeDeviceWithBody request with any body + // AuthorizeDeviceWithBody Authorize a device + // + // Requires the `devices:core` OAuth scope (an admin API key is all-access). + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /api/v2/device/{id}/authorized (the `AuthorizeDevice` operationId). AuthorizeDeviceWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // AuthorizeDevice Authorize a device + // + // Requires the `devices:core` OAuth scope (an admin API key is all-access). + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /api/v2/device/{id}/authorized (the `AuthorizeDevice` operationId). AuthorizeDevice(ctx context.Context, id string, body AuthorizeDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // SetDeviceKeyWithBody request with any body + // SetDeviceKeyWithBody Set a device's key settings + // + // Requires the `devices:core` OAuth scope (an admin API key is all-access). + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /api/v2/device/{id}/key (the `SetDeviceKey` operationId). SetDeviceKeyWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // SetDeviceKey Set a device's key settings + // + // Requires the `devices:core` OAuth scope (an admin API key is all-access). + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /api/v2/device/{id}/key (the `SetDeviceKey` operationId). SetDeviceKey(ctx context.Context, id string, body SetDeviceKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // SetDeviceNameWithBody request with any body + // SetDeviceNameWithBody Set a device's name + // + // Requires the `devices:core` OAuth scope (an admin API key is all-access). + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /api/v2/device/{id}/name (the `SetDeviceName` operationId). SetDeviceNameWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // SetDeviceName Set a device's name + // + // Requires the `devices:core` OAuth scope (an admin API key is all-access). + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /api/v2/device/{id}/name (the `SetDeviceName` operationId). SetDeviceName(ctx context.Context, id string, body SetDeviceNameJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetDeviceRoutes request + // GetDeviceRoutes Get a device's subnet routes + // + // Requires the `devices:routes:read` OAuth scope (an admin API key is all-access). + // + // Corresponds with GET /api/v2/device/{id}/routes (the `GetDeviceRoutes` operationId). GetDeviceRoutes(ctx context.Context, id string, params *GetDeviceRoutesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // SetDeviceRoutesWithBody request with any body + // SetDeviceRoutesWithBody Set a device's enabled subnet routes + // + // Requires the `devices:routes` OAuth scope (an admin API key is all-access). + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /api/v2/device/{id}/routes (the `SetDeviceRoutes` operationId). SetDeviceRoutesWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // SetDeviceRoutes Set a device's enabled subnet routes + // + // Requires the `devices:routes` OAuth scope (an admin API key is all-access). + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /api/v2/device/{id}/routes (the `SetDeviceRoutes` operationId). SetDeviceRoutes(ctx context.Context, id string, body SetDeviceRoutesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // SetDeviceTagsWithBody request with any body + // SetDeviceTagsWithBody Set a device's tags + // + // Requires the `devices:core` OAuth scope (an admin API key is all-access). + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /api/v2/device/{id}/tags (the `SetDeviceTags` operationId). SetDeviceTagsWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // SetDeviceTags Set a device's tags + // + // Requires the `devices:core` OAuth scope (an admin API key is all-access). + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /api/v2/device/{id}/tags (the `SetDeviceTags` operationId). SetDeviceTags(ctx context.Context, id string, body SetDeviceTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetACL request + // GetACL Get the policy file + // + // Requires the `policy_file:read` OAuth scope (an admin API key is all-access). + // + // Corresponds with GET /api/v2/tailnet/{tailnet}/acl (the `GetACL` operationId). GetACL(ctx context.Context, tailnet string, params *GetACLParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // SetACLWithBody request with any body + // SetACLWithBody Set the policy file + // + // Requires the `policy_file` OAuth scope (an admin API key is all-access). + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /api/v2/tailnet/{tailnet}/acl (the `SetACL` operationId). SetACLWithBody(ctx context.Context, tailnet string, params *SetACLParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // SetACL Set the policy file + // + // Requires the `policy_file` OAuth scope (an admin API key is all-access). + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /api/v2/tailnet/{tailnet}/acl (the `SetACL` operationId). SetACL(ctx context.Context, tailnet string, params *SetACLParams, body SetACLJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListDevices request + // ListDevices List devices + // + // Requires the `devices:core:read` OAuth scope (an admin API key is all-access). + // + // Corresponds with GET /api/v2/tailnet/{tailnet}/devices (the `ListDevices` operationId). ListDevices(ctx context.Context, tailnet string, params *ListDevicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListKeys request + // ListKeys List auth keys and OAuth clients + // + // A token sees the kinds it can read: `auth_keys:read` for auth keys, `oauth_keys:read` for OAuth clients (an admin API key sees all). + // + // Corresponds with GET /api/v2/tailnet/{tailnet}/keys (the `ListKeys` operationId). ListKeys(ctx context.Context, tailnet string, params *ListKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateKeyWithBody request with any body + // CreateKeyWithBody Create an auth key or OAuth client + // + // Requires the `auth_keys` scope for an auth key, or `oauth_keys` for an OAuth client (an admin API key is all-access). + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /api/v2/tailnet/{tailnet}/keys (the `CreateKey` operationId). CreateKeyWithBody(ctx context.Context, tailnet string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateKey Create an auth key or OAuth client + // + // Requires the `auth_keys` scope for an auth key, or `oauth_keys` for an OAuth client (an admin API key is all-access). + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /api/v2/tailnet/{tailnet}/keys (the `CreateKey` operationId). CreateKey(ctx context.Context, tailnet string, body CreateKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteKey request + // DeleteKey Delete an auth key or OAuth client + // + // Requires the `auth_keys` scope for an auth key, or `oauth_keys` for an OAuth client (an admin API key is all-access). + // + // Corresponds with DELETE /api/v2/tailnet/{tailnet}/keys/{keyId} (the `DeleteKey` operationId). DeleteKey(ctx context.Context, tailnet string, keyId string, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetKey request + // GetKey Get an auth key or OAuth client + // + // Requires `auth_keys:read` for an auth key, or `oauth_keys:read` for an OAuth client (an admin API key is all-access). + // + // Corresponds with GET /api/v2/tailnet/{tailnet}/keys/{keyId} (the `GetKey` operationId). GetKey(ctx context.Context, tailnet string, keyId string, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetTailnetSettings request + // GetTailnetSettings Get tailnet settings + // + // Requires the `feature_settings:read` OAuth scope (an admin API key is all-access). + // + // Corresponds with GET /api/v2/tailnet/{tailnet}/settings (the `GetTailnetSettings` operationId). GetTailnetSettings(ctx context.Context, tailnet string, reqEditors ...RequestEditorFn) (*http.Response, error) - // UpdateTailnetSettingsWithBody request with any body + // UpdateTailnetSettingsWithBody Update tailnet settings + // + // Requires the `feature_settings` OAuth scope (an admin API key is all-access). + // + // Takes any type of body and a specified content type. + // + // Corresponds with PATCH /api/v2/tailnet/{tailnet}/settings (the `UpdateTailnetSettings` operationId). UpdateTailnetSettingsWithBody(ctx context.Context, tailnet string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // UpdateTailnetSettings Update tailnet settings + // + // Requires the `feature_settings` OAuth scope (an admin API key is all-access). + // + // Takes a body of the `application/json` content type. + // + // Corresponds with PATCH /api/v2/tailnet/{tailnet}/settings (the `UpdateTailnetSettings` operationId). UpdateTailnetSettings(ctx context.Context, tailnet string, body UpdateTailnetSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListUsers request + // ListUsers List users + // + // Requires the `users:read` OAuth scope (an admin API key is all-access). + // + // Corresponds with GET /api/v2/tailnet/{tailnet}/users (the `ListUsers` operationId). ListUsers(ctx context.Context, tailnet string, params *ListUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetUser request + // GetUser Get a user + // + // Requires the `users:read` OAuth scope (an admin API key is all-access). + // + // Corresponds with GET /api/v2/users/{id} (the `GetUser` operationId). GetUser(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) } +// DeleteDevice Delete a device +// +// Requires the `devices:core` OAuth scope (an admin API key is all-access). +// +// Corresponds with DELETE /api/v2/device/{id} (the `DeleteDevice` operationId). func (c *Client) DeleteDevice(ctx context.Context, id string, params *DeleteDeviceParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteDeviceRequest(c.Server, id, params) if err != nil { @@ -462,6 +615,11 @@ func (c *Client) DeleteDevice(ctx context.Context, id string, params *DeleteDevi return c.Client.Do(req) } +// GetDevice Get a device +// +// Requires the `devices:core:read` OAuth scope (an admin API key is all-access). +// +// Corresponds with GET /api/v2/device/{id} (the `GetDevice` operationId). func (c *Client) GetDevice(ctx context.Context, id string, params *GetDeviceParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetDeviceRequest(c.Server, id, params) if err != nil { @@ -474,6 +632,13 @@ func (c *Client) GetDevice(ctx context.Context, id string, params *GetDevicePara return c.Client.Do(req) } +// AuthorizeDeviceWithBody Authorize a device +// +// Requires the `devices:core` OAuth scope (an admin API key is all-access). +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /api/v2/device/{id}/authorized (the `AuthorizeDevice` operationId). func (c *Client) AuthorizeDeviceWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewAuthorizeDeviceRequestWithBody(c.Server, id, contentType, body) if err != nil { @@ -486,6 +651,13 @@ func (c *Client) AuthorizeDeviceWithBody(ctx context.Context, id string, content return c.Client.Do(req) } +// AuthorizeDevice Authorize a device +// +// Requires the `devices:core` OAuth scope (an admin API key is all-access). +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /api/v2/device/{id}/authorized (the `AuthorizeDevice` operationId). func (c *Client) AuthorizeDevice(ctx context.Context, id string, body AuthorizeDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewAuthorizeDeviceRequest(c.Server, id, body) if err != nil { @@ -498,6 +670,13 @@ func (c *Client) AuthorizeDevice(ctx context.Context, id string, body AuthorizeD return c.Client.Do(req) } +// SetDeviceKeyWithBody Set a device's key settings +// +// Requires the `devices:core` OAuth scope (an admin API key is all-access). +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /api/v2/device/{id}/key (the `SetDeviceKey` operationId). func (c *Client) SetDeviceKeyWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewSetDeviceKeyRequestWithBody(c.Server, id, contentType, body) if err != nil { @@ -510,6 +689,13 @@ func (c *Client) SetDeviceKeyWithBody(ctx context.Context, id string, contentTyp return c.Client.Do(req) } +// SetDeviceKey Set a device's key settings +// +// Requires the `devices:core` OAuth scope (an admin API key is all-access). +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /api/v2/device/{id}/key (the `SetDeviceKey` operationId). func (c *Client) SetDeviceKey(ctx context.Context, id string, body SetDeviceKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewSetDeviceKeyRequest(c.Server, id, body) if err != nil { @@ -522,6 +708,13 @@ func (c *Client) SetDeviceKey(ctx context.Context, id string, body SetDeviceKeyJ return c.Client.Do(req) } +// SetDeviceNameWithBody Set a device's name +// +// Requires the `devices:core` OAuth scope (an admin API key is all-access). +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /api/v2/device/{id}/name (the `SetDeviceName` operationId). func (c *Client) SetDeviceNameWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewSetDeviceNameRequestWithBody(c.Server, id, contentType, body) if err != nil { @@ -534,6 +727,13 @@ func (c *Client) SetDeviceNameWithBody(ctx context.Context, id string, contentTy return c.Client.Do(req) } +// SetDeviceName Set a device's name +// +// Requires the `devices:core` OAuth scope (an admin API key is all-access). +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /api/v2/device/{id}/name (the `SetDeviceName` operationId). func (c *Client) SetDeviceName(ctx context.Context, id string, body SetDeviceNameJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewSetDeviceNameRequest(c.Server, id, body) if err != nil { @@ -546,6 +746,11 @@ func (c *Client) SetDeviceName(ctx context.Context, id string, body SetDeviceNam return c.Client.Do(req) } +// GetDeviceRoutes Get a device's subnet routes +// +// Requires the `devices:routes:read` OAuth scope (an admin API key is all-access). +// +// Corresponds with GET /api/v2/device/{id}/routes (the `GetDeviceRoutes` operationId). func (c *Client) GetDeviceRoutes(ctx context.Context, id string, params *GetDeviceRoutesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetDeviceRoutesRequest(c.Server, id, params) if err != nil { @@ -558,6 +763,13 @@ func (c *Client) GetDeviceRoutes(ctx context.Context, id string, params *GetDevi return c.Client.Do(req) } +// SetDeviceRoutesWithBody Set a device's enabled subnet routes +// +// Requires the `devices:routes` OAuth scope (an admin API key is all-access). +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /api/v2/device/{id}/routes (the `SetDeviceRoutes` operationId). func (c *Client) SetDeviceRoutesWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewSetDeviceRoutesRequestWithBody(c.Server, id, contentType, body) if err != nil { @@ -570,6 +782,13 @@ func (c *Client) SetDeviceRoutesWithBody(ctx context.Context, id string, content return c.Client.Do(req) } +// SetDeviceRoutes Set a device's enabled subnet routes +// +// Requires the `devices:routes` OAuth scope (an admin API key is all-access). +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /api/v2/device/{id}/routes (the `SetDeviceRoutes` operationId). func (c *Client) SetDeviceRoutes(ctx context.Context, id string, body SetDeviceRoutesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewSetDeviceRoutesRequest(c.Server, id, body) if err != nil { @@ -582,6 +801,13 @@ func (c *Client) SetDeviceRoutes(ctx context.Context, id string, body SetDeviceR return c.Client.Do(req) } +// SetDeviceTagsWithBody Set a device's tags +// +// Requires the `devices:core` OAuth scope (an admin API key is all-access). +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /api/v2/device/{id}/tags (the `SetDeviceTags` operationId). func (c *Client) SetDeviceTagsWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewSetDeviceTagsRequestWithBody(c.Server, id, contentType, body) if err != nil { @@ -594,6 +820,13 @@ func (c *Client) SetDeviceTagsWithBody(ctx context.Context, id string, contentTy return c.Client.Do(req) } +// SetDeviceTags Set a device's tags +// +// Requires the `devices:core` OAuth scope (an admin API key is all-access). +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /api/v2/device/{id}/tags (the `SetDeviceTags` operationId). func (c *Client) SetDeviceTags(ctx context.Context, id string, body SetDeviceTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewSetDeviceTagsRequest(c.Server, id, body) if err != nil { @@ -606,6 +839,11 @@ func (c *Client) SetDeviceTags(ctx context.Context, id string, body SetDeviceTag return c.Client.Do(req) } +// GetACL Get the policy file +// +// Requires the `policy_file:read` OAuth scope (an admin API key is all-access). +// +// Corresponds with GET /api/v2/tailnet/{tailnet}/acl (the `GetACL` operationId). func (c *Client) GetACL(ctx context.Context, tailnet string, params *GetACLParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetACLRequest(c.Server, tailnet, params) if err != nil { @@ -618,6 +856,13 @@ func (c *Client) GetACL(ctx context.Context, tailnet string, params *GetACLParam return c.Client.Do(req) } +// SetACLWithBody Set the policy file +// +// Requires the `policy_file` OAuth scope (an admin API key is all-access). +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /api/v2/tailnet/{tailnet}/acl (the `SetACL` operationId). func (c *Client) SetACLWithBody(ctx context.Context, tailnet string, params *SetACLParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewSetACLRequestWithBody(c.Server, tailnet, params, contentType, body) if err != nil { @@ -630,6 +875,13 @@ func (c *Client) SetACLWithBody(ctx context.Context, tailnet string, params *Set return c.Client.Do(req) } +// SetACL Set the policy file +// +// Requires the `policy_file` OAuth scope (an admin API key is all-access). +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /api/v2/tailnet/{tailnet}/acl (the `SetACL` operationId). func (c *Client) SetACL(ctx context.Context, tailnet string, params *SetACLParams, body SetACLJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewSetACLRequest(c.Server, tailnet, params, body) if err != nil { @@ -642,6 +894,11 @@ func (c *Client) SetACL(ctx context.Context, tailnet string, params *SetACLParam return c.Client.Do(req) } +// ListDevices List devices +// +// Requires the `devices:core:read` OAuth scope (an admin API key is all-access). +// +// Corresponds with GET /api/v2/tailnet/{tailnet}/devices (the `ListDevices` operationId). func (c *Client) ListDevices(ctx context.Context, tailnet string, params *ListDevicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListDevicesRequest(c.Server, tailnet, params) if err != nil { @@ -654,6 +911,11 @@ func (c *Client) ListDevices(ctx context.Context, tailnet string, params *ListDe return c.Client.Do(req) } +// ListKeys List auth keys and OAuth clients +// +// A token sees the kinds it can read: `auth_keys:read` for auth keys, `oauth_keys:read` for OAuth clients (an admin API key sees all). +// +// Corresponds with GET /api/v2/tailnet/{tailnet}/keys (the `ListKeys` operationId). func (c *Client) ListKeys(ctx context.Context, tailnet string, params *ListKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListKeysRequest(c.Server, tailnet, params) if err != nil { @@ -666,6 +928,13 @@ func (c *Client) ListKeys(ctx context.Context, tailnet string, params *ListKeysP return c.Client.Do(req) } +// CreateKeyWithBody Create an auth key or OAuth client +// +// Requires the `auth_keys` scope for an auth key, or `oauth_keys` for an OAuth client (an admin API key is all-access). +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /api/v2/tailnet/{tailnet}/keys (the `CreateKey` operationId). func (c *Client) CreateKeyWithBody(ctx context.Context, tailnet string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCreateKeyRequestWithBody(c.Server, tailnet, contentType, body) if err != nil { @@ -678,6 +947,13 @@ func (c *Client) CreateKeyWithBody(ctx context.Context, tailnet string, contentT return c.Client.Do(req) } +// CreateKey Create an auth key or OAuth client +// +// Requires the `auth_keys` scope for an auth key, or `oauth_keys` for an OAuth client (an admin API key is all-access). +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /api/v2/tailnet/{tailnet}/keys (the `CreateKey` operationId). func (c *Client) CreateKey(ctx context.Context, tailnet string, body CreateKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCreateKeyRequest(c.Server, tailnet, body) if err != nil { @@ -690,6 +966,11 @@ func (c *Client) CreateKey(ctx context.Context, tailnet string, body CreateKeyJS return c.Client.Do(req) } +// DeleteKey Delete an auth key or OAuth client +// +// Requires the `auth_keys` scope for an auth key, or `oauth_keys` for an OAuth client (an admin API key is all-access). +// +// Corresponds with DELETE /api/v2/tailnet/{tailnet}/keys/{keyId} (the `DeleteKey` operationId). func (c *Client) DeleteKey(ctx context.Context, tailnet string, keyId string, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteKeyRequest(c.Server, tailnet, keyId) if err != nil { @@ -702,6 +983,11 @@ func (c *Client) DeleteKey(ctx context.Context, tailnet string, keyId string, re return c.Client.Do(req) } +// GetKey Get an auth key or OAuth client +// +// Requires `auth_keys:read` for an auth key, or `oauth_keys:read` for an OAuth client (an admin API key is all-access). +// +// Corresponds with GET /api/v2/tailnet/{tailnet}/keys/{keyId} (the `GetKey` operationId). func (c *Client) GetKey(ctx context.Context, tailnet string, keyId string, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetKeyRequest(c.Server, tailnet, keyId) if err != nil { @@ -714,6 +1000,11 @@ func (c *Client) GetKey(ctx context.Context, tailnet string, keyId string, reqEd return c.Client.Do(req) } +// GetTailnetSettings Get tailnet settings +// +// Requires the `feature_settings:read` OAuth scope (an admin API key is all-access). +// +// Corresponds with GET /api/v2/tailnet/{tailnet}/settings (the `GetTailnetSettings` operationId). func (c *Client) GetTailnetSettings(ctx context.Context, tailnet string, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetTailnetSettingsRequest(c.Server, tailnet) if err != nil { @@ -726,6 +1017,13 @@ func (c *Client) GetTailnetSettings(ctx context.Context, tailnet string, reqEdit return c.Client.Do(req) } +// UpdateTailnetSettingsWithBody Update tailnet settings +// +// Requires the `feature_settings` OAuth scope (an admin API key is all-access). +// +// Takes any type of body and a specified content type. +// +// Corresponds with PATCH /api/v2/tailnet/{tailnet}/settings (the `UpdateTailnetSettings` operationId). func (c *Client) UpdateTailnetSettingsWithBody(ctx context.Context, tailnet string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewUpdateTailnetSettingsRequestWithBody(c.Server, tailnet, contentType, body) if err != nil { @@ -738,6 +1036,13 @@ func (c *Client) UpdateTailnetSettingsWithBody(ctx context.Context, tailnet stri return c.Client.Do(req) } +// UpdateTailnetSettings Update tailnet settings +// +// Requires the `feature_settings` OAuth scope (an admin API key is all-access). +// +// Takes a body of the `application/json` content type. +// +// Corresponds with PATCH /api/v2/tailnet/{tailnet}/settings (the `UpdateTailnetSettings` operationId). func (c *Client) UpdateTailnetSettings(ctx context.Context, tailnet string, body UpdateTailnetSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewUpdateTailnetSettingsRequest(c.Server, tailnet, body) if err != nil { @@ -750,6 +1055,11 @@ func (c *Client) UpdateTailnetSettings(ctx context.Context, tailnet string, body return c.Client.Do(req) } +// ListUsers List users +// +// Requires the `users:read` OAuth scope (an admin API key is all-access). +// +// Corresponds with GET /api/v2/tailnet/{tailnet}/users (the `ListUsers` operationId). func (c *Client) ListUsers(ctx context.Context, tailnet string, params *ListUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListUsersRequest(c.Server, tailnet, params) if err != nil { @@ -762,6 +1072,11 @@ func (c *Client) ListUsers(ctx context.Context, tailnet string, params *ListUser return c.Client.Do(req) } +// GetUser Get a user +// +// Requires the `users:read` OAuth scope (an admin API key is all-access). +// +// Corresponds with GET /api/v2/users/{id} (the `GetUser` operationId). func (c *Client) GetUser(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetUserRequest(c.Server, id) if err != nil { @@ -774,7 +1089,7 @@ func (c *Client) GetUser(ctx context.Context, id string, reqEditors ...RequestEd return c.Client.Do(req) } -// NewDeleteDeviceRequest generates requests for DeleteDevice +// NewDeleteDeviceRequest constructs an http.Request for the DeleteDevice method func NewDeleteDeviceRequest(server string, id string, params *DeleteDeviceParams) (*http.Request, error) { var err error @@ -835,7 +1150,7 @@ func NewDeleteDeviceRequest(server string, id string, params *DeleteDeviceParams return req, nil } -// NewGetDeviceRequest generates requests for GetDevice +// NewGetDeviceRequest constructs an http.Request for the GetDevice method func NewGetDeviceRequest(server string, id string, params *GetDeviceParams) (*http.Request, error) { var err error @@ -907,7 +1222,7 @@ func NewAuthorizeDeviceRequest(server string, id string, body AuthorizeDeviceJSO return NewAuthorizeDeviceRequestWithBody(server, id, "application/json", bodyReader) } -// NewAuthorizeDeviceRequestWithBody generates requests for AuthorizeDevice with any type of body +// NewAuthorizeDeviceRequestWithBody constructs an http.Request for the AuthorizeDevice method, with any body, and a specified content type func NewAuthorizeDeviceRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -954,7 +1269,7 @@ func NewSetDeviceKeyRequest(server string, id string, body SetDeviceKeyJSONReque return NewSetDeviceKeyRequestWithBody(server, id, "application/json", bodyReader) } -// NewSetDeviceKeyRequestWithBody generates requests for SetDeviceKey with any type of body +// NewSetDeviceKeyRequestWithBody constructs an http.Request for the SetDeviceKey method, with any body, and a specified content type func NewSetDeviceKeyRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -1001,7 +1316,7 @@ func NewSetDeviceNameRequest(server string, id string, body SetDeviceNameJSONReq return NewSetDeviceNameRequestWithBody(server, id, "application/json", bodyReader) } -// NewSetDeviceNameRequestWithBody generates requests for SetDeviceName with any type of body +// NewSetDeviceNameRequestWithBody constructs an http.Request for the SetDeviceName method, with any body, and a specified content type func NewSetDeviceNameRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -1037,7 +1352,7 @@ func NewSetDeviceNameRequestWithBody(server string, id string, contentType strin return req, nil } -// NewGetDeviceRoutesRequest generates requests for GetDeviceRoutes +// NewGetDeviceRoutesRequest constructs an http.Request for the GetDeviceRoutes method func NewGetDeviceRoutesRequest(server string, id string, params *GetDeviceRoutesParams) (*http.Request, error) { var err error @@ -1109,7 +1424,7 @@ func NewSetDeviceRoutesRequest(server string, id string, body SetDeviceRoutesJSO return NewSetDeviceRoutesRequestWithBody(server, id, "application/json", bodyReader) } -// NewSetDeviceRoutesRequestWithBody generates requests for SetDeviceRoutes with any type of body +// NewSetDeviceRoutesRequestWithBody constructs an http.Request for the SetDeviceRoutes method, with any body, and a specified content type func NewSetDeviceRoutesRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -1156,7 +1471,7 @@ func NewSetDeviceTagsRequest(server string, id string, body SetDeviceTagsJSONReq return NewSetDeviceTagsRequestWithBody(server, id, "application/json", bodyReader) } -// NewSetDeviceTagsRequestWithBody generates requests for SetDeviceTags with any type of body +// NewSetDeviceTagsRequestWithBody constructs an http.Request for the SetDeviceTags method, with any body, and a specified content type func NewSetDeviceTagsRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -1192,7 +1507,7 @@ func NewSetDeviceTagsRequestWithBody(server string, id string, contentType strin return req, nil } -// NewGetACLRequest generates requests for GetACL +// NewGetACLRequest constructs an http.Request for the GetACL method func NewGetACLRequest(server string, tailnet string, params *GetACLParams) (*http.Request, error) { var err error @@ -1279,7 +1594,7 @@ func NewSetACLRequest(server string, tailnet string, params *SetACLParams, body return NewSetACLRequestWithBody(server, tailnet, params, "application/json", bodyReader) } -// NewSetACLRequestWithBody generates requests for SetACL with any type of body +// NewSetACLRequestWithBody constructs an http.Request for the SetACL method, with any body, and a specified content type func NewSetACLRequestWithBody(server string, tailnet string, params *SetACLParams, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -1341,7 +1656,7 @@ func NewSetACLRequestWithBody(server string, tailnet string, params *SetACLParam return req, nil } -// NewListDevicesRequest generates requests for ListDevices +// NewListDevicesRequest constructs an http.Request for the ListDevices method func NewListDevicesRequest(server string, tailnet string, params *ListDevicesParams) (*http.Request, error) { var err error @@ -1402,7 +1717,7 @@ func NewListDevicesRequest(server string, tailnet string, params *ListDevicesPar return req, nil } -// NewListKeysRequest generates requests for ListKeys +// NewListKeysRequest constructs an http.Request for the ListKeys method func NewListKeysRequest(server string, tailnet string, params *ListKeysParams) (*http.Request, error) { var err error @@ -1474,7 +1789,7 @@ func NewCreateKeyRequest(server string, tailnet string, body CreateKeyJSONReques return NewCreateKeyRequestWithBody(server, tailnet, "application/json", bodyReader) } -// NewCreateKeyRequestWithBody generates requests for CreateKey with any type of body +// NewCreateKeyRequestWithBody constructs an http.Request for the CreateKey method, with any body, and a specified content type func NewCreateKeyRequestWithBody(server string, tailnet string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -1510,7 +1825,7 @@ func NewCreateKeyRequestWithBody(server string, tailnet string, contentType stri return req, nil } -// NewDeleteKeyRequest generates requests for DeleteKey +// NewDeleteKeyRequest constructs an http.Request for the DeleteKey method func NewDeleteKeyRequest(server string, tailnet string, keyId string) (*http.Request, error) { var err error @@ -1551,7 +1866,7 @@ func NewDeleteKeyRequest(server string, tailnet string, keyId string) (*http.Req return req, nil } -// NewGetKeyRequest generates requests for GetKey +// NewGetKeyRequest constructs an http.Request for the GetKey method func NewGetKeyRequest(server string, tailnet string, keyId string) (*http.Request, error) { var err error @@ -1592,7 +1907,7 @@ func NewGetKeyRequest(server string, tailnet string, keyId string) (*http.Reques return req, nil } -// NewGetTailnetSettingsRequest generates requests for GetTailnetSettings +// NewGetTailnetSettingsRequest constructs an http.Request for the GetTailnetSettings method func NewGetTailnetSettingsRequest(server string, tailnet string) (*http.Request, error) { var err error @@ -1637,7 +1952,7 @@ func NewUpdateTailnetSettingsRequest(server string, tailnet string, body UpdateT return NewUpdateTailnetSettingsRequestWithBody(server, tailnet, "application/json", bodyReader) } -// NewUpdateTailnetSettingsRequestWithBody generates requests for UpdateTailnetSettings with any type of body +// NewUpdateTailnetSettingsRequestWithBody constructs an http.Request for the UpdateTailnetSettings method, with any body, and a specified content type func NewUpdateTailnetSettingsRequestWithBody(server string, tailnet string, contentType string, body io.Reader) (*http.Request, error) { var err error @@ -1673,7 +1988,7 @@ func NewUpdateTailnetSettingsRequestWithBody(server string, tailnet string, cont return req, nil } -// NewListUsersRequest generates requests for ListUsers +// NewListUsersRequest constructs an http.Request for the ListUsers method func NewListUsersRequest(server string, tailnet string, params *ListUsersParams) (*http.Request, error) { var err error @@ -1746,7 +2061,7 @@ func NewListUsersRequest(server string, tailnet string, params *ListUsersParams) return req, nil } -// NewGetUserRequest generates requests for GetUser +// NewGetUserRequest constructs an http.Request for the GetUser method func NewGetUserRequest(server string, id string) (*http.Request, error) { var err error @@ -1823,91 +2138,303 @@ func WithBaseURL(baseURL string) ClientOption { // ClientWithResponsesInterface is the interface specification for the client with responses above. type ClientWithResponsesInterface interface { - // DeleteDeviceWithResponse request + + // DeleteDeviceWithResponse Delete a device + // + // Requires the `devices:core` OAuth scope (an admin API key is all-access). + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /api/v2/device/{id} (the `DeleteDevice` operationId). DeleteDeviceWithResponse(ctx context.Context, id string, params *DeleteDeviceParams, reqEditors ...RequestEditorFn) (*DeleteDeviceResponse, error) - // GetDeviceWithResponse request + // GetDeviceWithResponse Get a device + // + // Requires the `devices:core:read` OAuth scope (an admin API key is all-access). + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /api/v2/device/{id} (the `GetDevice` operationId). GetDeviceWithResponse(ctx context.Context, id string, params *GetDeviceParams, reqEditors ...RequestEditorFn) (*GetDeviceResponse, error) - // AuthorizeDeviceWithBodyWithResponse request with any body + // AuthorizeDeviceWithBodyWithResponse Authorize a device + // + // Requires the `devices:core` OAuth scope (an admin API key is all-access). + // + // 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/v2/device/{id}/authorized (the `AuthorizeDevice` operationId). AuthorizeDeviceWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthorizeDeviceResponse, error) + // AuthorizeDeviceWithResponse Authorize a device + // + // Requires the `devices:core` OAuth scope (an admin API key is all-access). + // + // 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/v2/device/{id}/authorized (the `AuthorizeDevice` operationId). AuthorizeDeviceWithResponse(ctx context.Context, id string, body AuthorizeDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthorizeDeviceResponse, error) - // SetDeviceKeyWithBodyWithResponse request with any body + // SetDeviceKeyWithBodyWithResponse Set a device's key settings + // + // Requires the `devices:core` OAuth scope (an admin API key is all-access). + // + // 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/v2/device/{id}/key (the `SetDeviceKey` operationId). SetDeviceKeyWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetDeviceKeyResponse, error) + // SetDeviceKeyWithResponse Set a device's key settings + // + // Requires the `devices:core` OAuth scope (an admin API key is all-access). + // + // 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/v2/device/{id}/key (the `SetDeviceKey` operationId). SetDeviceKeyWithResponse(ctx context.Context, id string, body SetDeviceKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*SetDeviceKeyResponse, error) - // SetDeviceNameWithBodyWithResponse request with any body + // SetDeviceNameWithBodyWithResponse Set a device's name + // + // Requires the `devices:core` OAuth scope (an admin API key is all-access). + // + // 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/v2/device/{id}/name (the `SetDeviceName` operationId). SetDeviceNameWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetDeviceNameResponse, error) + // SetDeviceNameWithResponse Set a device's name + // + // Requires the `devices:core` OAuth scope (an admin API key is all-access). + // + // 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/v2/device/{id}/name (the `SetDeviceName` operationId). SetDeviceNameWithResponse(ctx context.Context, id string, body SetDeviceNameJSONRequestBody, reqEditors ...RequestEditorFn) (*SetDeviceNameResponse, error) - // GetDeviceRoutesWithResponse request + // GetDeviceRoutesWithResponse Get a device's subnet routes + // + // Requires the `devices:routes:read` OAuth scope (an admin API key is all-access). + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /api/v2/device/{id}/routes (the `GetDeviceRoutes` operationId). GetDeviceRoutesWithResponse(ctx context.Context, id string, params *GetDeviceRoutesParams, reqEditors ...RequestEditorFn) (*GetDeviceRoutesResponse, error) - // SetDeviceRoutesWithBodyWithResponse request with any body + // SetDeviceRoutesWithBodyWithResponse Set a device's enabled subnet routes + // + // Requires the `devices:routes` OAuth scope (an admin API key is all-access). + // + // 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/v2/device/{id}/routes (the `SetDeviceRoutes` operationId). SetDeviceRoutesWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetDeviceRoutesResponse, error) + // SetDeviceRoutesWithResponse Set a device's enabled subnet routes + // + // Requires the `devices:routes` OAuth scope (an admin API key is all-access). + // + // 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/v2/device/{id}/routes (the `SetDeviceRoutes` operationId). SetDeviceRoutesWithResponse(ctx context.Context, id string, body SetDeviceRoutesJSONRequestBody, reqEditors ...RequestEditorFn) (*SetDeviceRoutesResponse, error) - // SetDeviceTagsWithBodyWithResponse request with any body + // SetDeviceTagsWithBodyWithResponse Set a device's tags + // + // Requires the `devices:core` OAuth scope (an admin API key is all-access). + // + // 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/v2/device/{id}/tags (the `SetDeviceTags` operationId). SetDeviceTagsWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetDeviceTagsResponse, error) + // SetDeviceTagsWithResponse Set a device's tags + // + // Requires the `devices:core` OAuth scope (an admin API key is all-access). + // + // 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/v2/device/{id}/tags (the `SetDeviceTags` operationId). SetDeviceTagsWithResponse(ctx context.Context, id string, body SetDeviceTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*SetDeviceTagsResponse, error) - // GetACLWithResponse request + // GetACLWithResponse Get the policy file + // + // Requires the `policy_file:read` OAuth scope (an admin API key is all-access). + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /api/v2/tailnet/{tailnet}/acl (the `GetACL` operationId). GetACLWithResponse(ctx context.Context, tailnet string, params *GetACLParams, reqEditors ...RequestEditorFn) (*GetACLResponse, error) - // SetACLWithBodyWithResponse request with any body + // SetACLWithBodyWithResponse Set the policy file + // + // Requires the `policy_file` OAuth scope (an admin API key is all-access). + // + // 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/v2/tailnet/{tailnet}/acl (the `SetACL` operationId). SetACLWithBodyWithResponse(ctx context.Context, tailnet string, params *SetACLParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetACLResponse, error) + // SetACLWithResponse Set the policy file + // + // Requires the `policy_file` OAuth scope (an admin API key is all-access). + // + // 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/v2/tailnet/{tailnet}/acl (the `SetACL` operationId). SetACLWithResponse(ctx context.Context, tailnet string, params *SetACLParams, body SetACLJSONRequestBody, reqEditors ...RequestEditorFn) (*SetACLResponse, error) - // ListDevicesWithResponse request + // ListDevicesWithResponse List devices + // + // Requires the `devices:core:read` OAuth scope (an admin API key is all-access). + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /api/v2/tailnet/{tailnet}/devices (the `ListDevices` operationId). ListDevicesWithResponse(ctx context.Context, tailnet string, params *ListDevicesParams, reqEditors ...RequestEditorFn) (*ListDevicesResponse, error) - // ListKeysWithResponse request + // ListKeysWithResponse List auth keys and OAuth clients + // + // A token sees the kinds it can read: `auth_keys:read` for auth keys, `oauth_keys:read` for OAuth clients (an admin API key sees all). + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /api/v2/tailnet/{tailnet}/keys (the `ListKeys` operationId). ListKeysWithResponse(ctx context.Context, tailnet string, params *ListKeysParams, reqEditors ...RequestEditorFn) (*ListKeysResponse, error) - // CreateKeyWithBodyWithResponse request with any body + // CreateKeyWithBodyWithResponse Create an auth key or OAuth client + // + // Requires the `auth_keys` scope for an auth key, or `oauth_keys` for an OAuth client (an admin API key is all-access). + // + // 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/v2/tailnet/{tailnet}/keys (the `CreateKey` operationId). CreateKeyWithBodyWithResponse(ctx context.Context, tailnet string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateKeyResponse, error) + // CreateKeyWithResponse Create an auth key or OAuth client + // + // Requires the `auth_keys` scope for an auth key, or `oauth_keys` for an OAuth client (an admin API key is all-access). + // + // 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/v2/tailnet/{tailnet}/keys (the `CreateKey` operationId). CreateKeyWithResponse(ctx context.Context, tailnet string, body CreateKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateKeyResponse, error) - // DeleteKeyWithResponse request + // DeleteKeyWithResponse Delete an auth key or OAuth client + // + // Requires the `auth_keys` scope for an auth key, or `oauth_keys` for an OAuth client (an admin API key is all-access). + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /api/v2/tailnet/{tailnet}/keys/{keyId} (the `DeleteKey` operationId). DeleteKeyWithResponse(ctx context.Context, tailnet string, keyId string, reqEditors ...RequestEditorFn) (*DeleteKeyResponse, error) - // GetKeyWithResponse request + // GetKeyWithResponse Get an auth key or OAuth client + // + // Requires `auth_keys:read` for an auth key, or `oauth_keys:read` for an OAuth client (an admin API key is all-access). + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /api/v2/tailnet/{tailnet}/keys/{keyId} (the `GetKey` operationId). GetKeyWithResponse(ctx context.Context, tailnet string, keyId string, reqEditors ...RequestEditorFn) (*GetKeyResponse, error) - // GetTailnetSettingsWithResponse request + // GetTailnetSettingsWithResponse Get tailnet settings + // + // Requires the `feature_settings:read` OAuth scope (an admin API key is all-access). + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /api/v2/tailnet/{tailnet}/settings (the `GetTailnetSettings` operationId). GetTailnetSettingsWithResponse(ctx context.Context, tailnet string, reqEditors ...RequestEditorFn) (*GetTailnetSettingsResponse, error) - // UpdateTailnetSettingsWithBodyWithResponse request with any body + // UpdateTailnetSettingsWithBodyWithResponse Update tailnet settings + // + // Requires the `feature_settings` OAuth scope (an admin API key is all-access). + // + // 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/v2/tailnet/{tailnet}/settings (the `UpdateTailnetSettings` operationId). UpdateTailnetSettingsWithBodyWithResponse(ctx context.Context, tailnet string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTailnetSettingsResponse, error) + // UpdateTailnetSettingsWithResponse Update tailnet settings + // + // Requires the `feature_settings` OAuth scope (an admin API key is all-access). + // + // 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/v2/tailnet/{tailnet}/settings (the `UpdateTailnetSettings` operationId). UpdateTailnetSettingsWithResponse(ctx context.Context, tailnet string, body UpdateTailnetSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTailnetSettingsResponse, error) - // ListUsersWithResponse request + // ListUsersWithResponse List users + // + // Requires the `users:read` OAuth scope (an admin API key is all-access). + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /api/v2/tailnet/{tailnet}/users (the `ListUsers` operationId). ListUsersWithResponse(ctx context.Context, tailnet string, params *ListUsersParams, reqEditors ...RequestEditorFn) (*ListUsersResponse, error) - // GetUserWithResponse request + // GetUserWithResponse Get a user + // + // Requires the `users:read` OAuth scope (an admin API key is all-access). + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /api/v2/users/{id} (the `GetUser` operationId). GetUserWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetUserResponse, error) } type DeleteDeviceResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *EmptyOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *EmptyOutputBody + // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *ErrorModel + // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *ErrorModel + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *ErrorModel + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ErrorModel + // ApplicationproblemJSON500 the response for an HTTP 500 `application/problem+json` response ApplicationproblemJSON500 *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r DeleteDeviceResponse) GetJSON200() *EmptyOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r DeleteDeviceResponse) GetApplicationproblemJSON401() *ErrorModel { + return r.ApplicationproblemJSON401 +} + +// GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response +func (r DeleteDeviceResponse) GetApplicationproblemJSON403() *ErrorModel { + return r.ApplicationproblemJSON403 +} + +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r DeleteDeviceResponse) GetApplicationproblemJSON404() *ErrorModel { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r DeleteDeviceResponse) GetApplicationproblemJSON422() *ErrorModel { + return r.ApplicationproblemJSON422 +} + +// GetApplicationproblemJSON500 returns the response for an HTTP 500 `application/problem+json` response +func (r DeleteDeviceResponse) GetApplicationproblemJSON500() *ErrorModel { + return r.ApplicationproblemJSON500 +} + +// GetBody returns the raw response body bytes +func (r DeleteDeviceResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r DeleteDeviceResponse) Status() string { if r.HTTPResponse != nil { @@ -1933,16 +2460,57 @@ func (r DeleteDeviceResponse) ContentType() string { } type GetDeviceResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Device + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *Device + // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *ErrorModel + // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *ErrorModel + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *ErrorModel + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ErrorModel + // ApplicationproblemJSON500 the response for an HTTP 500 `application/problem+json` response ApplicationproblemJSON500 *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r GetDeviceResponse) GetJSON200() *Device { + return r.JSON200 +} + +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r GetDeviceResponse) GetApplicationproblemJSON401() *ErrorModel { + return r.ApplicationproblemJSON401 +} + +// GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response +func (r GetDeviceResponse) GetApplicationproblemJSON403() *ErrorModel { + return r.ApplicationproblemJSON403 +} + +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r GetDeviceResponse) GetApplicationproblemJSON404() *ErrorModel { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r GetDeviceResponse) GetApplicationproblemJSON422() *ErrorModel { + return r.ApplicationproblemJSON422 +} + +// GetApplicationproblemJSON500 returns the response for an HTTP 500 `application/problem+json` response +func (r GetDeviceResponse) GetApplicationproblemJSON500() *ErrorModel { + return r.ApplicationproblemJSON500 +} + +// GetBody returns the raw response body bytes +func (r GetDeviceResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r GetDeviceResponse) Status() string { if r.HTTPResponse != nil { @@ -1968,17 +2536,64 @@ func (r GetDeviceResponse) ContentType() string { } type AuthorizeDeviceResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *EmptyOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *EmptyOutputBody + // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *ErrorModel + // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *ErrorModel + // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *ErrorModel + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *ErrorModel + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ErrorModel + // ApplicationproblemJSON500 the response for an HTTP 500 `application/problem+json` response ApplicationproblemJSON500 *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r AuthorizeDeviceResponse) GetJSON200() *EmptyOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response +func (r AuthorizeDeviceResponse) GetApplicationproblemJSON400() *ErrorModel { + return r.ApplicationproblemJSON400 +} + +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r AuthorizeDeviceResponse) GetApplicationproblemJSON401() *ErrorModel { + return r.ApplicationproblemJSON401 +} + +// GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response +func (r AuthorizeDeviceResponse) GetApplicationproblemJSON403() *ErrorModel { + return r.ApplicationproblemJSON403 +} + +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r AuthorizeDeviceResponse) GetApplicationproblemJSON404() *ErrorModel { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r AuthorizeDeviceResponse) GetApplicationproblemJSON422() *ErrorModel { + return r.ApplicationproblemJSON422 +} + +// GetApplicationproblemJSON500 returns the response for an HTTP 500 `application/problem+json` response +func (r AuthorizeDeviceResponse) GetApplicationproblemJSON500() *ErrorModel { + return r.ApplicationproblemJSON500 +} + +// GetBody returns the raw response body bytes +func (r AuthorizeDeviceResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r AuthorizeDeviceResponse) Status() string { if r.HTTPResponse != nil { @@ -2004,17 +2619,64 @@ func (r AuthorizeDeviceResponse) ContentType() string { } type SetDeviceKeyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *EmptyOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *EmptyOutputBody + // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *ErrorModel + // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *ErrorModel + // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *ErrorModel + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *ErrorModel + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ErrorModel + // ApplicationproblemJSON500 the response for an HTTP 500 `application/problem+json` response ApplicationproblemJSON500 *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r SetDeviceKeyResponse) GetJSON200() *EmptyOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response +func (r SetDeviceKeyResponse) GetApplicationproblemJSON400() *ErrorModel { + return r.ApplicationproblemJSON400 +} + +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r SetDeviceKeyResponse) GetApplicationproblemJSON401() *ErrorModel { + return r.ApplicationproblemJSON401 +} + +// GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response +func (r SetDeviceKeyResponse) GetApplicationproblemJSON403() *ErrorModel { + return r.ApplicationproblemJSON403 +} + +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r SetDeviceKeyResponse) GetApplicationproblemJSON404() *ErrorModel { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r SetDeviceKeyResponse) GetApplicationproblemJSON422() *ErrorModel { + return r.ApplicationproblemJSON422 +} + +// GetApplicationproblemJSON500 returns the response for an HTTP 500 `application/problem+json` response +func (r SetDeviceKeyResponse) GetApplicationproblemJSON500() *ErrorModel { + return r.ApplicationproblemJSON500 +} + +// GetBody returns the raw response body bytes +func (r SetDeviceKeyResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r SetDeviceKeyResponse) Status() string { if r.HTTPResponse != nil { @@ -2040,17 +2702,64 @@ func (r SetDeviceKeyResponse) ContentType() string { } type SetDeviceNameResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *EmptyOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *EmptyOutputBody + // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *ErrorModel + // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *ErrorModel + // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *ErrorModel + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *ErrorModel + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ErrorModel + // ApplicationproblemJSON500 the response for an HTTP 500 `application/problem+json` response ApplicationproblemJSON500 *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r SetDeviceNameResponse) GetJSON200() *EmptyOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response +func (r SetDeviceNameResponse) GetApplicationproblemJSON400() *ErrorModel { + return r.ApplicationproblemJSON400 +} + +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r SetDeviceNameResponse) GetApplicationproblemJSON401() *ErrorModel { + return r.ApplicationproblemJSON401 +} + +// GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response +func (r SetDeviceNameResponse) GetApplicationproblemJSON403() *ErrorModel { + return r.ApplicationproblemJSON403 +} + +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r SetDeviceNameResponse) GetApplicationproblemJSON404() *ErrorModel { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r SetDeviceNameResponse) GetApplicationproblemJSON422() *ErrorModel { + return r.ApplicationproblemJSON422 +} + +// GetApplicationproblemJSON500 returns the response for an HTTP 500 `application/problem+json` response +func (r SetDeviceNameResponse) GetApplicationproblemJSON500() *ErrorModel { + return r.ApplicationproblemJSON500 +} + +// GetBody returns the raw response body bytes +func (r SetDeviceNameResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r SetDeviceNameResponse) Status() string { if r.HTTPResponse != nil { @@ -2076,16 +2785,57 @@ func (r SetDeviceNameResponse) ContentType() string { } type GetDeviceRoutesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *DeviceRoutes + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *DeviceRoutes + // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *ErrorModel + // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *ErrorModel + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *ErrorModel + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ErrorModel + // ApplicationproblemJSON500 the response for an HTTP 500 `application/problem+json` response ApplicationproblemJSON500 *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r GetDeviceRoutesResponse) GetJSON200() *DeviceRoutes { + return r.JSON200 +} + +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r GetDeviceRoutesResponse) GetApplicationproblemJSON401() *ErrorModel { + return r.ApplicationproblemJSON401 +} + +// GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response +func (r GetDeviceRoutesResponse) GetApplicationproblemJSON403() *ErrorModel { + return r.ApplicationproblemJSON403 +} + +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r GetDeviceRoutesResponse) GetApplicationproblemJSON404() *ErrorModel { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r GetDeviceRoutesResponse) GetApplicationproblemJSON422() *ErrorModel { + return r.ApplicationproblemJSON422 +} + +// GetApplicationproblemJSON500 returns the response for an HTTP 500 `application/problem+json` response +func (r GetDeviceRoutesResponse) GetApplicationproblemJSON500() *ErrorModel { + return r.ApplicationproblemJSON500 +} + +// GetBody returns the raw response body bytes +func (r GetDeviceRoutesResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r GetDeviceRoutesResponse) Status() string { if r.HTTPResponse != nil { @@ -2111,17 +2861,64 @@ func (r GetDeviceRoutesResponse) ContentType() string { } type SetDeviceRoutesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *DeviceRoutes + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *DeviceRoutes + // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *ErrorModel + // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *ErrorModel + // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *ErrorModel + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *ErrorModel + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ErrorModel + // ApplicationproblemJSON500 the response for an HTTP 500 `application/problem+json` response ApplicationproblemJSON500 *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r SetDeviceRoutesResponse) GetJSON200() *DeviceRoutes { + return r.JSON200 +} + +// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response +func (r SetDeviceRoutesResponse) GetApplicationproblemJSON400() *ErrorModel { + return r.ApplicationproblemJSON400 +} + +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r SetDeviceRoutesResponse) GetApplicationproblemJSON401() *ErrorModel { + return r.ApplicationproblemJSON401 +} + +// GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response +func (r SetDeviceRoutesResponse) GetApplicationproblemJSON403() *ErrorModel { + return r.ApplicationproblemJSON403 +} + +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r SetDeviceRoutesResponse) GetApplicationproblemJSON404() *ErrorModel { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r SetDeviceRoutesResponse) GetApplicationproblemJSON422() *ErrorModel { + return r.ApplicationproblemJSON422 +} + +// GetApplicationproblemJSON500 returns the response for an HTTP 500 `application/problem+json` response +func (r SetDeviceRoutesResponse) GetApplicationproblemJSON500() *ErrorModel { + return r.ApplicationproblemJSON500 +} + +// GetBody returns the raw response body bytes +func (r SetDeviceRoutesResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r SetDeviceRoutesResponse) Status() string { if r.HTTPResponse != nil { @@ -2147,17 +2944,64 @@ func (r SetDeviceRoutesResponse) ContentType() string { } type SetDeviceTagsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *EmptyOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *EmptyOutputBody + // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *ErrorModel + // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *ErrorModel + // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *ErrorModel + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *ErrorModel + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ErrorModel + // ApplicationproblemJSON500 the response for an HTTP 500 `application/problem+json` response ApplicationproblemJSON500 *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r SetDeviceTagsResponse) GetJSON200() *EmptyOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response +func (r SetDeviceTagsResponse) GetApplicationproblemJSON400() *ErrorModel { + return r.ApplicationproblemJSON400 +} + +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r SetDeviceTagsResponse) GetApplicationproblemJSON401() *ErrorModel { + return r.ApplicationproblemJSON401 +} + +// GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response +func (r SetDeviceTagsResponse) GetApplicationproblemJSON403() *ErrorModel { + return r.ApplicationproblemJSON403 +} + +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r SetDeviceTagsResponse) GetApplicationproblemJSON404() *ErrorModel { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r SetDeviceTagsResponse) GetApplicationproblemJSON422() *ErrorModel { + return r.ApplicationproblemJSON422 +} + +// GetApplicationproblemJSON500 returns the response for an HTTP 500 `application/problem+json` response +func (r SetDeviceTagsResponse) GetApplicationproblemJSON500() *ErrorModel { + return r.ApplicationproblemJSON500 +} + +// GetBody returns the raw response body bytes +func (r SetDeviceTagsResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r SetDeviceTagsResponse) Status() string { if r.HTTPResponse != nil { @@ -2183,15 +3027,50 @@ func (r SetDeviceTagsResponse) ContentType() string { } type GetACLResponse struct { - Body []byte - HTTPResponse *http.Response + Body []byte + HTTPResponse *http.Response + // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *ErrorModel + // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *ErrorModel + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *ErrorModel + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ErrorModel + // ApplicationproblemJSON500 the response for an HTTP 500 `application/problem+json` response ApplicationproblemJSON500 *ErrorModel } +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r GetACLResponse) GetApplicationproblemJSON401() *ErrorModel { + return r.ApplicationproblemJSON401 +} + +// GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response +func (r GetACLResponse) GetApplicationproblemJSON403() *ErrorModel { + return r.ApplicationproblemJSON403 +} + +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r GetACLResponse) GetApplicationproblemJSON404() *ErrorModel { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r GetACLResponse) GetApplicationproblemJSON422() *ErrorModel { + return r.ApplicationproblemJSON422 +} + +// GetApplicationproblemJSON500 returns the response for an HTTP 500 `application/problem+json` response +func (r GetACLResponse) GetApplicationproblemJSON500() *ErrorModel { + return r.ApplicationproblemJSON500 +} + +// GetBody returns the raw response body bytes +func (r GetACLResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r GetACLResponse) Status() string { if r.HTTPResponse != nil { @@ -2217,17 +3096,64 @@ func (r GetACLResponse) ContentType() string { } type SetACLResponse struct { - Body []byte - HTTPResponse *http.Response + Body []byte + HTTPResponse *http.Response + // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *ErrorModel + // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *ErrorModel + // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *ErrorModel + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *ErrorModel + // ApplicationproblemJSON412 the response for an HTTP 412 `application/problem+json` response ApplicationproblemJSON412 *ErrorModel + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ErrorModel + // ApplicationproblemJSON500 the response for an HTTP 500 `application/problem+json` response ApplicationproblemJSON500 *ErrorModel } +// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response +func (r SetACLResponse) GetApplicationproblemJSON400() *ErrorModel { + return r.ApplicationproblemJSON400 +} + +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r SetACLResponse) GetApplicationproblemJSON401() *ErrorModel { + return r.ApplicationproblemJSON401 +} + +// GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response +func (r SetACLResponse) GetApplicationproblemJSON403() *ErrorModel { + return r.ApplicationproblemJSON403 +} + +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r SetACLResponse) GetApplicationproblemJSON404() *ErrorModel { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON412 returns the response for an HTTP 412 `application/problem+json` response +func (r SetACLResponse) GetApplicationproblemJSON412() *ErrorModel { + return r.ApplicationproblemJSON412 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r SetACLResponse) GetApplicationproblemJSON422() *ErrorModel { + return r.ApplicationproblemJSON422 +} + +// GetApplicationproblemJSON500 returns the response for an HTTP 500 `application/problem+json` response +func (r SetACLResponse) GetApplicationproblemJSON500() *ErrorModel { + return r.ApplicationproblemJSON500 +} + +// GetBody returns the raw response body bytes +func (r SetACLResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r SetACLResponse) Status() string { if r.HTTPResponse != nil { @@ -2253,16 +3179,57 @@ func (r SetACLResponse) ContentType() string { } type ListDevicesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListDevicesOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *ListDevicesOutputBody + // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *ErrorModel + // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *ErrorModel + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *ErrorModel + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ErrorModel + // ApplicationproblemJSON500 the response for an HTTP 500 `application/problem+json` response ApplicationproblemJSON500 *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r ListDevicesResponse) GetJSON200() *ListDevicesOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r ListDevicesResponse) GetApplicationproblemJSON401() *ErrorModel { + return r.ApplicationproblemJSON401 +} + +// GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response +func (r ListDevicesResponse) GetApplicationproblemJSON403() *ErrorModel { + return r.ApplicationproblemJSON403 +} + +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r ListDevicesResponse) GetApplicationproblemJSON404() *ErrorModel { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r ListDevicesResponse) GetApplicationproblemJSON422() *ErrorModel { + return r.ApplicationproblemJSON422 +} + +// GetApplicationproblemJSON500 returns the response for an HTTP 500 `application/problem+json` response +func (r ListDevicesResponse) GetApplicationproblemJSON500() *ErrorModel { + return r.ApplicationproblemJSON500 +} + +// GetBody returns the raw response body bytes +func (r ListDevicesResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r ListDevicesResponse) Status() string { if r.HTTPResponse != nil { @@ -2288,16 +3255,57 @@ func (r ListDevicesResponse) ContentType() string { } type ListKeysResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListKeysOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *ListKeysOutputBody + // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *ErrorModel + // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *ErrorModel + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *ErrorModel + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ErrorModel + // ApplicationproblemJSON500 the response for an HTTP 500 `application/problem+json` response ApplicationproblemJSON500 *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r ListKeysResponse) GetJSON200() *ListKeysOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r ListKeysResponse) GetApplicationproblemJSON401() *ErrorModel { + return r.ApplicationproblemJSON401 +} + +// GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response +func (r ListKeysResponse) GetApplicationproblemJSON403() *ErrorModel { + return r.ApplicationproblemJSON403 +} + +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r ListKeysResponse) GetApplicationproblemJSON404() *ErrorModel { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r ListKeysResponse) GetApplicationproblemJSON422() *ErrorModel { + return r.ApplicationproblemJSON422 +} + +// GetApplicationproblemJSON500 returns the response for an HTTP 500 `application/problem+json` response +func (r ListKeysResponse) GetApplicationproblemJSON500() *ErrorModel { + return r.ApplicationproblemJSON500 +} + +// GetBody returns the raw response body bytes +func (r ListKeysResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r ListKeysResponse) Status() string { if r.HTTPResponse != nil { @@ -2323,17 +3331,64 @@ func (r ListKeysResponse) ContentType() string { } type CreateKeyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Key + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *Key + // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *ErrorModel + // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *ErrorModel + // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *ErrorModel + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *ErrorModel + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ErrorModel + // ApplicationproblemJSON500 the response for an HTTP 500 `application/problem+json` response ApplicationproblemJSON500 *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r CreateKeyResponse) GetJSON200() *Key { + return r.JSON200 +} + +// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response +func (r CreateKeyResponse) GetApplicationproblemJSON400() *ErrorModel { + return r.ApplicationproblemJSON400 +} + +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r CreateKeyResponse) GetApplicationproblemJSON401() *ErrorModel { + return r.ApplicationproblemJSON401 +} + +// GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response +func (r CreateKeyResponse) GetApplicationproblemJSON403() *ErrorModel { + return r.ApplicationproblemJSON403 +} + +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r CreateKeyResponse) GetApplicationproblemJSON404() *ErrorModel { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r CreateKeyResponse) GetApplicationproblemJSON422() *ErrorModel { + return r.ApplicationproblemJSON422 +} + +// GetApplicationproblemJSON500 returns the response for an HTTP 500 `application/problem+json` response +func (r CreateKeyResponse) GetApplicationproblemJSON500() *ErrorModel { + return r.ApplicationproblemJSON500 +} + +// GetBody returns the raw response body bytes +func (r CreateKeyResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r CreateKeyResponse) Status() string { if r.HTTPResponse != nil { @@ -2359,16 +3414,57 @@ func (r CreateKeyResponse) ContentType() string { } type DeleteKeyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *DeleteKeyOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *DeleteKeyOutputBody + // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *ErrorModel + // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *ErrorModel + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *ErrorModel + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ErrorModel + // ApplicationproblemJSON500 the response for an HTTP 500 `application/problem+json` response ApplicationproblemJSON500 *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r DeleteKeyResponse) GetJSON200() *DeleteKeyOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r DeleteKeyResponse) GetApplicationproblemJSON401() *ErrorModel { + return r.ApplicationproblemJSON401 +} + +// GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response +func (r DeleteKeyResponse) GetApplicationproblemJSON403() *ErrorModel { + return r.ApplicationproblemJSON403 +} + +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r DeleteKeyResponse) GetApplicationproblemJSON404() *ErrorModel { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r DeleteKeyResponse) GetApplicationproblemJSON422() *ErrorModel { + return r.ApplicationproblemJSON422 +} + +// GetApplicationproblemJSON500 returns the response for an HTTP 500 `application/problem+json` response +func (r DeleteKeyResponse) GetApplicationproblemJSON500() *ErrorModel { + return r.ApplicationproblemJSON500 +} + +// GetBody returns the raw response body bytes +func (r DeleteKeyResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r DeleteKeyResponse) Status() string { if r.HTTPResponse != nil { @@ -2394,16 +3490,57 @@ func (r DeleteKeyResponse) ContentType() string { } type GetKeyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Key + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *Key + // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *ErrorModel + // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *ErrorModel + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *ErrorModel + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ErrorModel + // ApplicationproblemJSON500 the response for an HTTP 500 `application/problem+json` response ApplicationproblemJSON500 *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r GetKeyResponse) GetJSON200() *Key { + return r.JSON200 +} + +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r GetKeyResponse) GetApplicationproblemJSON401() *ErrorModel { + return r.ApplicationproblemJSON401 +} + +// GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response +func (r GetKeyResponse) GetApplicationproblemJSON403() *ErrorModel { + return r.ApplicationproblemJSON403 +} + +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r GetKeyResponse) GetApplicationproblemJSON404() *ErrorModel { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r GetKeyResponse) GetApplicationproblemJSON422() *ErrorModel { + return r.ApplicationproblemJSON422 +} + +// GetApplicationproblemJSON500 returns the response for an HTTP 500 `application/problem+json` response +func (r GetKeyResponse) GetApplicationproblemJSON500() *ErrorModel { + return r.ApplicationproblemJSON500 +} + +// GetBody returns the raw response body bytes +func (r GetKeyResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r GetKeyResponse) Status() string { if r.HTTPResponse != nil { @@ -2429,16 +3566,57 @@ func (r GetKeyResponse) ContentType() string { } type GetTailnetSettingsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *TailnetSettings + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *TailnetSettings + // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *ErrorModel + // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *ErrorModel + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *ErrorModel + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ErrorModel + // ApplicationproblemJSON500 the response for an HTTP 500 `application/problem+json` response ApplicationproblemJSON500 *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r GetTailnetSettingsResponse) GetJSON200() *TailnetSettings { + return r.JSON200 +} + +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r GetTailnetSettingsResponse) GetApplicationproblemJSON401() *ErrorModel { + return r.ApplicationproblemJSON401 +} + +// GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response +func (r GetTailnetSettingsResponse) GetApplicationproblemJSON403() *ErrorModel { + return r.ApplicationproblemJSON403 +} + +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r GetTailnetSettingsResponse) GetApplicationproblemJSON404() *ErrorModel { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r GetTailnetSettingsResponse) GetApplicationproblemJSON422() *ErrorModel { + return r.ApplicationproblemJSON422 +} + +// GetApplicationproblemJSON500 returns the response for an HTTP 500 `application/problem+json` response +func (r GetTailnetSettingsResponse) GetApplicationproblemJSON500() *ErrorModel { + return r.ApplicationproblemJSON500 +} + +// GetBody returns the raw response body bytes +func (r GetTailnetSettingsResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r GetTailnetSettingsResponse) Status() string { if r.HTTPResponse != nil { @@ -2464,17 +3642,64 @@ func (r GetTailnetSettingsResponse) ContentType() string { } type UpdateTailnetSettingsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *TailnetSettings + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *TailnetSettings + // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *ErrorModel + // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *ErrorModel + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *ErrorModel + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ErrorModel + // ApplicationproblemJSON500 the response for an HTTP 500 `application/problem+json` response ApplicationproblemJSON500 *ErrorModel + // ApplicationproblemJSON501 the response for an HTTP 501 `application/problem+json` response ApplicationproblemJSON501 *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r UpdateTailnetSettingsResponse) GetJSON200() *TailnetSettings { + return r.JSON200 +} + +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r UpdateTailnetSettingsResponse) GetApplicationproblemJSON401() *ErrorModel { + return r.ApplicationproblemJSON401 +} + +// GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response +func (r UpdateTailnetSettingsResponse) GetApplicationproblemJSON403() *ErrorModel { + return r.ApplicationproblemJSON403 +} + +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r UpdateTailnetSettingsResponse) GetApplicationproblemJSON404() *ErrorModel { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r UpdateTailnetSettingsResponse) GetApplicationproblemJSON422() *ErrorModel { + return r.ApplicationproblemJSON422 +} + +// GetApplicationproblemJSON500 returns the response for an HTTP 500 `application/problem+json` response +func (r UpdateTailnetSettingsResponse) GetApplicationproblemJSON500() *ErrorModel { + return r.ApplicationproblemJSON500 +} + +// GetApplicationproblemJSON501 returns the response for an HTTP 501 `application/problem+json` response +func (r UpdateTailnetSettingsResponse) GetApplicationproblemJSON501() *ErrorModel { + return r.ApplicationproblemJSON501 +} + +// GetBody returns the raw response body bytes +func (r UpdateTailnetSettingsResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r UpdateTailnetSettingsResponse) Status() string { if r.HTTPResponse != nil { @@ -2500,16 +3725,57 @@ func (r UpdateTailnetSettingsResponse) ContentType() string { } type ListUsersResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListUsersOutputBody + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *ListUsersOutputBody + // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *ErrorModel + // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *ErrorModel + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *ErrorModel + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ErrorModel + // ApplicationproblemJSON500 the response for an HTTP 500 `application/problem+json` response ApplicationproblemJSON500 *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r ListUsersResponse) GetJSON200() *ListUsersOutputBody { + return r.JSON200 +} + +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r ListUsersResponse) GetApplicationproblemJSON401() *ErrorModel { + return r.ApplicationproblemJSON401 +} + +// GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response +func (r ListUsersResponse) GetApplicationproblemJSON403() *ErrorModel { + return r.ApplicationproblemJSON403 +} + +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r ListUsersResponse) GetApplicationproblemJSON404() *ErrorModel { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r ListUsersResponse) GetApplicationproblemJSON422() *ErrorModel { + return r.ApplicationproblemJSON422 +} + +// GetApplicationproblemJSON500 returns the response for an HTTP 500 `application/problem+json` response +func (r ListUsersResponse) GetApplicationproblemJSON500() *ErrorModel { + return r.ApplicationproblemJSON500 +} + +// GetBody returns the raw response body bytes +func (r ListUsersResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r ListUsersResponse) Status() string { if r.HTTPResponse != nil { @@ -2535,16 +3801,57 @@ func (r ListUsersResponse) ContentType() string { } type GetUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *User + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *User + // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *ErrorModel + // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *ErrorModel + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *ErrorModel + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ErrorModel + // ApplicationproblemJSON500 the response for an HTTP 500 `application/problem+json` response ApplicationproblemJSON500 *ErrorModel } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r GetUserResponse) GetJSON200() *User { + return r.JSON200 +} + +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r GetUserResponse) GetApplicationproblemJSON401() *ErrorModel { + return r.ApplicationproblemJSON401 +} + +// GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response +func (r GetUserResponse) GetApplicationproblemJSON403() *ErrorModel { + return r.ApplicationproblemJSON403 +} + +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r GetUserResponse) GetApplicationproblemJSON404() *ErrorModel { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r GetUserResponse) GetApplicationproblemJSON422() *ErrorModel { + return r.ApplicationproblemJSON422 +} + +// GetApplicationproblemJSON500 returns the response for an HTTP 500 `application/problem+json` response +func (r GetUserResponse) GetApplicationproblemJSON500() *ErrorModel { + return r.ApplicationproblemJSON500 +} + +// GetBody returns the raw response body bytes +func (r GetUserResponse) GetBody() []byte { + return r.Body +} + // Status returns HTTPResponse.Status func (r GetUserResponse) Status() string { if r.HTTPResponse != nil { @@ -2569,7 +3876,13 @@ func (r GetUserResponse) ContentType() string { return "" } -// DeleteDeviceWithResponse request returning *DeleteDeviceResponse +// DeleteDeviceWithResponse Delete a device +// +// Requires the `devices:core` OAuth scope (an admin API key is all-access). +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with DELETE /api/v2/device/{id} (the `DeleteDevice` operationId). func (c *ClientWithResponses) DeleteDeviceWithResponse(ctx context.Context, id string, params *DeleteDeviceParams, reqEditors ...RequestEditorFn) (*DeleteDeviceResponse, error) { rsp, err := c.DeleteDevice(ctx, id, params, reqEditors...) if err != nil { @@ -2578,7 +3891,13 @@ func (c *ClientWithResponses) DeleteDeviceWithResponse(ctx context.Context, id s return ParseDeleteDeviceResponse(rsp) } -// GetDeviceWithResponse request returning *GetDeviceResponse +// GetDeviceWithResponse Get a device +// +// Requires the `devices:core:read` OAuth scope (an admin API key is all-access). +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /api/v2/device/{id} (the `GetDevice` operationId). func (c *ClientWithResponses) GetDeviceWithResponse(ctx context.Context, id string, params *GetDeviceParams, reqEditors ...RequestEditorFn) (*GetDeviceResponse, error) { rsp, err := c.GetDevice(ctx, id, params, reqEditors...) if err != nil { @@ -2587,7 +3906,13 @@ func (c *ClientWithResponses) GetDeviceWithResponse(ctx context.Context, id stri return ParseGetDeviceResponse(rsp) } -// AuthorizeDeviceWithBodyWithResponse request with arbitrary body returning *AuthorizeDeviceResponse +// AuthorizeDeviceWithBodyWithResponse Authorize a device +// +// Requires the `devices:core` OAuth scope (an admin API key is all-access). +// +// 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/v2/device/{id}/authorized (the `AuthorizeDevice` operationId). func (c *ClientWithResponses) AuthorizeDeviceWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthorizeDeviceResponse, error) { rsp, err := c.AuthorizeDeviceWithBody(ctx, id, contentType, body, reqEditors...) if err != nil { @@ -2596,6 +3921,13 @@ func (c *ClientWithResponses) AuthorizeDeviceWithBodyWithResponse(ctx context.Co return ParseAuthorizeDeviceResponse(rsp) } +// AuthorizeDeviceWithResponse Authorize a device +// +// Requires the `devices:core` OAuth scope (an admin API key is all-access). +// +// 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/v2/device/{id}/authorized (the `AuthorizeDevice` operationId). func (c *ClientWithResponses) AuthorizeDeviceWithResponse(ctx context.Context, id string, body AuthorizeDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthorizeDeviceResponse, error) { rsp, err := c.AuthorizeDevice(ctx, id, body, reqEditors...) if err != nil { @@ -2604,7 +3936,13 @@ func (c *ClientWithResponses) AuthorizeDeviceWithResponse(ctx context.Context, i return ParseAuthorizeDeviceResponse(rsp) } -// SetDeviceKeyWithBodyWithResponse request with arbitrary body returning *SetDeviceKeyResponse +// SetDeviceKeyWithBodyWithResponse Set a device's key settings +// +// Requires the `devices:core` OAuth scope (an admin API key is all-access). +// +// 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/v2/device/{id}/key (the `SetDeviceKey` operationId). func (c *ClientWithResponses) SetDeviceKeyWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetDeviceKeyResponse, error) { rsp, err := c.SetDeviceKeyWithBody(ctx, id, contentType, body, reqEditors...) if err != nil { @@ -2613,6 +3951,13 @@ func (c *ClientWithResponses) SetDeviceKeyWithBodyWithResponse(ctx context.Conte return ParseSetDeviceKeyResponse(rsp) } +// SetDeviceKeyWithResponse Set a device's key settings +// +// Requires the `devices:core` OAuth scope (an admin API key is all-access). +// +// 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/v2/device/{id}/key (the `SetDeviceKey` operationId). func (c *ClientWithResponses) SetDeviceKeyWithResponse(ctx context.Context, id string, body SetDeviceKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*SetDeviceKeyResponse, error) { rsp, err := c.SetDeviceKey(ctx, id, body, reqEditors...) if err != nil { @@ -2621,7 +3966,13 @@ func (c *ClientWithResponses) SetDeviceKeyWithResponse(ctx context.Context, id s return ParseSetDeviceKeyResponse(rsp) } -// SetDeviceNameWithBodyWithResponse request with arbitrary body returning *SetDeviceNameResponse +// SetDeviceNameWithBodyWithResponse Set a device's name +// +// Requires the `devices:core` OAuth scope (an admin API key is all-access). +// +// 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/v2/device/{id}/name (the `SetDeviceName` operationId). func (c *ClientWithResponses) SetDeviceNameWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetDeviceNameResponse, error) { rsp, err := c.SetDeviceNameWithBody(ctx, id, contentType, body, reqEditors...) if err != nil { @@ -2630,6 +3981,13 @@ func (c *ClientWithResponses) SetDeviceNameWithBodyWithResponse(ctx context.Cont return ParseSetDeviceNameResponse(rsp) } +// SetDeviceNameWithResponse Set a device's name +// +// Requires the `devices:core` OAuth scope (an admin API key is all-access). +// +// 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/v2/device/{id}/name (the `SetDeviceName` operationId). func (c *ClientWithResponses) SetDeviceNameWithResponse(ctx context.Context, id string, body SetDeviceNameJSONRequestBody, reqEditors ...RequestEditorFn) (*SetDeviceNameResponse, error) { rsp, err := c.SetDeviceName(ctx, id, body, reqEditors...) if err != nil { @@ -2638,7 +3996,13 @@ func (c *ClientWithResponses) SetDeviceNameWithResponse(ctx context.Context, id return ParseSetDeviceNameResponse(rsp) } -// GetDeviceRoutesWithResponse request returning *GetDeviceRoutesResponse +// GetDeviceRoutesWithResponse Get a device's subnet routes +// +// Requires the `devices:routes:read` OAuth scope (an admin API key is all-access). +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /api/v2/device/{id}/routes (the `GetDeviceRoutes` operationId). func (c *ClientWithResponses) GetDeviceRoutesWithResponse(ctx context.Context, id string, params *GetDeviceRoutesParams, reqEditors ...RequestEditorFn) (*GetDeviceRoutesResponse, error) { rsp, err := c.GetDeviceRoutes(ctx, id, params, reqEditors...) if err != nil { @@ -2647,7 +4011,13 @@ func (c *ClientWithResponses) GetDeviceRoutesWithResponse(ctx context.Context, i return ParseGetDeviceRoutesResponse(rsp) } -// SetDeviceRoutesWithBodyWithResponse request with arbitrary body returning *SetDeviceRoutesResponse +// SetDeviceRoutesWithBodyWithResponse Set a device's enabled subnet routes +// +// Requires the `devices:routes` OAuth scope (an admin API key is all-access). +// +// 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/v2/device/{id}/routes (the `SetDeviceRoutes` operationId). func (c *ClientWithResponses) SetDeviceRoutesWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetDeviceRoutesResponse, error) { rsp, err := c.SetDeviceRoutesWithBody(ctx, id, contentType, body, reqEditors...) if err != nil { @@ -2656,6 +4026,13 @@ func (c *ClientWithResponses) SetDeviceRoutesWithBodyWithResponse(ctx context.Co return ParseSetDeviceRoutesResponse(rsp) } +// SetDeviceRoutesWithResponse Set a device's enabled subnet routes +// +// Requires the `devices:routes` OAuth scope (an admin API key is all-access). +// +// 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/v2/device/{id}/routes (the `SetDeviceRoutes` operationId). func (c *ClientWithResponses) SetDeviceRoutesWithResponse(ctx context.Context, id string, body SetDeviceRoutesJSONRequestBody, reqEditors ...RequestEditorFn) (*SetDeviceRoutesResponse, error) { rsp, err := c.SetDeviceRoutes(ctx, id, body, reqEditors...) if err != nil { @@ -2664,7 +4041,13 @@ func (c *ClientWithResponses) SetDeviceRoutesWithResponse(ctx context.Context, i return ParseSetDeviceRoutesResponse(rsp) } -// SetDeviceTagsWithBodyWithResponse request with arbitrary body returning *SetDeviceTagsResponse +// SetDeviceTagsWithBodyWithResponse Set a device's tags +// +// Requires the `devices:core` OAuth scope (an admin API key is all-access). +// +// 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/v2/device/{id}/tags (the `SetDeviceTags` operationId). func (c *ClientWithResponses) SetDeviceTagsWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetDeviceTagsResponse, error) { rsp, err := c.SetDeviceTagsWithBody(ctx, id, contentType, body, reqEditors...) if err != nil { @@ -2673,6 +4056,13 @@ func (c *ClientWithResponses) SetDeviceTagsWithBodyWithResponse(ctx context.Cont return ParseSetDeviceTagsResponse(rsp) } +// SetDeviceTagsWithResponse Set a device's tags +// +// Requires the `devices:core` OAuth scope (an admin API key is all-access). +// +// 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/v2/device/{id}/tags (the `SetDeviceTags` operationId). func (c *ClientWithResponses) SetDeviceTagsWithResponse(ctx context.Context, id string, body SetDeviceTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*SetDeviceTagsResponse, error) { rsp, err := c.SetDeviceTags(ctx, id, body, reqEditors...) if err != nil { @@ -2681,7 +4071,13 @@ func (c *ClientWithResponses) SetDeviceTagsWithResponse(ctx context.Context, id return ParseSetDeviceTagsResponse(rsp) } -// GetACLWithResponse request returning *GetACLResponse +// GetACLWithResponse Get the policy file +// +// Requires the `policy_file:read` OAuth scope (an admin API key is all-access). +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /api/v2/tailnet/{tailnet}/acl (the `GetACL` operationId). func (c *ClientWithResponses) GetACLWithResponse(ctx context.Context, tailnet string, params *GetACLParams, reqEditors ...RequestEditorFn) (*GetACLResponse, error) { rsp, err := c.GetACL(ctx, tailnet, params, reqEditors...) if err != nil { @@ -2690,7 +4086,13 @@ func (c *ClientWithResponses) GetACLWithResponse(ctx context.Context, tailnet st return ParseGetACLResponse(rsp) } -// SetACLWithBodyWithResponse request with arbitrary body returning *SetACLResponse +// SetACLWithBodyWithResponse Set the policy file +// +// Requires the `policy_file` OAuth scope (an admin API key is all-access). +// +// 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/v2/tailnet/{tailnet}/acl (the `SetACL` operationId). func (c *ClientWithResponses) SetACLWithBodyWithResponse(ctx context.Context, tailnet string, params *SetACLParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetACLResponse, error) { rsp, err := c.SetACLWithBody(ctx, tailnet, params, contentType, body, reqEditors...) if err != nil { @@ -2699,6 +4101,13 @@ func (c *ClientWithResponses) SetACLWithBodyWithResponse(ctx context.Context, ta return ParseSetACLResponse(rsp) } +// SetACLWithResponse Set the policy file +// +// Requires the `policy_file` OAuth scope (an admin API key is all-access). +// +// 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/v2/tailnet/{tailnet}/acl (the `SetACL` operationId). func (c *ClientWithResponses) SetACLWithResponse(ctx context.Context, tailnet string, params *SetACLParams, body SetACLJSONRequestBody, reqEditors ...RequestEditorFn) (*SetACLResponse, error) { rsp, err := c.SetACL(ctx, tailnet, params, body, reqEditors...) if err != nil { @@ -2707,7 +4116,13 @@ func (c *ClientWithResponses) SetACLWithResponse(ctx context.Context, tailnet st return ParseSetACLResponse(rsp) } -// ListDevicesWithResponse request returning *ListDevicesResponse +// ListDevicesWithResponse List devices +// +// Requires the `devices:core:read` OAuth scope (an admin API key is all-access). +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /api/v2/tailnet/{tailnet}/devices (the `ListDevices` operationId). func (c *ClientWithResponses) ListDevicesWithResponse(ctx context.Context, tailnet string, params *ListDevicesParams, reqEditors ...RequestEditorFn) (*ListDevicesResponse, error) { rsp, err := c.ListDevices(ctx, tailnet, params, reqEditors...) if err != nil { @@ -2716,7 +4131,13 @@ func (c *ClientWithResponses) ListDevicesWithResponse(ctx context.Context, tailn return ParseListDevicesResponse(rsp) } -// ListKeysWithResponse request returning *ListKeysResponse +// ListKeysWithResponse List auth keys and OAuth clients +// +// A token sees the kinds it can read: `auth_keys:read` for auth keys, `oauth_keys:read` for OAuth clients (an admin API key sees all). +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /api/v2/tailnet/{tailnet}/keys (the `ListKeys` operationId). func (c *ClientWithResponses) ListKeysWithResponse(ctx context.Context, tailnet string, params *ListKeysParams, reqEditors ...RequestEditorFn) (*ListKeysResponse, error) { rsp, err := c.ListKeys(ctx, tailnet, params, reqEditors...) if err != nil { @@ -2725,7 +4146,13 @@ func (c *ClientWithResponses) ListKeysWithResponse(ctx context.Context, tailnet return ParseListKeysResponse(rsp) } -// CreateKeyWithBodyWithResponse request with arbitrary body returning *CreateKeyResponse +// CreateKeyWithBodyWithResponse Create an auth key or OAuth client +// +// Requires the `auth_keys` scope for an auth key, or `oauth_keys` for an OAuth client (an admin API key is all-access). +// +// 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/v2/tailnet/{tailnet}/keys (the `CreateKey` operationId). func (c *ClientWithResponses) CreateKeyWithBodyWithResponse(ctx context.Context, tailnet string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateKeyResponse, error) { rsp, err := c.CreateKeyWithBody(ctx, tailnet, contentType, body, reqEditors...) if err != nil { @@ -2734,6 +4161,13 @@ func (c *ClientWithResponses) CreateKeyWithBodyWithResponse(ctx context.Context, return ParseCreateKeyResponse(rsp) } +// CreateKeyWithResponse Create an auth key or OAuth client +// +// Requires the `auth_keys` scope for an auth key, or `oauth_keys` for an OAuth client (an admin API key is all-access). +// +// 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/v2/tailnet/{tailnet}/keys (the `CreateKey` operationId). func (c *ClientWithResponses) CreateKeyWithResponse(ctx context.Context, tailnet string, body CreateKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateKeyResponse, error) { rsp, err := c.CreateKey(ctx, tailnet, body, reqEditors...) if err != nil { @@ -2742,7 +4176,13 @@ func (c *ClientWithResponses) CreateKeyWithResponse(ctx context.Context, tailnet return ParseCreateKeyResponse(rsp) } -// DeleteKeyWithResponse request returning *DeleteKeyResponse +// DeleteKeyWithResponse Delete an auth key or OAuth client +// +// Requires the `auth_keys` scope for an auth key, or `oauth_keys` for an OAuth client (an admin API key is all-access). +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with DELETE /api/v2/tailnet/{tailnet}/keys/{keyId} (the `DeleteKey` operationId). func (c *ClientWithResponses) DeleteKeyWithResponse(ctx context.Context, tailnet string, keyId string, reqEditors ...RequestEditorFn) (*DeleteKeyResponse, error) { rsp, err := c.DeleteKey(ctx, tailnet, keyId, reqEditors...) if err != nil { @@ -2751,7 +4191,13 @@ func (c *ClientWithResponses) DeleteKeyWithResponse(ctx context.Context, tailnet return ParseDeleteKeyResponse(rsp) } -// GetKeyWithResponse request returning *GetKeyResponse +// GetKeyWithResponse Get an auth key or OAuth client +// +// Requires `auth_keys:read` for an auth key, or `oauth_keys:read` for an OAuth client (an admin API key is all-access). +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /api/v2/tailnet/{tailnet}/keys/{keyId} (the `GetKey` operationId). func (c *ClientWithResponses) GetKeyWithResponse(ctx context.Context, tailnet string, keyId string, reqEditors ...RequestEditorFn) (*GetKeyResponse, error) { rsp, err := c.GetKey(ctx, tailnet, keyId, reqEditors...) if err != nil { @@ -2760,7 +4206,13 @@ func (c *ClientWithResponses) GetKeyWithResponse(ctx context.Context, tailnet st return ParseGetKeyResponse(rsp) } -// GetTailnetSettingsWithResponse request returning *GetTailnetSettingsResponse +// GetTailnetSettingsWithResponse Get tailnet settings +// +// Requires the `feature_settings:read` OAuth scope (an admin API key is all-access). +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /api/v2/tailnet/{tailnet}/settings (the `GetTailnetSettings` operationId). func (c *ClientWithResponses) GetTailnetSettingsWithResponse(ctx context.Context, tailnet string, reqEditors ...RequestEditorFn) (*GetTailnetSettingsResponse, error) { rsp, err := c.GetTailnetSettings(ctx, tailnet, reqEditors...) if err != nil { @@ -2769,7 +4221,13 @@ func (c *ClientWithResponses) GetTailnetSettingsWithResponse(ctx context.Context return ParseGetTailnetSettingsResponse(rsp) } -// UpdateTailnetSettingsWithBodyWithResponse request with arbitrary body returning *UpdateTailnetSettingsResponse +// UpdateTailnetSettingsWithBodyWithResponse Update tailnet settings +// +// Requires the `feature_settings` OAuth scope (an admin API key is all-access). +// +// 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/v2/tailnet/{tailnet}/settings (the `UpdateTailnetSettings` operationId). func (c *ClientWithResponses) UpdateTailnetSettingsWithBodyWithResponse(ctx context.Context, tailnet string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTailnetSettingsResponse, error) { rsp, err := c.UpdateTailnetSettingsWithBody(ctx, tailnet, contentType, body, reqEditors...) if err != nil { @@ -2778,6 +4236,13 @@ func (c *ClientWithResponses) UpdateTailnetSettingsWithBodyWithResponse(ctx cont return ParseUpdateTailnetSettingsResponse(rsp) } +// UpdateTailnetSettingsWithResponse Update tailnet settings +// +// Requires the `feature_settings` OAuth scope (an admin API key is all-access). +// +// 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/v2/tailnet/{tailnet}/settings (the `UpdateTailnetSettings` operationId). func (c *ClientWithResponses) UpdateTailnetSettingsWithResponse(ctx context.Context, tailnet string, body UpdateTailnetSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTailnetSettingsResponse, error) { rsp, err := c.UpdateTailnetSettings(ctx, tailnet, body, reqEditors...) if err != nil { @@ -2786,7 +4251,13 @@ func (c *ClientWithResponses) UpdateTailnetSettingsWithResponse(ctx context.Cont return ParseUpdateTailnetSettingsResponse(rsp) } -// ListUsersWithResponse request returning *ListUsersResponse +// ListUsersWithResponse List users +// +// Requires the `users:read` OAuth scope (an admin API key is all-access). +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /api/v2/tailnet/{tailnet}/users (the `ListUsers` operationId). func (c *ClientWithResponses) ListUsersWithResponse(ctx context.Context, tailnet string, params *ListUsersParams, reqEditors ...RequestEditorFn) (*ListUsersResponse, error) { rsp, err := c.ListUsers(ctx, tailnet, params, reqEditors...) if err != nil { @@ -2795,7 +4266,13 @@ func (c *ClientWithResponses) ListUsersWithResponse(ctx context.Context, tailnet return ParseListUsersResponse(rsp) } -// GetUserWithResponse request returning *GetUserResponse +// GetUserWithResponse Get a user +// +// Requires the `users:read` OAuth scope (an admin API key is all-access). +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /api/v2/users/{id} (the `GetUser` operationId). func (c *ClientWithResponses) GetUserWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetUserResponse, error) { rsp, err := c.GetUser(ctx, id, reqEditors...) if err != nil { @@ -3341,6 +4818,9 @@ func ParseGetACLResponse(rsp *http.Response) (*GetACLResponse, error) { } switch { + case rsp.StatusCode == 200: + break // No content-type + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest ErrorModel if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -3395,6 +4875,9 @@ func ParseSetACLResponse(rsp *http.Response) (*SetACLResponse, error) { } switch { + case rsp.StatusCode == 200: + break // No content-type + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest ErrorModel if err := json.Unmarshal(bodyBytes, &dest); err != nil {