1 // Code generated by go-swagger; DO NOT EDIT.
5 // This file was generated by the swagger tool.
6 // Editing this file might prove futile when you re-run the swagger generate command
11 strfmt "github.com/go-openapi/strfmt"
13 "github.com/go-openapi/errors"
14 "github.com/go-openapi/validate"
17 // SubscriptionType subscription type
18 // swagger:model SubscriptionType
19 type SubscriptionType string
23 // SubscriptionTypeControl captures enum value "control"
24 SubscriptionTypeControl SubscriptionType = "control"
26 // SubscriptionTypeInsert captures enum value "insert"
27 SubscriptionTypeInsert SubscriptionType = "insert"
29 // SubscriptionTypePolicy captures enum value "policy"
30 SubscriptionTypePolicy SubscriptionType = "policy"
32 // SubscriptionTypeReport captures enum value "report"
33 SubscriptionTypeReport SubscriptionType = "report"
37 var subscriptionTypeEnum []interface{}
40 var res []SubscriptionType
41 if err := json.Unmarshal([]byte(`["control","insert","policy","report"]`), &res); err != nil {
44 for _, v := range res {
45 subscriptionTypeEnum = append(subscriptionTypeEnum, v)
49 func (m SubscriptionType) validateSubscriptionTypeEnum(path, location string, value SubscriptionType) error {
50 if err := validate.Enum(path, location, value, subscriptionTypeEnum); err != nil {
56 // Validate validates this subscription type
57 func (m SubscriptionType) Validate(formats strfmt.Registry) error {
61 if err := m.validateSubscriptionTypeEnum("", "body", m); err != nil {
66 return errors.CompositeValidationError(res...)