+++ /dev/null
-/*
-==================================================================================
- Copyright (c) 2021 Samsung
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- This source code is part of the near-RT RIC (RAN Intelligent Controller)
- platform project (RICP).
-==================================================================================
-*/
-// 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 (
- "github.com/go-openapi/errors"
- "github.com/go-openapi/strfmt"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// PolicyTypeSchema policy type schema
-//
-// swagger:model policy_type_schema
-type PolicyTypeSchema struct {
-
- // jsonschema (following http://json-schema.org/draft-07/schema) of the CREATE payload to be sent to handlers of this policy
- //
- // Required: true
- CreateSchema interface{} `json:"create_schema"`
-
- // description of the policy type
- // Required: true
- Description *string `json:"description"`
-
- // name of the policy type
- // Required: true
- Name *string `json:"name"`
-
- // the integer of the policy type
- // Required: true
- PolicyTypeID *int64 `json:"policy_type_id"`
-}
-
-// Validate validates this policy type schema
-func (m *PolicyTypeSchema) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateCreateSchema(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateDescription(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateName(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validatePolicyTypeID(formats); err != nil {
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *PolicyTypeSchema) validateCreateSchema(formats strfmt.Registry) error {
-
- if err := validate.Required("create_schema", "body", m.CreateSchema); err != nil {
- return err
- }
-
- return nil
-}
-
-func (m *PolicyTypeSchema) validateDescription(formats strfmt.Registry) error {
-
- if err := validate.Required("description", "body", m.Description); err != nil {
- return err
- }
-
- return nil
-}
-
-func (m *PolicyTypeSchema) validateName(formats strfmt.Registry) error {
-
- if err := validate.Required("name", "body", m.Name); err != nil {
- return err
- }
-
- return nil
-}
-
-func (m *PolicyTypeSchema) validatePolicyTypeID(formats strfmt.Registry) error {
-
- if err := validate.Required("policy_type_id", "body", m.PolicyTypeID); err != nil {
- return err
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *PolicyTypeSchema) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *PolicyTypeSchema) UnmarshalBinary(b []byte) error {
- var res PolicyTypeSchema
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}