+++ /dev/null
-// Code generated by go-swagger; DO NOT EDIT.
-
-package clientmodel
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "encoding/json"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/validate"
-)
-
-// SubscriptionType subscription type
-// swagger:model SubscriptionType
-type SubscriptionType string
-
-const (
-
- // SubscriptionTypeInsert captures enum value "insert"
- SubscriptionTypeInsert SubscriptionType = "insert"
-
- // SubscriptionTypePolicy captures enum value "policy"
- SubscriptionTypePolicy SubscriptionType = "policy"
-
- // SubscriptionTypeReport captures enum value "report"
- SubscriptionTypeReport SubscriptionType = "report"
-)
-
-// for schema
-var subscriptionTypeEnum []interface{}
-
-func init() {
- var res []SubscriptionType
- if err := json.Unmarshal([]byte(`["insert","policy","report"]`), &res); err != nil {
- panic(err)
- }
- for _, v := range res {
- subscriptionTypeEnum = append(subscriptionTypeEnum, v)
- }
-}
-
-func (m SubscriptionType) validateSubscriptionTypeEnum(path, location string, value SubscriptionType) error {
- if err := validate.Enum(path, location, value, subscriptionTypeEnum); err != nil {
- return err
- }
- return nil
-}
-
-// Validate validates this subscription type
-func (m SubscriptionType) Validate(formats strfmt.Registry) error {
- var res []error
-
- // value enum
- if err := m.validateSubscriptionTypeEnum("", "body", m); err != nil {
- return err
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}