Files
paralus/api/def/clients/sentry/models/sentry_bootstrap_agent_mode.go
nirav-rafay c66bdc25cd restructure rcloud-base as a single base controller (#37)
* restructure rcloud-base as a single base controller
* updated master.rest
* moved sentry from internal to pkg as it is used by relay
* removing unused rpc and it's dependencies
* Fix usermgmt tests
* Don't redefine variables in rest file
Co-authored-by: Abin Simon <abin.simon@rafay.co>
2022-03-03 17:59:06 +05:30

79 lines
2.2 KiB
Go

// 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"
)
// SentryBootstrapAgentMode sentry bootstrap agent mode
//
// swagger:model sentryBootstrapAgentMode
type SentryBootstrapAgentMode string
func NewSentryBootstrapAgentMode(value SentryBootstrapAgentMode) *SentryBootstrapAgentMode {
return &value
}
// Pointer returns a pointer to a freshly-allocated SentryBootstrapAgentMode.
func (m SentryBootstrapAgentMode) Pointer() *SentryBootstrapAgentMode {
return &m
}
const (
// SentryBootstrapAgentModeInCluster captures enum value "InCluster"
SentryBootstrapAgentModeInCluster SentryBootstrapAgentMode = "InCluster"
// SentryBootstrapAgentModeOutOfCluster captures enum value "OutOfCluster"
SentryBootstrapAgentModeOutOfCluster SentryBootstrapAgentMode = "OutOfCluster"
)
// for schema
var sentryBootstrapAgentModeEnum []interface{}
func init() {
var res []SentryBootstrapAgentMode
if err := json.Unmarshal([]byte(`["InCluster","OutOfCluster"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
sentryBootstrapAgentModeEnum = append(sentryBootstrapAgentModeEnum, v)
}
}
func (m SentryBootstrapAgentMode) validateSentryBootstrapAgentModeEnum(path, location string, value SentryBootstrapAgentMode) error {
if err := validate.EnumCase(path, location, value, sentryBootstrapAgentModeEnum, true); err != nil {
return err
}
return nil
}
// Validate validates this sentry bootstrap agent mode
func (m SentryBootstrapAgentMode) Validate(formats strfmt.Registry) error {
var res []error
// value enum
if err := m.validateSentryBootstrapAgentModeEnum("", "body", m); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// ContextValidate validates this sentry bootstrap agent mode based on context it is used
func (m SentryBootstrapAgentMode) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}