models

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package swaggerpetstore

This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).

Package swaggerpetstore

This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).

Package swaggerpetstore

This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).

Index

Constants

This section is empty.

Variables

View Source
var DEFAULT_DATE = utilities.DEFAULT_DATE

DEFAULT_DATE is a utility.

View Source
var GetFile = https.GetFile

GetFile retrieves a file from the given fileUrl and returns it as a FileWrapper. It makes an HTTP GET request to the fileUrl to fetch the file's content and metadata.

View Source
var TimeToStringMap = utilities.TimeToStringMap

TimeToStringMap is a utility.

View Source
var TimeToStringSlice = utilities.TimeToStringSlice

TimeToStringSlice is a utility.

View Source
var ToTimeMap = utilities.ToTimeMap

ToTimeMap is a utility.

View Source
var ToTimeSlice = utilities.ToTimeSlice

ToTimeSlice is a utility.

Functions

func ToPointer

func ToPointer[T any](value T) *T

Types

type ApiResponse

type ApiResponse[T any] struct {
	https.ApiResponse[T]
}

ApiResponse is a generic struct that represents an API response containing data and the HTTP response. The `Data` field holds the data of any type `T` returned by the API. The `Response` field contains the underlying HTTP response associated with the API call.

func NewApiResponse

func NewApiResponse[T any](
	data T,
	response *http.Response) ApiResponse[T]

NewApiResponse creates a new instance of ApiResponse. It takes the `data` of type `T` and the `response` as parameters, and returns an ApiResponse[T] struct.

type Category

type Category struct {
	Id   *int64  `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
}

Category represents a Category struct.

func (*Category) MarshalJSON

func (c *Category) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Category. It customizes the JSON marshaling process for Category objects.

func (*Category) UnmarshalJSON

func (c *Category) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Category. It customizes the JSON unmarshaling process for Category objects.

type FileWrapper

type FileWrapper = https.FileWrapper

FileWrapper is a struct that represents a file along with its metadata such as the file content, file name, and file headers.

type MApiResponse

type MApiResponse struct {
	Code    *int    `json:"code,omitempty"`
	Type    *string `json:"type,omitempty"`
	Message *string `json:"message,omitempty"`
}

MApiResponse represents a MApiResponse struct.

func (*MApiResponse) MarshalJSON

func (a *MApiResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for MApiResponse. It customizes the JSON marshaling process for MApiResponse objects.

func (*MApiResponse) UnmarshalJSON

func (a *MApiResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for MApiResponse. It customizes the JSON unmarshaling process for MApiResponse objects.

type OAuthProviderErrorEnum

type OAuthProviderErrorEnum string

OAuthProviderErrorEnum is a string enum. OAuth 2 Authorization error codes

const (
	OAuthProviderErrorEnum_INVALIDREQUEST       OAuthProviderErrorEnum = "invalid_request"
	OAuthProviderErrorEnum_INVALIDCLIENT        OAuthProviderErrorEnum = "invalid_client"
	OAuthProviderErrorEnum_INVALIDGRANT         OAuthProviderErrorEnum = "invalid_grant"
	OAuthProviderErrorEnum_UNAUTHORIZEDCLIENT   OAuthProviderErrorEnum = "unauthorized_client"
	OAuthProviderErrorEnum_UNSUPPORTEDGRANTTYPE OAuthProviderErrorEnum = "unsupported_grant_type"
	OAuthProviderErrorEnum_INVALIDSCOPE         OAuthProviderErrorEnum = "invalid_scope"
)

type OAuthScopePetstoreAuthEnum

type OAuthScopePetstoreAuthEnum string

OAuthScopePetstoreAuthEnum is a string enum. OAuth 2 scopes supported by the API

const (
	OAuthScopePetstoreAuthEnum_READPETS  OAuthScopePetstoreAuthEnum = "read:pets"
	OAuthScopePetstoreAuthEnum_WRITEPETS OAuthScopePetstoreAuthEnum = "write:pets"
)

type OAuthToken

type OAuthToken struct {
	// Access token
	AccessToken string `json:"access_token"`
	// Type of access token
	TokenType string `json:"token_type"`
	// Time in seconds before the access token expires
	ExpiresIn *int64 `json:"expires_in,omitempty"`
	// List of scopes granted
	// This is a space-delimited list of strings.
	Scope *string `json:"scope,omitempty"`
	// Time of token expiry as unix timestamp (UTC)
	Expiry *int64 `json:"expiry,omitempty"`
	// Refresh token
	// Used to get a new access token when it expires.
	RefreshToken *string `json:"refresh_token,omitempty"`
}

OAuthToken represents a OAuthToken struct. OAuth 2 Authorization endpoint response

func (*OAuthToken) MarshalJSON

func (o *OAuthToken) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for OAuthToken. It customizes the JSON marshaling process for OAuthToken objects.

func (*OAuthToken) UnmarshalJSON

func (o *OAuthToken) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for OAuthToken. It customizes the JSON unmarshaling process for OAuthToken objects.

type Optional

type Optional[T any] struct {
	types.Optional[T]
}

Optional is a generic struct that allows any type to be used as optional and nullable. Optional.set is true when Optional.value is to be used.

func NewOptional

func NewOptional[T any](value *T) Optional[T]

NewOptional creates and returns an Optional instance with the given value set.

func (*Optional[T]) IsValueSet

func (o *Optional[T]) IsValueSet() bool

IsValueSet returns true if a value is set in the Optional, false otherwise.

func (*Optional[T]) SetValue

func (o *Optional[T]) SetValue(value *T)

SetValue sets the value of the Optional.

func (*Optional[T]) ShouldSetValue

func (o *Optional[T]) ShouldSetValue(set bool)

ShouldSetValue sets whether the value should be used or not.

func (*Optional[T]) Value

func (o *Optional[T]) Value() *T

Value returns the value stored in the Optional. It returns nil if no value is set.

type Order

type Order struct {
	Id       *int64     `json:"id,omitempty"`
	PetId    *int64     `json:"petId,omitempty"`
	Quantity *int       `json:"quantity,omitempty"`
	ShipDate *time.Time `json:"shipDate,omitempty"`
	// Order Status
	Status   *Status1Enum `json:"status,omitempty"`
	Complete *bool        `json:"complete,omitempty"`
}

Order represents a Order struct.

func (*Order) MarshalJSON

func (o *Order) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Order. It customizes the JSON marshaling process for Order objects.

func (*Order) UnmarshalJSON

func (o *Order) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Order. It customizes the JSON unmarshaling process for Order objects.

type Pet

type Pet struct {
	Id        *int64    `json:"id,omitempty"`
	Category  *Category `json:"category,omitempty"`
	Name      string    `json:"name"`
	PhotoUrls []string  `json:"photoUrls"`
	Tags      []Tag     `json:"tags,omitempty"`
	// pet status in the store
	Status *StatusEnum `json:"status,omitempty"`
}

Pet represents a Pet struct.

func (*Pet) MarshalJSON

func (p *Pet) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Pet. It customizes the JSON marshaling process for Pet objects.

func (*Pet) UnmarshalJSON

func (p *Pet) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Pet. It customizes the JSON unmarshaling process for Pet objects.

type Status1Enum

type Status1Enum string

Status1Enum is a string enum. Order Status

const (
	Status1Enum_PLACED    Status1Enum = "placed"
	Status1Enum_APPROVED  Status1Enum = "approved"
	Status1Enum_DELIVERED Status1Enum = "delivered"
)

type Status2Enum

type Status2Enum string

Status2Enum is a string enum.

const (
	Status2Enum_AVAILABLE Status2Enum = "available"
	Status2Enum_PENDING   Status2Enum = "pending"
	Status2Enum_SOLD      Status2Enum = "sold"
)

type StatusEnum

type StatusEnum string

StatusEnum is a string enum. pet status in the store

const (
	StatusEnum_AVAILABLE StatusEnum = "available"
	StatusEnum_PENDING   StatusEnum = "pending"
	StatusEnum_SOLD      StatusEnum = "sold"
)

type Tag

type Tag struct {
	Id        *int64   `json:"id,omitempty"`
	PhotoUrls []string `json:"photoUrls"`
	Name      *string  `json:"name,omitempty"`
}

Tag represents a Tag struct.

func (*Tag) MarshalJSON

func (t *Tag) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Tag. It customizes the JSON marshaling process for Tag objects.

func (*Tag) UnmarshalJSON

func (t *Tag) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Tag. It customizes the JSON unmarshaling process for Tag objects.

type User

type User struct {
	Id        *int64  `json:"id,omitempty"`
	Username  *string `json:"username,omitempty"`
	FirstName *string `json:"firstName,omitempty"`
	LastName  *string `json:"lastName,omitempty"`
	Email     *string `json:"email,omitempty"`
	Password  *string `json:"password,omitempty"`
	Phone     *string `json:"phone,omitempty"`
	// User Status
	UserStatus *int `json:"userStatus,omitempty"`
}

User represents a User struct.

func (*User) MarshalJSON

func (u *User) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for User. It customizes the JSON marshaling process for User objects.

func (*User) UnmarshalJSON

func (u *User) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for User. It customizes the JSON unmarshaling process for User objects.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL