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

package packer_service

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

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

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

// New creates a new packer service 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 packer service 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 packer service API
*/
type Client struct {
	transport runtime.ClientTransport
	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 {
	PackerServiceAssignChannelVersion(params *PackerServiceAssignChannelVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceAssignChannelVersionOK, error)

	PackerServiceCreateBucket(params *PackerServiceCreateBucketParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceCreateBucketOK, error)

	PackerServiceCreateBuild(params *PackerServiceCreateBuildParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceCreateBuildOK, error)

	PackerServiceCreateChannel(params *PackerServiceCreateChannelParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceCreateChannelOK, error)

	PackerServiceCreateEnforcedBlock(params *PackerServiceCreateEnforcedBlockParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceCreateEnforcedBlockOK, error)

	PackerServiceCreateEnforcedBlockVersion(params *PackerServiceCreateEnforcedBlockVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceCreateEnforcedBlockVersionOK, error)

	PackerServiceCreateRegistry(params *PackerServiceCreateRegistryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceCreateRegistryOK, error)

	PackerServiceCreateVersion(params *PackerServiceCreateVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceCreateVersionOK, error)

	PackerServiceDeleteBucket(params *PackerServiceDeleteBucketParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceDeleteBucketOK, error)

	PackerServiceDeleteBuild(params *PackerServiceDeleteBuildParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceDeleteBuildOK, error)

	PackerServiceDeleteChannel(params *PackerServiceDeleteChannelParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceDeleteChannelOK, error)

	PackerServiceDeleteEnforcedBlock(params *PackerServiceDeleteEnforcedBlockParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceDeleteEnforcedBlockOK, error)

	PackerServiceDeleteEnforcedBlockVersion(params *PackerServiceDeleteEnforcedBlockVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceDeleteEnforcedBlockVersionOK, error)

	PackerServiceDeleteRegistry(params *PackerServiceDeleteRegistryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceDeleteRegistryOK, error)

	PackerServiceDeleteVersion(params *PackerServiceDeleteVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceDeleteVersionOK, error)

	PackerServiceGetBucket(params *PackerServiceGetBucketParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetBucketOK, error)

	PackerServiceGetBuild(params *PackerServiceGetBuildParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetBuildOK, error)

	PackerServiceGetChannel(params *PackerServiceGetChannelParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetChannelOK, error)

	PackerServiceGetEnforcedBlock(params *PackerServiceGetEnforcedBlockParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetEnforcedBlockOK, error)

	PackerServiceGetEnforcedBlockLinkedBuckets(params *PackerServiceGetEnforcedBlockLinkedBucketsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetEnforcedBlockLinkedBucketsOK, error)

	PackerServiceGetEnforcedBlockVersions(params *PackerServiceGetEnforcedBlockVersionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetEnforcedBlockVersionsOK, error)

	PackerServiceGetEnforcedBlocksByBucket(params *PackerServiceGetEnforcedBlocksByBucketParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetEnforcedBlocksByBucketOK, error)

	PackerServiceGetRegistry(params *PackerServiceGetRegistryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetRegistryOK, error)

	PackerServiceGetRegistryTFCRunTaskAPI(params *PackerServiceGetRegistryTFCRunTaskAPIParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetRegistryTFCRunTaskAPIOK, error)

	PackerServiceGetRunTaskConfig(params *PackerServiceGetRunTaskConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetRunTaskConfigOK, error)

	PackerServiceGetSbom(params *PackerServiceGetSbomParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetSbomOK, error)

	PackerServiceGetVersion(params *PackerServiceGetVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetVersionOK, error)

	PackerServiceListBucketAncestry(params *PackerServiceListBucketAncestryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListBucketAncestryOK, error)

	PackerServiceListBucketPackages(params *PackerServiceListBucketPackagesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListBucketPackagesOK, error)

	PackerServiceListBucketPackagesVulnerabilitySummary(params *PackerServiceListBucketPackagesVulnerabilitySummaryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListBucketPackagesVulnerabilitySummaryOK, error)

	PackerServiceListBucketPackagesWithVulnerabilities(params *PackerServiceListBucketPackagesWithVulnerabilitiesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListBucketPackagesWithVulnerabilitiesOK, error)

	PackerServiceListBucketVulnerabilities(params *PackerServiceListBucketVulnerabilitiesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListBucketVulnerabilitiesOK, error)

	PackerServiceListBuckets(params *PackerServiceListBucketsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListBucketsOK, error)

	PackerServiceListBuildPackages(params *PackerServiceListBuildPackagesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListBuildPackagesOK, error)

	PackerServiceListBuilds(params *PackerServiceListBuildsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListBuildsOK, error)

	PackerServiceListChannelAssignmentHistory(params *PackerServiceListChannelAssignmentHistoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListChannelAssignmentHistoryOK, error)

	PackerServiceListChannels(params *PackerServiceListChannelsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListChannelsOK, error)

	PackerServiceListEnforcedBlocks(params *PackerServiceListEnforcedBlocksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListEnforcedBlocksOK, error)

	PackerServiceListSboms(params *PackerServiceListSbomsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListSbomsOK, error)

	PackerServiceListVersions(params *PackerServiceListVersionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListVersionsOK, error)

	PackerServiceManageEnforcedBlockLinkedBuckets(params *PackerServiceManageEnforcedBlockLinkedBucketsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceManageEnforcedBlockLinkedBucketsOK, error)

	PackerServiceRegenerateTFCRunTaskHmacKey(params *PackerServiceRegenerateTFCRunTaskHmacKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceRegenerateTFCRunTaskHmacKeyOK, error)

	PackerServiceSearchExternalArtifact(params *PackerServiceSearchExternalArtifactParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceSearchExternalArtifactOK, error)

	PackerServiceUpdateBucket(params *PackerServiceUpdateBucketParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceUpdateBucketOK, error)

	PackerServiceUpdateBuild(params *PackerServiceUpdateBuildParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceUpdateBuildOK, error)

	PackerServiceUpdateChannel(params *PackerServiceUpdateChannelParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceUpdateChannelOK, error)

	PackerServiceUpdateEnforcedBlock(params *PackerServiceUpdateEnforcedBlockParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceUpdateEnforcedBlockOK, error)

	PackerServiceUpdateEnforcedBlockVersion(params *PackerServiceUpdateEnforcedBlockVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceUpdateEnforcedBlockVersionOK, error)

	PackerServiceUpdateRegistry(params *PackerServiceUpdateRegistryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceUpdateRegistryOK, error)

	PackerServiceUpdateRunTaskConfig(params *PackerServiceUpdateRunTaskConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceUpdateRunTaskConfigOK, error)

	PackerServiceUpdateVersion(params *PackerServiceUpdateVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceUpdateVersionOK, error)

	PackerServiceUploadSbom(params *PackerServiceUploadSbomParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceUploadSbomOK, error)

	SetTransport(transport runtime.ClientTransport)
}

/*
PackerServiceAssignChannelVersion assigns the version from a source channel to a target channel this operation copies the version assignment leaving both channels assigned to the same version it provides a simple way to deploy validated versions e g from staging to production
*/
func (a *Client) PackerServiceAssignChannelVersion(params *PackerServiceAssignChannelVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceAssignChannelVersionOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceAssignChannelVersionParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_AssignChannelVersion",
		Method:             "POST",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/channels/assign",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceAssignChannelVersionReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceAssignChannelVersionOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceAssignChannelVersionDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceCreateBucket creates a bucket in the h c p packer registry
*/
func (a *Client) PackerServiceCreateBucket(params *PackerServiceCreateBucketParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceCreateBucketOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceCreateBucketParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_CreateBucket",
		Method:             "PUT",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceCreateBucketReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceCreateBucketOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceCreateBucketDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceCreateBuild creates a build in the provided version it is called once for each build source in a packer build run the request will error if the build for a given platform already exists
*/
func (a *Client) PackerServiceCreateBuild(params *PackerServiceCreateBuildParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceCreateBuildOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceCreateBuildParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_CreateBuild",
		Method:             "POST",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/versions/{fingerprint}/builds",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceCreateBuildReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceCreateBuildOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceCreateBuildDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceCreateChannel creates a channel either empty or assigned to a version
*/
func (a *Client) PackerServiceCreateChannel(params *PackerServiceCreateChannelParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceCreateChannelOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceCreateChannelParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_CreateChannel",
		Method:             "POST",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/channels",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceCreateChannelReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceCreateChannelOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceCreateChannelDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceCreateEnforcedBlock es n f o r c e d b l o c k s creates an enforced block in the h c p packer registry
*/
func (a *Client) PackerServiceCreateEnforcedBlock(params *PackerServiceCreateEnforcedBlockParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceCreateEnforcedBlockOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceCreateEnforcedBlockParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_CreateEnforcedBlock",
		Method:             "PUT",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/enforced_blocks",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceCreateEnforcedBlockReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceCreateEnforcedBlockOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceCreateEnforcedBlockDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceCreateEnforcedBlockVersion packer service create enforced block version API
*/
func (a *Client) PackerServiceCreateEnforcedBlockVersion(params *PackerServiceCreateEnforcedBlockVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceCreateEnforcedBlockVersionOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceCreateEnforcedBlockVersionParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_CreateEnforcedBlockVersion",
		Method:             "PUT",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/enforced_blocks/{enforced_block_id}/versions",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceCreateEnforcedBlockVersionReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceCreateEnforcedBlockVersionOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceCreateEnforcedBlockVersionDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceCreateRegistry creates the h c p packer registry and starts billing for it
*/
func (a *Client) PackerServiceCreateRegistry(params *PackerServiceCreateRegistryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceCreateRegistryOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceCreateRegistryParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_CreateRegistry",
		Method:             "PUT",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/registry",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceCreateRegistryReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceCreateRegistryOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceCreateRegistryDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceCreateVersion creates an empty version to be written to this API is called at the beginning of a new packer build and does not create individual builds for the version
*/
func (a *Client) PackerServiceCreateVersion(params *PackerServiceCreateVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceCreateVersionOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceCreateVersionParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_CreateVersion",
		Method:             "POST",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/versions",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceCreateVersionReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceCreateVersionOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceCreateVersionDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceDeleteBucket deletes the bucket and all its information such as versions builds and artifacts
*/
func (a *Client) PackerServiceDeleteBucket(params *PackerServiceDeleteBucketParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceDeleteBucketOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceDeleteBucketParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_DeleteBucket",
		Method:             "DELETE",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceDeleteBucketReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceDeleteBucketOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceDeleteBucketDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceDeleteBuild deletes a build in the provided version
*/
func (a *Client) PackerServiceDeleteBuild(params *PackerServiceDeleteBuildParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceDeleteBuildOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceDeleteBuildParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_DeleteBuild",
		Method:             "DELETE",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/versions/{fingerprint}/builds/{build_id}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceDeleteBuildReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceDeleteBuildOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceDeleteBuildDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceDeleteChannel deletes a channel
*/
func (a *Client) PackerServiceDeleteChannel(params *PackerServiceDeleteChannelParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceDeleteChannelOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceDeleteChannelParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_DeleteChannel",
		Method:             "DELETE",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/channels/{channel_name}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceDeleteChannelReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceDeleteChannelOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceDeleteChannelDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceDeleteEnforcedBlock deletes an enforced block from the h c p packer registry
*/
func (a *Client) PackerServiceDeleteEnforcedBlock(params *PackerServiceDeleteEnforcedBlockParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceDeleteEnforcedBlockOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceDeleteEnforcedBlockParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_DeleteEnforcedBlock",
		Method:             "DELETE",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/enforced_blocks/{enforced_block_id}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceDeleteEnforcedBlockReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceDeleteEnforcedBlockOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceDeleteEnforcedBlockDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceDeleteEnforcedBlockVersion deletes an enforced block version from the h c p packer registry
*/
func (a *Client) PackerServiceDeleteEnforcedBlockVersion(params *PackerServiceDeleteEnforcedBlockVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceDeleteEnforcedBlockVersionOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceDeleteEnforcedBlockVersionParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_DeleteEnforcedBlockVersion",
		Method:             "DELETE",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/enforced_blocks/{enforced_block_id}/versions/{enforced_block_version_id}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceDeleteEnforcedBlockVersionReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceDeleteEnforcedBlockVersionOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceDeleteEnforcedBlockVersionDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceDeleteRegistry deletes the h c p packer registry and any associated resources from the database
*/
func (a *Client) PackerServiceDeleteRegistry(params *PackerServiceDeleteRegistryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceDeleteRegistryOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceDeleteRegistryParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_DeleteRegistry",
		Method:             "DELETE",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/registry",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceDeleteRegistryReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceDeleteRegistryOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceDeleteRegistryDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceDeleteVersion deletes the version and all its information such as its builds and artifacts
*/
func (a *Client) PackerServiceDeleteVersion(params *PackerServiceDeleteVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceDeleteVersionOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceDeleteVersionParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_DeleteVersion",
		Method:             "DELETE",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/versions/{fingerprint}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceDeleteVersionReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceDeleteVersionOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceDeleteVersionDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceGetBucket retrieves an existing bucket
*/
func (a *Client) PackerServiceGetBucket(params *PackerServiceGetBucketParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetBucketOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceGetBucketParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_GetBucket",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceGetBucketReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceGetBucketOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceGetBucketDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceGetBuild retrieves a build with its list of artifacts
*/
func (a *Client) PackerServiceGetBuild(params *PackerServiceGetBuildParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetBuildOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceGetBuildParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_GetBuild",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/versions/{fingerprint}/builds/{build_id}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceGetBuildReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceGetBuildOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceGetBuildDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceGetChannel retrieves a channel with the version that it is currently assigned if any
*/
func (a *Client) PackerServiceGetChannel(params *PackerServiceGetChannelParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetChannelOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceGetChannelParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_GetChannel",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/channels/{channel_name}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceGetChannelReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceGetChannelOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceGetChannelDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceGetEnforcedBlock packer service get enforced block API
*/
func (a *Client) PackerServiceGetEnforcedBlock(params *PackerServiceGetEnforcedBlockParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetEnforcedBlockOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceGetEnforcedBlockParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_GetEnforcedBlock",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/enforced_blocks/{enforced_block_id}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceGetEnforcedBlockReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceGetEnforcedBlockOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceGetEnforcedBlockDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceGetEnforcedBlockLinkedBuckets gets linked buckets for an enforced block version in the h c p packer registry
*/
func (a *Client) PackerServiceGetEnforcedBlockLinkedBuckets(params *PackerServiceGetEnforcedBlockLinkedBucketsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetEnforcedBlockLinkedBucketsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceGetEnforcedBlockLinkedBucketsParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_GetEnforcedBlockLinkedBuckets",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/enforced_blocks/{enforced_block_id}/versions/{enforced_block_version_id}/buckets",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceGetEnforcedBlockLinkedBucketsReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceGetEnforcedBlockLinkedBucketsOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceGetEnforcedBlockLinkedBucketsDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceGetEnforcedBlockVersions packer service get enforced block versions API
*/
func (a *Client) PackerServiceGetEnforcedBlockVersions(params *PackerServiceGetEnforcedBlockVersionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetEnforcedBlockVersionsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceGetEnforcedBlockVersionsParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_GetEnforcedBlockVersions",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/enforced_blocks/{enforced_block_id}/versions",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceGetEnforcedBlockVersionsReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceGetEnforcedBlockVersionsOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceGetEnforcedBlockVersionsDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceGetEnforcedBlocksByBucket packer service get enforced blocks by bucket API
*/
func (a *Client) PackerServiceGetEnforcedBlocksByBucket(params *PackerServiceGetEnforcedBlocksByBucketParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetEnforcedBlocksByBucketOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceGetEnforcedBlocksByBucketParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_GetEnforcedBlocksByBucket",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/enforced_blocks/bucket/{bucket_name}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceGetEnforcedBlocksByBucketReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceGetEnforcedBlocksByBucketOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceGetEnforcedBlocksByBucketDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceGetRegistry retrieves the h c p packer registry
*/
func (a *Client) PackerServiceGetRegistry(params *PackerServiceGetRegistryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetRegistryOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceGetRegistryParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_GetRegistry",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/registry",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceGetRegistryReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceGetRegistryOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceGetRegistryDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceGetRegistryTFCRunTaskAPI gets the h c p packer registry API URL and h m a c key to integrate with terraform cloud as a run task
*/
func (a *Client) PackerServiceGetRegistryTFCRunTaskAPI(params *PackerServiceGetRegistryTFCRunTaskAPIParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetRegistryTFCRunTaskAPIOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceGetRegistryTFCRunTaskAPIParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_GetRegistryTFCRunTaskAPI",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/runtasks/{task_type}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceGetRegistryTFCRunTaskAPIReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceGetRegistryTFCRunTaskAPIOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceGetRegistryTFCRunTaskAPIDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceGetRunTaskConfig gets run task related configuration
*/
func (a *Client) PackerServiceGetRunTaskConfig(params *PackerServiceGetRunTaskConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetRunTaskConfigOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceGetRunTaskConfigParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_GetRunTaskConfig",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/runtasks/config",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceGetRunTaskConfigReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceGetRunTaskConfigOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceGetRunTaskConfigDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceGetSbom retrieves the stored s b o m generating a presigned URL with a w s s3 to retrieve the file
*/
func (a *Client) PackerServiceGetSbom(params *PackerServiceGetSbomParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetSbomOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceGetSbomParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_GetSbom",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/versions/{fingerprint}/builds/{build_id}/sboms/{sbom_name}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceGetSbomReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceGetSbomOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceGetSbomDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceGetVersion retrieves the version using the version fingerprint
*/
func (a *Client) PackerServiceGetVersion(params *PackerServiceGetVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceGetVersionOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceGetVersionParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_GetVersion",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/versions/{fingerprint}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceGetVersionReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceGetVersionOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceGetVersionDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceListBucketAncestry lists the ancestry relationships for the bucket this includes direct source bucket parents and downstream artifacts built directly from the bucket children
*/
func (a *Client) PackerServiceListBucketAncestry(params *PackerServiceListBucketAncestryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListBucketAncestryOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceListBucketAncestryParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_ListBucketAncestry",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/ancestry",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceListBucketAncestryReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceListBucketAncestryOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceListBucketAncestryDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceListBucketPackages retrieves all packages matching the name and or version criteria for a bucket
*/
func (a *Client) PackerServiceListBucketPackages(params *PackerServiceListBucketPackagesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListBucketPackagesOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceListBucketPackagesParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_ListBucketPackages",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/packages",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceListBucketPackagesReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceListBucketPackagesOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceListBucketPackagesDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceListBucketPackagesVulnerabilitySummary retrieves a summary of packages with vulnerabilities for a bucket
*/
func (a *Client) PackerServiceListBucketPackagesVulnerabilitySummary(params *PackerServiceListBucketPackagesVulnerabilitySummaryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListBucketPackagesVulnerabilitySummaryOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceListBucketPackagesVulnerabilitySummaryParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_ListBucketPackagesVulnerabilitySummary",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/packages/vulnerability-summary",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceListBucketPackagesVulnerabilitySummaryReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceListBucketPackagesVulnerabilitySummaryOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceListBucketPackagesVulnerabilitySummaryDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceListBucketPackagesWithVulnerabilities retrieves packages with their vulnerability details for packages that have vulnerabilities
*/
func (a *Client) PackerServiceListBucketPackagesWithVulnerabilities(params *PackerServiceListBucketPackagesWithVulnerabilitiesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListBucketPackagesWithVulnerabilitiesOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceListBucketPackagesWithVulnerabilitiesParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_ListBucketPackagesWithVulnerabilities",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/packages/with-vulnerabilities",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceListBucketPackagesWithVulnerabilitiesReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceListBucketPackagesWithVulnerabilitiesOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceListBucketPackagesWithVulnerabilitiesDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceListBucketVulnerabilities retrieves all vulnerabilities for a bucket with their impacted builds channels and packages
*/
func (a *Client) PackerServiceListBucketVulnerabilities(params *PackerServiceListBucketVulnerabilitiesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListBucketVulnerabilitiesOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceListBucketVulnerabilitiesParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_ListBucketVulnerabilities",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/vulnerabilities",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceListBucketVulnerabilitiesReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceListBucketVulnerabilitiesOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceListBucketVulnerabilitiesDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceListBuckets lists all existing buckets in the h c p packer registry
*/
func (a *Client) PackerServiceListBuckets(params *PackerServiceListBucketsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListBucketsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceListBucketsParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_ListBuckets",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceListBucketsReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceListBucketsOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceListBucketsDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceListBuildPackages retrieves all packages matching the name and or version criteria for a build
*/
func (a *Client) PackerServiceListBuildPackages(params *PackerServiceListBuildPackagesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListBuildPackagesOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceListBuildPackagesParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_ListBuildPackages",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/versions/{fingerprint}/builds/{build_id}/packages",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceListBuildPackagesReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceListBuildPackagesOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceListBuildPackagesDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceListBuilds lists every existing build and its artifacts for a version
*/
func (a *Client) PackerServiceListBuilds(params *PackerServiceListBuildsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListBuildsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceListBuildsParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_ListBuilds",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/versions/{fingerprint}/builds",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceListBuildsReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceListBuildsOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceListBuildsDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceListChannelAssignmentHistory lists a channel assignement history
*/
func (a *Client) PackerServiceListChannelAssignmentHistory(params *PackerServiceListChannelAssignmentHistoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListChannelAssignmentHistoryOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceListChannelAssignmentHistoryParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_ListChannelAssignmentHistory",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/channels/{channel_name}/history",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceListChannelAssignmentHistoryReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceListChannelAssignmentHistoryOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceListChannelAssignmentHistoryDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceListChannels lists all channels of a given bucket
*/
func (a *Client) PackerServiceListChannels(params *PackerServiceListChannelsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListChannelsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceListChannelsParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_ListChannels",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/channels",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceListChannelsReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceListChannelsOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceListChannelsDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceListEnforcedBlocks packer service list enforced blocks API
*/
func (a *Client) PackerServiceListEnforcedBlocks(params *PackerServiceListEnforcedBlocksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListEnforcedBlocksOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceListEnforcedBlocksParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_ListEnforcedBlocks",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/enforced_blocks",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceListEnforcedBlocksReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceListEnforcedBlocksOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceListEnforcedBlocksDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceListSboms lists every existing sbom for a build
*/
func (a *Client) PackerServiceListSboms(params *PackerServiceListSbomsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListSbomsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceListSbomsParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_ListSboms",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/versions/{fingerprint}/builds/{build_id}/sboms",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceListSbomsReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceListSbomsOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceListSbomsDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceListVersions lists every existing version of a bucket
*/
func (a *Client) PackerServiceListVersions(params *PackerServiceListVersionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceListVersionsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceListVersionsParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_ListVersions",
		Method:             "GET",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/versions",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceListVersionsReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceListVersionsOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceListVersionsDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceManageEnforcedBlockLinkedBuckets manages linked buckets for an enforced block version in the h c p packer registry
*/
func (a *Client) PackerServiceManageEnforcedBlockLinkedBuckets(params *PackerServiceManageEnforcedBlockLinkedBucketsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceManageEnforcedBlockLinkedBucketsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceManageEnforcedBlockLinkedBucketsParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_ManageEnforcedBlockLinkedBuckets",
		Method:             "POST",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/enforced_blocks/{enforced_block_id}/versions/{enforced_block_version_id}/buckets",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceManageEnforcedBlockLinkedBucketsReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceManageEnforcedBlockLinkedBucketsOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceManageEnforcedBlockLinkedBucketsDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceRegenerateTFCRunTaskHmacKey regenerates the h m a c key used to sign requests from terraform cloud to h c p packer run tasks
*/
func (a *Client) PackerServiceRegenerateTFCRunTaskHmacKey(params *PackerServiceRegenerateTFCRunTaskHmacKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceRegenerateTFCRunTaskHmacKeyOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceRegenerateTFCRunTaskHmacKeyParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_RegenerateTFCRunTaskHmacKey",
		Method:             "PATCH",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/runtasks/hmac",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceRegenerateTFCRunTaskHmacKeyReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceRegenerateTFCRunTaskHmacKeyOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceRegenerateTFCRunTaskHmacKeyDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceSearchExternalArtifact s e a r c h search for artifacts using external cloud artifact identifiers platform and region and returns all relevant metadata in a single efficient API call
*/
func (a *Client) PackerServiceSearchExternalArtifact(params *PackerServiceSearchExternalArtifactParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceSearchExternalArtifactOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceSearchExternalArtifactParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_SearchExternalArtifact",
		Method:             "POST",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/_search/external_artifact",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceSearchExternalArtifactReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceSearchExternalArtifactOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceSearchExternalArtifactDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceUpdateBucket updates the bucket s information
*/
func (a *Client) PackerServiceUpdateBucket(params *PackerServiceUpdateBucketParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceUpdateBucketOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceUpdateBucketParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_UpdateBucket",
		Method:             "PATCH",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceUpdateBucketReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceUpdateBucketOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceUpdateBucketDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceUpdateBuild updates the build this may be most often used for modifying the status of a currently running build
*/
func (a *Client) PackerServiceUpdateBuild(params *PackerServiceUpdateBuildParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceUpdateBuildOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceUpdateBuildParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_UpdateBuild",
		Method:             "PATCH",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/versions/{fingerprint}/builds/{build_id}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceUpdateBuildReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceUpdateBuildOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceUpdateBuildDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceUpdateChannel updates the channel assignment and or restriction
*/
func (a *Client) PackerServiceUpdateChannel(params *PackerServiceUpdateChannelParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceUpdateChannelOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceUpdateChannelParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_UpdateChannel",
		Method:             "PATCH",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/channels/{channel_name}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceUpdateChannelReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceUpdateChannelOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceUpdateChannelDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceUpdateEnforcedBlock updates an enforced block in the h c p packer registry
*/
func (a *Client) PackerServiceUpdateEnforcedBlock(params *PackerServiceUpdateEnforcedBlockParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceUpdateEnforcedBlockOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceUpdateEnforcedBlockParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_UpdateEnforcedBlock",
		Method:             "PATCH",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/enforced_blocks/{enforced_block_id}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceUpdateEnforcedBlockReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceUpdateEnforcedBlockOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceUpdateEnforcedBlockDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceUpdateEnforcedBlockVersion updates an enforced block version in the h c p packer registry
*/
func (a *Client) PackerServiceUpdateEnforcedBlockVersion(params *PackerServiceUpdateEnforcedBlockVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceUpdateEnforcedBlockVersionOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceUpdateEnforcedBlockVersionParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_UpdateEnforcedBlockVersion",
		Method:             "PATCH",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/enforced_blocks/{enforced_block_id}/versions/{enforced_block_version_id}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceUpdateEnforcedBlockVersionReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceUpdateEnforcedBlockVersionOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceUpdateEnforcedBlockVersionDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceUpdateRegistry updates the feature tier o r activates deactivates the h c p packer registry deactivating a registry will stop any additional billing for the resource
*/
func (a *Client) PackerServiceUpdateRegistry(params *PackerServiceUpdateRegistryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceUpdateRegistryOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceUpdateRegistryParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_UpdateRegistry",
		Method:             "PATCH",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/registry",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceUpdateRegistryReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceUpdateRegistryOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceUpdateRegistryDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceUpdateRunTaskConfig updates run task related configuration
*/
func (a *Client) PackerServiceUpdateRunTaskConfig(params *PackerServiceUpdateRunTaskConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceUpdateRunTaskConfigOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceUpdateRunTaskConfigParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_UpdateRunTaskConfig",
		Method:             "PATCH",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/runtasks/config",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceUpdateRunTaskConfigReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceUpdateRunTaskConfigOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceUpdateRunTaskConfigDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceUpdateVersion this API can be used to revoke restore or complete a version when a version is revoked all its descendants will automatically get revoked unless skip descendants revocation is set descendants will get revoked asynchronously to the request revoked versions cannot be updated unless restored
*/
func (a *Client) PackerServiceUpdateVersion(params *PackerServiceUpdateVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceUpdateVersionOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceUpdateVersionParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_UpdateVersion",
		Method:             "PATCH",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/versions/{fingerprint}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceUpdateVersionReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceUpdateVersionOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceUpdateVersionDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
PackerServiceUploadSbom stores a zstd compressed s b o m and associates it with a build
*/
func (a *Client) PackerServiceUploadSbom(params *PackerServiceUploadSbomParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PackerServiceUploadSbomOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPackerServiceUploadSbomParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "PackerService_UploadSbom",
		Method:             "PUT",
		PathPattern:        "/packer/2023-01-01/organizations/{location.organization_id}/projects/{location.project_id}/buckets/{bucket_name}/versions/{fingerprint}/builds/{build_id}/sboms",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PackerServiceUploadSbomReader{formats: a.formats},
		AuthInfo:           authInfo,
		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.(*PackerServiceUploadSbomOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*PackerServiceUploadSbomDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

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