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

// Billing20201105Geo Geo is a reference to all available Geos supported by
// the billing service.
//
//   - GEO_UNSPECIFIED: GEO_UNSPECIFIED is an invalid Geo, which
//
// is used to flag when the Geo was left blank.
//   - GEO_US: GEO_US represents a US control-plane Geo.
//   - GEO_EU: GEO_EU represents a US control-plane Geo.
//
// swagger:model billing_20201105Geo
type Billing20201105Geo string

func NewBilling20201105Geo(value Billing20201105Geo) *Billing20201105Geo {
	return &value
}

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

const (

	// Billing20201105GeoGEOUNSPECIFIED captures enum value "GEO_UNSPECIFIED"
	Billing20201105GeoGEOUNSPECIFIED Billing20201105Geo = "GEO_UNSPECIFIED"

	// Billing20201105GeoGEOUS captures enum value "GEO_US"
	Billing20201105GeoGEOUS Billing20201105Geo = "GEO_US"

	// Billing20201105GeoGEOEU captures enum value "GEO_EU"
	Billing20201105GeoGEOEU Billing20201105Geo = "GEO_EU"
)

// for schema
var billing20201105GeoEnum []interface{}

func init() {
	var res []Billing20201105Geo
	if err := json.Unmarshal([]byte(`["GEO_UNSPECIFIED","GEO_US","GEO_EU"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		billing20201105GeoEnum = append(billing20201105GeoEnum, v)
	}
}

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

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

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

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

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