func (a *Client) TokensQuery(params *TokensQueryParams, opts ...ClientOption) (*TokensQueryOK, error) {
	if params == nil {
		params = NewTokensQueryParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "tokens-query",
		Method:             "GET",
		PathPattern:        "/installation-tokens/queries/tokens/v1",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &TokensQueryReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}
	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*TokensQueryOK)
	if ok {
		return success, nil
	}
	unexpectedSuccess := result.(*TokensQueryDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}
/*
TokensQuery searches for tokens by providing an f q l filter and paging details
package installation_tokens
import (
	"fmt"
	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"
)
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
	return &Client{transport: transport, formats: formats}
}
type Client struct {
	transport runtime.ClientTransport
	formats   strfmt.Registry
}
type ClientOption func(*runtime.ClientOperation)
type ClientService interface {
	AuditEventsQuery(params *AuditEventsQueryParams, opts ...ClientOption) (*AuditEventsQueryOK, error)
	AuditEventsRead(params *AuditEventsReadParams, opts ...ClientOption) (*AuditEventsReadOK, error)
	CustomerSettingsRead(params *CustomerSettingsReadParams, opts ...ClientOption) (*CustomerSettingsReadOK, error)
	TokensCreate(params *TokensCreateParams, opts ...ClientOption) (*TokensCreateCreated, error)
	TokensDelete(params *TokensDeleteParams, opts ...ClientOption) (*TokensDeleteOK, error)
	TokensQuery(params *TokensQueryParams, opts ...ClientOption) (*TokensQueryOK, error)
	TokensRead(params *TokensReadParams, opts ...ClientOption) (*TokensReadOK, error)
	TokensUpdate(params *TokensUpdateParams, opts ...ClientOption) (*TokensUpdateOK, error)
	SetTransport(transport runtime.ClientTransport)
}
func (a *Client) AuditEventsQuery(params *AuditEventsQueryParams, opts ...ClientOption) (*AuditEventsQueryOK, error) {
	if params == nil {
		params = NewAuditEventsQueryParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "audit-events-query",
		Method:             "GET",
		PathPattern:        "/installation-tokens/queries/audit-events/v1",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &AuditEventsQueryReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}
	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*AuditEventsQueryOK)
	if ok {
		return success, nil
	}
	unexpectedSuccess := result.(*AuditEventsQueryDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}
func (a *Client) AuditEventsRead(params *AuditEventsReadParams, opts ...ClientOption) (*AuditEventsReadOK, error) {
	if params == nil {
		params = NewAuditEventsReadParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "audit-events-read",
		Method:             "GET",
		PathPattern:        "/installation-tokens/entities/audit-events/v1",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &AuditEventsReadReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}
	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*AuditEventsReadOK)
	if ok {
		return success, nil
	}
	unexpectedSuccess := result.(*AuditEventsReadDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}
func (a *Client) CustomerSettingsRead(params *CustomerSettingsReadParams, opts ...ClientOption) (*CustomerSettingsReadOK, error) {
	if params == nil {
		params = NewCustomerSettingsReadParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "customer-settings-read",
		Method:             "GET",
		PathPattern:        "/installation-tokens/entities/customer-settings/v1",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &CustomerSettingsReadReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}
	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*CustomerSettingsReadOK)
	if ok {
		return success, nil
	}
	unexpectedSuccess := result.(*CustomerSettingsReadDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}
func (a *Client) TokensCreate(params *TokensCreateParams, opts ...ClientOption) (*TokensCreateCreated, error) {
	if params == nil {
		params = NewTokensCreateParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "tokens-create",
		Method:             "POST",
		PathPattern:        "/installation-tokens/entities/tokens/v1",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &TokensCreateReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}
	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*TokensCreateCreated)
	if ok {
		return success, nil
	}
	msg := fmt.Sprintf("unexpected success response for tokens-create: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}
func (a *Client) TokensDelete(params *TokensDeleteParams, opts ...ClientOption) (*TokensDeleteOK, error) {
	if params == nil {
		params = NewTokensDeleteParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "tokens-delete",
		Method:             "DELETE",
		PathPattern:        "/installation-tokens/entities/tokens/v1",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &TokensDeleteReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}
	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*TokensDeleteOK)
	if ok {
		return success, nil
	}
	unexpectedSuccess := result.(*TokensDeleteDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}