// Code generated by go-swagger; DO NOT EDIT. // (c) 2012-2020 by Taxnexus, Inc. // All rights reserved worldwide. // Proprietary product; unlicensed use is not allowed package members_models import ( "context" "encoding/json" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag/jsonutils" "github.com/go-openapi/validate" ) // PasswordRecoveryAccepted password recovery accepted // // swagger:model PasswordRecoveryAccepted type PasswordRecoveryAccepted struct { // status // Required: true // Enum: ["accepted"] Status *string `json:"status"` } // Validate validates this password recovery accepted func (m *PasswordRecoveryAccepted) Validate(formats strfmt.Registry) error { var res []error if err := m.validateStatus(formats); err != nil { res = append(res, err) } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } var passwordRecoveryAcceptedTypeStatusPropEnum []any func init() { var res []string if err := json.Unmarshal([]byte(`["accepted"]`), &res); err != nil { panic(err) } for _, v := range res { passwordRecoveryAcceptedTypeStatusPropEnum = append(passwordRecoveryAcceptedTypeStatusPropEnum, v) } } const ( // PasswordRecoveryAcceptedStatusAccepted captures enum value "accepted" PasswordRecoveryAcceptedStatusAccepted string = "accepted" ) // prop value enum func (m *PasswordRecoveryAccepted) validateStatusEnum(path, location string, value string) error { if err := validate.EnumCase(path, location, value, passwordRecoveryAcceptedTypeStatusPropEnum, true); err != nil { return err } return nil } func (m *PasswordRecoveryAccepted) validateStatus(formats strfmt.Registry) error { if err := validate.Required("status", "body", m.Status); err != nil { return err } // value enum if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { return err } return nil } // ContextValidate validates this password recovery accepted based on context it is used func (m *PasswordRecoveryAccepted) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation func (m *PasswordRecoveryAccepted) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } return jsonutils.WriteJSON(m) } // UnmarshalBinary interface implementation func (m *PasswordRecoveryAccepted) UnmarshalBinary(b []byte) error { var res PasswordRecoveryAccepted if err := jsonutils.ReadJSON(b, &res); err != nil { return err } *m = res return nil }