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

// SyncConfigGitlabScope sync config gitlab scope
//
// swagger:model SyncConfigGitlabScope
type SyncConfigGitlabScope string

func NewSyncConfigGitlabScope(value SyncConfigGitlabScope) *SyncConfigGitlabScope {
	return &value
}

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

const (

	// SyncConfigGitlabScopePROJECT captures enum value "PROJECT"
	SyncConfigGitlabScopePROJECT SyncConfigGitlabScope = "PROJECT"

	// SyncConfigGitlabScopeGROUP captures enum value "GROUP"
	SyncConfigGitlabScopeGROUP SyncConfigGitlabScope = "GROUP"
)

// for schema
var syncConfigGitlabScopeEnum []interface{}

func init() {
	var res []SyncConfigGitlabScope
	if err := json.Unmarshal([]byte(`["PROJECT","GROUP"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		syncConfigGitlabScopeEnum = append(syncConfigGitlabScopeEnum, v)
	}
}

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

// Validate validates this sync config gitlab scope
func (m SyncConfigGitlabScope) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this sync config gitlab scope based on context it is used
func (m SyncConfigGitlabScope) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
