// 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"
)

// BillingAccountOnDemandStatus OnDemandStatus represents the status of the on-demand payment method for a
// given BillingAccount.
//
// swagger:model BillingAccountOnDemandStatus
type BillingAccountOnDemandStatus string

func NewBillingAccountOnDemandStatus(value BillingAccountOnDemandStatus) *BillingAccountOnDemandStatus {
	return &value
}

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

const (

	// BillingAccountOnDemandStatusONDEMANDINVALID captures enum value "ON_DEMAND_INVALID"
	BillingAccountOnDemandStatusONDEMANDINVALID BillingAccountOnDemandStatus = "ON_DEMAND_INVALID"

	// BillingAccountOnDemandStatusONDEMANDUNSET captures enum value "ON_DEMAND_UNSET"
	BillingAccountOnDemandStatusONDEMANDUNSET BillingAccountOnDemandStatus = "ON_DEMAND_UNSET"

	// BillingAccountOnDemandStatusONDEMANDACTIVE captures enum value "ON_DEMAND_ACTIVE"
	BillingAccountOnDemandStatusONDEMANDACTIVE BillingAccountOnDemandStatus = "ON_DEMAND_ACTIVE"

	// BillingAccountOnDemandStatusONDEMANDDELETING captures enum value "ON_DEMAND_DELETING"
	BillingAccountOnDemandStatusONDEMANDDELETING BillingAccountOnDemandStatus = "ON_DEMAND_DELETING"
)

// for schema
var billingAccountOnDemandStatusEnum []interface{}

func init() {
	var res []BillingAccountOnDemandStatus
	if err := json.Unmarshal([]byte(`["ON_DEMAND_INVALID","ON_DEMAND_UNSET","ON_DEMAND_ACTIVE","ON_DEMAND_DELETING"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		billingAccountOnDemandStatusEnum = append(billingAccountOnDemandStatusEnum, v)
	}
}

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

// Validate validates this billing account on demand status
func (m BillingAccountOnDemandStatus) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this billing account on demand status based on context it is used
func (m BillingAccountOnDemandStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
