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

// HashicorpCloudWaypointActionConfigFlavorGitHubMethod Supported GitHub Action workflow methods
//
// swagger:model hashicorp.cloud.waypoint.ActionConfig.Flavor.GitHub.Method
type HashicorpCloudWaypointActionConfigFlavorGitHubMethod string

func NewHashicorpCloudWaypointActionConfigFlavorGitHubMethod(value HashicorpCloudWaypointActionConfigFlavorGitHubMethod) *HashicorpCloudWaypointActionConfigFlavorGitHubMethod {
	return &value
}

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

const (

	// HashicorpCloudWaypointActionConfigFlavorGitHubMethodCREATE captures enum value "CREATE"
	HashicorpCloudWaypointActionConfigFlavorGitHubMethodCREATE HashicorpCloudWaypointActionConfigFlavorGitHubMethod = "CREATE"

	// HashicorpCloudWaypointActionConfigFlavorGitHubMethodRERUN captures enum value "RERUN"
	HashicorpCloudWaypointActionConfigFlavorGitHubMethodRERUN HashicorpCloudWaypointActionConfigFlavorGitHubMethod = "RERUN"

	// HashicorpCloudWaypointActionConfigFlavorGitHubMethodRERUNFAILED captures enum value "RERUNFAILED"
	HashicorpCloudWaypointActionConfigFlavorGitHubMethodRERUNFAILED HashicorpCloudWaypointActionConfigFlavorGitHubMethod = "RERUNFAILED"

	// HashicorpCloudWaypointActionConfigFlavorGitHubMethodCANCEL captures enum value "CANCEL"
	HashicorpCloudWaypointActionConfigFlavorGitHubMethodCANCEL HashicorpCloudWaypointActionConfigFlavorGitHubMethod = "CANCEL"

	// HashicorpCloudWaypointActionConfigFlavorGitHubMethodAPPROVE captures enum value "APPROVE"
	HashicorpCloudWaypointActionConfigFlavorGitHubMethodAPPROVE HashicorpCloudWaypointActionConfigFlavorGitHubMethod = "APPROVE"

	// HashicorpCloudWaypointActionConfigFlavorGitHubMethodDELETE captures enum value "DELETE"
	HashicorpCloudWaypointActionConfigFlavorGitHubMethodDELETE HashicorpCloudWaypointActionConfigFlavorGitHubMethod = "DELETE"
)

// for schema
var hashicorpCloudWaypointActionConfigFlavorGitHubMethodEnum []interface{}

func init() {
	var res []HashicorpCloudWaypointActionConfigFlavorGitHubMethod
	if err := json.Unmarshal([]byte(`["CREATE","RERUN","RERUNFAILED","CANCEL","APPROVE","DELETE"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudWaypointActionConfigFlavorGitHubMethodEnum = append(hashicorpCloudWaypointActionConfigFlavorGitHubMethodEnum, v)
	}
}

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

// Validate validates this hashicorp cloud waypoint action config flavor git hub method
func (m HashicorpCloudWaypointActionConfigFlavorGitHubMethod) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this hashicorp cloud waypoint action config flavor git hub method based on context it is used
func (m HashicorpCloudWaypointActionConfigFlavorGitHubMethod) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
