package errors

import (
	errawr "github.com/puppetlabs/errawr-go/v2/pkg/errawr"
	impl "github.com/puppetlabs/errawr-go/v2/pkg/impl"
)

type Error interface {
	errawr.Error
}

type External struct{}

var API External

var Domain = &impl.ErrorDomain{
	Key:   "nbk8spr",
	Title: "Nebula Kubernetes Provisioner",
}

var K8sProvisionerSection = &impl.ErrorSection{
	Key:   "k8s_provisioner",
	Title: "K8s provisioner errors",
}

const K8sProvisionerAuthErrorCode = "nbk8spr_k8s_provisioner_auth_error"

func IsK8sProvisionerAuthError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerAuthErrorCode)
}

func (External) IsK8sProvisionerAuthError(err errawr.Error) bool {
	return IsK8sProvisionerAuthError(err)
}

type K8sProvisionerAuthErrorBuilder struct {
	arguments impl.ErrorArguments
}

func (b *K8sProvisionerAuthErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to authenticate",
		Technical: "failed to authenticate",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "auth_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Auth error",
		Version:          1,
	}
}

func NewK8sProvisionerAuthErrorBuilder() *K8sProvisionerAuthErrorBuilder {
	return &K8sProvisionerAuthErrorBuilder{arguments: impl.ErrorArguments{}}
}

func NewK8sProvisionerAuthError() Error {
	return NewK8sProvisionerAuthErrorBuilder().Build()
}

const K8sProvisionerClientSetupErrorCode = "nbk8spr_k8s_provisioner_client_setup_error"

func IsK8sProvisionerClientSetupError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerClientSetupErrorCode)
}

func (External) IsK8sProvisionerClientSetupError(err errawr.Error) bool {
	return IsK8sProvisionerClientSetupError(err)
}

type K8sProvisionerClientSetupErrorBuilder struct {
	arguments impl.ErrorArguments
}

func (b *K8sProvisionerClientSetupErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to setup the client",
		Technical: "failed to setup the client",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "client_setup_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Client setup error",
		Version:          1,
	}
}

func NewK8sProvisionerClientSetupErrorBuilder() *K8sProvisionerClientSetupErrorBuilder {
	return &K8sProvisionerClientSetupErrorBuilder{arguments: impl.ErrorArguments{}}
}

func NewK8sProvisionerClientSetupError() Error {
	return NewK8sProvisionerClientSetupErrorBuilder().Build()
}

const K8sProvisionerClusterManagerSetupErrorCode = "nbk8spr_k8s_provisioner_cluster_manager_setup_error"

func IsK8sProvisionerClusterManagerSetupError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerClusterManagerSetupErrorCode)
}

func (External) IsK8sProvisionerClusterManagerSetupError(err errawr.Error) bool {
	return IsK8sProvisionerClusterManagerSetupError(err)
}

type K8sProvisionerClusterManagerSetupErrorBuilder struct {
	arguments impl.ErrorArguments
}

func (b *K8sProvisionerClusterManagerSetupErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to setup the cluster manager",
		Technical: "failed to setup the cluster manager",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "cluster_manager_setup_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Cluster manager setup error",
		Version:          1,
	}
}

func NewK8sProvisionerClusterManagerSetupErrorBuilder() *K8sProvisionerClusterManagerSetupErrorBuilder {
	return &K8sProvisionerClusterManagerSetupErrorBuilder{arguments: impl.ErrorArguments{}}
}

func NewK8sProvisionerClusterManagerSetupError() Error {
	return NewK8sProvisionerClusterManagerSetupErrorBuilder().Build()
}

const K8sProvisionerClusterNotFoundCode = "nbk8spr_k8s_provisioner_cluster_not_found"

func IsK8sProvisionerClusterNotFound(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerClusterNotFoundCode)
}

func (External) IsK8sProvisionerClusterNotFound(err errawr.Error) bool {
	return IsK8sProvisionerClusterNotFound(err)
}

type K8sProvisionerClusterNotFoundBuilder struct {
	arguments impl.ErrorArguments
}

func (b *K8sProvisionerClusterNotFoundBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "cluster {{cluster}} not found",
		Technical: "cluster {{cluster}} not found",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "cluster_not_found",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Cluster not found",
		Version:          1,
	}
}

func NewK8sProvisionerClusterNotFoundBuilder(cluster string) *K8sProvisionerClusterNotFoundBuilder {
	return &K8sProvisionerClusterNotFoundBuilder{arguments: impl.ErrorArguments{"cluster": impl.NewErrorArgument(cluster, "the name of the cluster")}}
}

func NewK8sProvisionerClusterNotFound(cluster string) Error {
	return NewK8sProvisionerClusterNotFoundBuilder(cluster).Build()
}

const K8sProvisionerClusterSynchronizationErrorCode = "nbk8spr_k8s_provisioner_cluster_synchronization_error"

func IsK8sProvisionerClusterSynchronizationError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerClusterSynchronizationErrorCode)
}

func (External) IsK8sProvisionerClusterSynchronizationError(err errawr.Error) bool {
	return IsK8sProvisionerClusterSynchronizationError(err)
}

type K8sProvisionerClusterSynchronizationErrorBuilder struct {
	arguments impl.ErrorArguments
}

func (b *K8sProvisionerClusterSynchronizationErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to sync the cluster",
		Technical: "failed to sync the cluster",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "cluster_synchronization_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Cluster synchronization error",
		Version:          1,
	}
}

func NewK8sProvisionerClusterSynchronizationErrorBuilder() *K8sProvisionerClusterSynchronizationErrorBuilder {
	return &K8sProvisionerClusterSynchronizationErrorBuilder{arguments: impl.ErrorArguments{}}
}

func NewK8sProvisionerClusterSynchronizationError() Error {
	return NewK8sProvisionerClusterSynchronizationErrorBuilder().Build()
}

const K8sProvisionerCredentialsFileErrorCode = "nbk8spr_k8s_provisioner_credentials_file_error"

func IsK8sProvisionerCredentialsFileError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerCredentialsFileErrorCode)
}

func (External) IsK8sProvisionerCredentialsFileError(err errawr.Error) bool {
	return IsK8sProvisionerCredentialsFileError(err)
}

type K8sProvisionerCredentialsFileErrorBuilder struct {
	arguments impl.ErrorArguments
}

func (b *K8sProvisionerCredentialsFileErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to write credentials file",
		Technical: "failed to write credentials file",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "credentials_file_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Credentials file error",
		Version:          1,
	}
}

func NewK8sProvisionerCredentialsFileErrorBuilder() *K8sProvisionerCredentialsFileErrorBuilder {
	return &K8sProvisionerCredentialsFileErrorBuilder{arguments: impl.ErrorArguments{}}
}

func NewK8sProvisionerCredentialsFileError() Error {
	return NewK8sProvisionerCredentialsFileErrorBuilder().Build()
}

const K8sProvisionerIoErrorCode = "nbk8spr_k8s_provisioner_io_error"

func IsK8sProvisionerIoError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerIoErrorCode)
}

func (External) IsK8sProvisionerIoError(err errawr.Error) bool {
	return IsK8sProvisionerIoError(err)
}

type K8sProvisionerIoErrorBuilder struct {
	arguments impl.ErrorArguments
}

func (b *K8sProvisionerIoErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "{{msg}}",
		Technical: "{{msg}}",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "io_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "IO error",
		Version:          1,
	}
}

func NewK8sProvisionerIoErrorBuilder(msg string) *K8sProvisionerIoErrorBuilder {
	return &K8sProvisionerIoErrorBuilder{arguments: impl.ErrorArguments{"msg": impl.NewErrorArgument(msg, "the message describing what failed")}}
}

func NewK8sProvisionerIoError(msg string) Error {
	return NewK8sProvisionerIoErrorBuilder(msg).Build()
}

const K8sProvisionerKopsExecErrorCode = "nbk8spr_k8s_provisioner_kops_exec_error"

func IsK8sProvisionerKopsExecError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerKopsExecErrorCode)
}

func (External) IsK8sProvisionerKopsExecError(err errawr.Error) bool {
	return IsK8sProvisionerKopsExecError(err)
}

type K8sProvisionerKopsExecErrorBuilder struct {
	arguments impl.ErrorArguments
}

func (b *K8sProvisionerKopsExecErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to run kops",
		Technical: "failed to run kops",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "kops_exec_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Kops exec error",
		Version:          1,
	}
}

func NewK8sProvisionerKopsExecErrorBuilder() *K8sProvisionerKopsExecErrorBuilder {
	return &K8sProvisionerKopsExecErrorBuilder{arguments: impl.ErrorArguments{}}
}

func NewK8sProvisionerKopsExecError() Error {
	return NewK8sProvisionerKopsExecErrorBuilder().Build()
}

const K8sProvisionerKopsStateStoreCreateFailedCode = "nbk8spr_k8s_provisioner_kops_state_store_create_failed"

func IsK8sProvisionerKopsStateStoreCreateFailed(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerKopsStateStoreCreateFailedCode)
}

func (External) IsK8sProvisionerKopsStateStoreCreateFailed(err errawr.Error) bool {
	return IsK8sProvisionerKopsStateStoreCreateFailed(err)
}

type K8sProvisionerKopsStateStoreCreateFailedBuilder struct {
	arguments impl.ErrorArguments
}

func (b *K8sProvisionerKopsStateStoreCreateFailedBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to create the state storage bucket",
		Technical: "failed to create the state storage bucket",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "kops_state_store_create_failed",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Kops state store create failed",
		Version:          1,
	}
}

func NewK8sProvisionerKopsStateStoreCreateFailedBuilder() *K8sProvisionerKopsStateStoreCreateFailedBuilder {
	return &K8sProvisionerKopsStateStoreCreateFailedBuilder{arguments: impl.ErrorArguments{}}
}

func NewK8sProvisionerKopsStateStoreCreateFailed() Error {
	return NewK8sProvisionerKopsStateStoreCreateFailedBuilder().Build()
}

const K8sProvisionerKopsSupportSetupErrorCode = "nbk8spr_k8s_provisioner_kops_support_setup_error"

func IsK8sProvisionerKopsSupportSetupError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerKopsSupportSetupErrorCode)
}

func (External) IsK8sProvisionerKopsSupportSetupError(err errawr.Error) bool {
	return IsK8sProvisionerKopsSupportSetupError(err)
}

type K8sProvisionerKopsSupportSetupErrorBuilder struct {
	arguments impl.ErrorArguments
}

func (b *K8sProvisionerKopsSupportSetupErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "kops setup failed",
		Technical: "kops setup failed",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "kops_support_setup_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Kops support setup error",
		Version:          1,
	}
}

func NewK8sProvisionerKopsSupportSetupErrorBuilder() *K8sProvisionerKopsSupportSetupErrorBuilder {
	return &K8sProvisionerKopsSupportSetupErrorBuilder{arguments: impl.ErrorArguments{}}
}

func NewK8sProvisionerKopsSupportSetupError() Error {
	return NewK8sProvisionerKopsSupportSetupErrorBuilder().Build()
}

const K8sProvisionerKubeconfigReadErrorCode = "nbk8spr_k8s_provisioner_kubeconfig_read_error"

func IsK8sProvisionerKubeconfigReadError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerKubeconfigReadErrorCode)
}

func (External) IsK8sProvisionerKubeconfigReadError(err errawr.Error) bool {
	return IsK8sProvisionerKubeconfigReadError(err)
}

type K8sProvisionerKubeconfigReadErrorBuilder struct {
	arguments impl.ErrorArguments
}

func (b *K8sProvisionerKubeconfigReadErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to read the kubeconfig file from the adapter",
		Technical: "failed to read the kubeconfig file from the adapter",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "kubeconfig_read_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Kubeconfig read error",
		Version:          1,
	}
}

func NewK8sProvisionerKubeconfigReadErrorBuilder() *K8sProvisionerKubeconfigReadErrorBuilder {
	return &K8sProvisionerKubeconfigReadErrorBuilder{arguments: impl.ErrorArguments{}}
}

func NewK8sProvisionerKubeconfigReadError() Error {
	return NewK8sProvisionerKubeconfigReadErrorBuilder().Build()
}

const K8sProvisionerPlatformSetupErrorCode = "nbk8spr_k8s_provisioner_platform_setup_error"

func IsK8sProvisionerPlatformSetupError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerPlatformSetupErrorCode)
}

func (External) IsK8sProvisionerPlatformSetupError(err errawr.Error) bool {
	return IsK8sProvisionerPlatformSetupError(err)
}

type K8sProvisionerPlatformSetupErrorBuilder struct {
	arguments impl.ErrorArguments
}

func (b *K8sProvisionerPlatformSetupErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to setup the {{platform}} platform",
		Technical: "failed to setup the {{platform}} platform",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "platform_setup_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Platform setup error",
		Version:          1,
	}
}

func NewK8sProvisionerPlatformSetupErrorBuilder(platform string) *K8sProvisionerPlatformSetupErrorBuilder {
	return &K8sProvisionerPlatformSetupErrorBuilder{arguments: impl.ErrorArguments{"platform": impl.NewErrorArgument(platform, "the name of the platform")}}
}

func NewK8sProvisionerPlatformSetupError(platform string) Error {
	return NewK8sProvisionerPlatformSetupErrorBuilder(platform).Build()
}

const K8sProvisionerSetOutputFailedCode = "nbk8spr_k8s_provisioner_set_output_failed"

func IsK8sProvisionerSetOutputFailed(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerSetOutputFailedCode)
}

func (External) IsK8sProvisionerSetOutputFailed(err errawr.Error) bool {
	return IsK8sProvisionerSetOutputFailed(err)
}

type K8sProvisionerSetOutputFailedBuilder struct {
	arguments impl.ErrorArguments
}

func (b *K8sProvisionerSetOutputFailedBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to set the output",
		Technical: "failed to set the output",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "set_output_failed",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Set output failed",
		Version:          1,
	}
}

func NewK8sProvisionerSetOutputFailedBuilder() *K8sProvisionerSetOutputFailedBuilder {
	return &K8sProvisionerSetOutputFailedBuilder{arguments: impl.ErrorArguments{}}
}

func NewK8sProvisionerSetOutputFailed() Error {
	return NewK8sProvisionerSetOutputFailedBuilder().Build()
}

const K8sProvisionerSpecDecoderErrorCode = "nbk8spr_k8s_provisioner_spec_decoder_error"

func IsK8sProvisionerSpecDecoderError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerSpecDecoderErrorCode)
}

func (External) IsK8sProvisionerSpecDecoderError(err errawr.Error) bool {
	return IsK8sProvisionerSpecDecoderError(err)
}

type K8sProvisionerSpecDecoderErrorBuilder struct {
	arguments impl.ErrorArguments
}

func (b *K8sProvisionerSpecDecoderErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to decode the spec",
		Technical: "failed to decode the spec",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "spec_decoder_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Spec decoder error",
		Version:          1,
	}
}

func NewK8sProvisionerSpecDecoderErrorBuilder() *K8sProvisionerSpecDecoderErrorBuilder {
	return &K8sProvisionerSpecDecoderErrorBuilder{arguments: impl.ErrorArguments{}}
}

func NewK8sProvisionerSpecDecoderError() Error {
	return NewK8sProvisionerSpecDecoderErrorBuilder().Build()
}

const K8sProvisionerStateStoreErrorCode = "nbk8spr_k8s_provisioner_state_store_error"

func IsK8sProvisionerStateStoreError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerStateStoreErrorCode)
}

func (External) IsK8sProvisionerStateStoreError(err errawr.Error) bool {
	return IsK8sProvisionerStateStoreError(err)
}

type K8sProvisionerStateStoreErrorBuilder struct {
	arguments impl.ErrorArguments
}

func (b *K8sProvisionerStateStoreErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to get the URL and path for the state store",
		Technical: "failed to get the URL and path for the state store",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "state_store_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "State store error",
		Version:          1,
	}
}

func NewK8sProvisionerStateStoreErrorBuilder() *K8sProvisionerStateStoreErrorBuilder {
	return &K8sProvisionerStateStoreErrorBuilder{arguments: impl.ErrorArguments{}}
}

func NewK8sProvisionerStateStoreError() Error {
	return NewK8sProvisionerStateStoreErrorBuilder().Build()
}

const K8sProvisionerSupportValidationErrorCode = "nbk8spr_k8s_provisioner_support_validation_error"

func IsK8sProvisionerSupportValidationError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerSupportValidationErrorCode)
}

func (External) IsK8sProvisionerSupportValidationError(err errawr.Error) bool {
	return IsK8sProvisionerSupportValidationError(err)
}

type K8sProvisionerSupportValidationErrorBuilder struct {
	arguments impl.ErrorArguments
}

func (b *K8sProvisionerSupportValidationErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "{{msg}}",
		Technical: "{{msg}}",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "support_validation_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Support validation error",
		Version:          1,
	}
}

func NewK8sProvisionerSupportValidationErrorBuilder(msg string) *K8sProvisionerSupportValidationErrorBuilder {
	return &K8sProvisionerSupportValidationErrorBuilder{arguments: impl.ErrorArguments{"msg": impl.NewErrorArgument(msg, "the message describing what failed")}}
}

func NewK8sProvisionerSupportValidationError(msg string) Error {
	return NewK8sProvisionerSupportValidationErrorBuilder(msg).Build()
}

const K8sProvisionerTimeoutErrorCode = "nbk8spr_k8s_provisioner_timeout_error"

func IsK8sProvisionerTimeoutError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerTimeoutErrorCode)
}

func (External) IsK8sProvisionerTimeoutError(err errawr.Error) bool {
	return IsK8sProvisionerTimeoutError(err)
}

type K8sProvisionerTimeoutErrorBuilder struct {
	arguments impl.ErrorArguments
}

func (b *K8sProvisionerTimeoutErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "{{msg}}",
		Technical: "{{msg}}",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "timeout_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Readiness timeout error",
		Version:          1,
	}
}

func NewK8sProvisionerTimeoutErrorBuilder(msg string) *K8sProvisionerTimeoutErrorBuilder {
	return &K8sProvisionerTimeoutErrorBuilder{arguments: impl.ErrorArguments{"msg": impl.NewErrorArgument(msg, "a description of the timeout cause")}}
}

func NewK8sProvisionerTimeoutError(msg string) Error {
	return NewK8sProvisionerTimeoutErrorBuilder(msg).Build()
}

const K8sProvisionerUnknownProviderCode = "nbk8spr_k8s_provisioner_unknown_provider"

func IsK8sProvisionerUnknownProvider(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerUnknownProviderCode)
}

func (External) IsK8sProvisionerUnknownProvider(err errawr.Error) bool {
	return IsK8sProvisionerUnknownProvider(err)
}

type K8sProvisionerUnknownProviderBuilder struct {
	arguments impl.ErrorArguments
}

func (b *K8sProvisionerUnknownProviderBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "provider {{provider}} does not exist",
		Technical: "provider {{provider}} does not exist",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "unknown_provider",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Unknown provider",
		Version:          1,
	}
}

func NewK8sProvisionerUnknownProviderBuilder(provider string) *K8sProvisionerUnknownProviderBuilder {
	return &K8sProvisionerUnknownProviderBuilder{arguments: impl.ErrorArguments{"provider": impl.NewErrorArgument(provider, "the name of the provider")}}
}

func NewK8sProvisionerUnknownProvider(provider string) Error {
	return NewK8sProvisionerUnknownProviderBuilder(provider).Build()
}
// Package errors contains errors for the domain "nbk8spr".
//
// This file is automatically generated by errawr-gen. Do not modify it.
package errors

import (
	errawr "github.com/puppetlabs/errawr-go/v2/pkg/errawr"
	impl "github.com/puppetlabs/errawr-go/v2/pkg/impl"
)

// Error is the type of all errors generated by this package.
type Error interface {
	errawr.Error
}

// External contains methods that can be used externally to help consume errors from this package.
type External struct{}

// API is a singleton instance of the External type.
var API External

// Domain is the general domain in which all errors in this package belong.
var Domain = &impl.ErrorDomain{
	Key:   "nbk8spr",
	Title: "Nebula Kubernetes Provisioner",
}

// K8sProvisionerSection defines a section of errors with the following scope:
// K8s provisioner errors
var K8sProvisionerSection = &impl.ErrorSection{
	Key:   "k8s_provisioner",
	Title: "K8s provisioner errors",
}

// K8sProvisionerAuthErrorCode is the code for an instance of "auth_error".
const K8sProvisionerAuthErrorCode = "nbk8spr_k8s_provisioner_auth_error"

// IsK8sProvisionerAuthError tests whether a given error is an instance of "auth_error".
func IsK8sProvisionerAuthError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerAuthErrorCode)
}

// IsK8sProvisionerAuthError tests whether a given error is an instance of "auth_error".
func (External) IsK8sProvisionerAuthError(err errawr.Error) bool {
	return IsK8sProvisionerAuthError(err)
}

// K8sProvisionerAuthErrorBuilder is a builder for "auth_error" errors.
type K8sProvisionerAuthErrorBuilder struct {
	arguments impl.ErrorArguments
}

// Build creates the error for the code "auth_error" from this builder.
func (b *K8sProvisionerAuthErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to authenticate",
		Technical: "failed to authenticate",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "auth_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Auth error",
		Version:          1,
	}
}

// NewK8sProvisionerAuthErrorBuilder creates a new error builder for the code "auth_error".
func NewK8sProvisionerAuthErrorBuilder() *K8sProvisionerAuthErrorBuilder {
	return &K8sProvisionerAuthErrorBuilder{arguments: impl.ErrorArguments{}}
}

// NewK8sProvisionerAuthError creates a new error with the code "auth_error".
func NewK8sProvisionerAuthError() Error {
	return NewK8sProvisionerAuthErrorBuilder().Build()
}

// K8sProvisionerClientSetupErrorCode is the code for an instance of "client_setup_error".
const K8sProvisionerClientSetupErrorCode = "nbk8spr_k8s_provisioner_client_setup_error"

// IsK8sProvisionerClientSetupError tests whether a given error is an instance of "client_setup_error".
func IsK8sProvisionerClientSetupError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerClientSetupErrorCode)
}

// IsK8sProvisionerClientSetupError tests whether a given error is an instance of "client_setup_error".
func (External) IsK8sProvisionerClientSetupError(err errawr.Error) bool {
	return IsK8sProvisionerClientSetupError(err)
}

// K8sProvisionerClientSetupErrorBuilder is a builder for "client_setup_error" errors.
type K8sProvisionerClientSetupErrorBuilder struct {
	arguments impl.ErrorArguments
}

// Build creates the error for the code "client_setup_error" from this builder.
func (b *K8sProvisionerClientSetupErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to setup the client",
		Technical: "failed to setup the client",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "client_setup_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Client setup error",
		Version:          1,
	}
}

// NewK8sProvisionerClientSetupErrorBuilder creates a new error builder for the code "client_setup_error".
func NewK8sProvisionerClientSetupErrorBuilder() *K8sProvisionerClientSetupErrorBuilder {
	return &K8sProvisionerClientSetupErrorBuilder{arguments: impl.ErrorArguments{}}
}

// NewK8sProvisionerClientSetupError creates a new error with the code "client_setup_error".
func NewK8sProvisionerClientSetupError() Error {
	return NewK8sProvisionerClientSetupErrorBuilder().Build()
}

// K8sProvisionerClusterManagerSetupErrorCode is the code for an instance of "cluster_manager_setup_error".
const K8sProvisionerClusterManagerSetupErrorCode = "nbk8spr_k8s_provisioner_cluster_manager_setup_error"

// IsK8sProvisionerClusterManagerSetupError tests whether a given error is an instance of "cluster_manager_setup_error".
func IsK8sProvisionerClusterManagerSetupError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerClusterManagerSetupErrorCode)
}

// IsK8sProvisionerClusterManagerSetupError tests whether a given error is an instance of "cluster_manager_setup_error".
func (External) IsK8sProvisionerClusterManagerSetupError(err errawr.Error) bool {
	return IsK8sProvisionerClusterManagerSetupError(err)
}

// K8sProvisionerClusterManagerSetupErrorBuilder is a builder for "cluster_manager_setup_error" errors.
type K8sProvisionerClusterManagerSetupErrorBuilder struct {
	arguments impl.ErrorArguments
}

// Build creates the error for the code "cluster_manager_setup_error" from this builder.
func (b *K8sProvisionerClusterManagerSetupErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to setup the cluster manager",
		Technical: "failed to setup the cluster manager",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "cluster_manager_setup_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Cluster manager setup error",
		Version:          1,
	}
}

// NewK8sProvisionerClusterManagerSetupErrorBuilder creates a new error builder for the code "cluster_manager_setup_error".
func NewK8sProvisionerClusterManagerSetupErrorBuilder() *K8sProvisionerClusterManagerSetupErrorBuilder {
	return &K8sProvisionerClusterManagerSetupErrorBuilder{arguments: impl.ErrorArguments{}}
}

// NewK8sProvisionerClusterManagerSetupError creates a new error with the code "cluster_manager_setup_error".
func NewK8sProvisionerClusterManagerSetupError() Error {
	return NewK8sProvisionerClusterManagerSetupErrorBuilder().Build()
}

// K8sProvisionerClusterNotFoundCode is the code for an instance of "cluster_not_found".
const K8sProvisionerClusterNotFoundCode = "nbk8spr_k8s_provisioner_cluster_not_found"

// IsK8sProvisionerClusterNotFound tests whether a given error is an instance of "cluster_not_found".
func IsK8sProvisionerClusterNotFound(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerClusterNotFoundCode)
}

// IsK8sProvisionerClusterNotFound tests whether a given error is an instance of "cluster_not_found".
func (External) IsK8sProvisionerClusterNotFound(err errawr.Error) bool {
	return IsK8sProvisionerClusterNotFound(err)
}

// K8sProvisionerClusterNotFoundBuilder is a builder for "cluster_not_found" errors.
type K8sProvisionerClusterNotFoundBuilder struct {
	arguments impl.ErrorArguments
}

// Build creates the error for the code "cluster_not_found" from this builder.
func (b *K8sProvisionerClusterNotFoundBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "cluster {{cluster}} not found",
		Technical: "cluster {{cluster}} not found",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "cluster_not_found",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Cluster not found",
		Version:          1,
	}
}

// NewK8sProvisionerClusterNotFoundBuilder creates a new error builder for the code "cluster_not_found".
func NewK8sProvisionerClusterNotFoundBuilder(cluster string) *K8sProvisionerClusterNotFoundBuilder {
	return &K8sProvisionerClusterNotFoundBuilder{arguments: impl.ErrorArguments{"cluster": impl.NewErrorArgument(cluster, "the name of the cluster")}}
}

// NewK8sProvisionerClusterNotFound creates a new error with the code "cluster_not_found".
func NewK8sProvisionerClusterNotFound(cluster string) Error {
	return NewK8sProvisionerClusterNotFoundBuilder(cluster).Build()
}

// K8sProvisionerClusterSynchronizationErrorCode is the code for an instance of "cluster_synchronization_error".
const K8sProvisionerClusterSynchronizationErrorCode = "nbk8spr_k8s_provisioner_cluster_synchronization_error"

// IsK8sProvisionerClusterSynchronizationError tests whether a given error is an instance of "cluster_synchronization_error".
func IsK8sProvisionerClusterSynchronizationError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerClusterSynchronizationErrorCode)
}

// IsK8sProvisionerClusterSynchronizationError tests whether a given error is an instance of "cluster_synchronization_error".
func (External) IsK8sProvisionerClusterSynchronizationError(err errawr.Error) bool {
	return IsK8sProvisionerClusterSynchronizationError(err)
}

// K8sProvisionerClusterSynchronizationErrorBuilder is a builder for "cluster_synchronization_error" errors.
type K8sProvisionerClusterSynchronizationErrorBuilder struct {
	arguments impl.ErrorArguments
}

// Build creates the error for the code "cluster_synchronization_error" from this builder.
func (b *K8sProvisionerClusterSynchronizationErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to sync the cluster",
		Technical: "failed to sync the cluster",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "cluster_synchronization_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Cluster synchronization error",
		Version:          1,
	}
}

// NewK8sProvisionerClusterSynchronizationErrorBuilder creates a new error builder for the code "cluster_synchronization_error".
func NewK8sProvisionerClusterSynchronizationErrorBuilder() *K8sProvisionerClusterSynchronizationErrorBuilder {
	return &K8sProvisionerClusterSynchronizationErrorBuilder{arguments: impl.ErrorArguments{}}
}

// NewK8sProvisionerClusterSynchronizationError creates a new error with the code "cluster_synchronization_error".
func NewK8sProvisionerClusterSynchronizationError() Error {
	return NewK8sProvisionerClusterSynchronizationErrorBuilder().Build()
}

// K8sProvisionerCredentialsFileErrorCode is the code for an instance of "credentials_file_error".
const K8sProvisionerCredentialsFileErrorCode = "nbk8spr_k8s_provisioner_credentials_file_error"

// IsK8sProvisionerCredentialsFileError tests whether a given error is an instance of "credentials_file_error".
func IsK8sProvisionerCredentialsFileError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerCredentialsFileErrorCode)
}

// IsK8sProvisionerCredentialsFileError tests whether a given error is an instance of "credentials_file_error".
func (External) IsK8sProvisionerCredentialsFileError(err errawr.Error) bool {
	return IsK8sProvisionerCredentialsFileError(err)
}

// K8sProvisionerCredentialsFileErrorBuilder is a builder for "credentials_file_error" errors.
type K8sProvisionerCredentialsFileErrorBuilder struct {
	arguments impl.ErrorArguments
}

// Build creates the error for the code "credentials_file_error" from this builder.
func (b *K8sProvisionerCredentialsFileErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to write credentials file",
		Technical: "failed to write credentials file",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "credentials_file_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Credentials file error",
		Version:          1,
	}
}

// NewK8sProvisionerCredentialsFileErrorBuilder creates a new error builder for the code "credentials_file_error".
func NewK8sProvisionerCredentialsFileErrorBuilder() *K8sProvisionerCredentialsFileErrorBuilder {
	return &K8sProvisionerCredentialsFileErrorBuilder{arguments: impl.ErrorArguments{}}
}

// NewK8sProvisionerCredentialsFileError creates a new error with the code "credentials_file_error".
func NewK8sProvisionerCredentialsFileError() Error {
	return NewK8sProvisionerCredentialsFileErrorBuilder().Build()
}

// K8sProvisionerIoErrorCode is the code for an instance of "io_error".
const K8sProvisionerIoErrorCode = "nbk8spr_k8s_provisioner_io_error"

// IsK8sProvisionerIoError tests whether a given error is an instance of "io_error".
func IsK8sProvisionerIoError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerIoErrorCode)
}

// IsK8sProvisionerIoError tests whether a given error is an instance of "io_error".
func (External) IsK8sProvisionerIoError(err errawr.Error) bool {
	return IsK8sProvisionerIoError(err)
}

// K8sProvisionerIoErrorBuilder is a builder for "io_error" errors.
type K8sProvisionerIoErrorBuilder struct {
	arguments impl.ErrorArguments
}

// Build creates the error for the code "io_error" from this builder.
func (b *K8sProvisionerIoErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "{{msg}}",
		Technical: "{{msg}}",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "io_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "IO error",
		Version:          1,
	}
}

// NewK8sProvisionerIoErrorBuilder creates a new error builder for the code "io_error".
func NewK8sProvisionerIoErrorBuilder(msg string) *K8sProvisionerIoErrorBuilder {
	return &K8sProvisionerIoErrorBuilder{arguments: impl.ErrorArguments{"msg": impl.NewErrorArgument(msg, "the message describing what failed")}}
}

// NewK8sProvisionerIoError creates a new error with the code "io_error".
func NewK8sProvisionerIoError(msg string) Error {
	return NewK8sProvisionerIoErrorBuilder(msg).Build()
}

// K8sProvisionerKopsExecErrorCode is the code for an instance of "kops_exec_error".
const K8sProvisionerKopsExecErrorCode = "nbk8spr_k8s_provisioner_kops_exec_error"

// IsK8sProvisionerKopsExecError tests whether a given error is an instance of "kops_exec_error".
func IsK8sProvisionerKopsExecError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerKopsExecErrorCode)
}

// IsK8sProvisionerKopsExecError tests whether a given error is an instance of "kops_exec_error".
func (External) IsK8sProvisionerKopsExecError(err errawr.Error) bool {
	return IsK8sProvisionerKopsExecError(err)
}

// K8sProvisionerKopsExecErrorBuilder is a builder for "kops_exec_error" errors.
type K8sProvisionerKopsExecErrorBuilder struct {
	arguments impl.ErrorArguments
}

// Build creates the error for the code "kops_exec_error" from this builder.
func (b *K8sProvisionerKopsExecErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to run kops",
		Technical: "failed to run kops",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "kops_exec_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Kops exec error",
		Version:          1,
	}
}

// NewK8sProvisionerKopsExecErrorBuilder creates a new error builder for the code "kops_exec_error".
func NewK8sProvisionerKopsExecErrorBuilder() *K8sProvisionerKopsExecErrorBuilder {
	return &K8sProvisionerKopsExecErrorBuilder{arguments: impl.ErrorArguments{}}
}

// NewK8sProvisionerKopsExecError creates a new error with the code "kops_exec_error".
func NewK8sProvisionerKopsExecError() Error {
	return NewK8sProvisionerKopsExecErrorBuilder().Build()
}

// K8sProvisionerKopsStateStoreCreateFailedCode is the code for an instance of "kops_state_store_create_failed".
const K8sProvisionerKopsStateStoreCreateFailedCode = "nbk8spr_k8s_provisioner_kops_state_store_create_failed"

// IsK8sProvisionerKopsStateStoreCreateFailed tests whether a given error is an instance of "kops_state_store_create_failed".
func IsK8sProvisionerKopsStateStoreCreateFailed(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerKopsStateStoreCreateFailedCode)
}

// IsK8sProvisionerKopsStateStoreCreateFailed tests whether a given error is an instance of "kops_state_store_create_failed".
func (External) IsK8sProvisionerKopsStateStoreCreateFailed(err errawr.Error) bool {
	return IsK8sProvisionerKopsStateStoreCreateFailed(err)
}

// K8sProvisionerKopsStateStoreCreateFailedBuilder is a builder for "kops_state_store_create_failed" errors.
type K8sProvisionerKopsStateStoreCreateFailedBuilder struct {
	arguments impl.ErrorArguments
}

// Build creates the error for the code "kops_state_store_create_failed" from this builder.
func (b *K8sProvisionerKopsStateStoreCreateFailedBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to create the state storage bucket",
		Technical: "failed to create the state storage bucket",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "kops_state_store_create_failed",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Kops state store create failed",
		Version:          1,
	}
}

// NewK8sProvisionerKopsStateStoreCreateFailedBuilder creates a new error builder for the code "kops_state_store_create_failed".
func NewK8sProvisionerKopsStateStoreCreateFailedBuilder() *K8sProvisionerKopsStateStoreCreateFailedBuilder {
	return &K8sProvisionerKopsStateStoreCreateFailedBuilder{arguments: impl.ErrorArguments{}}
}

// NewK8sProvisionerKopsStateStoreCreateFailed creates a new error with the code "kops_state_store_create_failed".
func NewK8sProvisionerKopsStateStoreCreateFailed() Error {
	return NewK8sProvisionerKopsStateStoreCreateFailedBuilder().Build()
}

// K8sProvisionerKopsSupportSetupErrorCode is the code for an instance of "kops_support_setup_error".
const K8sProvisionerKopsSupportSetupErrorCode = "nbk8spr_k8s_provisioner_kops_support_setup_error"

// IsK8sProvisionerKopsSupportSetupError tests whether a given error is an instance of "kops_support_setup_error".
func IsK8sProvisionerKopsSupportSetupError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerKopsSupportSetupErrorCode)
}

// IsK8sProvisionerKopsSupportSetupError tests whether a given error is an instance of "kops_support_setup_error".
func (External) IsK8sProvisionerKopsSupportSetupError(err errawr.Error) bool {
	return IsK8sProvisionerKopsSupportSetupError(err)
}

// K8sProvisionerKopsSupportSetupErrorBuilder is a builder for "kops_support_setup_error" errors.
type K8sProvisionerKopsSupportSetupErrorBuilder struct {
	arguments impl.ErrorArguments
}

// Build creates the error for the code "kops_support_setup_error" from this builder.
func (b *K8sProvisionerKopsSupportSetupErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "kops setup failed",
		Technical: "kops setup failed",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "kops_support_setup_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Kops support setup error",
		Version:          1,
	}
}

// NewK8sProvisionerKopsSupportSetupErrorBuilder creates a new error builder for the code "kops_support_setup_error".
func NewK8sProvisionerKopsSupportSetupErrorBuilder() *K8sProvisionerKopsSupportSetupErrorBuilder {
	return &K8sProvisionerKopsSupportSetupErrorBuilder{arguments: impl.ErrorArguments{}}
}

// NewK8sProvisionerKopsSupportSetupError creates a new error with the code "kops_support_setup_error".
func NewK8sProvisionerKopsSupportSetupError() Error {
	return NewK8sProvisionerKopsSupportSetupErrorBuilder().Build()
}

// K8sProvisionerKubeconfigReadErrorCode is the code for an instance of "kubeconfig_read_error".
const K8sProvisionerKubeconfigReadErrorCode = "nbk8spr_k8s_provisioner_kubeconfig_read_error"

// IsK8sProvisionerKubeconfigReadError tests whether a given error is an instance of "kubeconfig_read_error".
func IsK8sProvisionerKubeconfigReadError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerKubeconfigReadErrorCode)
}

// IsK8sProvisionerKubeconfigReadError tests whether a given error is an instance of "kubeconfig_read_error".
func (External) IsK8sProvisionerKubeconfigReadError(err errawr.Error) bool {
	return IsK8sProvisionerKubeconfigReadError(err)
}

// K8sProvisionerKubeconfigReadErrorBuilder is a builder for "kubeconfig_read_error" errors.
type K8sProvisionerKubeconfigReadErrorBuilder struct {
	arguments impl.ErrorArguments
}

// Build creates the error for the code "kubeconfig_read_error" from this builder.
func (b *K8sProvisionerKubeconfigReadErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to read the kubeconfig file from the adapter",
		Technical: "failed to read the kubeconfig file from the adapter",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "kubeconfig_read_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Kubeconfig read error",
		Version:          1,
	}
}

// NewK8sProvisionerKubeconfigReadErrorBuilder creates a new error builder for the code "kubeconfig_read_error".
func NewK8sProvisionerKubeconfigReadErrorBuilder() *K8sProvisionerKubeconfigReadErrorBuilder {
	return &K8sProvisionerKubeconfigReadErrorBuilder{arguments: impl.ErrorArguments{}}
}

// NewK8sProvisionerKubeconfigReadError creates a new error with the code "kubeconfig_read_error".
func NewK8sProvisionerKubeconfigReadError() Error {
	return NewK8sProvisionerKubeconfigReadErrorBuilder().Build()
}

// K8sProvisionerPlatformSetupErrorCode is the code for an instance of "platform_setup_error".
const K8sProvisionerPlatformSetupErrorCode = "nbk8spr_k8s_provisioner_platform_setup_error"

// IsK8sProvisionerPlatformSetupError tests whether a given error is an instance of "platform_setup_error".
func IsK8sProvisionerPlatformSetupError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerPlatformSetupErrorCode)
}

// IsK8sProvisionerPlatformSetupError tests whether a given error is an instance of "platform_setup_error".
func (External) IsK8sProvisionerPlatformSetupError(err errawr.Error) bool {
	return IsK8sProvisionerPlatformSetupError(err)
}

// K8sProvisionerPlatformSetupErrorBuilder is a builder for "platform_setup_error" errors.
type K8sProvisionerPlatformSetupErrorBuilder struct {
	arguments impl.ErrorArguments
}

// Build creates the error for the code "platform_setup_error" from this builder.
func (b *K8sProvisionerPlatformSetupErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to setup the {{platform}} platform",
		Technical: "failed to setup the {{platform}} platform",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "platform_setup_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Platform setup error",
		Version:          1,
	}
}

// NewK8sProvisionerPlatformSetupErrorBuilder creates a new error builder for the code "platform_setup_error".
func NewK8sProvisionerPlatformSetupErrorBuilder(platform string) *K8sProvisionerPlatformSetupErrorBuilder {
	return &K8sProvisionerPlatformSetupErrorBuilder{arguments: impl.ErrorArguments{"platform": impl.NewErrorArgument(platform, "the name of the platform")}}
}

// NewK8sProvisionerPlatformSetupError creates a new error with the code "platform_setup_error".
func NewK8sProvisionerPlatformSetupError(platform string) Error {
	return NewK8sProvisionerPlatformSetupErrorBuilder(platform).Build()
}

// K8sProvisionerSetOutputFailedCode is the code for an instance of "set_output_failed".
const K8sProvisionerSetOutputFailedCode = "nbk8spr_k8s_provisioner_set_output_failed"

// IsK8sProvisionerSetOutputFailed tests whether a given error is an instance of "set_output_failed".
func IsK8sProvisionerSetOutputFailed(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerSetOutputFailedCode)
}

// IsK8sProvisionerSetOutputFailed tests whether a given error is an instance of "set_output_failed".
func (External) IsK8sProvisionerSetOutputFailed(err errawr.Error) bool {
	return IsK8sProvisionerSetOutputFailed(err)
}

// K8sProvisionerSetOutputFailedBuilder is a builder for "set_output_failed" errors.
type K8sProvisionerSetOutputFailedBuilder struct {
	arguments impl.ErrorArguments
}

// Build creates the error for the code "set_output_failed" from this builder.
func (b *K8sProvisionerSetOutputFailedBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to set the output",
		Technical: "failed to set the output",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "set_output_failed",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Set output failed",
		Version:          1,
	}
}

// NewK8sProvisionerSetOutputFailedBuilder creates a new error builder for the code "set_output_failed".
func NewK8sProvisionerSetOutputFailedBuilder() *K8sProvisionerSetOutputFailedBuilder {
	return &K8sProvisionerSetOutputFailedBuilder{arguments: impl.ErrorArguments{}}
}

// NewK8sProvisionerSetOutputFailed creates a new error with the code "set_output_failed".
func NewK8sProvisionerSetOutputFailed() Error {
	return NewK8sProvisionerSetOutputFailedBuilder().Build()
}

// K8sProvisionerSpecDecoderErrorCode is the code for an instance of "spec_decoder_error".
const K8sProvisionerSpecDecoderErrorCode = "nbk8spr_k8s_provisioner_spec_decoder_error"

// IsK8sProvisionerSpecDecoderError tests whether a given error is an instance of "spec_decoder_error".
func IsK8sProvisionerSpecDecoderError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerSpecDecoderErrorCode)
}

// IsK8sProvisionerSpecDecoderError tests whether a given error is an instance of "spec_decoder_error".
func (External) IsK8sProvisionerSpecDecoderError(err errawr.Error) bool {
	return IsK8sProvisionerSpecDecoderError(err)
}

// K8sProvisionerSpecDecoderErrorBuilder is a builder for "spec_decoder_error" errors.
type K8sProvisionerSpecDecoderErrorBuilder struct {
	arguments impl.ErrorArguments
}

// Build creates the error for the code "spec_decoder_error" from this builder.
func (b *K8sProvisionerSpecDecoderErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to decode the spec",
		Technical: "failed to decode the spec",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "spec_decoder_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Spec decoder error",
		Version:          1,
	}
}

// NewK8sProvisionerSpecDecoderErrorBuilder creates a new error builder for the code "spec_decoder_error".
func NewK8sProvisionerSpecDecoderErrorBuilder() *K8sProvisionerSpecDecoderErrorBuilder {
	return &K8sProvisionerSpecDecoderErrorBuilder{arguments: impl.ErrorArguments{}}
}

// NewK8sProvisionerSpecDecoderError creates a new error with the code "spec_decoder_error".
func NewK8sProvisionerSpecDecoderError() Error {
	return NewK8sProvisionerSpecDecoderErrorBuilder().Build()
}

// K8sProvisionerStateStoreErrorCode is the code for an instance of "state_store_error".
const K8sProvisionerStateStoreErrorCode = "nbk8spr_k8s_provisioner_state_store_error"

// IsK8sProvisionerStateStoreError tests whether a given error is an instance of "state_store_error".
func IsK8sProvisionerStateStoreError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerStateStoreErrorCode)
}

// IsK8sProvisionerStateStoreError tests whether a given error is an instance of "state_store_error".
func (External) IsK8sProvisionerStateStoreError(err errawr.Error) bool {
	return IsK8sProvisionerStateStoreError(err)
}

// K8sProvisionerStateStoreErrorBuilder is a builder for "state_store_error" errors.
type K8sProvisionerStateStoreErrorBuilder struct {
	arguments impl.ErrorArguments
}

// Build creates the error for the code "state_store_error" from this builder.
func (b *K8sProvisionerStateStoreErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "failed to get the URL and path for the state store",
		Technical: "failed to get the URL and path for the state store",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "state_store_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "State store error",
		Version:          1,
	}
}

// NewK8sProvisionerStateStoreErrorBuilder creates a new error builder for the code "state_store_error".
func NewK8sProvisionerStateStoreErrorBuilder() *K8sProvisionerStateStoreErrorBuilder {
	return &K8sProvisionerStateStoreErrorBuilder{arguments: impl.ErrorArguments{}}
}

// NewK8sProvisionerStateStoreError creates a new error with the code "state_store_error".
func NewK8sProvisionerStateStoreError() Error {
	return NewK8sProvisionerStateStoreErrorBuilder().Build()
}

// K8sProvisionerSupportValidationErrorCode is the code for an instance of "support_validation_error".
const K8sProvisionerSupportValidationErrorCode = "nbk8spr_k8s_provisioner_support_validation_error"

// IsK8sProvisionerSupportValidationError tests whether a given error is an instance of "support_validation_error".
func IsK8sProvisionerSupportValidationError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerSupportValidationErrorCode)
}

// IsK8sProvisionerSupportValidationError tests whether a given error is an instance of "support_validation_error".
func (External) IsK8sProvisionerSupportValidationError(err errawr.Error) bool {
	return IsK8sProvisionerSupportValidationError(err)
}

// K8sProvisionerSupportValidationErrorBuilder is a builder for "support_validation_error" errors.
type K8sProvisionerSupportValidationErrorBuilder struct {
	arguments impl.ErrorArguments
}

// Build creates the error for the code "support_validation_error" from this builder.
func (b *K8sProvisionerSupportValidationErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "{{msg}}",
		Technical: "{{msg}}",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "support_validation_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Support validation error",
		Version:          1,
	}
}

// NewK8sProvisionerSupportValidationErrorBuilder creates a new error builder for the code "support_validation_error".
func NewK8sProvisionerSupportValidationErrorBuilder(msg string) *K8sProvisionerSupportValidationErrorBuilder {
	return &K8sProvisionerSupportValidationErrorBuilder{arguments: impl.ErrorArguments{"msg": impl.NewErrorArgument(msg, "the message describing what failed")}}
}

// NewK8sProvisionerSupportValidationError creates a new error with the code "support_validation_error".
func NewK8sProvisionerSupportValidationError(msg string) Error {
	return NewK8sProvisionerSupportValidationErrorBuilder(msg).Build()
}

// K8sProvisionerTimeoutErrorCode is the code for an instance of "timeout_error".
const K8sProvisionerTimeoutErrorCode = "nbk8spr_k8s_provisioner_timeout_error"

// IsK8sProvisionerTimeoutError tests whether a given error is an instance of "timeout_error".
func IsK8sProvisionerTimeoutError(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerTimeoutErrorCode)
}

// IsK8sProvisionerTimeoutError tests whether a given error is an instance of "timeout_error".
func (External) IsK8sProvisionerTimeoutError(err errawr.Error) bool {
	return IsK8sProvisionerTimeoutError(err)
}

// K8sProvisionerTimeoutErrorBuilder is a builder for "timeout_error" errors.
type K8sProvisionerTimeoutErrorBuilder struct {
	arguments impl.ErrorArguments
}

// Build creates the error for the code "timeout_error" from this builder.
func (b *K8sProvisionerTimeoutErrorBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "{{msg}}",
		Technical: "{{msg}}",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "timeout_error",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Readiness timeout error",
		Version:          1,
	}
}

// NewK8sProvisionerTimeoutErrorBuilder creates a new error builder for the code "timeout_error".
func NewK8sProvisionerTimeoutErrorBuilder(msg string) *K8sProvisionerTimeoutErrorBuilder {
	return &K8sProvisionerTimeoutErrorBuilder{arguments: impl.ErrorArguments{"msg": impl.NewErrorArgument(msg, "a description of the timeout cause")}}
}

// NewK8sProvisionerTimeoutError creates a new error with the code "timeout_error".
func NewK8sProvisionerTimeoutError(msg string) Error {
	return NewK8sProvisionerTimeoutErrorBuilder(msg).Build()
}

// K8sProvisionerUnknownProviderCode is the code for an instance of "unknown_provider".
const K8sProvisionerUnknownProviderCode = "nbk8spr_k8s_provisioner_unknown_provider"

// IsK8sProvisionerUnknownProvider tests whether a given error is an instance of "unknown_provider".
func IsK8sProvisionerUnknownProvider(err errawr.Error) bool {
	return err != nil && err.Is(K8sProvisionerUnknownProviderCode)
}

// IsK8sProvisionerUnknownProvider tests whether a given error is an instance of "unknown_provider".
func (External) IsK8sProvisionerUnknownProvider(err errawr.Error) bool {
	return IsK8sProvisionerUnknownProvider(err)
}

// K8sProvisionerUnknownProviderBuilder is a builder for "unknown_provider" errors.
type K8sProvisionerUnknownProviderBuilder struct {
	arguments impl.ErrorArguments
}

// Build creates the error for the code "unknown_provider" from this builder.
func (b *K8sProvisionerUnknownProviderBuilder) Build() Error {
	description := &impl.ErrorDescription{
		Friendly:  "provider {{provider}} does not exist",
		Technical: "provider {{provider}} does not exist",
	}

	return &impl.Error{
		ErrorArguments:   b.arguments,
		ErrorCode:        "unknown_provider",
		ErrorDescription: description,
		ErrorDomain:      Domain,
		ErrorMetadata:    &impl.ErrorMetadata{},
		ErrorSection:     K8sProvisionerSection,
		ErrorSensitivity: errawr.ErrorSensitivityNone,
		ErrorTitle:       "Unknown provider",
		Version:          1,
	}
}

// NewK8sProvisionerUnknownProviderBuilder creates a new error builder for the code "unknown_provider".
func NewK8sProvisionerUnknownProviderBuilder(provider string) *K8sProvisionerUnknownProviderBuilder {
	return &K8sProvisionerUnknownProviderBuilder{arguments: impl.ErrorArguments{"provider": impl.NewErrorArgument(provider, "the name of the provider")}}
}

// NewK8sProvisionerUnknownProvider creates a new error with the code "unknown_provider".
func NewK8sProvisionerUnknownProvider(provider string) Error {
	return NewK8sProvisionerUnknownProviderBuilder(provider).Build()
}
