// Code generated by go-swagger; DO NOT EDIT.

// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed

package portal_catalog

import (
	"context"
	"fmt"
	"time"

	"github.com/go-openapi/runtime"
	httptransport "github.com/go-openapi/runtime/client"
	"github.com/go-openapi/strfmt"
)

// New creates a new portal catalog API client.
func New(transport runtime.ContextualTransport, formats strfmt.Registry) ClientService {
	return &Client{transport: transport, formats: formats}
}

// New creates a new portal catalog API client with basic auth credentials.
//
// It takes the following parameters:
// - host: http host (github.com).
// - basePath: any base path for the API client ("/v1", "/v3").
// - scheme: http scheme ("http", "https").
// - user: user for basic authentication header.
// - password: password for basic authentication header.
func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService {
	transport := httptransport.New(host, basePath, []string{scheme})
	transport.DefaultAuthentication = httptransport.BasicAuth(user, password)
	return &Client{transport: transport, formats: strfmt.Default}
}

// New creates a new portal catalog API client with a bearer token for authentication.
//
// It takes the following parameters:
// - host: http host (github.com).
// - basePath: any base path for the API client ("/v1", "/v3").
// - scheme: http scheme ("http", "https").
// - bearerToken: bearer token for Bearer authentication header.
func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService {
	transport := httptransport.New(host, basePath, []string{scheme})
	transport.DefaultAuthentication = httptransport.BearerToken(bearerToken)
	return &Client{transport: transport, formats: strfmt.Default}
}

// Client for portal catalog API.
type Client struct {
	transport runtime.ContextualTransport
	formats   strfmt.Registry
}

// ClientOption may be used to customize the behavior of Client methods.
type ClientOption func(*runtime.ClientOperation)

// ClientService is the interface for Client methods.
type ClientService interface {

	// GetBrandServices list brand catalog placements.
	GetBrandServices(params *GetBrandServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBrandServicesOK, error)

	// GetBrandServicesContext list brand catalog placements.
	GetBrandServicesContext(ctx context.Context, params *GetBrandServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBrandServicesOK, error)

	// GetBrands list customer facing brands.
	GetBrands(params *GetBrandsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBrandsOK, error)

	// GetBrandsContext list customer facing brands.
	GetBrandsContext(ctx context.Context, params *GetBrandsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBrandsOK, error)

	// GetServiceScopes list controlled client scopes.
	GetServiceScopes(params *GetServiceScopesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetServiceScopesOK, error)

	// GetServiceScopesContext list controlled client scopes.
	GetServiceScopesContext(ctx context.Context, params *GetServiceScopesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetServiceScopesOK, error)

	// GetServices list commercial member facing capabilities.
	GetServices(params *GetServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetServicesOK, error)

	// GetServicesContext list commercial member facing capabilities.
	GetServicesContext(ctx context.Context, params *GetServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetServicesOK, error)

	// PostBrandServices create brand catalog placements.
	PostBrandServices(params *PostBrandServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostBrandServicesOK, error)

	// PostBrandServicesContext create brand catalog placements.
	PostBrandServicesContext(ctx context.Context, params *PostBrandServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostBrandServicesOK, error)

	// PostBrands create brands.
	PostBrands(params *PostBrandsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostBrandsOK, error)

	// PostBrandsContext create brands.
	PostBrandsContext(ctx context.Context, params *PostBrandsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostBrandsOK, error)

	// PostServiceScopes create controlled client scopes.
	PostServiceScopes(params *PostServiceScopesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostServiceScopesOK, error)

	// PostServiceScopesContext create controlled client scopes.
	PostServiceScopesContext(ctx context.Context, params *PostServiceScopesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostServiceScopesOK, error)

	// PostServices create commercial services.
	PostServices(params *PostServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostServicesOK, error)

	// PostServicesContext create commercial services.
	PostServicesContext(ctx context.Context, params *PostServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostServicesOK, error)

	// PutBrandServices update brand catalog placements.
	PutBrandServices(params *PutBrandServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutBrandServicesOK, error)

	// PutBrandServicesContext update brand catalog placements.
	PutBrandServicesContext(ctx context.Context, params *PutBrandServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutBrandServicesOK, error)

	// PutBrands update brands without deleting history.
	PutBrands(params *PutBrandsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutBrandsOK, error)

	// PutBrandsContext update brands without deleting history.
	PutBrandsContext(ctx context.Context, params *PutBrandsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutBrandsOK, error)

	// PutServiceScopes update controlled client scopes.
	PutServiceScopes(params *PutServiceScopesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutServiceScopesOK, error)

	// PutServiceScopesContext update controlled client scopes.
	PutServiceScopesContext(ctx context.Context, params *PutServiceScopesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutServiceScopesOK, error)

	// PutServices update commercial services without deleting history.
	PutServices(params *PutServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutServicesOK, error)

	// PutServicesContext update commercial services without deleting history.
	PutServicesContext(ctx context.Context, params *PutServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutServicesOK, error)

	SetTransport(transport runtime.ContextualTransport)
}

// GetBrandServices lists brand catalog placements.
//
// This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled.
//
// If you need to pass a specific context, use [Client.GetBrandServicesContext] instead.
func (a *Client) GetBrandServices(params *GetBrandServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBrandServicesOK, error) {
	var ctx context.Context
	if params.inner.ctx != nil {
		ctx = params.inner.ctx
	} else {
		ctx = context.Background()
	}

	return a.GetBrandServicesContext(ctx, params, authInfo, opts...)
}

// GetBrandServicesContext lists brand catalog placements.
//
// Do not use the deprecated [GetBrandServicesParams.Context] with this method: it would be ignored.
func (a *Client) GetBrandServicesContext(ctx context.Context, params *GetBrandServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBrandServicesOK, error) {
	// NOTE: parameters are not validated before sending
	if params == nil {
		params = NewGetBrandServicesParams()
	}

	op := &runtime.ClientOperation{
		ID:                 "getBrandServices",
		Method:             "GET",
		PathPattern:        "/brandservices",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &GetBrandServicesReader{formats: a.formats},
		AuthInfo:           authInfo,
		Client:             params.HTTPClient,
	}

	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.SubmitContext(ctx, op)
	if err != nil {
		return nil, err
	}

	// only one success response has to be checked
	success, ok := result.(*GetBrandServicesOK)
	if ok {
		return success, nil
	}

	// unexpected success response.

	// no default response is defined.
	//
	// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
	msg := fmt.Sprintf("unexpected success response for getBrandServices: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

// GetBrands lists customer facing brands.
//
// This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled.
//
// If you need to pass a specific context, use [Client.GetBrandsContext] instead.
func (a *Client) GetBrands(params *GetBrandsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBrandsOK, error) {
	var ctx context.Context
	if params.inner.ctx != nil {
		ctx = params.inner.ctx
	} else {
		ctx = context.Background()
	}

	return a.GetBrandsContext(ctx, params, authInfo, opts...)
}

// GetBrandsContext lists customer facing brands.
//
// Do not use the deprecated [GetBrandsParams.Context] with this method: it would be ignored.
func (a *Client) GetBrandsContext(ctx context.Context, params *GetBrandsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBrandsOK, error) {
	// NOTE: parameters are not validated before sending
	if params == nil {
		params = NewGetBrandsParams()
	}

	op := &runtime.ClientOperation{
		ID:                 "getBrands",
		Method:             "GET",
		PathPattern:        "/brands",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &GetBrandsReader{formats: a.formats},
		AuthInfo:           authInfo,
		Client:             params.HTTPClient,
	}

	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.SubmitContext(ctx, op)
	if err != nil {
		return nil, err
	}

	// only one success response has to be checked
	success, ok := result.(*GetBrandsOK)
	if ok {
		return success, nil
	}

	// unexpected success response.

	// no default response is defined.
	//
	// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
	msg := fmt.Sprintf("unexpected success response for getBrands: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

// GetServiceScopes lists controlled client scopes.
//
// This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled.
//
// If you need to pass a specific context, use [Client.GetServiceScopesContext] instead.
func (a *Client) GetServiceScopes(params *GetServiceScopesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetServiceScopesOK, error) {
	var ctx context.Context
	if params.inner.ctx != nil {
		ctx = params.inner.ctx
	} else {
		ctx = context.Background()
	}

	return a.GetServiceScopesContext(ctx, params, authInfo, opts...)
}

// GetServiceScopesContext lists controlled client scopes.
//
// Do not use the deprecated [GetServiceScopesParams.Context] with this method: it would be ignored.
func (a *Client) GetServiceScopesContext(ctx context.Context, params *GetServiceScopesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetServiceScopesOK, error) {
	// NOTE: parameters are not validated before sending
	if params == nil {
		params = NewGetServiceScopesParams()
	}

	op := &runtime.ClientOperation{
		ID:                 "getServiceScopes",
		Method:             "GET",
		PathPattern:        "/servicescopes",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &GetServiceScopesReader{formats: a.formats},
		AuthInfo:           authInfo,
		Client:             params.HTTPClient,
	}

	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.SubmitContext(ctx, op)
	if err != nil {
		return nil, err
	}

	// only one success response has to be checked
	success, ok := result.(*GetServiceScopesOK)
	if ok {
		return success, nil
	}

	// unexpected success response.

	// no default response is defined.
	//
	// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
	msg := fmt.Sprintf("unexpected success response for getServiceScopes: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

// GetServices lists commercial member facing capabilities.
//
// This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled.
//
// If you need to pass a specific context, use [Client.GetServicesContext] instead.
func (a *Client) GetServices(params *GetServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetServicesOK, error) {
	var ctx context.Context
	if params.inner.ctx != nil {
		ctx = params.inner.ctx
	} else {
		ctx = context.Background()
	}

	return a.GetServicesContext(ctx, params, authInfo, opts...)
}

// GetServicesContext lists commercial member facing capabilities.
//
// Do not use the deprecated [GetServicesParams.Context] with this method: it would be ignored.
func (a *Client) GetServicesContext(ctx context.Context, params *GetServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetServicesOK, error) {
	// NOTE: parameters are not validated before sending
	if params == nil {
		params = NewGetServicesParams()
	}

	op := &runtime.ClientOperation{
		ID:                 "getServices",
		Method:             "GET",
		PathPattern:        "/services",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &GetServicesReader{formats: a.formats},
		AuthInfo:           authInfo,
		Client:             params.HTTPClient,
	}

	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.SubmitContext(ctx, op)
	if err != nil {
		return nil, err
	}

	// only one success response has to be checked
	success, ok := result.(*GetServicesOK)
	if ok {
		return success, nil
	}

	// unexpected success response.

	// no default response is defined.
	//
	// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
	msg := fmt.Sprintf("unexpected success response for getServices: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

// PostBrandServices creates brand catalog placements.
//
// This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled.
//
// If you need to pass a specific context, use [Client.PostBrandServicesContext] instead.
func (a *Client) PostBrandServices(params *PostBrandServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostBrandServicesOK, error) {
	var ctx context.Context
	if params.inner.ctx != nil {
		ctx = params.inner.ctx
	} else {
		ctx = context.Background()
	}

	return a.PostBrandServicesContext(ctx, params, authInfo, opts...)
}

// PostBrandServicesContext creates brand catalog placements.
//
// Do not use the deprecated [PostBrandServicesParams.Context] with this method: it would be ignored.
func (a *Client) PostBrandServicesContext(ctx context.Context, params *PostBrandServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostBrandServicesOK, error) {
	// NOTE: parameters are not validated before sending
	if params == nil {
		params = NewPostBrandServicesParams()
	}

	op := &runtime.ClientOperation{
		ID:                 "postBrandServices",
		Method:             "POST",
		PathPattern:        "/brandservices",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PostBrandServicesReader{formats: a.formats},
		AuthInfo:           authInfo,
		Client:             params.HTTPClient,
	}

	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.SubmitContext(ctx, op)
	if err != nil {
		return nil, err
	}

	// only one success response has to be checked
	success, ok := result.(*PostBrandServicesOK)
	if ok {
		return success, nil
	}

	// unexpected success response.

	// no default response is defined.
	//
	// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
	msg := fmt.Sprintf("unexpected success response for postBrandServices: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

// PostBrands creates brands.
//
// This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled.
//
// If you need to pass a specific context, use [Client.PostBrandsContext] instead.
func (a *Client) PostBrands(params *PostBrandsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostBrandsOK, error) {
	var ctx context.Context
	if params.inner.ctx != nil {
		ctx = params.inner.ctx
	} else {
		ctx = context.Background()
	}

	return a.PostBrandsContext(ctx, params, authInfo, opts...)
}

// PostBrandsContext creates brands.
//
// Do not use the deprecated [PostBrandsParams.Context] with this method: it would be ignored.
func (a *Client) PostBrandsContext(ctx context.Context, params *PostBrandsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostBrandsOK, error) {
	// NOTE: parameters are not validated before sending
	if params == nil {
		params = NewPostBrandsParams()
	}

	op := &runtime.ClientOperation{
		ID:                 "postBrands",
		Method:             "POST",
		PathPattern:        "/brands",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PostBrandsReader{formats: a.formats},
		AuthInfo:           authInfo,
		Client:             params.HTTPClient,
	}

	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.SubmitContext(ctx, op)
	if err != nil {
		return nil, err
	}

	// only one success response has to be checked
	success, ok := result.(*PostBrandsOK)
	if ok {
		return success, nil
	}

	// unexpected success response.

	// no default response is defined.
	//
	// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
	msg := fmt.Sprintf("unexpected success response for postBrands: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

// PostServiceScopes creates controlled client scopes.
//
// This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled.
//
// If you need to pass a specific context, use [Client.PostServiceScopesContext] instead.
func (a *Client) PostServiceScopes(params *PostServiceScopesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostServiceScopesOK, error) {
	var ctx context.Context
	if params.inner.ctx != nil {
		ctx = params.inner.ctx
	} else {
		ctx = context.Background()
	}

	return a.PostServiceScopesContext(ctx, params, authInfo, opts...)
}

// PostServiceScopesContext creates controlled client scopes.
//
// Do not use the deprecated [PostServiceScopesParams.Context] with this method: it would be ignored.
func (a *Client) PostServiceScopesContext(ctx context.Context, params *PostServiceScopesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostServiceScopesOK, error) {
	// NOTE: parameters are not validated before sending
	if params == nil {
		params = NewPostServiceScopesParams()
	}

	op := &runtime.ClientOperation{
		ID:                 "postServiceScopes",
		Method:             "POST",
		PathPattern:        "/servicescopes",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PostServiceScopesReader{formats: a.formats},
		AuthInfo:           authInfo,
		Client:             params.HTTPClient,
	}

	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.SubmitContext(ctx, op)
	if err != nil {
		return nil, err
	}

	// only one success response has to be checked
	success, ok := result.(*PostServiceScopesOK)
	if ok {
		return success, nil
	}

	// unexpected success response.

	// no default response is defined.
	//
	// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
	msg := fmt.Sprintf("unexpected success response for postServiceScopes: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

// PostServices creates commercial services.
//
// This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled.
//
// If you need to pass a specific context, use [Client.PostServicesContext] instead.
func (a *Client) PostServices(params *PostServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostServicesOK, error) {
	var ctx context.Context
	if params.inner.ctx != nil {
		ctx = params.inner.ctx
	} else {
		ctx = context.Background()
	}

	return a.PostServicesContext(ctx, params, authInfo, opts...)
}

// PostServicesContext creates commercial services.
//
// Do not use the deprecated [PostServicesParams.Context] with this method: it would be ignored.
func (a *Client) PostServicesContext(ctx context.Context, params *PostServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostServicesOK, error) {
	// NOTE: parameters are not validated before sending
	if params == nil {
		params = NewPostServicesParams()
	}

	op := &runtime.ClientOperation{
		ID:                 "postServices",
		Method:             "POST",
		PathPattern:        "/services",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PostServicesReader{formats: a.formats},
		AuthInfo:           authInfo,
		Client:             params.HTTPClient,
	}

	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.SubmitContext(ctx, op)
	if err != nil {
		return nil, err
	}

	// only one success response has to be checked
	success, ok := result.(*PostServicesOK)
	if ok {
		return success, nil
	}

	// unexpected success response.

	// no default response is defined.
	//
	// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
	msg := fmt.Sprintf("unexpected success response for postServices: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

// PutBrandServices updates brand catalog placements.
//
// This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled.
//
// If you need to pass a specific context, use [Client.PutBrandServicesContext] instead.
func (a *Client) PutBrandServices(params *PutBrandServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutBrandServicesOK, error) {
	var ctx context.Context
	if params.inner.ctx != nil {
		ctx = params.inner.ctx
	} else {
		ctx = context.Background()
	}

	return a.PutBrandServicesContext(ctx, params, authInfo, opts...)
}

// PutBrandServicesContext updates brand catalog placements.
//
// Do not use the deprecated [PutBrandServicesParams.Context] with this method: it would be ignored.
func (a *Client) PutBrandServicesContext(ctx context.Context, params *PutBrandServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutBrandServicesOK, error) {
	// NOTE: parameters are not validated before sending
	if params == nil {
		params = NewPutBrandServicesParams()
	}

	op := &runtime.ClientOperation{
		ID:                 "putBrandServices",
		Method:             "PUT",
		PathPattern:        "/brandservices",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PutBrandServicesReader{formats: a.formats},
		AuthInfo:           authInfo,
		Client:             params.HTTPClient,
	}

	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.SubmitContext(ctx, op)
	if err != nil {
		return nil, err
	}

	// only one success response has to be checked
	success, ok := result.(*PutBrandServicesOK)
	if ok {
		return success, nil
	}

	// unexpected success response.

	// no default response is defined.
	//
	// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
	msg := fmt.Sprintf("unexpected success response for putBrandServices: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

// PutBrands updates brands without deleting history.
//
// This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled.
//
// If you need to pass a specific context, use [Client.PutBrandsContext] instead.
func (a *Client) PutBrands(params *PutBrandsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutBrandsOK, error) {
	var ctx context.Context
	if params.inner.ctx != nil {
		ctx = params.inner.ctx
	} else {
		ctx = context.Background()
	}

	return a.PutBrandsContext(ctx, params, authInfo, opts...)
}

// PutBrandsContext updates brands without deleting history.
//
// Do not use the deprecated [PutBrandsParams.Context] with this method: it would be ignored.
func (a *Client) PutBrandsContext(ctx context.Context, params *PutBrandsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutBrandsOK, error) {
	// NOTE: parameters are not validated before sending
	if params == nil {
		params = NewPutBrandsParams()
	}

	op := &runtime.ClientOperation{
		ID:                 "putBrands",
		Method:             "PUT",
		PathPattern:        "/brands",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PutBrandsReader{formats: a.formats},
		AuthInfo:           authInfo,
		Client:             params.HTTPClient,
	}

	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.SubmitContext(ctx, op)
	if err != nil {
		return nil, err
	}

	// only one success response has to be checked
	success, ok := result.(*PutBrandsOK)
	if ok {
		return success, nil
	}

	// unexpected success response.

	// no default response is defined.
	//
	// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
	msg := fmt.Sprintf("unexpected success response for putBrands: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

// PutServiceScopes updates controlled client scopes.
//
// This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled.
//
// If you need to pass a specific context, use [Client.PutServiceScopesContext] instead.
func (a *Client) PutServiceScopes(params *PutServiceScopesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutServiceScopesOK, error) {
	var ctx context.Context
	if params.inner.ctx != nil {
		ctx = params.inner.ctx
	} else {
		ctx = context.Background()
	}

	return a.PutServiceScopesContext(ctx, params, authInfo, opts...)
}

// PutServiceScopesContext updates controlled client scopes.
//
// Do not use the deprecated [PutServiceScopesParams.Context] with this method: it would be ignored.
func (a *Client) PutServiceScopesContext(ctx context.Context, params *PutServiceScopesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutServiceScopesOK, error) {
	// NOTE: parameters are not validated before sending
	if params == nil {
		params = NewPutServiceScopesParams()
	}

	op := &runtime.ClientOperation{
		ID:                 "putServiceScopes",
		Method:             "PUT",
		PathPattern:        "/servicescopes",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PutServiceScopesReader{formats: a.formats},
		AuthInfo:           authInfo,
		Client:             params.HTTPClient,
	}

	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.SubmitContext(ctx, op)
	if err != nil {
		return nil, err
	}

	// only one success response has to be checked
	success, ok := result.(*PutServiceScopesOK)
	if ok {
		return success, nil
	}

	// unexpected success response.

	// no default response is defined.
	//
	// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
	msg := fmt.Sprintf("unexpected success response for putServiceScopes: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

// PutServices updates commercial services without deleting history.
//
// This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled.
//
// If you need to pass a specific context, use [Client.PutServicesContext] instead.
func (a *Client) PutServices(params *PutServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutServicesOK, error) {
	var ctx context.Context
	if params.inner.ctx != nil {
		ctx = params.inner.ctx
	} else {
		ctx = context.Background()
	}

	return a.PutServicesContext(ctx, params, authInfo, opts...)
}

// PutServicesContext updates commercial services without deleting history.
//
// Do not use the deprecated [PutServicesParams.Context] with this method: it would be ignored.
func (a *Client) PutServicesContext(ctx context.Context, params *PutServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutServicesOK, error) {
	// NOTE: parameters are not validated before sending
	if params == nil {
		params = NewPutServicesParams()
	}

	op := &runtime.ClientOperation{
		ID:                 "putServices",
		Method:             "PUT",
		PathPattern:        "/services",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PutServicesReader{formats: a.formats},
		AuthInfo:           authInfo,
		Client:             params.HTTPClient,
	}

	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.SubmitContext(ctx, op)
	if err != nil {
		return nil, err
	}

	// only one success response has to be checked
	success, ok := result.(*PutServicesOK)
	if ok {
		return success, nil
	}

	// unexpected success response.

	// no default response is defined.
	//
	// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
	msg := fmt.Sprintf("unexpected success response for putServices: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

// SetTransport changes the transport on the client
func (a *Client) SetTransport(transport runtime.ContextualTransport) {
	a.transport = transport
}

// innerParams captures internal fields so they don't conflict with user-supplied parameters.
type innerParams struct {
	timeout time.Duration

	// Deprecated: use the operation call with context to pass the context instead of [PortalCatalogParams].
	ctx context.Context
}
