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 ¶
var DEFAULT_DATE = utilities.DEFAULT_DATE
DEFAULT_DATE is a utility.
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.
var TimeToStringMap = utilities.TimeToStringMap
TimeToStringMap is a utility.
var TimeToStringSlice = utilities.TimeToStringSlice
TimeToStringSlice is a utility.
var ToTimeMap = utilities.ToTimeMap
ToTimeMap is a utility.
var ToTimeSlice = utilities.ToTimeSlice
ToTimeSlice is a utility.
Functions ¶
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 ¶
Category represents a Category struct.
func (*Category) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface for Category. It customizes the JSON marshaling process for Category objects.
func (*Category) UnmarshalJSON ¶
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 ¶
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 ¶
NewOptional creates and returns an Optional instance with the given value set.
func (*Optional[T]) IsValueSet ¶
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 ¶
ShouldSetValue sets whether the value should be used or not.
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 ¶
MarshalJSON implements the json.Marshaler interface for Order. It customizes the JSON marshaling process for Order objects.
func (*Order) UnmarshalJSON ¶
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 ¶
MarshalJSON implements the json.Marshaler interface for Pet. It customizes the JSON marshaling process for Pet objects.
func (*Pet) UnmarshalJSON ¶
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 ¶
MarshalJSON implements the json.Marshaler interface for Tag. It customizes the JSON marshaling process for Tag objects.
func (*Tag) UnmarshalJSON ¶
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 ¶
MarshalJSON implements the json.Marshaler interface for User. It customizes the JSON marshaling process for User objects.
func (*User) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for User. It customizes the JSON unmarshaling process for User objects.