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

package models

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

import (
	"context"
	"encoding/json"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/validate"
)

// Billing20201105PricingModel PricingModel is a reference to all available pricing models in the billing service.
//
//   - PRICING_MODEL_UNSPECIFIED: PRICING_MODEL_UNSPECIFIED is an invalid pricing model, which
//
// is used to flag when the pricing model was left blank.
//   - PRICING_MODEL_PAYG: PRICING_MODEL_PAYG represents the PAYG pricing model.
//   - PRICING_MODEL_FLEX: PRICING_MODEL_FLEX represents the FLEX (or FCP) pricing model.
//   - PRICING_MODEL_ENTITLEMENT: PRICING_MODEL_ENTITLEMENT represents the Entitlement (or contracts) pricing model.
//
// swagger:model billing_20201105PricingModel
type Billing20201105PricingModel string

func NewBilling20201105PricingModel(value Billing20201105PricingModel) *Billing20201105PricingModel {
	return &value
}

// Pointer returns a pointer to a freshly-allocated Billing20201105PricingModel.
func (m Billing20201105PricingModel) Pointer() *Billing20201105PricingModel {
	return &m
}

const (

	// Billing20201105PricingModelPRICINGMODELUNSPECIFIED captures enum value "PRICING_MODEL_UNSPECIFIED"
	Billing20201105PricingModelPRICINGMODELUNSPECIFIED Billing20201105PricingModel = "PRICING_MODEL_UNSPECIFIED"

	// Billing20201105PricingModelPRICINGMODELPAYG captures enum value "PRICING_MODEL_PAYG"
	Billing20201105PricingModelPRICINGMODELPAYG Billing20201105PricingModel = "PRICING_MODEL_PAYG"

	// Billing20201105PricingModelPRICINGMODELFLEX captures enum value "PRICING_MODEL_FLEX"
	Billing20201105PricingModelPRICINGMODELFLEX Billing20201105PricingModel = "PRICING_MODEL_FLEX"

	// Billing20201105PricingModelPRICINGMODELENTITLEMENT captures enum value "PRICING_MODEL_ENTITLEMENT"
	Billing20201105PricingModelPRICINGMODELENTITLEMENT Billing20201105PricingModel = "PRICING_MODEL_ENTITLEMENT"
)

// for schema
var billing20201105PricingModelEnum []interface{}

func init() {
	var res []Billing20201105PricingModel
	if err := json.Unmarshal([]byte(`["PRICING_MODEL_UNSPECIFIED","PRICING_MODEL_PAYG","PRICING_MODEL_FLEX","PRICING_MODEL_ENTITLEMENT"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		billing20201105PricingModelEnum = append(billing20201105PricingModelEnum, v)
	}
}

func (m Billing20201105PricingModel) validateBilling20201105PricingModelEnum(path, location string, value Billing20201105PricingModel) error {
	if err := validate.EnumCase(path, location, value, billing20201105PricingModelEnum, true); err != nil {
		return err
	}
	return nil
}

// Validate validates this billing 20201105 pricing model
func (m Billing20201105PricingModel) Validate(formats strfmt.Registry) error {
	var res []error

	// value enum
	if err := m.validateBilling20201105PricingModelEnum("", "body", m); err != nil {
		return err
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

// ContextValidate validates this billing 20201105 pricing model based on context it is used
func (m Billing20201105PricingModel) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
