lib/api/kazoo/kazoo_models/get_account_user_response.go

214 lines
4.9 KiB
Go
Raw Permalink Normal View History

2021-07-31 03:05:02 +00:00
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Telnexus LLC
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package kazoo_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// GetAccountUserResponse get account user response
//
// swagger:model GetAccountUserResponse
type GetAccountUserResponse struct {
// auth token
AuthToken string `json:"auth_token,omitempty"`
// data
Data []*GetAccountUserResponseDataItems0 `json:"data"`
// node
// Example: dqZFtHthbelyE8MI6vU-LA
Node string `json:"node,omitempty"`
// page size
// Example: 4
PageSize float64 `json:"page_size,omitempty"`
// request id
// Example: c11b939a99b181b3a09b7770c4e49302
RequestID string `json:"request_id,omitempty"`
// revision
// Example: c989520cf895f314b32d163d3b59d723
Revision string `json:"revision,omitempty"`
// status
// Example: success
Status string `json:"status,omitempty"`
// timestamp
// Example: 2020-05-07T02:44:28Z
Timestamp string `json:"timestamp,omitempty"`
// version
// Example: 4.3.103
Version string `json:"version,omitempty"`
}
// Validate validates this get account user response
func (m *GetAccountUserResponse) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateData(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *GetAccountUserResponse) validateData(formats strfmt.Registry) error {
if swag.IsZero(m.Data) { // not required
return nil
}
for i := 0; i < len(m.Data); i++ {
if swag.IsZero(m.Data[i]) { // not required
continue
}
if m.Data[i] != nil {
if err := m.Data[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// ContextValidate validate this get account user response based on the context it is used
func (m *GetAccountUserResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateData(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *GetAccountUserResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Data); i++ {
if m.Data[i] != nil {
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *GetAccountUserResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *GetAccountUserResponse) UnmarshalBinary(b []byte) error {
var res GetAccountUserResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// GetAccountUserResponseDataItems0 get account user response data items0
//
// swagger:model GetAccountUserResponseDataItems0
type GetAccountUserResponseDataItems0 struct {
// email
// Example: reception@telnexus.com
Email string `json:"email,omitempty"`
// features
// Example: ["vm_to_email"]
Features []string `json:"features"`
// first name
// Example: Phil
FirstName string `json:"first_name,omitempty"`
// id
// Example: 8c571470fef7db363994c8427c07b7bb
ID string `json:"id,omitempty"`
// last name
// Example: Cranepool
LastName string `json:"last_name,omitempty"`
// priv level
// Example: user
PrivLevel string `json:"priv_level,omitempty"`
// timezone
// Example: America/Los_Angeles
Timezone string `json:"timezone,omitempty"`
// username
// Example: phil
Username string `json:"username,omitempty"`
}
// Validate validates this get account user response data items0
func (m *GetAccountUserResponseDataItems0) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this get account user response data items0 based on context it is used
func (m *GetAccountUserResponseDataItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *GetAccountUserResponseDataItems0) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *GetAccountUserResponseDataItems0) UnmarshalBinary(b []byte) error {
var res GetAccountUserResponseDataItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}