X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fmodels%2Fsubscription_type.go;fp=pkg%2Fmodels%2Fsubscription_type.go;h=0000000000000000000000000000000000000000;hb=3602bf801fef17e317cb35a4c710118ec80908b9;hp=c7dd86ec9dda34fb3a11f4ea2c8763cd770ee085;hpb=060448c051013852d463bc13bfc5f0aa3696ac9c;p=ric-plt%2Fxapp-frame.git diff --git a/pkg/models/subscription_type.go b/pkg/models/subscription_type.go deleted file mode 100644 index c7dd86e..0000000 --- a/pkg/models/subscription_type.go +++ /dev/null @@ -1,66 +0,0 @@ -// 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 ( - "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 -}