Documentation
¶
Overview ¶
Package client provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
Index ¶
- func NewCreatePolicyRequest(server string, params *CreatePolicyParams, body CreatePolicyJSONRequestBody) (*http.Request, error)
- func NewCreatePolicyRequestWithBody(server string, params *CreatePolicyParams, contentType string, body io.Reader) (*http.Request, error)
- func NewDeletePolicyRequest(server string, policyId PolicyIdPath) (*http.Request, error)
- func NewGetPolicyRequest(server string, policyId PolicyIdPath) (*http.Request, error)
- func NewListPoliciesRequest(server string, params *ListPoliciesParams) (*http.Request, error)
- func NewUpdatePolicyRequestWithApplicationMergePatchPlusJSONBody(server string, policyId PolicyIdPath, ...) (*http.Request, error)
- func NewUpdatePolicyRequestWithBody(server string, policyId PolicyIdPath, contentType string, body io.Reader) (*http.Request, error)
- type Client
- func (c *Client) CreatePolicy(ctx context.Context, params *CreatePolicyParams, ...) (*http.Response, error)
- func (c *Client) CreatePolicyWithBody(ctx context.Context, params *CreatePolicyParams, contentType string, ...) (*http.Response, error)
- func (c *Client) DeletePolicy(ctx context.Context, policyId PolicyIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetPolicy(ctx context.Context, policyId PolicyIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListPolicies(ctx context.Context, params *ListPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) UpdatePolicyWithApplicationMergePatchPlusJSONBody(ctx context.Context, policyId PolicyIdPath, ...) (*http.Response, error)
- func (c *Client) UpdatePolicyWithBody(ctx context.Context, policyId PolicyIdPath, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreatePolicyWithBodyWithResponse(ctx context.Context, params *CreatePolicyParams, contentType string, ...) (*CreatePolicyResponse, error)
- func (c *ClientWithResponses) CreatePolicyWithResponse(ctx context.Context, params *CreatePolicyParams, ...) (*CreatePolicyResponse, error)
- func (c *ClientWithResponses) DeletePolicyWithResponse(ctx context.Context, policyId PolicyIdPath, reqEditors ...RequestEditorFn) (*DeletePolicyResponse, error)
- func (c *ClientWithResponses) GetPolicyWithResponse(ctx context.Context, policyId PolicyIdPath, reqEditors ...RequestEditorFn) (*GetPolicyResponse, error)
- func (c *ClientWithResponses) ListPoliciesWithResponse(ctx context.Context, params *ListPoliciesParams, reqEditors ...RequestEditorFn) (*ListPoliciesResponse, error)
- func (c *ClientWithResponses) UpdatePolicyWithApplicationMergePatchPlusJSONBodyWithResponse(ctx context.Context, policyId PolicyIdPath, ...) (*UpdatePolicyResponse, error)
- func (c *ClientWithResponses) UpdatePolicyWithBodyWithResponse(ctx context.Context, policyId PolicyIdPath, contentType string, body io.Reader, ...) (*UpdatePolicyResponse, error)
- type ClientWithResponsesInterface
- type CreatePolicyResponse
- func (r CreatePolicyResponse) ContentType() string
- func (r CreatePolicyResponse) GetBody() []byte
- func (r CreatePolicyResponse) GetJSON201() *Policy
- func (r CreatePolicyResponse) GetJSON400() *BadRequest
- func (r CreatePolicyResponse) GetJSON401() *Unauthorized
- func (r CreatePolicyResponse) GetJSON403() *Forbidden
- func (r CreatePolicyResponse) GetJSON409() *AlreadyExists
- func (r CreatePolicyResponse) GetJSON422() *ValidationError
- func (r CreatePolicyResponse) GetJSON500() *InternalServerError
- func (r CreatePolicyResponse) Status() string
- func (r CreatePolicyResponse) StatusCode() int
- type CreatePolicyResponse201Headers
- type DeletePolicyResponse
- func (r DeletePolicyResponse) ContentType() string
- func (r DeletePolicyResponse) GetBody() []byte
- func (r DeletePolicyResponse) GetJSON401() *Unauthorized
- func (r DeletePolicyResponse) GetJSON403() *Forbidden
- func (r DeletePolicyResponse) GetJSON404() *NotFound
- func (r DeletePolicyResponse) GetJSON500() *InternalServerError
- func (r DeletePolicyResponse) Status() string
- func (r DeletePolicyResponse) StatusCode() int
- type GetPolicyResponse
- func (r GetPolicyResponse) ContentType() string
- func (r GetPolicyResponse) GetBody() []byte
- func (r GetPolicyResponse) GetJSON200() *Policy
- func (r GetPolicyResponse) GetJSON401() *Unauthorized
- func (r GetPolicyResponse) GetJSON403() *Forbidden
- func (r GetPolicyResponse) GetJSON404() *NotFound
- func (r GetPolicyResponse) GetJSON500() *InternalServerError
- func (r GetPolicyResponse) Status() string
- func (r GetPolicyResponse) StatusCode() int
- type HttpRequestDoer
- type ListPoliciesResponse
- func (r ListPoliciesResponse) ContentType() string
- func (r ListPoliciesResponse) GetBody() []byte
- func (r ListPoliciesResponse) GetJSON200() *PolicyList
- func (r ListPoliciesResponse) GetJSON400() *BadRequest
- func (r ListPoliciesResponse) GetJSON401() *Unauthorized
- func (r ListPoliciesResponse) GetJSON403() *Forbidden
- func (r ListPoliciesResponse) GetJSON500() *InternalServerError
- func (r ListPoliciesResponse) Status() string
- func (r ListPoliciesResponse) StatusCode() int
- type RequestEditorFn
- type UpdatePolicyResponse
- func (r UpdatePolicyResponse) ContentType() string
- func (r UpdatePolicyResponse) GetBody() []byte
- func (r UpdatePolicyResponse) GetJSON200() *Policy
- func (r UpdatePolicyResponse) GetJSON400() *BadRequest
- func (r UpdatePolicyResponse) GetJSON401() *Unauthorized
- func (r UpdatePolicyResponse) GetJSON403() *Forbidden
- func (r UpdatePolicyResponse) GetJSON404() *NotFound
- func (r UpdatePolicyResponse) GetJSON409() *AlreadyExists
- func (r UpdatePolicyResponse) GetJSON500() *InternalServerError
- func (r UpdatePolicyResponse) Status() string
- func (r UpdatePolicyResponse) StatusCode() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreatePolicyRequest ¶
func NewCreatePolicyRequest(server string, params *CreatePolicyParams, body CreatePolicyJSONRequestBody) (*http.Request, error)
NewCreatePolicyRequest calls the generic CreatePolicy builder with application/json body
func NewCreatePolicyRequestWithBody ¶
func NewCreatePolicyRequestWithBody(server string, params *CreatePolicyParams, contentType string, body io.Reader) (*http.Request, error)
NewCreatePolicyRequestWithBody constructs an http.Request for the CreatePolicy method, with any body, and a specified content type
func NewDeletePolicyRequest ¶
NewDeletePolicyRequest constructs an http.Request for the DeletePolicy method
func NewGetPolicyRequest ¶
NewGetPolicyRequest constructs an http.Request for the GetPolicy method
func NewListPoliciesRequest ¶
NewListPoliciesRequest constructs an http.Request for the ListPolicies method
func NewUpdatePolicyRequestWithApplicationMergePatchPlusJSONBody ¶
func NewUpdatePolicyRequestWithApplicationMergePatchPlusJSONBody(server string, policyId PolicyIdPath, body UpdatePolicyApplicationMergePatchPlusJSONRequestBody) (*http.Request, error)
NewUpdatePolicyRequestWithApplicationMergePatchPlusJSONBody calls the generic UpdatePolicy builder with application/merge-patch+json body
func NewUpdatePolicyRequestWithBody ¶
func NewUpdatePolicyRequestWithBody(server string, policyId PolicyIdPath, contentType string, body io.Reader) (*http.Request, error)
NewUpdatePolicyRequestWithBody constructs an http.Request for the UpdatePolicy method, with any body, and a specified content type
Types ¶
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CreatePolicy ¶
func (c *Client) CreatePolicy(ctx context.Context, params *CreatePolicyParams, body CreatePolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreatePolicy Create a new policy
Creates a new policy resource. The caller may optionally specify a client-assigned ID via the `id` query parameter. If not provided, the server will generate a UUID.
Takes a body of the `application/json` content type.
Corresponds with POST /policies (the `CreatePolicy` operationId).
func (*Client) CreatePolicyWithBody ¶
func (c *Client) CreatePolicyWithBody(ctx context.Context, params *CreatePolicyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreatePolicyWithBody Create a new policy
Creates a new policy resource. The caller may optionally specify a client-assigned ID via the `id` query parameter. If not provided, the server will generate a UUID.
Takes any type of body and a specified content type.
Corresponds with POST /policies (the `CreatePolicy` operationId).
func (*Client) DeletePolicy ¶
func (c *Client) DeletePolicy(ctx context.Context, policyId PolicyIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
DeletePolicy Delete a policy
Deletes a policy. This operation is immediate and cannot be undone.
Returns 204 No Content on successful deletion. The operation provides strong consistency - attempting to read the resource immediately after deletion will return 404 Not Found.
Corresponds with DELETE /policies/{policyId} (the `DeletePolicy` operationId).
func (*Client) GetPolicy ¶
func (c *Client) GetPolicy(ctx context.Context, policyId PolicyIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
GetPolicy Get a policy
Retrieves a single policy by its ID.
This method implements AEP-131 Get standard method.
Corresponds with GET /policies/{policyId} (the `GetPolicy` operationId).
func (*Client) ListPolicies ¶
func (c *Client) ListPolicies(ctx context.Context, params *ListPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
ListPolicies List policies
Lists policies with support for pagination, filtering, and ordering.
## Filtering Use the `filter` parameter with CEL-style expressions: - `policy_type='GLOBAL'` - `enabled=true` - `policy_type='USER' AND enabled=true`
## Ordering Use the `order_by` parameter: - `priority asc` (default) - `priority desc` - `display_name asc` - `create_time desc`
Corresponds with GET /policies (the `ListPolicies` operationId).
func (*Client) UpdatePolicyWithApplicationMergePatchPlusJSONBody ¶
func (c *Client) UpdatePolicyWithApplicationMergePatchPlusJSONBody(ctx context.Context, policyId PolicyIdPath, body UpdatePolicyApplicationMergePatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdatePolicyWithApplicationMergePatchPlusJSONBody Update a policy
Updates an existing policy using partial update (merge).
This method implements AEP-134 Update standard method. It uses PATCH with JSON Merge Patch per RFC 7396. Only provided fields are updated; omitted fields are left unchanged. Use `null` to clear optional fields.
## Partial Update (Merge) Send only the fields you want to change. The server merges the patch onto the existing resource. Content-Type must be `application/merge-patch+json`.
## Immutable Fields The following fields cannot be updated (ignored if sent): - path - id - policy_type (cannot be changed after creation) - create_time - update_time
Takes a body of the `application/merge-patch+json` content type.
Corresponds with PATCH /policies/{policyId} (the `UpdatePolicy` operationId).
func (*Client) UpdatePolicyWithBody ¶
func (c *Client) UpdatePolicyWithBody(ctx context.Context, policyId PolicyIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdatePolicyWithBody Update a policy
Updates an existing policy using partial update (merge).
This method implements AEP-134 Update standard method. It uses PATCH with JSON Merge Patch per RFC 7396. Only provided fields are updated; omitted fields are left unchanged. Use `null` to clear optional fields.
## Partial Update (Merge) Send only the fields you want to change. The server merges the patch onto the existing resource. Content-Type must be `application/merge-patch+json`.
## Immutable Fields The following fields cannot be updated (ignored if sent): - path - id - policy_type (cannot be changed after creation) - create_time - update_time
Takes any type of body and a specified content type.
Corresponds with PATCH /policies/{policyId} (the `UpdatePolicy` operationId).
type ClientInterface ¶
type ClientInterface interface {
// ListPolicies List policies
//
// Lists policies with support for pagination, filtering, and ordering.
//
// ## Filtering
// Use the `filter` parameter with CEL-style expressions:
// - `policy_type='GLOBAL'`
// - `enabled=true`
// - `policy_type='USER' AND enabled=true`
//
// ## Ordering
// Use the `order_by` parameter:
// - `priority asc` (default)
// - `priority desc`
// - `display_name asc`
// - `create_time desc`
//
// Corresponds with GET /policies (the `ListPolicies` operationId).
ListPolicies(ctx context.Context, params *ListPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreatePolicyWithBody Create a new policy
//
// Creates a new policy resource. The caller may optionally specify a
// client-assigned ID via the `id` query parameter. If not provided, the
// server will generate a UUID.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /policies (the `CreatePolicy` operationId).
CreatePolicyWithBody(ctx context.Context, params *CreatePolicyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreatePolicy Create a new policy
//
// Creates a new policy resource. The caller may optionally specify a
// client-assigned ID via the `id` query parameter. If not provided, the
// server will generate a UUID.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /policies (the `CreatePolicy` operationId).
CreatePolicy(ctx context.Context, params *CreatePolicyParams, body CreatePolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeletePolicy Delete a policy
//
// Deletes a policy. This operation is immediate and cannot be undone.
//
// Returns 204 No Content on successful deletion. The operation provides
// strong consistency - attempting to read the resource immediately after
// deletion will return 404 Not Found.
//
// Corresponds with DELETE /policies/{policyId} (the `DeletePolicy` operationId).
DeletePolicy(ctx context.Context, policyId PolicyIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetPolicy Get a policy
//
// Retrieves a single policy by its ID.
//
// This method implements AEP-131 Get standard method.
//
// Corresponds with GET /policies/{policyId} (the `GetPolicy` operationId).
GetPolicy(ctx context.Context, policyId PolicyIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdatePolicyWithBody Update a policy
//
// Updates an existing policy using partial update (merge).
//
// This method implements AEP-134 Update standard method. It uses PATCH
// with JSON Merge Patch per RFC 7396. Only provided fields are updated;
// omitted fields are left unchanged. Use `null` to clear optional fields.
//
// ## Partial Update (Merge)
// Send only the fields you want to change. The server merges the patch
// onto the existing resource. Content-Type must be
// `application/merge-patch+json`.
//
// ## Immutable Fields
// The following fields cannot be updated (ignored if sent):
// - path
// - id
// - policy_type (cannot be changed after creation)
// - create_time
// - update_time
//
// Takes any type of body and a specified content type.
//
// Corresponds with PATCH /policies/{policyId} (the `UpdatePolicy` operationId).
UpdatePolicyWithBody(ctx context.Context, policyId PolicyIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdatePolicyWithApplicationMergePatchPlusJSONBody Update a policy
//
// Updates an existing policy using partial update (merge).
//
// This method implements AEP-134 Update standard method. It uses PATCH
// with JSON Merge Patch per RFC 7396. Only provided fields are updated;
// omitted fields are left unchanged. Use `null` to clear optional fields.
//
// ## Partial Update (Merge)
// Send only the fields you want to change. The server merges the patch
// onto the existing resource. Content-Type must be
// `application/merge-patch+json`.
//
// ## Immutable Fields
// The following fields cannot be updated (ignored if sent):
// - path
// - id
// - policy_type (cannot be changed after creation)
// - create_time
// - update_time
//
// Takes a body of the `application/merge-patch+json` content type.
//
// Corresponds with PATCH /policies/{policyId} (the `UpdatePolicy` operationId).
UpdatePolicyWithApplicationMergePatchPlusJSONBody(ctx context.Context, policyId PolicyIdPath, body UpdatePolicyApplicationMergePatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreatePolicyWithBodyWithResponse ¶
func (c *ClientWithResponses) CreatePolicyWithBodyWithResponse(ctx context.Context, params *CreatePolicyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePolicyResponse, error)
CreatePolicyWithBodyWithResponse Create a new policy
Creates a new policy resource. The caller may optionally specify a client-assigned ID via the `id` query parameter. If not provided, the server will generate a UUID.
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 /policies (the `CreatePolicy` operationId).
func (*ClientWithResponses) CreatePolicyWithResponse ¶
func (c *ClientWithResponses) CreatePolicyWithResponse(ctx context.Context, params *CreatePolicyParams, body CreatePolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePolicyResponse, error)
CreatePolicyWithResponse Create a new policy
Creates a new policy resource. The caller may optionally specify a client-assigned ID via the `id` query parameter. If not provided, the server will generate a UUID.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /policies (the `CreatePolicy` operationId).
func (*ClientWithResponses) DeletePolicyWithResponse ¶
func (c *ClientWithResponses) DeletePolicyWithResponse(ctx context.Context, policyId PolicyIdPath, reqEditors ...RequestEditorFn) (*DeletePolicyResponse, error)
DeletePolicyWithResponse Delete a policy
Deletes a policy. This operation is immediate and cannot be undone.
Returns 204 No Content on successful deletion. The operation provides strong consistency - attempting to read the resource immediately after deletion will return 404 Not Found.
Returns a wrapper object for the known response body format(s).
Corresponds with DELETE /policies/{policyId} (the `DeletePolicy` operationId).
func (*ClientWithResponses) GetPolicyWithResponse ¶
func (c *ClientWithResponses) GetPolicyWithResponse(ctx context.Context, policyId PolicyIdPath, reqEditors ...RequestEditorFn) (*GetPolicyResponse, error)
GetPolicyWithResponse Get a policy
Retrieves a single policy by its ID.
This method implements AEP-131 Get standard method.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /policies/{policyId} (the `GetPolicy` operationId).
func (*ClientWithResponses) ListPoliciesWithResponse ¶
func (c *ClientWithResponses) ListPoliciesWithResponse(ctx context.Context, params *ListPoliciesParams, reqEditors ...RequestEditorFn) (*ListPoliciesResponse, error)
ListPoliciesWithResponse List policies
Lists policies with support for pagination, filtering, and ordering.
## Filtering Use the `filter` parameter with CEL-style expressions: - `policy_type='GLOBAL'` - `enabled=true` - `policy_type='USER' AND enabled=true`
## Ordering Use the `order_by` parameter: - `priority asc` (default) - `priority desc` - `display_name asc` - `create_time desc`
Returns a wrapper object for the known response body format(s).
Corresponds with GET /policies (the `ListPolicies` operationId).
func (*ClientWithResponses) UpdatePolicyWithApplicationMergePatchPlusJSONBodyWithResponse ¶
func (c *ClientWithResponses) UpdatePolicyWithApplicationMergePatchPlusJSONBodyWithResponse(ctx context.Context, policyId PolicyIdPath, body UpdatePolicyApplicationMergePatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePolicyResponse, error)
UpdatePolicyWithApplicationMergePatchPlusJSONBodyWithResponse Update a policy
Updates an existing policy using partial update (merge).
This method implements AEP-134 Update standard method. It uses PATCH with JSON Merge Patch per RFC 7396. Only provided fields are updated; omitted fields are left unchanged. Use `null` to clear optional fields.
## Partial Update (Merge) Send only the fields you want to change. The server merges the patch onto the existing resource. Content-Type must be `application/merge-patch+json`.
## Immutable Fields The following fields cannot be updated (ignored if sent): - path - id - policy_type (cannot be changed after creation) - create_time - update_time
Takes a body of the `application/merge-patch+json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with PATCH /policies/{policyId} (the `UpdatePolicy` operationId).
func (*ClientWithResponses) UpdatePolicyWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdatePolicyWithBodyWithResponse(ctx context.Context, policyId PolicyIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePolicyResponse, error)
UpdatePolicyWithBodyWithResponse Update a policy
Updates an existing policy using partial update (merge).
This method implements AEP-134 Update standard method. It uses PATCH with JSON Merge Patch per RFC 7396. Only provided fields are updated; omitted fields are left unchanged. Use `null` to clear optional fields.
## Partial Update (Merge) Send only the fields you want to change. The server merges the patch onto the existing resource. Content-Type must be `application/merge-patch+json`.
## Immutable Fields The following fields cannot be updated (ignored if sent): - path - id - policy_type (cannot be changed after creation) - create_time - update_time
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 /policies/{policyId} (the `UpdatePolicy` operationId).
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ListPoliciesWithResponse List policies
//
// Lists policies with support for pagination, filtering, and ordering.
//
// ## Filtering
// Use the `filter` parameter with CEL-style expressions:
// - `policy_type='GLOBAL'`
// - `enabled=true`
// - `policy_type='USER' AND enabled=true`
//
// ## Ordering
// Use the `order_by` parameter:
// - `priority asc` (default)
// - `priority desc`
// - `display_name asc`
// - `create_time desc`
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /policies (the `ListPolicies` operationId).
ListPoliciesWithResponse(ctx context.Context, params *ListPoliciesParams, reqEditors ...RequestEditorFn) (*ListPoliciesResponse, error)
// CreatePolicyWithBodyWithResponse Create a new policy
//
// Creates a new policy resource. The caller may optionally specify a
// client-assigned ID via the `id` query parameter. If not provided, the
// server will generate a UUID.
//
// 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 /policies (the `CreatePolicy` operationId).
CreatePolicyWithBodyWithResponse(ctx context.Context, params *CreatePolicyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePolicyResponse, error)
// CreatePolicyWithResponse Create a new policy
//
// Creates a new policy resource. The caller may optionally specify a
// client-assigned ID via the `id` query parameter. If not provided, the
// server will generate a UUID.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /policies (the `CreatePolicy` operationId).
CreatePolicyWithResponse(ctx context.Context, params *CreatePolicyParams, body CreatePolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePolicyResponse, error)
// DeletePolicyWithResponse Delete a policy
//
// Deletes a policy. This operation is immediate and cannot be undone.
//
// Returns 204 No Content on successful deletion. The operation provides
// strong consistency - attempting to read the resource immediately after
// deletion will return 404 Not Found.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with DELETE /policies/{policyId} (the `DeletePolicy` operationId).
DeletePolicyWithResponse(ctx context.Context, policyId PolicyIdPath, reqEditors ...RequestEditorFn) (*DeletePolicyResponse, error)
// GetPolicyWithResponse Get a policy
//
// Retrieves a single policy by its ID.
//
// This method implements AEP-131 Get standard method.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /policies/{policyId} (the `GetPolicy` operationId).
GetPolicyWithResponse(ctx context.Context, policyId PolicyIdPath, reqEditors ...RequestEditorFn) (*GetPolicyResponse, error)
// UpdatePolicyWithBodyWithResponse Update a policy
//
// Updates an existing policy using partial update (merge).
//
// This method implements AEP-134 Update standard method. It uses PATCH
// with JSON Merge Patch per RFC 7396. Only provided fields are updated;
// omitted fields are left unchanged. Use `null` to clear optional fields.
//
// ## Partial Update (Merge)
// Send only the fields you want to change. The server merges the patch
// onto the existing resource. Content-Type must be
// `application/merge-patch+json`.
//
// ## Immutable Fields
// The following fields cannot be updated (ignored if sent):
// - path
// - id
// - policy_type (cannot be changed after creation)
// - create_time
// - update_time
//
// 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 /policies/{policyId} (the `UpdatePolicy` operationId).
UpdatePolicyWithBodyWithResponse(ctx context.Context, policyId PolicyIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePolicyResponse, error)
// UpdatePolicyWithApplicationMergePatchPlusJSONBodyWithResponse Update a policy
//
// Updates an existing policy using partial update (merge).
//
// This method implements AEP-134 Update standard method. It uses PATCH
// with JSON Merge Patch per RFC 7396. Only provided fields are updated;
// omitted fields are left unchanged. Use `null` to clear optional fields.
//
// ## Partial Update (Merge)
// Send only the fields you want to change. The server merges the patch
// onto the existing resource. Content-Type must be
// `application/merge-patch+json`.
//
// ## Immutable Fields
// The following fields cannot be updated (ignored if sent):
// - path
// - id
// - policy_type (cannot be changed after creation)
// - create_time
// - update_time
//
// Takes a body of the `application/merge-patch+json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PATCH /policies/{policyId} (the `UpdatePolicy` operationId).
UpdatePolicyWithApplicationMergePatchPlusJSONBodyWithResponse(ctx context.Context, policyId PolicyIdPath, body UpdatePolicyApplicationMergePatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePolicyResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreatePolicyResponse ¶
type CreatePolicyResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON201 the response for an HTTP 201 `application/json` response
JSON201 *Policy
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *Forbidden
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AlreadyExists
// JSON422 the response for an HTTP 422 `application/json` response
JSON422 *ValidationError
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
// Headers201 the parsed response headers for an HTTP 201 response
Headers201 *CreatePolicyResponse201Headers
}
func ParseCreatePolicyResponse ¶
func ParseCreatePolicyResponse(rsp *http.Response) (*CreatePolicyResponse, error)
ParseCreatePolicyResponse parses an HTTP response from a CreatePolicyWithResponse call
func (CreatePolicyResponse) ContentType ¶
func (r CreatePolicyResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreatePolicyResponse) GetBody ¶
func (r CreatePolicyResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CreatePolicyResponse) GetJSON201 ¶
func (r CreatePolicyResponse) GetJSON201() *Policy
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (CreatePolicyResponse) GetJSON400 ¶
func (r CreatePolicyResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (CreatePolicyResponse) GetJSON401 ¶
func (r CreatePolicyResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (CreatePolicyResponse) GetJSON403 ¶
func (r CreatePolicyResponse) GetJSON403() *Forbidden
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (CreatePolicyResponse) GetJSON409 ¶
func (r CreatePolicyResponse) GetJSON409() *AlreadyExists
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (CreatePolicyResponse) GetJSON422 ¶
func (r CreatePolicyResponse) GetJSON422() *ValidationError
GetJSON422 returns the response for an HTTP 422 `application/json` response
func (CreatePolicyResponse) GetJSON500 ¶
func (r CreatePolicyResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (CreatePolicyResponse) Status ¶
func (r CreatePolicyResponse) Status() string
Status returns HTTPResponse.Status
func (CreatePolicyResponse) StatusCode ¶
func (r CreatePolicyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreatePolicyResponse201Headers ¶
type CreatePolicyResponse201Headers struct {
Location *string
}
CreatePolicyResponse201Headers the declared response headers of an HTTP 201 response for CreatePolicy
type DeletePolicyResponse ¶
type DeletePolicyResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *Forbidden
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *NotFound
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
}
func ParseDeletePolicyResponse ¶
func ParseDeletePolicyResponse(rsp *http.Response) (*DeletePolicyResponse, error)
ParseDeletePolicyResponse parses an HTTP response from a DeletePolicyWithResponse call
func (DeletePolicyResponse) ContentType ¶
func (r DeletePolicyResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DeletePolicyResponse) GetBody ¶
func (r DeletePolicyResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (DeletePolicyResponse) GetJSON401 ¶
func (r DeletePolicyResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (DeletePolicyResponse) GetJSON403 ¶
func (r DeletePolicyResponse) GetJSON403() *Forbidden
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (DeletePolicyResponse) GetJSON404 ¶
func (r DeletePolicyResponse) GetJSON404() *NotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (DeletePolicyResponse) GetJSON500 ¶
func (r DeletePolicyResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (DeletePolicyResponse) Status ¶
func (r DeletePolicyResponse) Status() string
Status returns HTTPResponse.Status
func (DeletePolicyResponse) StatusCode ¶
func (r DeletePolicyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetPolicyResponse ¶
type GetPolicyResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Policy
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *Forbidden
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *NotFound
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
}
func ParseGetPolicyResponse ¶
func ParseGetPolicyResponse(rsp *http.Response) (*GetPolicyResponse, error)
ParseGetPolicyResponse parses an HTTP response from a GetPolicyWithResponse call
func (GetPolicyResponse) ContentType ¶
func (r GetPolicyResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetPolicyResponse) GetBody ¶
func (r GetPolicyResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetPolicyResponse) GetJSON200 ¶
func (r GetPolicyResponse) GetJSON200() *Policy
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetPolicyResponse) GetJSON401 ¶
func (r GetPolicyResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (GetPolicyResponse) GetJSON403 ¶
func (r GetPolicyResponse) GetJSON403() *Forbidden
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (GetPolicyResponse) GetJSON404 ¶
func (r GetPolicyResponse) GetJSON404() *NotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (GetPolicyResponse) GetJSON500 ¶
func (r GetPolicyResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (GetPolicyResponse) Status ¶
func (r GetPolicyResponse) Status() string
Status returns HTTPResponse.Status
func (GetPolicyResponse) StatusCode ¶
func (r GetPolicyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ListPoliciesResponse ¶
type ListPoliciesResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *PolicyList
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *Forbidden
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
}
func ParseListPoliciesResponse ¶
func ParseListPoliciesResponse(rsp *http.Response) (*ListPoliciesResponse, error)
ParseListPoliciesResponse parses an HTTP response from a ListPoliciesWithResponse call
func (ListPoliciesResponse) ContentType ¶
func (r ListPoliciesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListPoliciesResponse) GetBody ¶
func (r ListPoliciesResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListPoliciesResponse) GetJSON200 ¶
func (r ListPoliciesResponse) GetJSON200() *PolicyList
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListPoliciesResponse) GetJSON400 ¶
func (r ListPoliciesResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (ListPoliciesResponse) GetJSON401 ¶
func (r ListPoliciesResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (ListPoliciesResponse) GetJSON403 ¶
func (r ListPoliciesResponse) GetJSON403() *Forbidden
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (ListPoliciesResponse) GetJSON500 ¶
func (r ListPoliciesResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (ListPoliciesResponse) Status ¶
func (r ListPoliciesResponse) Status() string
Status returns HTTPResponse.Status
func (ListPoliciesResponse) StatusCode ¶
func (r ListPoliciesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type UpdatePolicyResponse ¶
type UpdatePolicyResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Policy
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *Forbidden
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *NotFound
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AlreadyExists
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
}
func ParseUpdatePolicyResponse ¶
func ParseUpdatePolicyResponse(rsp *http.Response) (*UpdatePolicyResponse, error)
ParseUpdatePolicyResponse parses an HTTP response from a UpdatePolicyWithResponse call
func (UpdatePolicyResponse) ContentType ¶
func (r UpdatePolicyResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UpdatePolicyResponse) GetBody ¶
func (r UpdatePolicyResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (UpdatePolicyResponse) GetJSON200 ¶
func (r UpdatePolicyResponse) GetJSON200() *Policy
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (UpdatePolicyResponse) GetJSON400 ¶
func (r UpdatePolicyResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (UpdatePolicyResponse) GetJSON401 ¶
func (r UpdatePolicyResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (UpdatePolicyResponse) GetJSON403 ¶
func (r UpdatePolicyResponse) GetJSON403() *Forbidden
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (UpdatePolicyResponse) GetJSON404 ¶
func (r UpdatePolicyResponse) GetJSON404() *NotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (UpdatePolicyResponse) GetJSON409 ¶
func (r UpdatePolicyResponse) GetJSON409() *AlreadyExists
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (UpdatePolicyResponse) GetJSON500 ¶
func (r UpdatePolicyResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (UpdatePolicyResponse) Status ¶
func (r UpdatePolicyResponse) Status() string
Status returns HTTPResponse.Status
func (UpdatePolicyResponse) StatusCode ¶
func (r UpdatePolicyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode