mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 07:52:48 +00:00
fix enum which is not string of Go (#4077)
This commit is contained in:
committed by
William Cheng
parent
7a369d3b02
commit
08613691e8
@@ -35,12 +35,14 @@ import static org.openapitools.codegen.utils.StringUtils.underscore;
|
|||||||
public abstract class AbstractGoCodegen extends DefaultCodegen implements CodegenConfig {
|
public abstract class AbstractGoCodegen extends DefaultCodegen implements CodegenConfig {
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractGoCodegen.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractGoCodegen.class);
|
||||||
|
private static final String NUMERIC_ENUM_PREFIX = "_";
|
||||||
|
|
||||||
protected boolean withGoCodegenComment = false;
|
protected boolean withGoCodegenComment = false;
|
||||||
protected boolean withXml = false;
|
protected boolean withXml = false;
|
||||||
protected boolean enumClassPrefix = false;
|
protected boolean enumClassPrefix = false;
|
||||||
|
|
||||||
protected String packageName = "openapi";
|
protected String packageName = "openapi";
|
||||||
|
protected Set<String> numberTypes;
|
||||||
|
|
||||||
public AbstractGoCodegen() {
|
public AbstractGoCodegen() {
|
||||||
super();
|
super();
|
||||||
@@ -110,6 +112,13 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
|
|||||||
typeMapping.put("ByteArray", "string");
|
typeMapping.put("ByteArray", "string");
|
||||||
typeMapping.put("object", "map[string]interface{}");
|
typeMapping.put("object", "map[string]interface{}");
|
||||||
|
|
||||||
|
numberTypes = new HashSet<String>(
|
||||||
|
Arrays.asList(
|
||||||
|
"uint", "uint8", "uint16", "uint32", "uint64",
|
||||||
|
"int", "int8", "int16","int32", "int64",
|
||||||
|
"float32", "float64")
|
||||||
|
);
|
||||||
|
|
||||||
importMapping = new HashMap<String, String>();
|
importMapping = new HashMap<String, String>();
|
||||||
|
|
||||||
cliOptions.clear();
|
cliOptions.clear();
|
||||||
@@ -560,10 +569,10 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toEnumValue(String value, String datatype) {
|
public String toEnumValue(String value, String datatype) {
|
||||||
if ("int".equals(datatype) || "double".equals(datatype) || "float".equals(datatype)) {
|
if (isNumberType(datatype) || "bool".equals(datatype)) {
|
||||||
return value;
|
return value;
|
||||||
} else {
|
} else {
|
||||||
return escapeText(value);
|
return "\"" + escapeText(value) + "\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -579,12 +588,12 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
|
|||||||
}
|
}
|
||||||
|
|
||||||
// number
|
// number
|
||||||
if ("int".equals(datatype) || "double".equals(datatype) || "float".equals(datatype)) {
|
if (isNumberType(datatype)) {
|
||||||
String varName = name;
|
String varName = name;
|
||||||
varName = varName.replaceAll("-", "MINUS_");
|
varName = varName.replaceAll("-", "MINUS_");
|
||||||
varName = varName.replaceAll("\\+", "PLUS_");
|
varName = varName.replaceAll("\\+", "PLUS_");
|
||||||
varName = varName.replaceAll("\\.", "_DOT_");
|
varName = varName.replaceAll("\\.", "_DOT_");
|
||||||
return varName;
|
return NUMERIC_ENUM_PREFIX + varName;
|
||||||
}
|
}
|
||||||
|
|
||||||
// for symbol, e.g. $, #
|
// for symbol, e.g. $, #
|
||||||
@@ -600,7 +609,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
|
|||||||
if (isReservedWord(enumName)) { // reserved word
|
if (isReservedWord(enumName)) { // reserved word
|
||||||
return escapeReservedWord(enumName);
|
return escapeReservedWord(enumName);
|
||||||
} else if (enumName.matches("\\d.*")) { // starts with a number
|
} else if (enumName.matches("\\d.*")) { // starts with a number
|
||||||
return "_" + enumName;
|
return NUMERIC_ENUM_PREFIX + enumName;
|
||||||
} else {
|
} else {
|
||||||
return enumName;
|
return enumName;
|
||||||
}
|
}
|
||||||
@@ -614,7 +623,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
|
|||||||
enumName = enumName.replace("[]", "");
|
enumName = enumName.replace("[]", "");
|
||||||
|
|
||||||
if (enumName.matches("\\d.*")) { // starts with number
|
if (enumName.matches("\\d.*")) { // starts with number
|
||||||
return "_" + enumName;
|
return NUMERIC_ENUM_PREFIX + enumName;
|
||||||
} else {
|
} else {
|
||||||
return enumName;
|
return enumName;
|
||||||
}
|
}
|
||||||
@@ -682,4 +691,8 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean isNumberType(String datatype) {
|
||||||
|
return numberTypes.contains(datatype);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const (
|
|||||||
{{#enumVars}}
|
{{#enumVars}}
|
||||||
{{^-first}}
|
{{^-first}}
|
||||||
{{/-first}}
|
{{/-first}}
|
||||||
{{#enumClassPrefix}}{{{classname.toUpperCase}}}_{{/enumClassPrefix}}{{name}} {{{classname}}} = "{{{value}}}"
|
{{#enumClassPrefix}}{{{classname.toUpperCase}}}_{{/enumClassPrefix}}{{name}} {{{classname}}} = {{{value}}}
|
||||||
{{/enumVars}}
|
{{/enumVars}}
|
||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ type {{{name}}} {{^format}}{{dataType}}{{/format}}{{#format}}{{{format}}}{{/form
|
|||||||
const (
|
const (
|
||||||
{{#allowableValues}}
|
{{#allowableValues}}
|
||||||
{{#enumVars}}
|
{{#enumVars}}
|
||||||
{{name}} {{{classname}}} = "{{{value}}}"
|
{{name}} {{{classname}}} = {{{value}}}
|
||||||
{{/enumVars}}
|
{{/enumVars}}
|
||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
){{/isEnum}}{{^isEnum}}{{#description}}
|
){{/isEnum}}{{^isEnum}}{{#description}}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ type {{{name}}} {{^format}}{{dataType}}{{/format}}{{#format}}{{{format}}}{{/form
|
|||||||
const (
|
const (
|
||||||
{{#allowableValues}}
|
{{#allowableValues}}
|
||||||
{{#enumVars}}
|
{{#enumVars}}
|
||||||
{{name}} {{{classname}}} = "{{{value}}}"
|
{{name}} {{{classname}}} = {{{value}}}
|
||||||
{{/enumVars}}
|
{{/enumVars}}
|
||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
){{/isEnum}}{{^isEnum}}{{#description}}
|
){{/isEnum}}{{^isEnum}}{{#description}}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const (
|
|||||||
{{#enumVars}}
|
{{#enumVars}}
|
||||||
{{^-first}}
|
{{^-first}}
|
||||||
{{/-first}}
|
{{/-first}}
|
||||||
{{#enumClassPrefix}}{{{classname.toUpperCase}}}_{{/enumClassPrefix}}{{name}} {{{classname}}} = "{{{value}}}"
|
{{#enumClassPrefix}}{{{classname.toUpperCase}}}_{{/enumClassPrefix}}{{name}} {{{classname}}} = {{{value}}}
|
||||||
{{/enumVars}}
|
{{/enumVars}}
|
||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
)
|
)
|
||||||
|
|||||||
24
samples/openapi3/client/petstore/go-experimental/go-petstore/.gitignore
vendored
Normal file
24
samples/openapi3/client/petstore/go-experimental/go-petstore/.gitignore
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||||
|
*.o
|
||||||
|
*.a
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Folders
|
||||||
|
_obj
|
||||||
|
_test
|
||||||
|
|
||||||
|
# Architecture specific extensions/prefixes
|
||||||
|
*.[568vq]
|
||||||
|
[568vq].out
|
||||||
|
|
||||||
|
*.cgo1.go
|
||||||
|
*.cgo2.c
|
||||||
|
_cgo_defun.c
|
||||||
|
_cgo_gotypes.go
|
||||||
|
_cgo_export.*
|
||||||
|
|
||||||
|
_testmain.go
|
||||||
|
|
||||||
|
*.exe
|
||||||
|
*.test
|
||||||
|
*.prof
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# OpenAPI Generator Ignore
|
||||||
|
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||||
|
|
||||||
|
# Use this file to prevent files from being overwritten by the generator.
|
||||||
|
# The patterns follow closely to .gitignore or .dockerignore.
|
||||||
|
|
||||||
|
# As an example, the C# client generator defines ApiClient.cs.
|
||||||
|
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||||
|
#ApiClient.cs
|
||||||
|
|
||||||
|
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||||
|
#foo/*/qux
|
||||||
|
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||||
|
|
||||||
|
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||||
|
#foo/**/qux
|
||||||
|
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||||
|
|
||||||
|
# You can also negate patterns with an exclamation (!).
|
||||||
|
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||||
|
#docs/*.md
|
||||||
|
# Then explicitly reverse the ignore rule for a single file:
|
||||||
|
#!docs/README.md
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
4.2.0-SNAPSHOT
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
language: go
|
||||||
|
|
||||||
|
install:
|
||||||
|
- go get -d -v .
|
||||||
|
|
||||||
|
script:
|
||||||
|
- go build -v ./
|
||||||
|
|
||||||
@@ -0,0 +1,229 @@
|
|||||||
|
# Go API client for openapi
|
||||||
|
|
||||||
|
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
|
||||||
|
|
||||||
|
- API version: 1.0.0
|
||||||
|
- Package version: 1.0.0
|
||||||
|
- Build package: org.openapitools.codegen.languages.GoClientExperimentalCodegen
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Install the following dependencies:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
go get github.com/stretchr/testify/assert
|
||||||
|
go get golang.org/x/oauth2
|
||||||
|
go get golang.org/x/net/context
|
||||||
|
go get github.com/antihax/optional
|
||||||
|
```
|
||||||
|
|
||||||
|
Put the package under your project folder and add the following in import:
|
||||||
|
|
||||||
|
```golang
|
||||||
|
import sw "./openapi"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Documentation for API Endpoints
|
||||||
|
|
||||||
|
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||||
|
|
||||||
|
Class | Method | HTTP request | Description
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **Patch** /another-fake/dummy | To test special tags
|
||||||
|
*DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **Get** /foo |
|
||||||
|
*FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **Get** /fake/health | Health check endpoint
|
||||||
|
*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **Post** /fake/outer/boolean |
|
||||||
|
*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **Post** /fake/outer/composite |
|
||||||
|
*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **Post** /fake/outer/number |
|
||||||
|
*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **Post** /fake/outer/string |
|
||||||
|
*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **Put** /fake/body-with-file-schema |
|
||||||
|
*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **Put** /fake/body-with-query-params |
|
||||||
|
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **Patch** /fake | To test \"client\" model
|
||||||
|
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **Get** /fake | To test enum parameters
|
||||||
|
*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional)
|
||||||
|
*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties
|
||||||
|
*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **Get** /fake/jsonFormData | test json serialization of form data
|
||||||
|
*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **Put** /fake/test-query-paramters |
|
||||||
|
*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **Patch** /fake_classname_test | To test class name in snake case
|
||||||
|
*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **Post** /pet | Add a new pet to the store
|
||||||
|
*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **Delete** /pet/{petId} | Deletes a pet
|
||||||
|
*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **Get** /pet/findByStatus | Finds Pets by status
|
||||||
|
*PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **Get** /pet/findByTags | Finds Pets by tags
|
||||||
|
*PetApi* | [**GetPetById**](docs/PetApi.md#getpetbyid) | **Get** /pet/{petId} | Find pet by ID
|
||||||
|
*PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **Put** /pet | Update an existing pet
|
||||||
|
*PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data
|
||||||
|
*PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image
|
||||||
|
*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||||
|
*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID
|
||||||
|
*StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status
|
||||||
|
*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID
|
||||||
|
*StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **Post** /store/order | Place an order for a pet
|
||||||
|
*UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **Post** /user | Create user
|
||||||
|
*UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **Post** /user/createWithArray | Creates list of users with given input array
|
||||||
|
*UserApi* | [**CreateUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **Post** /user/createWithList | Creates list of users with given input array
|
||||||
|
*UserApi* | [**DeleteUser**](docs/UserApi.md#deleteuser) | **Delete** /user/{username} | Delete user
|
||||||
|
*UserApi* | [**GetUserByName**](docs/UserApi.md#getuserbyname) | **Get** /user/{username} | Get user by user name
|
||||||
|
*UserApi* | [**LoginUser**](docs/UserApi.md#loginuser) | **Get** /user/login | Logs user into the system
|
||||||
|
*UserApi* | [**LogoutUser**](docs/UserApi.md#logoutuser) | **Get** /user/logout | Logs out current logged in user session
|
||||||
|
*UserApi* | [**UpdateUser**](docs/UserApi.md#updateuser) | **Put** /user/{username} | Updated user
|
||||||
|
|
||||||
|
|
||||||
|
## Documentation For Models
|
||||||
|
|
||||||
|
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
||||||
|
- [Animal](docs/Animal.md)
|
||||||
|
- [ApiResponse](docs/ApiResponse.md)
|
||||||
|
- [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||||
|
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||||
|
- [ArrayTest](docs/ArrayTest.md)
|
||||||
|
- [Capitalization](docs/Capitalization.md)
|
||||||
|
- [Cat](docs/Cat.md)
|
||||||
|
- [CatAllOf](docs/CatAllOf.md)
|
||||||
|
- [Category](docs/Category.md)
|
||||||
|
- [ClassModel](docs/ClassModel.md)
|
||||||
|
- [Client](docs/Client.md)
|
||||||
|
- [Dog](docs/Dog.md)
|
||||||
|
- [DogAllOf](docs/DogAllOf.md)
|
||||||
|
- [EnumArrays](docs/EnumArrays.md)
|
||||||
|
- [EnumClass](docs/EnumClass.md)
|
||||||
|
- [EnumTest](docs/EnumTest.md)
|
||||||
|
- [File](docs/File.md)
|
||||||
|
- [FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||||
|
- [Foo](docs/Foo.md)
|
||||||
|
- [FormatTest](docs/FormatTest.md)
|
||||||
|
- [HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||||
|
- [HealthCheckResult](docs/HealthCheckResult.md)
|
||||||
|
- [InlineObject](docs/InlineObject.md)
|
||||||
|
- [InlineObject1](docs/InlineObject1.md)
|
||||||
|
- [InlineObject2](docs/InlineObject2.md)
|
||||||
|
- [InlineObject3](docs/InlineObject3.md)
|
||||||
|
- [InlineObject4](docs/InlineObject4.md)
|
||||||
|
- [InlineObject5](docs/InlineObject5.md)
|
||||||
|
- [InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||||
|
- [List](docs/List.md)
|
||||||
|
- [MapTest](docs/MapTest.md)
|
||||||
|
- [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
|
||||||
|
- [Model200Response](docs/Model200Response.md)
|
||||||
|
- [Name](docs/Name.md)
|
||||||
|
- [NullableClass](docs/NullableClass.md)
|
||||||
|
- [NumberOnly](docs/NumberOnly.md)
|
||||||
|
- [Order](docs/Order.md)
|
||||||
|
- [OuterComposite](docs/OuterComposite.md)
|
||||||
|
- [OuterEnum](docs/OuterEnum.md)
|
||||||
|
- [OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md)
|
||||||
|
- [OuterEnumInteger](docs/OuterEnumInteger.md)
|
||||||
|
- [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md)
|
||||||
|
- [Pet](docs/Pet.md)
|
||||||
|
- [ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||||
|
- [Return](docs/Return.md)
|
||||||
|
- [SpecialModelName](docs/SpecialModelName.md)
|
||||||
|
- [Tag](docs/Tag.md)
|
||||||
|
- [User](docs/User.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Documentation For Authorization
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### api_key
|
||||||
|
|
||||||
|
- **Type**: API key
|
||||||
|
- **API key parameter name**: api_key
|
||||||
|
- **Location**: HTTP header
|
||||||
|
|
||||||
|
Note, each API key must be added to a map of `map[string]APIKey` where the key is: api_key and passed in as the auth context for each request.
|
||||||
|
|
||||||
|
|
||||||
|
### api_key_query
|
||||||
|
|
||||||
|
- **Type**: API key
|
||||||
|
- **API key parameter name**: api_key_query
|
||||||
|
- **Location**: URL query string
|
||||||
|
|
||||||
|
Note, each API key must be added to a map of `map[string]APIKey` where the key is: api_key_query and passed in as the auth context for each request.
|
||||||
|
|
||||||
|
|
||||||
|
### bearer_test
|
||||||
|
|
||||||
|
- **Type**: HTTP basic authentication
|
||||||
|
|
||||||
|
Example
|
||||||
|
|
||||||
|
```golang
|
||||||
|
auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
|
||||||
|
UserName: "username",
|
||||||
|
Password: "password",
|
||||||
|
})
|
||||||
|
r, err := client.Service.Operation(auth, args)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### http_basic_test
|
||||||
|
|
||||||
|
- **Type**: HTTP basic authentication
|
||||||
|
|
||||||
|
Example
|
||||||
|
|
||||||
|
```golang
|
||||||
|
auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
|
||||||
|
UserName: "username",
|
||||||
|
Password: "password",
|
||||||
|
})
|
||||||
|
r, err := client.Service.Operation(auth, args)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### petstore_auth
|
||||||
|
|
||||||
|
|
||||||
|
- **Type**: OAuth
|
||||||
|
- **Flow**: implicit
|
||||||
|
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||||
|
- **Scopes**:
|
||||||
|
- **write:pets**: modify pets in your account
|
||||||
|
- **read:pets**: read your pets
|
||||||
|
|
||||||
|
Example
|
||||||
|
|
||||||
|
```golang
|
||||||
|
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING")
|
||||||
|
r, err := client.Service.Operation(auth, args)
|
||||||
|
```
|
||||||
|
|
||||||
|
Or via OAuth2 module to automatically refresh tokens and perform user authentication.
|
||||||
|
|
||||||
|
```golang
|
||||||
|
import "golang.org/x/oauth2"
|
||||||
|
|
||||||
|
/* Perform OAuth2 round trip request and obtain a token */
|
||||||
|
|
||||||
|
tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
|
||||||
|
auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource)
|
||||||
|
r, err := client.Service.Operation(auth, args)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Documentation for Utility Methods
|
||||||
|
|
||||||
|
Due to the fact that model structure members are all pointers, this package contains
|
||||||
|
a number of utility functions to easily obtain pointers to values of basic types.
|
||||||
|
Each of these functions takes a value of the given basic type and returns a pointer to it:
|
||||||
|
|
||||||
|
* `PtrBool`
|
||||||
|
* `PtrInt`
|
||||||
|
* `PtrInt32`
|
||||||
|
* `PtrInt64`
|
||||||
|
* `PtrFloat`
|
||||||
|
* `PtrFloat32`
|
||||||
|
* `PtrFloat64`
|
||||||
|
* `PtrString`
|
||||||
|
* `PtrTime`
|
||||||
|
|
||||||
|
## Author
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,114 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
|
||||||
|
import (
|
||||||
|
_context "context"
|
||||||
|
_ioutil "io/ioutil"
|
||||||
|
_nethttp "net/http"
|
||||||
|
_neturl "net/url"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Linger please
|
||||||
|
var (
|
||||||
|
_ _context.Context
|
||||||
|
)
|
||||||
|
|
||||||
|
// AnotherFakeApiService AnotherFakeApi service
|
||||||
|
type AnotherFakeApiService service
|
||||||
|
|
||||||
|
/*
|
||||||
|
Call123TestSpecialTags To test special tags
|
||||||
|
To test special tags and operation ID starting with number
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param client client model
|
||||||
|
@return Client
|
||||||
|
*/
|
||||||
|
func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodPatch
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
localVarReturnValue Client
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/another-fake/dummy"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{"application/json"}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
// body params
|
||||||
|
localVarPostBody = &client
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
if localVarHTTPResponse.StatusCode == 200 {
|
||||||
|
var v Client
|
||||||
|
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr.error = err.Error()
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
|
||||||
|
import (
|
||||||
|
_context "context"
|
||||||
|
_ioutil "io/ioutil"
|
||||||
|
_nethttp "net/http"
|
||||||
|
_neturl "net/url"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Linger please
|
||||||
|
var (
|
||||||
|
_ _context.Context
|
||||||
|
)
|
||||||
|
|
||||||
|
// DefaultApiService DefaultApi service
|
||||||
|
type DefaultApiService service
|
||||||
|
|
||||||
|
/*
|
||||||
|
FooGet Method for FooGet
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return InlineResponseDefault
|
||||||
|
*/
|
||||||
|
func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault, *_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
localVarReturnValue InlineResponseDefault
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/foo"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
if localVarHTTPResponse.StatusCode == 0 {
|
||||||
|
var v InlineResponseDefault
|
||||||
|
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr.error = err.Error()
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,128 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
|
||||||
|
import (
|
||||||
|
_context "context"
|
||||||
|
_ioutil "io/ioutil"
|
||||||
|
_nethttp "net/http"
|
||||||
|
_neturl "net/url"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Linger please
|
||||||
|
var (
|
||||||
|
_ _context.Context
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeClassnameTags123ApiService FakeClassnameTags123Api service
|
||||||
|
type FakeClassnameTags123ApiService service
|
||||||
|
|
||||||
|
/*
|
||||||
|
TestClassname To test class name in snake case
|
||||||
|
To test class name in snake case
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param client client model
|
||||||
|
@return Client
|
||||||
|
*/
|
||||||
|
func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodPatch
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
localVarReturnValue Client
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/fake_classname_test"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{"application/json"}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
// body params
|
||||||
|
localVarPostBody = &client
|
||||||
|
if ctx != nil {
|
||||||
|
// API Key Authentication
|
||||||
|
if auth, ok := ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
|
||||||
|
if auth, ok := auth["api_key_query"]; ok {
|
||||||
|
var key string
|
||||||
|
if auth.Prefix != "" {
|
||||||
|
key = auth.Prefix + " " + auth.Key
|
||||||
|
} else {
|
||||||
|
key = auth.Key
|
||||||
|
}
|
||||||
|
localVarQueryParams.Add("api_key_query", key)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
if localVarHTTPResponse.StatusCode == 200 {
|
||||||
|
var v Client
|
||||||
|
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr.error = err.Error()
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,818 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
|
||||||
|
import (
|
||||||
|
_context "context"
|
||||||
|
_ioutil "io/ioutil"
|
||||||
|
_nethttp "net/http"
|
||||||
|
_neturl "net/url"
|
||||||
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
"github.com/antihax/optional"
|
||||||
|
"os"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Linger please
|
||||||
|
var (
|
||||||
|
_ _context.Context
|
||||||
|
)
|
||||||
|
|
||||||
|
// PetApiService PetApi service
|
||||||
|
type PetApiService service
|
||||||
|
|
||||||
|
/*
|
||||||
|
AddPet Add a new pet to the store
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param pet Pet object that needs to be added to the store
|
||||||
|
*/
|
||||||
|
func (a *PetApiService) AddPet(ctx _context.Context, pet Pet) (*_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodPost
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/pet"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{"application/json", "application/xml"}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
// body params
|
||||||
|
localVarPostBody = &pet
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeletePetOpts Optional parameters for the method 'DeletePet'
|
||||||
|
type DeletePetOpts struct {
|
||||||
|
ApiKey optional.String
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
DeletePet Deletes a pet
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param petId Pet id to delete
|
||||||
|
* @param optional nil or *DeletePetOpts - Optional Parameters:
|
||||||
|
* @param "ApiKey" (optional.String) -
|
||||||
|
*/
|
||||||
|
func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOptionals *DeletePetOpts) (*_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodDelete
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/pet/{petId}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", petId)), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
if localVarOptionals != nil && localVarOptionals.ApiKey.IsSet() {
|
||||||
|
localVarHeaderParams["api_key"] = parameterToString(localVarOptionals.ApiKey.Value(), "")
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
FindPetsByStatus Finds Pets by status
|
||||||
|
Multiple status values can be provided with comma separated strings
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param status Status values that need to be considered for filter
|
||||||
|
@return []Pet
|
||||||
|
*/
|
||||||
|
func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) ([]Pet, *_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
localVarReturnValue []Pet
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/pet/findByStatus"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
localVarQueryParams.Add("status", parameterToString(status, "csv"))
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{"application/xml", "application/json"}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
if localVarHTTPResponse.StatusCode == 200 {
|
||||||
|
var v []Pet
|
||||||
|
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr.error = err.Error()
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
FindPetsByTags Finds Pets by tags
|
||||||
|
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param tags Tags to filter by
|
||||||
|
@return []Pet
|
||||||
|
*/
|
||||||
|
func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]Pet, *_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
localVarReturnValue []Pet
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/pet/findByTags"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
localVarQueryParams.Add("tags", parameterToString(tags, "csv"))
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{"application/xml", "application/json"}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
if localVarHTTPResponse.StatusCode == 200 {
|
||||||
|
var v []Pet
|
||||||
|
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr.error = err.Error()
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetPetById Find pet by ID
|
||||||
|
Returns a single pet
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param petId ID of pet to return
|
||||||
|
@return Pet
|
||||||
|
*/
|
||||||
|
func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
localVarReturnValue Pet
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/pet/{petId}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", petId)), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{"application/xml", "application/json"}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
if ctx != nil {
|
||||||
|
// API Key Authentication
|
||||||
|
if auth, ok := ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
|
||||||
|
if auth, ok := auth["api_key"]; ok {
|
||||||
|
var key string
|
||||||
|
if auth.Prefix != "" {
|
||||||
|
key = auth.Prefix + " " + auth.Key
|
||||||
|
} else {
|
||||||
|
key = auth.Key
|
||||||
|
}
|
||||||
|
localVarHeaderParams["api_key"] = key
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
if localVarHTTPResponse.StatusCode == 200 {
|
||||||
|
var v Pet
|
||||||
|
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr.error = err.Error()
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
UpdatePet Update an existing pet
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param pet Pet object that needs to be added to the store
|
||||||
|
*/
|
||||||
|
func (a *PetApiService) UpdatePet(ctx _context.Context, pet Pet) (*_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodPut
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/pet"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{"application/json", "application/xml"}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
// body params
|
||||||
|
localVarPostBody = &pet
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdatePetWithFormOpts Optional parameters for the method 'UpdatePetWithForm'
|
||||||
|
type UpdatePetWithFormOpts struct {
|
||||||
|
Name optional.String
|
||||||
|
Status optional.String
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
UpdatePetWithForm Updates a pet in the store with form data
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param petId ID of pet that needs to be updated
|
||||||
|
* @param optional nil or *UpdatePetWithFormOpts - Optional Parameters:
|
||||||
|
* @param "Name" (optional.String) - Updated name of the pet
|
||||||
|
* @param "Status" (optional.String) - Updated status of the pet
|
||||||
|
*/
|
||||||
|
func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodPost
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/pet/{petId}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", petId)), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
if localVarOptionals != nil && localVarOptionals.Name.IsSet() {
|
||||||
|
localVarFormParams.Add("name", parameterToString(localVarOptionals.Name.Value(), ""))
|
||||||
|
}
|
||||||
|
if localVarOptionals != nil && localVarOptionals.Status.IsSet() {
|
||||||
|
localVarFormParams.Add("status", parameterToString(localVarOptionals.Status.Value(), ""))
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// UploadFileOpts Optional parameters for the method 'UploadFile'
|
||||||
|
type UploadFileOpts struct {
|
||||||
|
AdditionalMetadata optional.String
|
||||||
|
File optional.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
UploadFile uploads an image
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param petId ID of pet to update
|
||||||
|
* @param optional nil or *UploadFileOpts - Optional Parameters:
|
||||||
|
* @param "AdditionalMetadata" (optional.String) - Additional data to pass to server
|
||||||
|
* @param "File" (optional.Interface of *os.File) - file to upload
|
||||||
|
@return ApiResponse
|
||||||
|
*/
|
||||||
|
func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodPost
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
localVarReturnValue ApiResponse
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/pet/{petId}/uploadImage"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", petId)), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{"multipart/form-data"}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
if localVarOptionals != nil && localVarOptionals.AdditionalMetadata.IsSet() {
|
||||||
|
localVarFormParams.Add("additionalMetadata", parameterToString(localVarOptionals.AdditionalMetadata.Value(), ""))
|
||||||
|
}
|
||||||
|
localVarFormFileName = "file"
|
||||||
|
var localVarFile *os.File
|
||||||
|
if localVarOptionals != nil && localVarOptionals.File.IsSet() {
|
||||||
|
localVarFileOk := false
|
||||||
|
localVarFile, localVarFileOk = localVarOptionals.File.Value().(*os.File)
|
||||||
|
if !localVarFileOk {
|
||||||
|
return localVarReturnValue, nil, reportError("file should be *os.File")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if localVarFile != nil {
|
||||||
|
fbs, _ := _ioutil.ReadAll(localVarFile)
|
||||||
|
localVarFileBytes = fbs
|
||||||
|
localVarFileName = localVarFile.Name()
|
||||||
|
localVarFile.Close()
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
if localVarHTTPResponse.StatusCode == 200 {
|
||||||
|
var v ApiResponse
|
||||||
|
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr.error = err.Error()
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// UploadFileWithRequiredFileOpts Optional parameters for the method 'UploadFileWithRequiredFile'
|
||||||
|
type UploadFileWithRequiredFileOpts struct {
|
||||||
|
AdditionalMetadata optional.String
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
UploadFileWithRequiredFile uploads an image (required)
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param petId ID of pet to update
|
||||||
|
* @param requiredFile file to upload
|
||||||
|
* @param optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters:
|
||||||
|
* @param "AdditionalMetadata" (optional.String) - Additional data to pass to server
|
||||||
|
@return ApiResponse
|
||||||
|
*/
|
||||||
|
func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodPost
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
localVarReturnValue ApiResponse
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/fake/{petId}/uploadImageWithRequiredFile"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", petId)), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{"multipart/form-data"}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
if localVarOptionals != nil && localVarOptionals.AdditionalMetadata.IsSet() {
|
||||||
|
localVarFormParams.Add("additionalMetadata", parameterToString(localVarOptionals.AdditionalMetadata.Value(), ""))
|
||||||
|
}
|
||||||
|
localVarFormFileName = "requiredFile"
|
||||||
|
localVarFile := requiredFile
|
||||||
|
if localVarFile != nil {
|
||||||
|
fbs, _ := _ioutil.ReadAll(localVarFile)
|
||||||
|
localVarFileBytes = fbs
|
||||||
|
localVarFileName = localVarFile.Name()
|
||||||
|
localVarFile.Close()
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
if localVarHTTPResponse.StatusCode == 200 {
|
||||||
|
var v ApiResponse
|
||||||
|
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr.error = err.Error()
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,376 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
|
||||||
|
import (
|
||||||
|
_context "context"
|
||||||
|
_ioutil "io/ioutil"
|
||||||
|
_nethttp "net/http"
|
||||||
|
_neturl "net/url"
|
||||||
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Linger please
|
||||||
|
var (
|
||||||
|
_ _context.Context
|
||||||
|
)
|
||||||
|
|
||||||
|
// StoreApiService StoreApi service
|
||||||
|
type StoreApiService service
|
||||||
|
|
||||||
|
/*
|
||||||
|
DeleteOrder Delete purchase order by ID
|
||||||
|
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param orderId ID of the order that needs to be deleted
|
||||||
|
*/
|
||||||
|
func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodDelete
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/store/order/{order_id}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", orderId)), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetInventory Returns pet inventories by status
|
||||||
|
Returns a map of status codes to quantities
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return map[string]int32
|
||||||
|
*/
|
||||||
|
func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, *_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
localVarReturnValue map[string]int32
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/store/inventory"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
if ctx != nil {
|
||||||
|
// API Key Authentication
|
||||||
|
if auth, ok := ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
|
||||||
|
if auth, ok := auth["api_key"]; ok {
|
||||||
|
var key string
|
||||||
|
if auth.Prefix != "" {
|
||||||
|
key = auth.Prefix + " " + auth.Key
|
||||||
|
} else {
|
||||||
|
key = auth.Key
|
||||||
|
}
|
||||||
|
localVarHeaderParams["api_key"] = key
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
if localVarHTTPResponse.StatusCode == 200 {
|
||||||
|
var v map[string]int32
|
||||||
|
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr.error = err.Error()
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetOrderById Find purchase order by ID
|
||||||
|
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param orderId ID of pet that needs to be fetched
|
||||||
|
@return Order
|
||||||
|
*/
|
||||||
|
func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Order, *_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
localVarReturnValue Order
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/store/order/{order_id}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", orderId)), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
if orderId < 1 {
|
||||||
|
return localVarReturnValue, nil, reportError("orderId must be greater than 1")
|
||||||
|
}
|
||||||
|
if orderId > 5 {
|
||||||
|
return localVarReturnValue, nil, reportError("orderId must be less than 5")
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{"application/xml", "application/json"}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
if localVarHTTPResponse.StatusCode == 200 {
|
||||||
|
var v Order
|
||||||
|
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr.error = err.Error()
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PlaceOrder Place an order for a pet
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param order order placed for purchasing the pet
|
||||||
|
@return Order
|
||||||
|
*/
|
||||||
|
func (a *StoreApiService) PlaceOrder(ctx _context.Context, order Order) (Order, *_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodPost
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
localVarReturnValue Order
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/store/order"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{"application/json"}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{"application/xml", "application/json"}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
// body params
|
||||||
|
localVarPostBody = &order
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
if localVarHTTPResponse.StatusCode == 200 {
|
||||||
|
var v Order
|
||||||
|
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr.error = err.Error()
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,606 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
|
||||||
|
import (
|
||||||
|
_context "context"
|
||||||
|
_ioutil "io/ioutil"
|
||||||
|
_nethttp "net/http"
|
||||||
|
_neturl "net/url"
|
||||||
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Linger please
|
||||||
|
var (
|
||||||
|
_ _context.Context
|
||||||
|
)
|
||||||
|
|
||||||
|
// UserApiService UserApi service
|
||||||
|
type UserApiService service
|
||||||
|
|
||||||
|
/*
|
||||||
|
CreateUser Create user
|
||||||
|
This can only be done by the logged in user.
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param user Created user object
|
||||||
|
*/
|
||||||
|
func (a *UserApiService) CreateUser(ctx _context.Context, user User) (*_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodPost
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/user"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{"application/json"}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
// body params
|
||||||
|
localVarPostBody = &user
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
CreateUsersWithArrayInput Creates list of users with given input array
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param user List of user object
|
||||||
|
*/
|
||||||
|
func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, user []User) (*_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodPost
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/user/createWithArray"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{"application/json"}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
// body params
|
||||||
|
localVarPostBody = &user
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
CreateUsersWithListInput Creates list of users with given input array
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param user List of user object
|
||||||
|
*/
|
||||||
|
func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, user []User) (*_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodPost
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/user/createWithList"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{"application/json"}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
// body params
|
||||||
|
localVarPostBody = &user
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
DeleteUser Delete user
|
||||||
|
This can only be done by the logged in user.
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param username The name that needs to be deleted
|
||||||
|
*/
|
||||||
|
func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodDelete
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/user/{username}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", username)), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetUserByName Get user by user name
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||||
|
@return User
|
||||||
|
*/
|
||||||
|
func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (User, *_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
localVarReturnValue User
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/user/{username}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", username)), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{"application/xml", "application/json"}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
if localVarHTTPResponse.StatusCode == 200 {
|
||||||
|
var v User
|
||||||
|
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr.error = err.Error()
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
LoginUser Logs user into the system
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param username The user name for login
|
||||||
|
* @param password The password for login in clear text
|
||||||
|
@return string
|
||||||
|
*/
|
||||||
|
func (a *UserApiService) LoginUser(ctx _context.Context, username string, password string) (string, *_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
localVarReturnValue string
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/user/login"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
localVarQueryParams.Add("username", parameterToString(username, ""))
|
||||||
|
localVarQueryParams.Add("password", parameterToString(password, ""))
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{"application/xml", "application/json"}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
if localVarHTTPResponse.StatusCode == 200 {
|
||||||
|
var v string
|
||||||
|
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr.error = err.Error()
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarReturnValue, localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
LogoutUser Logs out current logged in user session
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
*/
|
||||||
|
func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/user/logout"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
UpdateUser Updated user
|
||||||
|
This can only be done by the logged in user.
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param username name that need to be deleted
|
||||||
|
* @param user Updated user object
|
||||||
|
*/
|
||||||
|
func (a *UserApiService) UpdateUser(ctx _context.Context, username string, user User) (*_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodPut
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/user/{username}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", username)), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{"application/json"}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
// body params
|
||||||
|
localVarPostBody = &user
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,517 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"encoding/json"
|
||||||
|
"encoding/xml"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"mime/multipart"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
"reflect"
|
||||||
|
"regexp"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
"unicode/utf8"
|
||||||
|
|
||||||
|
"golang.org/x/oauth2"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`)
|
||||||
|
xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`)
|
||||||
|
)
|
||||||
|
|
||||||
|
// APIClient manages communication with the OpenAPI Petstore API v1.0.0
|
||||||
|
// In most cases there should be only one, shared, APIClient.
|
||||||
|
type APIClient struct {
|
||||||
|
cfg *Configuration
|
||||||
|
common service // Reuse a single struct instead of allocating one for each service on the heap.
|
||||||
|
|
||||||
|
// API Services
|
||||||
|
|
||||||
|
AnotherFakeApi *AnotherFakeApiService
|
||||||
|
|
||||||
|
DefaultApi *DefaultApiService
|
||||||
|
|
||||||
|
FakeApi *FakeApiService
|
||||||
|
|
||||||
|
FakeClassnameTags123Api *FakeClassnameTags123ApiService
|
||||||
|
|
||||||
|
PetApi *PetApiService
|
||||||
|
|
||||||
|
StoreApi *StoreApiService
|
||||||
|
|
||||||
|
UserApi *UserApiService
|
||||||
|
}
|
||||||
|
|
||||||
|
type service struct {
|
||||||
|
client *APIClient
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewAPIClient creates a new API client. Requires a userAgent string describing your application.
|
||||||
|
// optionally a custom http.Client to allow for advanced features such as caching.
|
||||||
|
func NewAPIClient(cfg *Configuration) *APIClient {
|
||||||
|
if cfg.HTTPClient == nil {
|
||||||
|
cfg.HTTPClient = http.DefaultClient
|
||||||
|
}
|
||||||
|
|
||||||
|
c := &APIClient{}
|
||||||
|
c.cfg = cfg
|
||||||
|
c.common.client = c
|
||||||
|
|
||||||
|
// API Services
|
||||||
|
c.AnotherFakeApi = (*AnotherFakeApiService)(&c.common)
|
||||||
|
c.DefaultApi = (*DefaultApiService)(&c.common)
|
||||||
|
c.FakeApi = (*FakeApiService)(&c.common)
|
||||||
|
c.FakeClassnameTags123Api = (*FakeClassnameTags123ApiService)(&c.common)
|
||||||
|
c.PetApi = (*PetApiService)(&c.common)
|
||||||
|
c.StoreApi = (*StoreApiService)(&c.common)
|
||||||
|
c.UserApi = (*UserApiService)(&c.common)
|
||||||
|
|
||||||
|
return c
|
||||||
|
}
|
||||||
|
|
||||||
|
func atoi(in string) (int, error) {
|
||||||
|
return strconv.Atoi(in)
|
||||||
|
}
|
||||||
|
|
||||||
|
// selectHeaderContentType select a content type from the available list.
|
||||||
|
func selectHeaderContentType(contentTypes []string) string {
|
||||||
|
if len(contentTypes) == 0 {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
if contains(contentTypes, "application/json") {
|
||||||
|
return "application/json"
|
||||||
|
}
|
||||||
|
return contentTypes[0] // use the first content type specified in 'consumes'
|
||||||
|
}
|
||||||
|
|
||||||
|
// selectHeaderAccept join all accept types and return
|
||||||
|
func selectHeaderAccept(accepts []string) string {
|
||||||
|
if len(accepts) == 0 {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
if contains(accepts, "application/json") {
|
||||||
|
return "application/json"
|
||||||
|
}
|
||||||
|
|
||||||
|
return strings.Join(accepts, ",")
|
||||||
|
}
|
||||||
|
|
||||||
|
// contains is a case insenstive match, finding needle in a haystack
|
||||||
|
func contains(haystack []string, needle string) bool {
|
||||||
|
for _, a := range haystack {
|
||||||
|
if strings.ToLower(a) == strings.ToLower(needle) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verify optional parameters are of the correct type.
|
||||||
|
func typeCheckParameter(obj interface{}, expected string, name string) error {
|
||||||
|
// Make sure there is an object.
|
||||||
|
if obj == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check the type is as expected.
|
||||||
|
if reflect.TypeOf(obj).String() != expected {
|
||||||
|
return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String())
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// parameterToString convert interface{} parameters to string, using a delimiter if format is provided.
|
||||||
|
func parameterToString(obj interface{}, collectionFormat string) string {
|
||||||
|
var delimiter string
|
||||||
|
|
||||||
|
switch collectionFormat {
|
||||||
|
case "pipes":
|
||||||
|
delimiter = "|"
|
||||||
|
case "ssv":
|
||||||
|
delimiter = " "
|
||||||
|
case "tsv":
|
||||||
|
delimiter = "\t"
|
||||||
|
case "csv":
|
||||||
|
delimiter = ","
|
||||||
|
}
|
||||||
|
|
||||||
|
if reflect.TypeOf(obj).Kind() == reflect.Slice {
|
||||||
|
return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]")
|
||||||
|
} else if t, ok := obj.(time.Time); ok {
|
||||||
|
return t.Format(time.RFC3339)
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Sprintf("%v", obj)
|
||||||
|
}
|
||||||
|
|
||||||
|
// helper for converting interface{} parameters to json strings
|
||||||
|
func parameterToJson(obj interface{}) (string, error) {
|
||||||
|
jsonBuf, err := json.Marshal(obj)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
return string(jsonBuf), err
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// callAPI do the request.
|
||||||
|
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
|
||||||
|
return c.cfg.HTTPClient.Do(request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ChangeBasePath changes base path to allow switching to mocks
|
||||||
|
func (c *APIClient) ChangeBasePath(path string) {
|
||||||
|
c.cfg.BasePath = path
|
||||||
|
}
|
||||||
|
|
||||||
|
// prepareRequest build the request
|
||||||
|
func (c *APIClient) prepareRequest(
|
||||||
|
ctx context.Context,
|
||||||
|
path string, method string,
|
||||||
|
postBody interface{},
|
||||||
|
headerParams map[string]string,
|
||||||
|
queryParams url.Values,
|
||||||
|
formParams url.Values,
|
||||||
|
formFileName string,
|
||||||
|
fileName string,
|
||||||
|
fileBytes []byte) (localVarRequest *http.Request, err error) {
|
||||||
|
|
||||||
|
var body *bytes.Buffer
|
||||||
|
|
||||||
|
// Detect postBody type and post.
|
||||||
|
if postBody != nil {
|
||||||
|
contentType := headerParams["Content-Type"]
|
||||||
|
if contentType == "" {
|
||||||
|
contentType = detectContentType(postBody)
|
||||||
|
headerParams["Content-Type"] = contentType
|
||||||
|
}
|
||||||
|
|
||||||
|
body, err = setBody(postBody, contentType)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// add form parameters and file if available.
|
||||||
|
if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") {
|
||||||
|
if body != nil {
|
||||||
|
return nil, errors.New("Cannot specify postBody and multipart form at the same time.")
|
||||||
|
}
|
||||||
|
body = &bytes.Buffer{}
|
||||||
|
w := multipart.NewWriter(body)
|
||||||
|
|
||||||
|
for k, v := range formParams {
|
||||||
|
for _, iv := range v {
|
||||||
|
if strings.HasPrefix(k, "@") { // file
|
||||||
|
err = addFile(w, k[1:], iv)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
} else { // form value
|
||||||
|
w.WriteField(k, iv)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if len(fileBytes) > 0 && fileName != "" {
|
||||||
|
w.Boundary()
|
||||||
|
//_, fileNm := filepath.Split(fileName)
|
||||||
|
part, err := w.CreateFormFile(formFileName, filepath.Base(fileName))
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
_, err = part.Write(fileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the Boundary in the Content-Type
|
||||||
|
headerParams["Content-Type"] = w.FormDataContentType()
|
||||||
|
|
||||||
|
// Set Content-Length
|
||||||
|
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
|
||||||
|
w.Close()
|
||||||
|
}
|
||||||
|
|
||||||
|
if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 {
|
||||||
|
if body != nil {
|
||||||
|
return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.")
|
||||||
|
}
|
||||||
|
body = &bytes.Buffer{}
|
||||||
|
body.WriteString(formParams.Encode())
|
||||||
|
// Set Content-Length
|
||||||
|
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
|
||||||
|
}
|
||||||
|
|
||||||
|
// Setup path and query parameters
|
||||||
|
url, err := url.Parse(path)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Override request host, if applicable
|
||||||
|
if c.cfg.Host != "" {
|
||||||
|
url.Host = c.cfg.Host
|
||||||
|
}
|
||||||
|
|
||||||
|
// Override request scheme, if applicable
|
||||||
|
if c.cfg.Scheme != "" {
|
||||||
|
url.Scheme = c.cfg.Scheme
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adding Query Param
|
||||||
|
query := url.Query()
|
||||||
|
for k, v := range queryParams {
|
||||||
|
for _, iv := range v {
|
||||||
|
query.Add(k, iv)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Encode the parameters.
|
||||||
|
url.RawQuery = query.Encode()
|
||||||
|
|
||||||
|
// Generate a new request
|
||||||
|
if body != nil {
|
||||||
|
localVarRequest, err = http.NewRequest(method, url.String(), body)
|
||||||
|
} else {
|
||||||
|
localVarRequest, err = http.NewRequest(method, url.String(), nil)
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// add header parameters, if any
|
||||||
|
if len(headerParams) > 0 {
|
||||||
|
headers := http.Header{}
|
||||||
|
for h, v := range headerParams {
|
||||||
|
headers.Set(h, v)
|
||||||
|
}
|
||||||
|
localVarRequest.Header = headers
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add the user agent to the request.
|
||||||
|
localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent)
|
||||||
|
|
||||||
|
if ctx != nil {
|
||||||
|
// add context to the request
|
||||||
|
localVarRequest = localVarRequest.WithContext(ctx)
|
||||||
|
|
||||||
|
// Walk through any authentication.
|
||||||
|
|
||||||
|
// OAuth2 authentication
|
||||||
|
if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok {
|
||||||
|
// We were able to grab an oauth2 token from the context
|
||||||
|
var latestToken *oauth2.Token
|
||||||
|
if latestToken, err = tok.Token(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
latestToken.SetAuthHeader(localVarRequest)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Basic HTTP Authentication
|
||||||
|
if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok {
|
||||||
|
localVarRequest.SetBasicAuth(auth.UserName, auth.Password)
|
||||||
|
}
|
||||||
|
|
||||||
|
// AccessToken Authentication
|
||||||
|
if auth, ok := ctx.Value(ContextAccessToken).(string); ok {
|
||||||
|
localVarRequest.Header.Add("Authorization", "Bearer "+auth)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for header, value := range c.cfg.DefaultHeader {
|
||||||
|
localVarRequest.Header.Add(header, value)
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarRequest, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
|
||||||
|
if s, ok := v.(*string); ok {
|
||||||
|
*s = string(b)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
if xmlCheck.MatchString(contentType) {
|
||||||
|
if err = xml.Unmarshal(b, v); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
if jsonCheck.MatchString(contentType) {
|
||||||
|
if err = json.Unmarshal(b, v); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return errors.New("undefined response type")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add a file to the multipart request
|
||||||
|
func addFile(w *multipart.Writer, fieldName, path string) error {
|
||||||
|
file, err := os.Open(path)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer file.Close()
|
||||||
|
|
||||||
|
part, err := w.CreateFormFile(fieldName, filepath.Base(path))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
_, err = io.Copy(part, file)
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prevent trying to import "fmt"
|
||||||
|
func reportError(format string, a ...interface{}) error {
|
||||||
|
return fmt.Errorf(format, a...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set request body from an interface{}
|
||||||
|
func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) {
|
||||||
|
if bodyBuf == nil {
|
||||||
|
bodyBuf = &bytes.Buffer{}
|
||||||
|
}
|
||||||
|
|
||||||
|
if reader, ok := body.(io.Reader); ok {
|
||||||
|
_, err = bodyBuf.ReadFrom(reader)
|
||||||
|
} else if b, ok := body.([]byte); ok {
|
||||||
|
_, err = bodyBuf.Write(b)
|
||||||
|
} else if s, ok := body.(string); ok {
|
||||||
|
_, err = bodyBuf.WriteString(s)
|
||||||
|
} else if s, ok := body.(*string); ok {
|
||||||
|
_, err = bodyBuf.WriteString(*s)
|
||||||
|
} else if jsonCheck.MatchString(contentType) {
|
||||||
|
err = json.NewEncoder(bodyBuf).Encode(body)
|
||||||
|
} else if xmlCheck.MatchString(contentType) {
|
||||||
|
err = xml.NewEncoder(bodyBuf).Encode(body)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if bodyBuf.Len() == 0 {
|
||||||
|
err = fmt.Errorf("Invalid body type %s\n", contentType)
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return bodyBuf, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// detectContentType method is used to figure out `Request.Body` content type for request header
|
||||||
|
func detectContentType(body interface{}) string {
|
||||||
|
contentType := "text/plain; charset=utf-8"
|
||||||
|
kind := reflect.TypeOf(body).Kind()
|
||||||
|
|
||||||
|
switch kind {
|
||||||
|
case reflect.Struct, reflect.Map, reflect.Ptr:
|
||||||
|
contentType = "application/json; charset=utf-8"
|
||||||
|
case reflect.String:
|
||||||
|
contentType = "text/plain; charset=utf-8"
|
||||||
|
default:
|
||||||
|
if b, ok := body.([]byte); ok {
|
||||||
|
contentType = http.DetectContentType(b)
|
||||||
|
} else if kind == reflect.Slice {
|
||||||
|
contentType = "application/json; charset=utf-8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return contentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go
|
||||||
|
type cacheControl map[string]string
|
||||||
|
|
||||||
|
func parseCacheControl(headers http.Header) cacheControl {
|
||||||
|
cc := cacheControl{}
|
||||||
|
ccHeader := headers.Get("Cache-Control")
|
||||||
|
for _, part := range strings.Split(ccHeader, ",") {
|
||||||
|
part = strings.Trim(part, " ")
|
||||||
|
if part == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if strings.ContainsRune(part, '=') {
|
||||||
|
keyval := strings.Split(part, "=")
|
||||||
|
cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",")
|
||||||
|
} else {
|
||||||
|
cc[part] = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cc
|
||||||
|
}
|
||||||
|
|
||||||
|
// CacheExpires helper function to determine remaining time before repeating a request.
|
||||||
|
func CacheExpires(r *http.Response) time.Time {
|
||||||
|
// Figure out when the cache expires.
|
||||||
|
var expires time.Time
|
||||||
|
now, err := time.Parse(time.RFC1123, r.Header.Get("date"))
|
||||||
|
if err != nil {
|
||||||
|
return time.Now()
|
||||||
|
}
|
||||||
|
respCacheControl := parseCacheControl(r.Header)
|
||||||
|
|
||||||
|
if maxAge, ok := respCacheControl["max-age"]; ok {
|
||||||
|
lifetime, err := time.ParseDuration(maxAge + "s")
|
||||||
|
if err != nil {
|
||||||
|
expires = now
|
||||||
|
} else {
|
||||||
|
expires = now.Add(lifetime)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
expiresHeader := r.Header.Get("Expires")
|
||||||
|
if expiresHeader != "" {
|
||||||
|
expires, err = time.Parse(time.RFC1123, expiresHeader)
|
||||||
|
if err != nil {
|
||||||
|
expires = now
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return expires
|
||||||
|
}
|
||||||
|
|
||||||
|
func strlen(s string) int {
|
||||||
|
return utf8.RuneCountInString(s)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GenericOpenAPIError Provides access to the body, error and model on returned errors.
|
||||||
|
type GenericOpenAPIError struct {
|
||||||
|
body []byte
|
||||||
|
error string
|
||||||
|
model interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Error returns non-empty string if there was an error.
|
||||||
|
func (e GenericOpenAPIError) Error() string {
|
||||||
|
return e.error
|
||||||
|
}
|
||||||
|
|
||||||
|
// Body returns the raw bytes of the response
|
||||||
|
func (e GenericOpenAPIError) Body() []byte {
|
||||||
|
return e.body
|
||||||
|
}
|
||||||
|
|
||||||
|
// Model returns the unpacked model of the error
|
||||||
|
func (e GenericOpenAPIError) Model() interface{} {
|
||||||
|
return e.model
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// contextKeys are used to identify the type of value in the context.
|
||||||
|
// Since these are string, it is possible to get a short description of the
|
||||||
|
// context key for logging and debugging using key.String().
|
||||||
|
|
||||||
|
type contextKey string
|
||||||
|
|
||||||
|
func (c contextKey) String() string {
|
||||||
|
return "auth " + string(c)
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
|
||||||
|
ContextOAuth2 = contextKey("token")
|
||||||
|
|
||||||
|
// ContextBasicAuth takes BasicAuth as authentication for the request.
|
||||||
|
ContextBasicAuth = contextKey("basic")
|
||||||
|
|
||||||
|
// ContextAccessToken takes a string oauth2 access token as authentication for the request.
|
||||||
|
ContextAccessToken = contextKey("accesstoken")
|
||||||
|
|
||||||
|
// ContextAPIKeys takes a string apikey as authentication for the request
|
||||||
|
ContextAPIKeys = contextKey("apiKeys")
|
||||||
|
)
|
||||||
|
|
||||||
|
// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
|
||||||
|
type BasicAuth struct {
|
||||||
|
UserName string `json:"userName,omitempty"`
|
||||||
|
Password string `json:"password,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// APIKey provides API key based authentication to a request passed via context using ContextAPIKey
|
||||||
|
type APIKey struct {
|
||||||
|
Key string
|
||||||
|
Prefix string
|
||||||
|
}
|
||||||
|
|
||||||
|
// Configuration stores the configuration of the API client
|
||||||
|
type Configuration struct {
|
||||||
|
BasePath string `json:"basePath,omitempty"`
|
||||||
|
Host string `json:"host,omitempty"`
|
||||||
|
Scheme string `json:"scheme,omitempty"`
|
||||||
|
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
|
||||||
|
UserAgent string `json:"userAgent,omitempty"`
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewConfiguration returns a new Configuration object
|
||||||
|
func NewConfiguration() *Configuration {
|
||||||
|
cfg := &Configuration{
|
||||||
|
BasePath: "http://petstore.swagger.io:80/v2",
|
||||||
|
DefaultHeader: make(map[string]string),
|
||||||
|
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||||
|
}
|
||||||
|
return cfg
|
||||||
|
}
|
||||||
|
|
||||||
|
// AddDefaultHeader adds a new HTTP header to the default header in the request
|
||||||
|
func (c *Configuration) AddDefaultHeader(key string, value string) {
|
||||||
|
c.DefaultHeader[key] = value
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# AdditionalPropertiesClass
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**MapProperty** | Pointer to **map[string]string** | | [optional]
|
||||||
|
**MapOfMapProperty** | Pointer to [**map[string]map[string]string**](map.md) | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetMapProperty
|
||||||
|
|
||||||
|
`func (o *AdditionalPropertiesClass) GetMapProperty() map[string]string`
|
||||||
|
|
||||||
|
GetMapProperty returns the MapProperty field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetMapPropertyOk
|
||||||
|
|
||||||
|
`func (o *AdditionalPropertiesClass) GetMapPropertyOk() (map[string]string, bool)`
|
||||||
|
|
||||||
|
GetMapPropertyOk returns a tuple with the MapProperty field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasMapProperty
|
||||||
|
|
||||||
|
`func (o *AdditionalPropertiesClass) HasMapProperty() bool`
|
||||||
|
|
||||||
|
HasMapProperty returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetMapProperty
|
||||||
|
|
||||||
|
`func (o *AdditionalPropertiesClass) SetMapProperty(v map[string]string)`
|
||||||
|
|
||||||
|
SetMapProperty gets a reference to the given map[string]string and assigns it to the MapProperty field.
|
||||||
|
|
||||||
|
### GetMapOfMapProperty
|
||||||
|
|
||||||
|
`func (o *AdditionalPropertiesClass) GetMapOfMapProperty() map[string]map[string]string`
|
||||||
|
|
||||||
|
GetMapOfMapProperty returns the MapOfMapProperty field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetMapOfMapPropertyOk
|
||||||
|
|
||||||
|
`func (o *AdditionalPropertiesClass) GetMapOfMapPropertyOk() (map[string]map[string]string, bool)`
|
||||||
|
|
||||||
|
GetMapOfMapPropertyOk returns a tuple with the MapOfMapProperty field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasMapOfMapProperty
|
||||||
|
|
||||||
|
`func (o *AdditionalPropertiesClass) HasMapOfMapProperty() bool`
|
||||||
|
|
||||||
|
HasMapOfMapProperty returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetMapOfMapProperty
|
||||||
|
|
||||||
|
`func (o *AdditionalPropertiesClass) SetMapOfMapProperty(v map[string]map[string]string)`
|
||||||
|
|
||||||
|
SetMapOfMapProperty gets a reference to the given map[string]map[string]string and assigns it to the MapOfMapProperty field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# Animal
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**ClassName** | Pointer to **string** | |
|
||||||
|
**Color** | Pointer to **string** | | [optional] [default to red]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetClassName
|
||||||
|
|
||||||
|
`func (o *Animal) GetClassName() string`
|
||||||
|
|
||||||
|
GetClassName returns the ClassName field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetClassNameOk
|
||||||
|
|
||||||
|
`func (o *Animal) GetClassNameOk() (string, bool)`
|
||||||
|
|
||||||
|
GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasClassName
|
||||||
|
|
||||||
|
`func (o *Animal) HasClassName() bool`
|
||||||
|
|
||||||
|
HasClassName returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetClassName
|
||||||
|
|
||||||
|
`func (o *Animal) SetClassName(v string)`
|
||||||
|
|
||||||
|
SetClassName gets a reference to the given string and assigns it to the ClassName field.
|
||||||
|
|
||||||
|
### GetColor
|
||||||
|
|
||||||
|
`func (o *Animal) GetColor() string`
|
||||||
|
|
||||||
|
GetColor returns the Color field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetColorOk
|
||||||
|
|
||||||
|
`func (o *Animal) GetColorOk() (string, bool)`
|
||||||
|
|
||||||
|
GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasColor
|
||||||
|
|
||||||
|
`func (o *Animal) HasColor() bool`
|
||||||
|
|
||||||
|
HasColor returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetColor
|
||||||
|
|
||||||
|
`func (o *Animal) SetColor(v string)`
|
||||||
|
|
||||||
|
SetColor gets a reference to the given string and assigns it to the Color field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
# \AnotherFakeApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**Call123TestSpecialTags**](AnotherFakeApi.md#Call123TestSpecialTags) | **Patch** /another-fake/dummy | To test special tags
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Call123TestSpecialTags
|
||||||
|
|
||||||
|
> Client Call123TestSpecialTags(ctx, client)
|
||||||
|
To test special tags
|
||||||
|
|
||||||
|
To test special tags and operation ID starting with number
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**client** | [**Client**](Client.md)| client model |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Client**](Client.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
# ApiResponse
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Code** | Pointer to **int32** | | [optional]
|
||||||
|
**Type** | Pointer to **string** | | [optional]
|
||||||
|
**Message** | Pointer to **string** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetCode
|
||||||
|
|
||||||
|
`func (o *ApiResponse) GetCode() int32`
|
||||||
|
|
||||||
|
GetCode returns the Code field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetCodeOk
|
||||||
|
|
||||||
|
`func (o *ApiResponse) GetCodeOk() (int32, bool)`
|
||||||
|
|
||||||
|
GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasCode
|
||||||
|
|
||||||
|
`func (o *ApiResponse) HasCode() bool`
|
||||||
|
|
||||||
|
HasCode returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetCode
|
||||||
|
|
||||||
|
`func (o *ApiResponse) SetCode(v int32)`
|
||||||
|
|
||||||
|
SetCode gets a reference to the given int32 and assigns it to the Code field.
|
||||||
|
|
||||||
|
### GetType
|
||||||
|
|
||||||
|
`func (o *ApiResponse) GetType() string`
|
||||||
|
|
||||||
|
GetType returns the Type field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetTypeOk
|
||||||
|
|
||||||
|
`func (o *ApiResponse) GetTypeOk() (string, bool)`
|
||||||
|
|
||||||
|
GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasType
|
||||||
|
|
||||||
|
`func (o *ApiResponse) HasType() bool`
|
||||||
|
|
||||||
|
HasType returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetType
|
||||||
|
|
||||||
|
`func (o *ApiResponse) SetType(v string)`
|
||||||
|
|
||||||
|
SetType gets a reference to the given string and assigns it to the Type field.
|
||||||
|
|
||||||
|
### GetMessage
|
||||||
|
|
||||||
|
`func (o *ApiResponse) GetMessage() string`
|
||||||
|
|
||||||
|
GetMessage returns the Message field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetMessageOk
|
||||||
|
|
||||||
|
`func (o *ApiResponse) GetMessageOk() (string, bool)`
|
||||||
|
|
||||||
|
GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasMessage
|
||||||
|
|
||||||
|
`func (o *ApiResponse) HasMessage() bool`
|
||||||
|
|
||||||
|
HasMessage returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetMessage
|
||||||
|
|
||||||
|
`func (o *ApiResponse) SetMessage(v string)`
|
||||||
|
|
||||||
|
SetMessage gets a reference to the given string and assigns it to the Message field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# ArrayOfArrayOfNumberOnly
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**ArrayArrayNumber** | Pointer to [**[][]float32**](array.md) | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetArrayArrayNumber
|
||||||
|
|
||||||
|
`func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32`
|
||||||
|
|
||||||
|
GetArrayArrayNumber returns the ArrayArrayNumber field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetArrayArrayNumberOk
|
||||||
|
|
||||||
|
`func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() ([][]float32, bool)`
|
||||||
|
|
||||||
|
GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasArrayArrayNumber
|
||||||
|
|
||||||
|
`func (o *ArrayOfArrayOfNumberOnly) HasArrayArrayNumber() bool`
|
||||||
|
|
||||||
|
HasArrayArrayNumber returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetArrayArrayNumber
|
||||||
|
|
||||||
|
`func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32)`
|
||||||
|
|
||||||
|
SetArrayArrayNumber gets a reference to the given [][]float32 and assigns it to the ArrayArrayNumber field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# ArrayOfNumberOnly
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**ArrayNumber** | Pointer to **[]float32** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetArrayNumber
|
||||||
|
|
||||||
|
`func (o *ArrayOfNumberOnly) GetArrayNumber() []float32`
|
||||||
|
|
||||||
|
GetArrayNumber returns the ArrayNumber field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetArrayNumberOk
|
||||||
|
|
||||||
|
`func (o *ArrayOfNumberOnly) GetArrayNumberOk() ([]float32, bool)`
|
||||||
|
|
||||||
|
GetArrayNumberOk returns a tuple with the ArrayNumber field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasArrayNumber
|
||||||
|
|
||||||
|
`func (o *ArrayOfNumberOnly) HasArrayNumber() bool`
|
||||||
|
|
||||||
|
HasArrayNumber returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetArrayNumber
|
||||||
|
|
||||||
|
`func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32)`
|
||||||
|
|
||||||
|
SetArrayNumber gets a reference to the given []float32 and assigns it to the ArrayNumber field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
# ArrayTest
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**ArrayOfString** | Pointer to **[]string** | | [optional]
|
||||||
|
**ArrayArrayOfInteger** | Pointer to [**[][]int64**](array.md) | | [optional]
|
||||||
|
**ArrayArrayOfModel** | Pointer to [**[][]ReadOnlyFirst**](array.md) | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetArrayOfString
|
||||||
|
|
||||||
|
`func (o *ArrayTest) GetArrayOfString() []string`
|
||||||
|
|
||||||
|
GetArrayOfString returns the ArrayOfString field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetArrayOfStringOk
|
||||||
|
|
||||||
|
`func (o *ArrayTest) GetArrayOfStringOk() ([]string, bool)`
|
||||||
|
|
||||||
|
GetArrayOfStringOk returns a tuple with the ArrayOfString field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasArrayOfString
|
||||||
|
|
||||||
|
`func (o *ArrayTest) HasArrayOfString() bool`
|
||||||
|
|
||||||
|
HasArrayOfString returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetArrayOfString
|
||||||
|
|
||||||
|
`func (o *ArrayTest) SetArrayOfString(v []string)`
|
||||||
|
|
||||||
|
SetArrayOfString gets a reference to the given []string and assigns it to the ArrayOfString field.
|
||||||
|
|
||||||
|
### GetArrayArrayOfInteger
|
||||||
|
|
||||||
|
`func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64`
|
||||||
|
|
||||||
|
GetArrayArrayOfInteger returns the ArrayArrayOfInteger field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetArrayArrayOfIntegerOk
|
||||||
|
|
||||||
|
`func (o *ArrayTest) GetArrayArrayOfIntegerOk() ([][]int64, bool)`
|
||||||
|
|
||||||
|
GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasArrayArrayOfInteger
|
||||||
|
|
||||||
|
`func (o *ArrayTest) HasArrayArrayOfInteger() bool`
|
||||||
|
|
||||||
|
HasArrayArrayOfInteger returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetArrayArrayOfInteger
|
||||||
|
|
||||||
|
`func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64)`
|
||||||
|
|
||||||
|
SetArrayArrayOfInteger gets a reference to the given [][]int64 and assigns it to the ArrayArrayOfInteger field.
|
||||||
|
|
||||||
|
### GetArrayArrayOfModel
|
||||||
|
|
||||||
|
`func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst`
|
||||||
|
|
||||||
|
GetArrayArrayOfModel returns the ArrayArrayOfModel field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetArrayArrayOfModelOk
|
||||||
|
|
||||||
|
`func (o *ArrayTest) GetArrayArrayOfModelOk() ([][]ReadOnlyFirst, bool)`
|
||||||
|
|
||||||
|
GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasArrayArrayOfModel
|
||||||
|
|
||||||
|
`func (o *ArrayTest) HasArrayArrayOfModel() bool`
|
||||||
|
|
||||||
|
HasArrayArrayOfModel returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetArrayArrayOfModel
|
||||||
|
|
||||||
|
`func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst)`
|
||||||
|
|
||||||
|
SetArrayArrayOfModel gets a reference to the given [][]ReadOnlyFirst and assigns it to the ArrayArrayOfModel field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
# Capitalization
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**SmallCamel** | Pointer to **string** | | [optional]
|
||||||
|
**CapitalCamel** | Pointer to **string** | | [optional]
|
||||||
|
**SmallSnake** | Pointer to **string** | | [optional]
|
||||||
|
**CapitalSnake** | Pointer to **string** | | [optional]
|
||||||
|
**SCAETHFlowPoints** | Pointer to **string** | | [optional]
|
||||||
|
**ATT_NAME** | Pointer to **string** | Name of the pet | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetSmallCamel
|
||||||
|
|
||||||
|
`func (o *Capitalization) GetSmallCamel() string`
|
||||||
|
|
||||||
|
GetSmallCamel returns the SmallCamel field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetSmallCamelOk
|
||||||
|
|
||||||
|
`func (o *Capitalization) GetSmallCamelOk() (string, bool)`
|
||||||
|
|
||||||
|
GetSmallCamelOk returns a tuple with the SmallCamel field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasSmallCamel
|
||||||
|
|
||||||
|
`func (o *Capitalization) HasSmallCamel() bool`
|
||||||
|
|
||||||
|
HasSmallCamel returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetSmallCamel
|
||||||
|
|
||||||
|
`func (o *Capitalization) SetSmallCamel(v string)`
|
||||||
|
|
||||||
|
SetSmallCamel gets a reference to the given string and assigns it to the SmallCamel field.
|
||||||
|
|
||||||
|
### GetCapitalCamel
|
||||||
|
|
||||||
|
`func (o *Capitalization) GetCapitalCamel() string`
|
||||||
|
|
||||||
|
GetCapitalCamel returns the CapitalCamel field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetCapitalCamelOk
|
||||||
|
|
||||||
|
`func (o *Capitalization) GetCapitalCamelOk() (string, bool)`
|
||||||
|
|
||||||
|
GetCapitalCamelOk returns a tuple with the CapitalCamel field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasCapitalCamel
|
||||||
|
|
||||||
|
`func (o *Capitalization) HasCapitalCamel() bool`
|
||||||
|
|
||||||
|
HasCapitalCamel returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetCapitalCamel
|
||||||
|
|
||||||
|
`func (o *Capitalization) SetCapitalCamel(v string)`
|
||||||
|
|
||||||
|
SetCapitalCamel gets a reference to the given string and assigns it to the CapitalCamel field.
|
||||||
|
|
||||||
|
### GetSmallSnake
|
||||||
|
|
||||||
|
`func (o *Capitalization) GetSmallSnake() string`
|
||||||
|
|
||||||
|
GetSmallSnake returns the SmallSnake field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetSmallSnakeOk
|
||||||
|
|
||||||
|
`func (o *Capitalization) GetSmallSnakeOk() (string, bool)`
|
||||||
|
|
||||||
|
GetSmallSnakeOk returns a tuple with the SmallSnake field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasSmallSnake
|
||||||
|
|
||||||
|
`func (o *Capitalization) HasSmallSnake() bool`
|
||||||
|
|
||||||
|
HasSmallSnake returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetSmallSnake
|
||||||
|
|
||||||
|
`func (o *Capitalization) SetSmallSnake(v string)`
|
||||||
|
|
||||||
|
SetSmallSnake gets a reference to the given string and assigns it to the SmallSnake field.
|
||||||
|
|
||||||
|
### GetCapitalSnake
|
||||||
|
|
||||||
|
`func (o *Capitalization) GetCapitalSnake() string`
|
||||||
|
|
||||||
|
GetCapitalSnake returns the CapitalSnake field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetCapitalSnakeOk
|
||||||
|
|
||||||
|
`func (o *Capitalization) GetCapitalSnakeOk() (string, bool)`
|
||||||
|
|
||||||
|
GetCapitalSnakeOk returns a tuple with the CapitalSnake field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasCapitalSnake
|
||||||
|
|
||||||
|
`func (o *Capitalization) HasCapitalSnake() bool`
|
||||||
|
|
||||||
|
HasCapitalSnake returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetCapitalSnake
|
||||||
|
|
||||||
|
`func (o *Capitalization) SetCapitalSnake(v string)`
|
||||||
|
|
||||||
|
SetCapitalSnake gets a reference to the given string and assigns it to the CapitalSnake field.
|
||||||
|
|
||||||
|
### GetSCAETHFlowPoints
|
||||||
|
|
||||||
|
`func (o *Capitalization) GetSCAETHFlowPoints() string`
|
||||||
|
|
||||||
|
GetSCAETHFlowPoints returns the SCAETHFlowPoints field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetSCAETHFlowPointsOk
|
||||||
|
|
||||||
|
`func (o *Capitalization) GetSCAETHFlowPointsOk() (string, bool)`
|
||||||
|
|
||||||
|
GetSCAETHFlowPointsOk returns a tuple with the SCAETHFlowPoints field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasSCAETHFlowPoints
|
||||||
|
|
||||||
|
`func (o *Capitalization) HasSCAETHFlowPoints() bool`
|
||||||
|
|
||||||
|
HasSCAETHFlowPoints returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetSCAETHFlowPoints
|
||||||
|
|
||||||
|
`func (o *Capitalization) SetSCAETHFlowPoints(v string)`
|
||||||
|
|
||||||
|
SetSCAETHFlowPoints gets a reference to the given string and assigns it to the SCAETHFlowPoints field.
|
||||||
|
|
||||||
|
### GetATT_NAME
|
||||||
|
|
||||||
|
`func (o *Capitalization) GetATT_NAME() string`
|
||||||
|
|
||||||
|
GetATT_NAME returns the ATT_NAME field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetATT_NAMEOk
|
||||||
|
|
||||||
|
`func (o *Capitalization) GetATT_NAMEOk() (string, bool)`
|
||||||
|
|
||||||
|
GetATT_NAMEOk returns a tuple with the ATT_NAME field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasATT_NAME
|
||||||
|
|
||||||
|
`func (o *Capitalization) HasATT_NAME() bool`
|
||||||
|
|
||||||
|
HasATT_NAME returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetATT_NAME
|
||||||
|
|
||||||
|
`func (o *Capitalization) SetATT_NAME(v string)`
|
||||||
|
|
||||||
|
SetATT_NAME gets a reference to the given string and assigns it to the ATT_NAME field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
# Cat
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**ClassName** | Pointer to **string** | |
|
||||||
|
**Color** | Pointer to **string** | | [optional] [default to red]
|
||||||
|
**Declawed** | Pointer to **bool** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetClassName
|
||||||
|
|
||||||
|
`func (o *Cat) GetClassName() string`
|
||||||
|
|
||||||
|
GetClassName returns the ClassName field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetClassNameOk
|
||||||
|
|
||||||
|
`func (o *Cat) GetClassNameOk() (string, bool)`
|
||||||
|
|
||||||
|
GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasClassName
|
||||||
|
|
||||||
|
`func (o *Cat) HasClassName() bool`
|
||||||
|
|
||||||
|
HasClassName returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetClassName
|
||||||
|
|
||||||
|
`func (o *Cat) SetClassName(v string)`
|
||||||
|
|
||||||
|
SetClassName gets a reference to the given string and assigns it to the ClassName field.
|
||||||
|
|
||||||
|
### GetColor
|
||||||
|
|
||||||
|
`func (o *Cat) GetColor() string`
|
||||||
|
|
||||||
|
GetColor returns the Color field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetColorOk
|
||||||
|
|
||||||
|
`func (o *Cat) GetColorOk() (string, bool)`
|
||||||
|
|
||||||
|
GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasColor
|
||||||
|
|
||||||
|
`func (o *Cat) HasColor() bool`
|
||||||
|
|
||||||
|
HasColor returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetColor
|
||||||
|
|
||||||
|
`func (o *Cat) SetColor(v string)`
|
||||||
|
|
||||||
|
SetColor gets a reference to the given string and assigns it to the Color field.
|
||||||
|
|
||||||
|
### GetDeclawed
|
||||||
|
|
||||||
|
`func (o *Cat) GetDeclawed() bool`
|
||||||
|
|
||||||
|
GetDeclawed returns the Declawed field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetDeclawedOk
|
||||||
|
|
||||||
|
`func (o *Cat) GetDeclawedOk() (bool, bool)`
|
||||||
|
|
||||||
|
GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasDeclawed
|
||||||
|
|
||||||
|
`func (o *Cat) HasDeclawed() bool`
|
||||||
|
|
||||||
|
HasDeclawed returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetDeclawed
|
||||||
|
|
||||||
|
`func (o *Cat) SetDeclawed(v bool)`
|
||||||
|
|
||||||
|
SetDeclawed gets a reference to the given bool and assigns it to the Declawed field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# CatAllOf
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Declawed** | Pointer to **bool** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetDeclawed
|
||||||
|
|
||||||
|
`func (o *CatAllOf) GetDeclawed() bool`
|
||||||
|
|
||||||
|
GetDeclawed returns the Declawed field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetDeclawedOk
|
||||||
|
|
||||||
|
`func (o *CatAllOf) GetDeclawedOk() (bool, bool)`
|
||||||
|
|
||||||
|
GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasDeclawed
|
||||||
|
|
||||||
|
`func (o *CatAllOf) HasDeclawed() bool`
|
||||||
|
|
||||||
|
HasDeclawed returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetDeclawed
|
||||||
|
|
||||||
|
`func (o *CatAllOf) SetDeclawed(v bool)`
|
||||||
|
|
||||||
|
SetDeclawed gets a reference to the given bool and assigns it to the Declawed field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# Category
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Id** | Pointer to **int64** | | [optional]
|
||||||
|
**Name** | Pointer to **string** | | [default to default-name]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetId
|
||||||
|
|
||||||
|
`func (o *Category) GetId() int64`
|
||||||
|
|
||||||
|
GetId returns the Id field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetIdOk
|
||||||
|
|
||||||
|
`func (o *Category) GetIdOk() (int64, bool)`
|
||||||
|
|
||||||
|
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasId
|
||||||
|
|
||||||
|
`func (o *Category) HasId() bool`
|
||||||
|
|
||||||
|
HasId returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetId
|
||||||
|
|
||||||
|
`func (o *Category) SetId(v int64)`
|
||||||
|
|
||||||
|
SetId gets a reference to the given int64 and assigns it to the Id field.
|
||||||
|
|
||||||
|
### GetName
|
||||||
|
|
||||||
|
`func (o *Category) GetName() string`
|
||||||
|
|
||||||
|
GetName returns the Name field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetNameOk
|
||||||
|
|
||||||
|
`func (o *Category) GetNameOk() (string, bool)`
|
||||||
|
|
||||||
|
GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasName
|
||||||
|
|
||||||
|
`func (o *Category) HasName() bool`
|
||||||
|
|
||||||
|
HasName returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetName
|
||||||
|
|
||||||
|
`func (o *Category) SetName(v string)`
|
||||||
|
|
||||||
|
SetName gets a reference to the given string and assigns it to the Name field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# ClassModel
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Class** | Pointer to **string** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetClass
|
||||||
|
|
||||||
|
`func (o *ClassModel) GetClass() string`
|
||||||
|
|
||||||
|
GetClass returns the Class field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetClassOk
|
||||||
|
|
||||||
|
`func (o *ClassModel) GetClassOk() (string, bool)`
|
||||||
|
|
||||||
|
GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasClass
|
||||||
|
|
||||||
|
`func (o *ClassModel) HasClass() bool`
|
||||||
|
|
||||||
|
HasClass returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetClass
|
||||||
|
|
||||||
|
`func (o *ClassModel) SetClass(v string)`
|
||||||
|
|
||||||
|
SetClass gets a reference to the given string and assigns it to the Class field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# Client
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Client** | Pointer to **string** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetClient
|
||||||
|
|
||||||
|
`func (o *Client) GetClient() string`
|
||||||
|
|
||||||
|
GetClient returns the Client field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetClientOk
|
||||||
|
|
||||||
|
`func (o *Client) GetClientOk() (string, bool)`
|
||||||
|
|
||||||
|
GetClientOk returns a tuple with the Client field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasClient
|
||||||
|
|
||||||
|
`func (o *Client) HasClient() bool`
|
||||||
|
|
||||||
|
HasClient returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetClient
|
||||||
|
|
||||||
|
`func (o *Client) SetClient(v string)`
|
||||||
|
|
||||||
|
SetClient gets a reference to the given string and assigns it to the Client field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
# \DefaultApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**FooGet**](DefaultApi.md#FooGet) | **Get** /foo |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## FooGet
|
||||||
|
|
||||||
|
> InlineResponseDefault FooGet(ctx, )
|
||||||
|
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**InlineResponseDefault**](inline_response_default.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
# Dog
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**ClassName** | Pointer to **string** | |
|
||||||
|
**Color** | Pointer to **string** | | [optional] [default to red]
|
||||||
|
**Breed** | Pointer to **string** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetClassName
|
||||||
|
|
||||||
|
`func (o *Dog) GetClassName() string`
|
||||||
|
|
||||||
|
GetClassName returns the ClassName field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetClassNameOk
|
||||||
|
|
||||||
|
`func (o *Dog) GetClassNameOk() (string, bool)`
|
||||||
|
|
||||||
|
GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasClassName
|
||||||
|
|
||||||
|
`func (o *Dog) HasClassName() bool`
|
||||||
|
|
||||||
|
HasClassName returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetClassName
|
||||||
|
|
||||||
|
`func (o *Dog) SetClassName(v string)`
|
||||||
|
|
||||||
|
SetClassName gets a reference to the given string and assigns it to the ClassName field.
|
||||||
|
|
||||||
|
### GetColor
|
||||||
|
|
||||||
|
`func (o *Dog) GetColor() string`
|
||||||
|
|
||||||
|
GetColor returns the Color field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetColorOk
|
||||||
|
|
||||||
|
`func (o *Dog) GetColorOk() (string, bool)`
|
||||||
|
|
||||||
|
GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasColor
|
||||||
|
|
||||||
|
`func (o *Dog) HasColor() bool`
|
||||||
|
|
||||||
|
HasColor returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetColor
|
||||||
|
|
||||||
|
`func (o *Dog) SetColor(v string)`
|
||||||
|
|
||||||
|
SetColor gets a reference to the given string and assigns it to the Color field.
|
||||||
|
|
||||||
|
### GetBreed
|
||||||
|
|
||||||
|
`func (o *Dog) GetBreed() string`
|
||||||
|
|
||||||
|
GetBreed returns the Breed field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetBreedOk
|
||||||
|
|
||||||
|
`func (o *Dog) GetBreedOk() (string, bool)`
|
||||||
|
|
||||||
|
GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasBreed
|
||||||
|
|
||||||
|
`func (o *Dog) HasBreed() bool`
|
||||||
|
|
||||||
|
HasBreed returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetBreed
|
||||||
|
|
||||||
|
`func (o *Dog) SetBreed(v string)`
|
||||||
|
|
||||||
|
SetBreed gets a reference to the given string and assigns it to the Breed field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# DogAllOf
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Breed** | Pointer to **string** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetBreed
|
||||||
|
|
||||||
|
`func (o *DogAllOf) GetBreed() string`
|
||||||
|
|
||||||
|
GetBreed returns the Breed field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetBreedOk
|
||||||
|
|
||||||
|
`func (o *DogAllOf) GetBreedOk() (string, bool)`
|
||||||
|
|
||||||
|
GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasBreed
|
||||||
|
|
||||||
|
`func (o *DogAllOf) HasBreed() bool`
|
||||||
|
|
||||||
|
HasBreed returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetBreed
|
||||||
|
|
||||||
|
`func (o *DogAllOf) SetBreed(v string)`
|
||||||
|
|
||||||
|
SetBreed gets a reference to the given string and assigns it to the Breed field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# EnumArrays
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**JustSymbol** | Pointer to **string** | | [optional]
|
||||||
|
**ArrayEnum** | Pointer to **[]string** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetJustSymbol
|
||||||
|
|
||||||
|
`func (o *EnumArrays) GetJustSymbol() string`
|
||||||
|
|
||||||
|
GetJustSymbol returns the JustSymbol field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetJustSymbolOk
|
||||||
|
|
||||||
|
`func (o *EnumArrays) GetJustSymbolOk() (string, bool)`
|
||||||
|
|
||||||
|
GetJustSymbolOk returns a tuple with the JustSymbol field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasJustSymbol
|
||||||
|
|
||||||
|
`func (o *EnumArrays) HasJustSymbol() bool`
|
||||||
|
|
||||||
|
HasJustSymbol returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetJustSymbol
|
||||||
|
|
||||||
|
`func (o *EnumArrays) SetJustSymbol(v string)`
|
||||||
|
|
||||||
|
SetJustSymbol gets a reference to the given string and assigns it to the JustSymbol field.
|
||||||
|
|
||||||
|
### GetArrayEnum
|
||||||
|
|
||||||
|
`func (o *EnumArrays) GetArrayEnum() []string`
|
||||||
|
|
||||||
|
GetArrayEnum returns the ArrayEnum field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetArrayEnumOk
|
||||||
|
|
||||||
|
`func (o *EnumArrays) GetArrayEnumOk() ([]string, bool)`
|
||||||
|
|
||||||
|
GetArrayEnumOk returns a tuple with the ArrayEnum field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasArrayEnum
|
||||||
|
|
||||||
|
`func (o *EnumArrays) HasArrayEnum() bool`
|
||||||
|
|
||||||
|
HasArrayEnum returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetArrayEnum
|
||||||
|
|
||||||
|
`func (o *EnumArrays) SetArrayEnum(v []string)`
|
||||||
|
|
||||||
|
SetArrayEnum gets a reference to the given []string and assigns it to the ArrayEnum field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# EnumClass
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,228 @@
|
|||||||
|
# EnumTest
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**EnumString** | Pointer to **string** | | [optional]
|
||||||
|
**EnumStringRequired** | Pointer to **string** | |
|
||||||
|
**EnumInteger** | Pointer to **int32** | | [optional]
|
||||||
|
**EnumNumber** | Pointer to **float64** | | [optional]
|
||||||
|
**OuterEnum** | Pointer to [**OuterEnum**](OuterEnum.md) | | [optional]
|
||||||
|
**OuterEnumInteger** | Pointer to [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional]
|
||||||
|
**OuterEnumDefaultValue** | Pointer to [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional]
|
||||||
|
**OuterEnumIntegerDefaultValue** | Pointer to [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetEnumString
|
||||||
|
|
||||||
|
`func (o *EnumTest) GetEnumString() string`
|
||||||
|
|
||||||
|
GetEnumString returns the EnumString field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetEnumStringOk
|
||||||
|
|
||||||
|
`func (o *EnumTest) GetEnumStringOk() (string, bool)`
|
||||||
|
|
||||||
|
GetEnumStringOk returns a tuple with the EnumString field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasEnumString
|
||||||
|
|
||||||
|
`func (o *EnumTest) HasEnumString() bool`
|
||||||
|
|
||||||
|
HasEnumString returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetEnumString
|
||||||
|
|
||||||
|
`func (o *EnumTest) SetEnumString(v string)`
|
||||||
|
|
||||||
|
SetEnumString gets a reference to the given string and assigns it to the EnumString field.
|
||||||
|
|
||||||
|
### GetEnumStringRequired
|
||||||
|
|
||||||
|
`func (o *EnumTest) GetEnumStringRequired() string`
|
||||||
|
|
||||||
|
GetEnumStringRequired returns the EnumStringRequired field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetEnumStringRequiredOk
|
||||||
|
|
||||||
|
`func (o *EnumTest) GetEnumStringRequiredOk() (string, bool)`
|
||||||
|
|
||||||
|
GetEnumStringRequiredOk returns a tuple with the EnumStringRequired field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasEnumStringRequired
|
||||||
|
|
||||||
|
`func (o *EnumTest) HasEnumStringRequired() bool`
|
||||||
|
|
||||||
|
HasEnumStringRequired returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetEnumStringRequired
|
||||||
|
|
||||||
|
`func (o *EnumTest) SetEnumStringRequired(v string)`
|
||||||
|
|
||||||
|
SetEnumStringRequired gets a reference to the given string and assigns it to the EnumStringRequired field.
|
||||||
|
|
||||||
|
### GetEnumInteger
|
||||||
|
|
||||||
|
`func (o *EnumTest) GetEnumInteger() int32`
|
||||||
|
|
||||||
|
GetEnumInteger returns the EnumInteger field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetEnumIntegerOk
|
||||||
|
|
||||||
|
`func (o *EnumTest) GetEnumIntegerOk() (int32, bool)`
|
||||||
|
|
||||||
|
GetEnumIntegerOk returns a tuple with the EnumInteger field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasEnumInteger
|
||||||
|
|
||||||
|
`func (o *EnumTest) HasEnumInteger() bool`
|
||||||
|
|
||||||
|
HasEnumInteger returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetEnumInteger
|
||||||
|
|
||||||
|
`func (o *EnumTest) SetEnumInteger(v int32)`
|
||||||
|
|
||||||
|
SetEnumInteger gets a reference to the given int32 and assigns it to the EnumInteger field.
|
||||||
|
|
||||||
|
### GetEnumNumber
|
||||||
|
|
||||||
|
`func (o *EnumTest) GetEnumNumber() float64`
|
||||||
|
|
||||||
|
GetEnumNumber returns the EnumNumber field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetEnumNumberOk
|
||||||
|
|
||||||
|
`func (o *EnumTest) GetEnumNumberOk() (float64, bool)`
|
||||||
|
|
||||||
|
GetEnumNumberOk returns a tuple with the EnumNumber field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasEnumNumber
|
||||||
|
|
||||||
|
`func (o *EnumTest) HasEnumNumber() bool`
|
||||||
|
|
||||||
|
HasEnumNumber returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetEnumNumber
|
||||||
|
|
||||||
|
`func (o *EnumTest) SetEnumNumber(v float64)`
|
||||||
|
|
||||||
|
SetEnumNumber gets a reference to the given float64 and assigns it to the EnumNumber field.
|
||||||
|
|
||||||
|
### GetOuterEnum
|
||||||
|
|
||||||
|
`func (o *EnumTest) GetOuterEnum() OuterEnum`
|
||||||
|
|
||||||
|
GetOuterEnum returns the OuterEnum field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetOuterEnumOk
|
||||||
|
|
||||||
|
`func (o *EnumTest) GetOuterEnumOk() (OuterEnum, bool)`
|
||||||
|
|
||||||
|
GetOuterEnumOk returns a tuple with the OuterEnum field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasOuterEnum
|
||||||
|
|
||||||
|
`func (o *EnumTest) HasOuterEnum() bool`
|
||||||
|
|
||||||
|
HasOuterEnum returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetOuterEnum
|
||||||
|
|
||||||
|
`func (o *EnumTest) SetOuterEnum(v OuterEnum)`
|
||||||
|
|
||||||
|
SetOuterEnum gets a reference to the given OuterEnum and assigns it to the OuterEnum field.
|
||||||
|
|
||||||
|
### SetOuterEnumExplicitNull
|
||||||
|
|
||||||
|
`func (o *EnumTest) SetOuterEnumExplicitNull(b bool)`
|
||||||
|
|
||||||
|
SetOuterEnumExplicitNull (un)sets OuterEnum to be considered as explicit "null" value
|
||||||
|
when serializing to JSON (pass true as argument to set this, false to unset)
|
||||||
|
The OuterEnum value is set to nil even if false is passed
|
||||||
|
### GetOuterEnumInteger
|
||||||
|
|
||||||
|
`func (o *EnumTest) GetOuterEnumInteger() OuterEnumInteger`
|
||||||
|
|
||||||
|
GetOuterEnumInteger returns the OuterEnumInteger field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetOuterEnumIntegerOk
|
||||||
|
|
||||||
|
`func (o *EnumTest) GetOuterEnumIntegerOk() (OuterEnumInteger, bool)`
|
||||||
|
|
||||||
|
GetOuterEnumIntegerOk returns a tuple with the OuterEnumInteger field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasOuterEnumInteger
|
||||||
|
|
||||||
|
`func (o *EnumTest) HasOuterEnumInteger() bool`
|
||||||
|
|
||||||
|
HasOuterEnumInteger returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetOuterEnumInteger
|
||||||
|
|
||||||
|
`func (o *EnumTest) SetOuterEnumInteger(v OuterEnumInteger)`
|
||||||
|
|
||||||
|
SetOuterEnumInteger gets a reference to the given OuterEnumInteger and assigns it to the OuterEnumInteger field.
|
||||||
|
|
||||||
|
### GetOuterEnumDefaultValue
|
||||||
|
|
||||||
|
`func (o *EnumTest) GetOuterEnumDefaultValue() OuterEnumDefaultValue`
|
||||||
|
|
||||||
|
GetOuterEnumDefaultValue returns the OuterEnumDefaultValue field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetOuterEnumDefaultValueOk
|
||||||
|
|
||||||
|
`func (o *EnumTest) GetOuterEnumDefaultValueOk() (OuterEnumDefaultValue, bool)`
|
||||||
|
|
||||||
|
GetOuterEnumDefaultValueOk returns a tuple with the OuterEnumDefaultValue field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasOuterEnumDefaultValue
|
||||||
|
|
||||||
|
`func (o *EnumTest) HasOuterEnumDefaultValue() bool`
|
||||||
|
|
||||||
|
HasOuterEnumDefaultValue returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetOuterEnumDefaultValue
|
||||||
|
|
||||||
|
`func (o *EnumTest) SetOuterEnumDefaultValue(v OuterEnumDefaultValue)`
|
||||||
|
|
||||||
|
SetOuterEnumDefaultValue gets a reference to the given OuterEnumDefaultValue and assigns it to the OuterEnumDefaultValue field.
|
||||||
|
|
||||||
|
### GetOuterEnumIntegerDefaultValue
|
||||||
|
|
||||||
|
`func (o *EnumTest) GetOuterEnumIntegerDefaultValue() OuterEnumIntegerDefaultValue`
|
||||||
|
|
||||||
|
GetOuterEnumIntegerDefaultValue returns the OuterEnumIntegerDefaultValue field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetOuterEnumIntegerDefaultValueOk
|
||||||
|
|
||||||
|
`func (o *EnumTest) GetOuterEnumIntegerDefaultValueOk() (OuterEnumIntegerDefaultValue, bool)`
|
||||||
|
|
||||||
|
GetOuterEnumIntegerDefaultValueOk returns a tuple with the OuterEnumIntegerDefaultValue field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasOuterEnumIntegerDefaultValue
|
||||||
|
|
||||||
|
`func (o *EnumTest) HasOuterEnumIntegerDefaultValue() bool`
|
||||||
|
|
||||||
|
HasOuterEnumIntegerDefaultValue returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetOuterEnumIntegerDefaultValue
|
||||||
|
|
||||||
|
`func (o *EnumTest) SetOuterEnumIntegerDefaultValue(v OuterEnumIntegerDefaultValue)`
|
||||||
|
|
||||||
|
SetOuterEnumIntegerDefaultValue gets a reference to the given OuterEnumIntegerDefaultValue and assigns it to the OuterEnumIntegerDefaultValue field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,573 @@
|
|||||||
|
# \FakeApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**FakeHealthGet**](FakeApi.md#FakeHealthGet) | **Get** /fake/health | Health check endpoint
|
||||||
|
[**FakeOuterBooleanSerialize**](FakeApi.md#FakeOuterBooleanSerialize) | **Post** /fake/outer/boolean |
|
||||||
|
[**FakeOuterCompositeSerialize**](FakeApi.md#FakeOuterCompositeSerialize) | **Post** /fake/outer/composite |
|
||||||
|
[**FakeOuterNumberSerialize**](FakeApi.md#FakeOuterNumberSerialize) | **Post** /fake/outer/number |
|
||||||
|
[**FakeOuterStringSerialize**](FakeApi.md#FakeOuterStringSerialize) | **Post** /fake/outer/string |
|
||||||
|
[**TestBodyWithFileSchema**](FakeApi.md#TestBodyWithFileSchema) | **Put** /fake/body-with-file-schema |
|
||||||
|
[**TestBodyWithQueryParams**](FakeApi.md#TestBodyWithQueryParams) | **Put** /fake/body-with-query-params |
|
||||||
|
[**TestClientModel**](FakeApi.md#TestClientModel) | **Patch** /fake | To test \"client\" model
|
||||||
|
[**TestEndpointParameters**](FakeApi.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
[**TestEnumParameters**](FakeApi.md#TestEnumParameters) | **Get** /fake | To test enum parameters
|
||||||
|
[**TestGroupParameters**](FakeApi.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional)
|
||||||
|
[**TestInlineAdditionalProperties**](FakeApi.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties
|
||||||
|
[**TestJsonFormData**](FakeApi.md#TestJsonFormData) | **Get** /fake/jsonFormData | test json serialization of form data
|
||||||
|
[**TestQueryParameterCollectionFormat**](FakeApi.md#TestQueryParameterCollectionFormat) | **Put** /fake/test-query-paramters |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## FakeHealthGet
|
||||||
|
|
||||||
|
> HealthCheckResult FakeHealthGet(ctx, )
|
||||||
|
Health check endpoint
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**HealthCheckResult**](HealthCheckResult.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## FakeOuterBooleanSerialize
|
||||||
|
|
||||||
|
> bool FakeOuterBooleanSerialize(ctx, optional)
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer boolean types
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**optional** | ***FakeOuterBooleanSerializeOpts** | optional parameters | nil if no parameters
|
||||||
|
|
||||||
|
### Optional Parameters
|
||||||
|
|
||||||
|
Optional parameters are passed through a pointer to a FakeOuterBooleanSerializeOpts struct
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | **optional.Bool**| Input boolean as post body |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**bool**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: */*
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## FakeOuterCompositeSerialize
|
||||||
|
|
||||||
|
> OuterComposite FakeOuterCompositeSerialize(ctx, optional)
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of object with outer number type
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**optional** | ***FakeOuterCompositeSerializeOpts** | optional parameters | nil if no parameters
|
||||||
|
|
||||||
|
### Optional Parameters
|
||||||
|
|
||||||
|
Optional parameters are passed through a pointer to a FakeOuterCompositeSerializeOpts struct
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**outerComposite** | [**optional.Interface of OuterComposite**](OuterComposite.md)| Input composite as post body |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OuterComposite**](OuterComposite.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: */*
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## FakeOuterNumberSerialize
|
||||||
|
|
||||||
|
> float32 FakeOuterNumberSerialize(ctx, optional)
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer number types
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**optional** | ***FakeOuterNumberSerializeOpts** | optional parameters | nil if no parameters
|
||||||
|
|
||||||
|
### Optional Parameters
|
||||||
|
|
||||||
|
Optional parameters are passed through a pointer to a FakeOuterNumberSerializeOpts struct
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | **optional.Float32**| Input number as post body |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**float32**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: */*
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## FakeOuterStringSerialize
|
||||||
|
|
||||||
|
> string FakeOuterStringSerialize(ctx, optional)
|
||||||
|
|
||||||
|
|
||||||
|
Test serialization of outer string types
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**optional** | ***FakeOuterStringSerializeOpts** | optional parameters | nil if no parameters
|
||||||
|
|
||||||
|
### Optional Parameters
|
||||||
|
|
||||||
|
Optional parameters are passed through a pointer to a FakeOuterStringSerializeOpts struct
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | **optional.String**| Input string as post body |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**string**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: */*
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## TestBodyWithFileSchema
|
||||||
|
|
||||||
|
> TestBodyWithFileSchema(ctx, fileSchemaTestClass)
|
||||||
|
|
||||||
|
|
||||||
|
For this test, the body for this request much reference a schema named `File`.
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## TestBodyWithQueryParams
|
||||||
|
|
||||||
|
> TestBodyWithQueryParams(ctx, query, user)
|
||||||
|
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**query** | **string**| |
|
||||||
|
**user** | [**User**](User.md)| |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## TestClientModel
|
||||||
|
|
||||||
|
> Client TestClientModel(ctx, client)
|
||||||
|
To test \"client\" model
|
||||||
|
|
||||||
|
To test \"client\" model
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**client** | [**Client**](Client.md)| client model |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Client**](Client.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## TestEndpointParameters
|
||||||
|
|
||||||
|
> TestEndpointParameters(ctx, number, double, patternWithoutDelimiter, byte_, optional)
|
||||||
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
|
||||||
|
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**number** | **float32**| None |
|
||||||
|
**double** | **float64**| None |
|
||||||
|
**patternWithoutDelimiter** | **string**| None |
|
||||||
|
**byte_** | **string**| None |
|
||||||
|
**optional** | ***TestEndpointParametersOpts** | optional parameters | nil if no parameters
|
||||||
|
|
||||||
|
### Optional Parameters
|
||||||
|
|
||||||
|
Optional parameters are passed through a pointer to a TestEndpointParametersOpts struct
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
**integer** | **optional.Int32**| None |
|
||||||
|
**int32_** | **optional.Int32**| None |
|
||||||
|
**int64_** | **optional.Int64**| None |
|
||||||
|
**float** | **optional.Float32**| None |
|
||||||
|
**string_** | **optional.String**| None |
|
||||||
|
**binary** | **optional.Interface of *os.File****optional.*os.File**| None |
|
||||||
|
**date** | **optional.String**| None |
|
||||||
|
**dateTime** | **optional.Time**| None |
|
||||||
|
**password** | **optional.String**| None |
|
||||||
|
**callback** | **optional.String**| None |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[http_basic_test](../README.md#http_basic_test)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/x-www-form-urlencoded
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## TestEnumParameters
|
||||||
|
|
||||||
|
> TestEnumParameters(ctx, optional)
|
||||||
|
To test enum parameters
|
||||||
|
|
||||||
|
To test enum parameters
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**optional** | ***TestEnumParametersOpts** | optional parameters | nil if no parameters
|
||||||
|
|
||||||
|
### Optional Parameters
|
||||||
|
|
||||||
|
Optional parameters are passed through a pointer to a TestEnumParametersOpts struct
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**enumHeaderStringArray** | [**optional.Interface of []string**](string.md)| Header parameter enum test (string array) |
|
||||||
|
**enumHeaderString** | **optional.String**| Header parameter enum test (string) | [default to -efg]
|
||||||
|
**enumQueryStringArray** | [**optional.Interface of []string**](string.md)| Query parameter enum test (string array) |
|
||||||
|
**enumQueryString** | **optional.String**| Query parameter enum test (string) | [default to -efg]
|
||||||
|
**enumQueryInteger** | **optional.Int32**| Query parameter enum test (double) |
|
||||||
|
**enumQueryDouble** | **optional.Float64**| Query parameter enum test (double) |
|
||||||
|
**enumFormStringArray** | [**optional.Interface of []string**](string.md)| Form parameter enum test (string array) | [default to $]
|
||||||
|
**enumFormString** | **optional.String**| Form parameter enum test (string) | [default to -efg]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/x-www-form-urlencoded
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## TestGroupParameters
|
||||||
|
|
||||||
|
> TestGroupParameters(ctx, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, optional)
|
||||||
|
Fake endpoint to test group parameters (optional)
|
||||||
|
|
||||||
|
Fake endpoint to test group parameters (optional)
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**requiredStringGroup** | **int32**| Required String in group parameters |
|
||||||
|
**requiredBooleanGroup** | **bool**| Required Boolean in group parameters |
|
||||||
|
**requiredInt64Group** | **int64**| Required Integer in group parameters |
|
||||||
|
**optional** | ***TestGroupParametersOpts** | optional parameters | nil if no parameters
|
||||||
|
|
||||||
|
### Optional Parameters
|
||||||
|
|
||||||
|
Optional parameters are passed through a pointer to a TestGroupParametersOpts struct
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
**stringGroup** | **optional.Int32**| String in group parameters |
|
||||||
|
**booleanGroup** | **optional.Bool**| Boolean in group parameters |
|
||||||
|
**int64Group** | **optional.Int64**| Integer in group parameters |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[bearer_test](../README.md#bearer_test)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## TestInlineAdditionalProperties
|
||||||
|
|
||||||
|
> TestInlineAdditionalProperties(ctx, requestBody)
|
||||||
|
test inline additionalProperties
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**requestBody** | [**map[string]string**](string.md)| request body |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## TestJsonFormData
|
||||||
|
|
||||||
|
> TestJsonFormData(ctx, param, param2)
|
||||||
|
test json serialization of form data
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**param** | **string**| field1 |
|
||||||
|
**param2** | **string**| field2 |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/x-www-form-urlencoded
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## TestQueryParameterCollectionFormat
|
||||||
|
|
||||||
|
> TestQueryParameterCollectionFormat(ctx, pipe, ioutil, http, url, context)
|
||||||
|
|
||||||
|
|
||||||
|
To test the collection format in query parameters
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**pipe** | [**[]string**](string.md)| |
|
||||||
|
**ioutil** | [**[]string**](string.md)| |
|
||||||
|
**http** | [**[]string**](string.md)| |
|
||||||
|
**url** | [**[]string**](string.md)| |
|
||||||
|
**context** | [**[]string**](string.md)| |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
# \FakeClassnameTags123Api
|
||||||
|
|
||||||
|
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**TestClassname**](FakeClassnameTags123Api.md#TestClassname) | **Patch** /fake_classname_test | To test class name in snake case
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## TestClassname
|
||||||
|
|
||||||
|
> Client TestClassname(ctx, client)
|
||||||
|
To test class name in snake case
|
||||||
|
|
||||||
|
To test class name in snake case
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**client** | [**Client**](Client.md)| client model |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Client**](Client.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[api_key_query](../README.md#api_key_query)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# File
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**SourceURI** | Pointer to **string** | Test capitalization | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetSourceURI
|
||||||
|
|
||||||
|
`func (o *File) GetSourceURI() string`
|
||||||
|
|
||||||
|
GetSourceURI returns the SourceURI field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetSourceURIOk
|
||||||
|
|
||||||
|
`func (o *File) GetSourceURIOk() (string, bool)`
|
||||||
|
|
||||||
|
GetSourceURIOk returns a tuple with the SourceURI field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasSourceURI
|
||||||
|
|
||||||
|
`func (o *File) HasSourceURI() bool`
|
||||||
|
|
||||||
|
HasSourceURI returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetSourceURI
|
||||||
|
|
||||||
|
`func (o *File) SetSourceURI(v string)`
|
||||||
|
|
||||||
|
SetSourceURI gets a reference to the given string and assigns it to the SourceURI field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# FileSchemaTestClass
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**File** | Pointer to [**File**](File.md) | | [optional]
|
||||||
|
**Files** | Pointer to [**[]File**](File.md) | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetFile
|
||||||
|
|
||||||
|
`func (o *FileSchemaTestClass) GetFile() File`
|
||||||
|
|
||||||
|
GetFile returns the File field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetFileOk
|
||||||
|
|
||||||
|
`func (o *FileSchemaTestClass) GetFileOk() (File, bool)`
|
||||||
|
|
||||||
|
GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasFile
|
||||||
|
|
||||||
|
`func (o *FileSchemaTestClass) HasFile() bool`
|
||||||
|
|
||||||
|
HasFile returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetFile
|
||||||
|
|
||||||
|
`func (o *FileSchemaTestClass) SetFile(v File)`
|
||||||
|
|
||||||
|
SetFile gets a reference to the given File and assigns it to the File field.
|
||||||
|
|
||||||
|
### GetFiles
|
||||||
|
|
||||||
|
`func (o *FileSchemaTestClass) GetFiles() []File`
|
||||||
|
|
||||||
|
GetFiles returns the Files field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetFilesOk
|
||||||
|
|
||||||
|
`func (o *FileSchemaTestClass) GetFilesOk() ([]File, bool)`
|
||||||
|
|
||||||
|
GetFilesOk returns a tuple with the Files field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasFiles
|
||||||
|
|
||||||
|
`func (o *FileSchemaTestClass) HasFiles() bool`
|
||||||
|
|
||||||
|
HasFiles returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetFiles
|
||||||
|
|
||||||
|
`func (o *FileSchemaTestClass) SetFiles(v []File)`
|
||||||
|
|
||||||
|
SetFiles gets a reference to the given []File and assigns it to the Files field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# Foo
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Bar** | Pointer to **string** | | [optional] [default to bar]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetBar
|
||||||
|
|
||||||
|
`func (o *Foo) GetBar() string`
|
||||||
|
|
||||||
|
GetBar returns the Bar field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetBarOk
|
||||||
|
|
||||||
|
`func (o *Foo) GetBarOk() (string, bool)`
|
||||||
|
|
||||||
|
GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasBar
|
||||||
|
|
||||||
|
`func (o *Foo) HasBar() bool`
|
||||||
|
|
||||||
|
HasBar returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetBar
|
||||||
|
|
||||||
|
`func (o *Foo) SetBar(v string)`
|
||||||
|
|
||||||
|
SetBar gets a reference to the given string and assigns it to the Bar field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,403 @@
|
|||||||
|
# FormatTest
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Integer** | Pointer to **int32** | | [optional]
|
||||||
|
**Int32** | Pointer to **int32** | | [optional]
|
||||||
|
**Int64** | Pointer to **int64** | | [optional]
|
||||||
|
**Number** | Pointer to **float32** | |
|
||||||
|
**Float** | Pointer to **float32** | | [optional]
|
||||||
|
**Double** | Pointer to **float64** | | [optional]
|
||||||
|
**String** | Pointer to **string** | | [optional]
|
||||||
|
**Byte** | Pointer to **string** | |
|
||||||
|
**Binary** | Pointer to [***os.File**](*os.File.md) | | [optional]
|
||||||
|
**Date** | Pointer to **string** | |
|
||||||
|
**DateTime** | Pointer to [**time.Time**](time.Time.md) | | [optional]
|
||||||
|
**Uuid** | Pointer to **string** | | [optional]
|
||||||
|
**Password** | Pointer to **string** | |
|
||||||
|
**PatternWithDigits** | Pointer to **string** | A string that is a 10 digit number. Can have leading zeros. | [optional]
|
||||||
|
**PatternWithDigitsAndDelimiter** | Pointer to **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetInteger
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetInteger() int32`
|
||||||
|
|
||||||
|
GetInteger returns the Integer field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetIntegerOk
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetIntegerOk() (int32, bool)`
|
||||||
|
|
||||||
|
GetIntegerOk returns a tuple with the Integer field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasInteger
|
||||||
|
|
||||||
|
`func (o *FormatTest) HasInteger() bool`
|
||||||
|
|
||||||
|
HasInteger returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetInteger
|
||||||
|
|
||||||
|
`func (o *FormatTest) SetInteger(v int32)`
|
||||||
|
|
||||||
|
SetInteger gets a reference to the given int32 and assigns it to the Integer field.
|
||||||
|
|
||||||
|
### GetInt32
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetInt32() int32`
|
||||||
|
|
||||||
|
GetInt32 returns the Int32 field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetInt32Ok
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetInt32Ok() (int32, bool)`
|
||||||
|
|
||||||
|
GetInt32Ok returns a tuple with the Int32 field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasInt32
|
||||||
|
|
||||||
|
`func (o *FormatTest) HasInt32() bool`
|
||||||
|
|
||||||
|
HasInt32 returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetInt32
|
||||||
|
|
||||||
|
`func (o *FormatTest) SetInt32(v int32)`
|
||||||
|
|
||||||
|
SetInt32 gets a reference to the given int32 and assigns it to the Int32 field.
|
||||||
|
|
||||||
|
### GetInt64
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetInt64() int64`
|
||||||
|
|
||||||
|
GetInt64 returns the Int64 field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetInt64Ok
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetInt64Ok() (int64, bool)`
|
||||||
|
|
||||||
|
GetInt64Ok returns a tuple with the Int64 field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasInt64
|
||||||
|
|
||||||
|
`func (o *FormatTest) HasInt64() bool`
|
||||||
|
|
||||||
|
HasInt64 returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetInt64
|
||||||
|
|
||||||
|
`func (o *FormatTest) SetInt64(v int64)`
|
||||||
|
|
||||||
|
SetInt64 gets a reference to the given int64 and assigns it to the Int64 field.
|
||||||
|
|
||||||
|
### GetNumber
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetNumber() float32`
|
||||||
|
|
||||||
|
GetNumber returns the Number field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetNumberOk
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetNumberOk() (float32, bool)`
|
||||||
|
|
||||||
|
GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasNumber
|
||||||
|
|
||||||
|
`func (o *FormatTest) HasNumber() bool`
|
||||||
|
|
||||||
|
HasNumber returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetNumber
|
||||||
|
|
||||||
|
`func (o *FormatTest) SetNumber(v float32)`
|
||||||
|
|
||||||
|
SetNumber gets a reference to the given float32 and assigns it to the Number field.
|
||||||
|
|
||||||
|
### GetFloat
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetFloat() float32`
|
||||||
|
|
||||||
|
GetFloat returns the Float field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetFloatOk
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetFloatOk() (float32, bool)`
|
||||||
|
|
||||||
|
GetFloatOk returns a tuple with the Float field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasFloat
|
||||||
|
|
||||||
|
`func (o *FormatTest) HasFloat() bool`
|
||||||
|
|
||||||
|
HasFloat returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetFloat
|
||||||
|
|
||||||
|
`func (o *FormatTest) SetFloat(v float32)`
|
||||||
|
|
||||||
|
SetFloat gets a reference to the given float32 and assigns it to the Float field.
|
||||||
|
|
||||||
|
### GetDouble
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetDouble() float64`
|
||||||
|
|
||||||
|
GetDouble returns the Double field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetDoubleOk
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetDoubleOk() (float64, bool)`
|
||||||
|
|
||||||
|
GetDoubleOk returns a tuple with the Double field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasDouble
|
||||||
|
|
||||||
|
`func (o *FormatTest) HasDouble() bool`
|
||||||
|
|
||||||
|
HasDouble returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetDouble
|
||||||
|
|
||||||
|
`func (o *FormatTest) SetDouble(v float64)`
|
||||||
|
|
||||||
|
SetDouble gets a reference to the given float64 and assigns it to the Double field.
|
||||||
|
|
||||||
|
### GetString
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetString() string`
|
||||||
|
|
||||||
|
GetString returns the String field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetStringOk
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetStringOk() (string, bool)`
|
||||||
|
|
||||||
|
GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasString
|
||||||
|
|
||||||
|
`func (o *FormatTest) HasString() bool`
|
||||||
|
|
||||||
|
HasString returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetString
|
||||||
|
|
||||||
|
`func (o *FormatTest) SetString(v string)`
|
||||||
|
|
||||||
|
SetString gets a reference to the given string and assigns it to the String field.
|
||||||
|
|
||||||
|
### GetByte
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetByte() string`
|
||||||
|
|
||||||
|
GetByte returns the Byte field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetByteOk
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetByteOk() (string, bool)`
|
||||||
|
|
||||||
|
GetByteOk returns a tuple with the Byte field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasByte
|
||||||
|
|
||||||
|
`func (o *FormatTest) HasByte() bool`
|
||||||
|
|
||||||
|
HasByte returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetByte
|
||||||
|
|
||||||
|
`func (o *FormatTest) SetByte(v string)`
|
||||||
|
|
||||||
|
SetByte gets a reference to the given string and assigns it to the Byte field.
|
||||||
|
|
||||||
|
### GetBinary
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetBinary() *os.File`
|
||||||
|
|
||||||
|
GetBinary returns the Binary field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetBinaryOk
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetBinaryOk() (*os.File, bool)`
|
||||||
|
|
||||||
|
GetBinaryOk returns a tuple with the Binary field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasBinary
|
||||||
|
|
||||||
|
`func (o *FormatTest) HasBinary() bool`
|
||||||
|
|
||||||
|
HasBinary returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetBinary
|
||||||
|
|
||||||
|
`func (o *FormatTest) SetBinary(v *os.File)`
|
||||||
|
|
||||||
|
SetBinary gets a reference to the given *os.File and assigns it to the Binary field.
|
||||||
|
|
||||||
|
### GetDate
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetDate() string`
|
||||||
|
|
||||||
|
GetDate returns the Date field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetDateOk
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetDateOk() (string, bool)`
|
||||||
|
|
||||||
|
GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasDate
|
||||||
|
|
||||||
|
`func (o *FormatTest) HasDate() bool`
|
||||||
|
|
||||||
|
HasDate returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetDate
|
||||||
|
|
||||||
|
`func (o *FormatTest) SetDate(v string)`
|
||||||
|
|
||||||
|
SetDate gets a reference to the given string and assigns it to the Date field.
|
||||||
|
|
||||||
|
### GetDateTime
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetDateTime() time.Time`
|
||||||
|
|
||||||
|
GetDateTime returns the DateTime field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetDateTimeOk
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetDateTimeOk() (time.Time, bool)`
|
||||||
|
|
||||||
|
GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasDateTime
|
||||||
|
|
||||||
|
`func (o *FormatTest) HasDateTime() bool`
|
||||||
|
|
||||||
|
HasDateTime returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetDateTime
|
||||||
|
|
||||||
|
`func (o *FormatTest) SetDateTime(v time.Time)`
|
||||||
|
|
||||||
|
SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field.
|
||||||
|
|
||||||
|
### GetUuid
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetUuid() string`
|
||||||
|
|
||||||
|
GetUuid returns the Uuid field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetUuidOk
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetUuidOk() (string, bool)`
|
||||||
|
|
||||||
|
GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasUuid
|
||||||
|
|
||||||
|
`func (o *FormatTest) HasUuid() bool`
|
||||||
|
|
||||||
|
HasUuid returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetUuid
|
||||||
|
|
||||||
|
`func (o *FormatTest) SetUuid(v string)`
|
||||||
|
|
||||||
|
SetUuid gets a reference to the given string and assigns it to the Uuid field.
|
||||||
|
|
||||||
|
### GetPassword
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetPassword() string`
|
||||||
|
|
||||||
|
GetPassword returns the Password field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetPasswordOk
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetPasswordOk() (string, bool)`
|
||||||
|
|
||||||
|
GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasPassword
|
||||||
|
|
||||||
|
`func (o *FormatTest) HasPassword() bool`
|
||||||
|
|
||||||
|
HasPassword returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetPassword
|
||||||
|
|
||||||
|
`func (o *FormatTest) SetPassword(v string)`
|
||||||
|
|
||||||
|
SetPassword gets a reference to the given string and assigns it to the Password field.
|
||||||
|
|
||||||
|
### GetPatternWithDigits
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetPatternWithDigits() string`
|
||||||
|
|
||||||
|
GetPatternWithDigits returns the PatternWithDigits field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetPatternWithDigitsOk
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetPatternWithDigitsOk() (string, bool)`
|
||||||
|
|
||||||
|
GetPatternWithDigitsOk returns a tuple with the PatternWithDigits field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasPatternWithDigits
|
||||||
|
|
||||||
|
`func (o *FormatTest) HasPatternWithDigits() bool`
|
||||||
|
|
||||||
|
HasPatternWithDigits returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetPatternWithDigits
|
||||||
|
|
||||||
|
`func (o *FormatTest) SetPatternWithDigits(v string)`
|
||||||
|
|
||||||
|
SetPatternWithDigits gets a reference to the given string and assigns it to the PatternWithDigits field.
|
||||||
|
|
||||||
|
### GetPatternWithDigitsAndDelimiter
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetPatternWithDigitsAndDelimiter() string`
|
||||||
|
|
||||||
|
GetPatternWithDigitsAndDelimiter returns the PatternWithDigitsAndDelimiter field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetPatternWithDigitsAndDelimiterOk
|
||||||
|
|
||||||
|
`func (o *FormatTest) GetPatternWithDigitsAndDelimiterOk() (string, bool)`
|
||||||
|
|
||||||
|
GetPatternWithDigitsAndDelimiterOk returns a tuple with the PatternWithDigitsAndDelimiter field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasPatternWithDigitsAndDelimiter
|
||||||
|
|
||||||
|
`func (o *FormatTest) HasPatternWithDigitsAndDelimiter() bool`
|
||||||
|
|
||||||
|
HasPatternWithDigitsAndDelimiter returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetPatternWithDigitsAndDelimiter
|
||||||
|
|
||||||
|
`func (o *FormatTest) SetPatternWithDigitsAndDelimiter(v string)`
|
||||||
|
|
||||||
|
SetPatternWithDigitsAndDelimiter gets a reference to the given string and assigns it to the PatternWithDigitsAndDelimiter field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# HasOnlyReadOnly
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Bar** | Pointer to **string** | | [optional]
|
||||||
|
**Foo** | Pointer to **string** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetBar
|
||||||
|
|
||||||
|
`func (o *HasOnlyReadOnly) GetBar() string`
|
||||||
|
|
||||||
|
GetBar returns the Bar field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetBarOk
|
||||||
|
|
||||||
|
`func (o *HasOnlyReadOnly) GetBarOk() (string, bool)`
|
||||||
|
|
||||||
|
GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasBar
|
||||||
|
|
||||||
|
`func (o *HasOnlyReadOnly) HasBar() bool`
|
||||||
|
|
||||||
|
HasBar returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetBar
|
||||||
|
|
||||||
|
`func (o *HasOnlyReadOnly) SetBar(v string)`
|
||||||
|
|
||||||
|
SetBar gets a reference to the given string and assigns it to the Bar field.
|
||||||
|
|
||||||
|
### GetFoo
|
||||||
|
|
||||||
|
`func (o *HasOnlyReadOnly) GetFoo() string`
|
||||||
|
|
||||||
|
GetFoo returns the Foo field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetFooOk
|
||||||
|
|
||||||
|
`func (o *HasOnlyReadOnly) GetFooOk() (string, bool)`
|
||||||
|
|
||||||
|
GetFooOk returns a tuple with the Foo field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasFoo
|
||||||
|
|
||||||
|
`func (o *HasOnlyReadOnly) HasFoo() bool`
|
||||||
|
|
||||||
|
HasFoo returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetFoo
|
||||||
|
|
||||||
|
`func (o *HasOnlyReadOnly) SetFoo(v string)`
|
||||||
|
|
||||||
|
SetFoo gets a reference to the given string and assigns it to the Foo field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
# HealthCheckResult
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**NullableMessage** | Pointer to **string** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetNullableMessage
|
||||||
|
|
||||||
|
`func (o *HealthCheckResult) GetNullableMessage() string`
|
||||||
|
|
||||||
|
GetNullableMessage returns the NullableMessage field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetNullableMessageOk
|
||||||
|
|
||||||
|
`func (o *HealthCheckResult) GetNullableMessageOk() (string, bool)`
|
||||||
|
|
||||||
|
GetNullableMessageOk returns a tuple with the NullableMessage field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasNullableMessage
|
||||||
|
|
||||||
|
`func (o *HealthCheckResult) HasNullableMessage() bool`
|
||||||
|
|
||||||
|
HasNullableMessage returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetNullableMessage
|
||||||
|
|
||||||
|
`func (o *HealthCheckResult) SetNullableMessage(v string)`
|
||||||
|
|
||||||
|
SetNullableMessage gets a reference to the given string and assigns it to the NullableMessage field.
|
||||||
|
|
||||||
|
### SetNullableMessageExplicitNull
|
||||||
|
|
||||||
|
`func (o *HealthCheckResult) SetNullableMessageExplicitNull(b bool)`
|
||||||
|
|
||||||
|
SetNullableMessageExplicitNull (un)sets NullableMessage to be considered as explicit "null" value
|
||||||
|
when serializing to JSON (pass true as argument to set this, false to unset)
|
||||||
|
The NullableMessage value is set to nil even if false is passed
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# InlineObject
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Name** | Pointer to **string** | Updated name of the pet | [optional]
|
||||||
|
**Status** | Pointer to **string** | Updated status of the pet | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetName
|
||||||
|
|
||||||
|
`func (o *InlineObject) GetName() string`
|
||||||
|
|
||||||
|
GetName returns the Name field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetNameOk
|
||||||
|
|
||||||
|
`func (o *InlineObject) GetNameOk() (string, bool)`
|
||||||
|
|
||||||
|
GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasName
|
||||||
|
|
||||||
|
`func (o *InlineObject) HasName() bool`
|
||||||
|
|
||||||
|
HasName returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetName
|
||||||
|
|
||||||
|
`func (o *InlineObject) SetName(v string)`
|
||||||
|
|
||||||
|
SetName gets a reference to the given string and assigns it to the Name field.
|
||||||
|
|
||||||
|
### GetStatus
|
||||||
|
|
||||||
|
`func (o *InlineObject) GetStatus() string`
|
||||||
|
|
||||||
|
GetStatus returns the Status field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetStatusOk
|
||||||
|
|
||||||
|
`func (o *InlineObject) GetStatusOk() (string, bool)`
|
||||||
|
|
||||||
|
GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasStatus
|
||||||
|
|
||||||
|
`func (o *InlineObject) HasStatus() bool`
|
||||||
|
|
||||||
|
HasStatus returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetStatus
|
||||||
|
|
||||||
|
`func (o *InlineObject) SetStatus(v string)`
|
||||||
|
|
||||||
|
SetStatus gets a reference to the given string and assigns it to the Status field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# InlineObject1
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**AdditionalMetadata** | Pointer to **string** | Additional data to pass to server | [optional]
|
||||||
|
**File** | Pointer to [***os.File**](*os.File.md) | file to upload | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetAdditionalMetadata
|
||||||
|
|
||||||
|
`func (o *InlineObject1) GetAdditionalMetadata() string`
|
||||||
|
|
||||||
|
GetAdditionalMetadata returns the AdditionalMetadata field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetAdditionalMetadataOk
|
||||||
|
|
||||||
|
`func (o *InlineObject1) GetAdditionalMetadataOk() (string, bool)`
|
||||||
|
|
||||||
|
GetAdditionalMetadataOk returns a tuple with the AdditionalMetadata field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasAdditionalMetadata
|
||||||
|
|
||||||
|
`func (o *InlineObject1) HasAdditionalMetadata() bool`
|
||||||
|
|
||||||
|
HasAdditionalMetadata returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetAdditionalMetadata
|
||||||
|
|
||||||
|
`func (o *InlineObject1) SetAdditionalMetadata(v string)`
|
||||||
|
|
||||||
|
SetAdditionalMetadata gets a reference to the given string and assigns it to the AdditionalMetadata field.
|
||||||
|
|
||||||
|
### GetFile
|
||||||
|
|
||||||
|
`func (o *InlineObject1) GetFile() *os.File`
|
||||||
|
|
||||||
|
GetFile returns the File field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetFileOk
|
||||||
|
|
||||||
|
`func (o *InlineObject1) GetFileOk() (*os.File, bool)`
|
||||||
|
|
||||||
|
GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasFile
|
||||||
|
|
||||||
|
`func (o *InlineObject1) HasFile() bool`
|
||||||
|
|
||||||
|
HasFile returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetFile
|
||||||
|
|
||||||
|
`func (o *InlineObject1) SetFile(v *os.File)`
|
||||||
|
|
||||||
|
SetFile gets a reference to the given *os.File and assigns it to the File field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# InlineObject2
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**EnumFormStringArray** | Pointer to **[]string** | Form parameter enum test (string array) | [optional]
|
||||||
|
**EnumFormString** | Pointer to **string** | Form parameter enum test (string) | [optional] [default to ENUM_FORM_STRING_EFG]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetEnumFormStringArray
|
||||||
|
|
||||||
|
`func (o *InlineObject2) GetEnumFormStringArray() []string`
|
||||||
|
|
||||||
|
GetEnumFormStringArray returns the EnumFormStringArray field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetEnumFormStringArrayOk
|
||||||
|
|
||||||
|
`func (o *InlineObject2) GetEnumFormStringArrayOk() ([]string, bool)`
|
||||||
|
|
||||||
|
GetEnumFormStringArrayOk returns a tuple with the EnumFormStringArray field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasEnumFormStringArray
|
||||||
|
|
||||||
|
`func (o *InlineObject2) HasEnumFormStringArray() bool`
|
||||||
|
|
||||||
|
HasEnumFormStringArray returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetEnumFormStringArray
|
||||||
|
|
||||||
|
`func (o *InlineObject2) SetEnumFormStringArray(v []string)`
|
||||||
|
|
||||||
|
SetEnumFormStringArray gets a reference to the given []string and assigns it to the EnumFormStringArray field.
|
||||||
|
|
||||||
|
### GetEnumFormString
|
||||||
|
|
||||||
|
`func (o *InlineObject2) GetEnumFormString() string`
|
||||||
|
|
||||||
|
GetEnumFormString returns the EnumFormString field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetEnumFormStringOk
|
||||||
|
|
||||||
|
`func (o *InlineObject2) GetEnumFormStringOk() (string, bool)`
|
||||||
|
|
||||||
|
GetEnumFormStringOk returns a tuple with the EnumFormString field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasEnumFormString
|
||||||
|
|
||||||
|
`func (o *InlineObject2) HasEnumFormString() bool`
|
||||||
|
|
||||||
|
HasEnumFormString returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetEnumFormString
|
||||||
|
|
||||||
|
`func (o *InlineObject2) SetEnumFormString(v string)`
|
||||||
|
|
||||||
|
SetEnumFormString gets a reference to the given string and assigns it to the EnumFormString field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,377 @@
|
|||||||
|
# InlineObject3
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Integer** | Pointer to **int32** | None | [optional]
|
||||||
|
**Int32** | Pointer to **int32** | None | [optional]
|
||||||
|
**Int64** | Pointer to **int64** | None | [optional]
|
||||||
|
**Number** | Pointer to **float32** | None |
|
||||||
|
**Float** | Pointer to **float32** | None | [optional]
|
||||||
|
**Double** | Pointer to **float64** | None |
|
||||||
|
**String** | Pointer to **string** | None | [optional]
|
||||||
|
**PatternWithoutDelimiter** | Pointer to **string** | None |
|
||||||
|
**Byte** | Pointer to **string** | None |
|
||||||
|
**Binary** | Pointer to [***os.File**](*os.File.md) | None | [optional]
|
||||||
|
**Date** | Pointer to **string** | None | [optional]
|
||||||
|
**DateTime** | Pointer to [**time.Time**](time.Time.md) | None | [optional]
|
||||||
|
**Password** | Pointer to **string** | None | [optional]
|
||||||
|
**Callback** | Pointer to **string** | None | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetInteger
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetInteger() int32`
|
||||||
|
|
||||||
|
GetInteger returns the Integer field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetIntegerOk
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetIntegerOk() (int32, bool)`
|
||||||
|
|
||||||
|
GetIntegerOk returns a tuple with the Integer field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasInteger
|
||||||
|
|
||||||
|
`func (o *InlineObject3) HasInteger() bool`
|
||||||
|
|
||||||
|
HasInteger returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetInteger
|
||||||
|
|
||||||
|
`func (o *InlineObject3) SetInteger(v int32)`
|
||||||
|
|
||||||
|
SetInteger gets a reference to the given int32 and assigns it to the Integer field.
|
||||||
|
|
||||||
|
### GetInt32
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetInt32() int32`
|
||||||
|
|
||||||
|
GetInt32 returns the Int32 field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetInt32Ok
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetInt32Ok() (int32, bool)`
|
||||||
|
|
||||||
|
GetInt32Ok returns a tuple with the Int32 field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasInt32
|
||||||
|
|
||||||
|
`func (o *InlineObject3) HasInt32() bool`
|
||||||
|
|
||||||
|
HasInt32 returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetInt32
|
||||||
|
|
||||||
|
`func (o *InlineObject3) SetInt32(v int32)`
|
||||||
|
|
||||||
|
SetInt32 gets a reference to the given int32 and assigns it to the Int32 field.
|
||||||
|
|
||||||
|
### GetInt64
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetInt64() int64`
|
||||||
|
|
||||||
|
GetInt64 returns the Int64 field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetInt64Ok
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetInt64Ok() (int64, bool)`
|
||||||
|
|
||||||
|
GetInt64Ok returns a tuple with the Int64 field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasInt64
|
||||||
|
|
||||||
|
`func (o *InlineObject3) HasInt64() bool`
|
||||||
|
|
||||||
|
HasInt64 returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetInt64
|
||||||
|
|
||||||
|
`func (o *InlineObject3) SetInt64(v int64)`
|
||||||
|
|
||||||
|
SetInt64 gets a reference to the given int64 and assigns it to the Int64 field.
|
||||||
|
|
||||||
|
### GetNumber
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetNumber() float32`
|
||||||
|
|
||||||
|
GetNumber returns the Number field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetNumberOk
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetNumberOk() (float32, bool)`
|
||||||
|
|
||||||
|
GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasNumber
|
||||||
|
|
||||||
|
`func (o *InlineObject3) HasNumber() bool`
|
||||||
|
|
||||||
|
HasNumber returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetNumber
|
||||||
|
|
||||||
|
`func (o *InlineObject3) SetNumber(v float32)`
|
||||||
|
|
||||||
|
SetNumber gets a reference to the given float32 and assigns it to the Number field.
|
||||||
|
|
||||||
|
### GetFloat
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetFloat() float32`
|
||||||
|
|
||||||
|
GetFloat returns the Float field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetFloatOk
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetFloatOk() (float32, bool)`
|
||||||
|
|
||||||
|
GetFloatOk returns a tuple with the Float field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasFloat
|
||||||
|
|
||||||
|
`func (o *InlineObject3) HasFloat() bool`
|
||||||
|
|
||||||
|
HasFloat returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetFloat
|
||||||
|
|
||||||
|
`func (o *InlineObject3) SetFloat(v float32)`
|
||||||
|
|
||||||
|
SetFloat gets a reference to the given float32 and assigns it to the Float field.
|
||||||
|
|
||||||
|
### GetDouble
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetDouble() float64`
|
||||||
|
|
||||||
|
GetDouble returns the Double field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetDoubleOk
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetDoubleOk() (float64, bool)`
|
||||||
|
|
||||||
|
GetDoubleOk returns a tuple with the Double field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasDouble
|
||||||
|
|
||||||
|
`func (o *InlineObject3) HasDouble() bool`
|
||||||
|
|
||||||
|
HasDouble returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetDouble
|
||||||
|
|
||||||
|
`func (o *InlineObject3) SetDouble(v float64)`
|
||||||
|
|
||||||
|
SetDouble gets a reference to the given float64 and assigns it to the Double field.
|
||||||
|
|
||||||
|
### GetString
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetString() string`
|
||||||
|
|
||||||
|
GetString returns the String field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetStringOk
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetStringOk() (string, bool)`
|
||||||
|
|
||||||
|
GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasString
|
||||||
|
|
||||||
|
`func (o *InlineObject3) HasString() bool`
|
||||||
|
|
||||||
|
HasString returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetString
|
||||||
|
|
||||||
|
`func (o *InlineObject3) SetString(v string)`
|
||||||
|
|
||||||
|
SetString gets a reference to the given string and assigns it to the String field.
|
||||||
|
|
||||||
|
### GetPatternWithoutDelimiter
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetPatternWithoutDelimiter() string`
|
||||||
|
|
||||||
|
GetPatternWithoutDelimiter returns the PatternWithoutDelimiter field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetPatternWithoutDelimiterOk
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetPatternWithoutDelimiterOk() (string, bool)`
|
||||||
|
|
||||||
|
GetPatternWithoutDelimiterOk returns a tuple with the PatternWithoutDelimiter field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasPatternWithoutDelimiter
|
||||||
|
|
||||||
|
`func (o *InlineObject3) HasPatternWithoutDelimiter() bool`
|
||||||
|
|
||||||
|
HasPatternWithoutDelimiter returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetPatternWithoutDelimiter
|
||||||
|
|
||||||
|
`func (o *InlineObject3) SetPatternWithoutDelimiter(v string)`
|
||||||
|
|
||||||
|
SetPatternWithoutDelimiter gets a reference to the given string and assigns it to the PatternWithoutDelimiter field.
|
||||||
|
|
||||||
|
### GetByte
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetByte() string`
|
||||||
|
|
||||||
|
GetByte returns the Byte field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetByteOk
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetByteOk() (string, bool)`
|
||||||
|
|
||||||
|
GetByteOk returns a tuple with the Byte field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasByte
|
||||||
|
|
||||||
|
`func (o *InlineObject3) HasByte() bool`
|
||||||
|
|
||||||
|
HasByte returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetByte
|
||||||
|
|
||||||
|
`func (o *InlineObject3) SetByte(v string)`
|
||||||
|
|
||||||
|
SetByte gets a reference to the given string and assigns it to the Byte field.
|
||||||
|
|
||||||
|
### GetBinary
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetBinary() *os.File`
|
||||||
|
|
||||||
|
GetBinary returns the Binary field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetBinaryOk
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetBinaryOk() (*os.File, bool)`
|
||||||
|
|
||||||
|
GetBinaryOk returns a tuple with the Binary field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasBinary
|
||||||
|
|
||||||
|
`func (o *InlineObject3) HasBinary() bool`
|
||||||
|
|
||||||
|
HasBinary returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetBinary
|
||||||
|
|
||||||
|
`func (o *InlineObject3) SetBinary(v *os.File)`
|
||||||
|
|
||||||
|
SetBinary gets a reference to the given *os.File and assigns it to the Binary field.
|
||||||
|
|
||||||
|
### GetDate
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetDate() string`
|
||||||
|
|
||||||
|
GetDate returns the Date field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetDateOk
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetDateOk() (string, bool)`
|
||||||
|
|
||||||
|
GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasDate
|
||||||
|
|
||||||
|
`func (o *InlineObject3) HasDate() bool`
|
||||||
|
|
||||||
|
HasDate returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetDate
|
||||||
|
|
||||||
|
`func (o *InlineObject3) SetDate(v string)`
|
||||||
|
|
||||||
|
SetDate gets a reference to the given string and assigns it to the Date field.
|
||||||
|
|
||||||
|
### GetDateTime
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetDateTime() time.Time`
|
||||||
|
|
||||||
|
GetDateTime returns the DateTime field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetDateTimeOk
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetDateTimeOk() (time.Time, bool)`
|
||||||
|
|
||||||
|
GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasDateTime
|
||||||
|
|
||||||
|
`func (o *InlineObject3) HasDateTime() bool`
|
||||||
|
|
||||||
|
HasDateTime returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetDateTime
|
||||||
|
|
||||||
|
`func (o *InlineObject3) SetDateTime(v time.Time)`
|
||||||
|
|
||||||
|
SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field.
|
||||||
|
|
||||||
|
### GetPassword
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetPassword() string`
|
||||||
|
|
||||||
|
GetPassword returns the Password field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetPasswordOk
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetPasswordOk() (string, bool)`
|
||||||
|
|
||||||
|
GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasPassword
|
||||||
|
|
||||||
|
`func (o *InlineObject3) HasPassword() bool`
|
||||||
|
|
||||||
|
HasPassword returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetPassword
|
||||||
|
|
||||||
|
`func (o *InlineObject3) SetPassword(v string)`
|
||||||
|
|
||||||
|
SetPassword gets a reference to the given string and assigns it to the Password field.
|
||||||
|
|
||||||
|
### GetCallback
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetCallback() string`
|
||||||
|
|
||||||
|
GetCallback returns the Callback field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetCallbackOk
|
||||||
|
|
||||||
|
`func (o *InlineObject3) GetCallbackOk() (string, bool)`
|
||||||
|
|
||||||
|
GetCallbackOk returns a tuple with the Callback field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasCallback
|
||||||
|
|
||||||
|
`func (o *InlineObject3) HasCallback() bool`
|
||||||
|
|
||||||
|
HasCallback returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetCallback
|
||||||
|
|
||||||
|
`func (o *InlineObject3) SetCallback(v string)`
|
||||||
|
|
||||||
|
SetCallback gets a reference to the given string and assigns it to the Callback field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# InlineObject4
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Param** | Pointer to **string** | field1 |
|
||||||
|
**Param2** | Pointer to **string** | field2 |
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetParam
|
||||||
|
|
||||||
|
`func (o *InlineObject4) GetParam() string`
|
||||||
|
|
||||||
|
GetParam returns the Param field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetParamOk
|
||||||
|
|
||||||
|
`func (o *InlineObject4) GetParamOk() (string, bool)`
|
||||||
|
|
||||||
|
GetParamOk returns a tuple with the Param field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasParam
|
||||||
|
|
||||||
|
`func (o *InlineObject4) HasParam() bool`
|
||||||
|
|
||||||
|
HasParam returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetParam
|
||||||
|
|
||||||
|
`func (o *InlineObject4) SetParam(v string)`
|
||||||
|
|
||||||
|
SetParam gets a reference to the given string and assigns it to the Param field.
|
||||||
|
|
||||||
|
### GetParam2
|
||||||
|
|
||||||
|
`func (o *InlineObject4) GetParam2() string`
|
||||||
|
|
||||||
|
GetParam2 returns the Param2 field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetParam2Ok
|
||||||
|
|
||||||
|
`func (o *InlineObject4) GetParam2Ok() (string, bool)`
|
||||||
|
|
||||||
|
GetParam2Ok returns a tuple with the Param2 field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasParam2
|
||||||
|
|
||||||
|
`func (o *InlineObject4) HasParam2() bool`
|
||||||
|
|
||||||
|
HasParam2 returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetParam2
|
||||||
|
|
||||||
|
`func (o *InlineObject4) SetParam2(v string)`
|
||||||
|
|
||||||
|
SetParam2 gets a reference to the given string and assigns it to the Param2 field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# InlineObject5
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**AdditionalMetadata** | Pointer to **string** | Additional data to pass to server | [optional]
|
||||||
|
**RequiredFile** | Pointer to [***os.File**](*os.File.md) | file to upload |
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetAdditionalMetadata
|
||||||
|
|
||||||
|
`func (o *InlineObject5) GetAdditionalMetadata() string`
|
||||||
|
|
||||||
|
GetAdditionalMetadata returns the AdditionalMetadata field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetAdditionalMetadataOk
|
||||||
|
|
||||||
|
`func (o *InlineObject5) GetAdditionalMetadataOk() (string, bool)`
|
||||||
|
|
||||||
|
GetAdditionalMetadataOk returns a tuple with the AdditionalMetadata field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasAdditionalMetadata
|
||||||
|
|
||||||
|
`func (o *InlineObject5) HasAdditionalMetadata() bool`
|
||||||
|
|
||||||
|
HasAdditionalMetadata returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetAdditionalMetadata
|
||||||
|
|
||||||
|
`func (o *InlineObject5) SetAdditionalMetadata(v string)`
|
||||||
|
|
||||||
|
SetAdditionalMetadata gets a reference to the given string and assigns it to the AdditionalMetadata field.
|
||||||
|
|
||||||
|
### GetRequiredFile
|
||||||
|
|
||||||
|
`func (o *InlineObject5) GetRequiredFile() *os.File`
|
||||||
|
|
||||||
|
GetRequiredFile returns the RequiredFile field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetRequiredFileOk
|
||||||
|
|
||||||
|
`func (o *InlineObject5) GetRequiredFileOk() (*os.File, bool)`
|
||||||
|
|
||||||
|
GetRequiredFileOk returns a tuple with the RequiredFile field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasRequiredFile
|
||||||
|
|
||||||
|
`func (o *InlineObject5) HasRequiredFile() bool`
|
||||||
|
|
||||||
|
HasRequiredFile returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetRequiredFile
|
||||||
|
|
||||||
|
`func (o *InlineObject5) SetRequiredFile(v *os.File)`
|
||||||
|
|
||||||
|
SetRequiredFile gets a reference to the given *os.File and assigns it to the RequiredFile field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# InlineResponseDefault
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**String** | Pointer to [**Foo**](Foo.md) | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetString
|
||||||
|
|
||||||
|
`func (o *InlineResponseDefault) GetString() Foo`
|
||||||
|
|
||||||
|
GetString returns the String field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetStringOk
|
||||||
|
|
||||||
|
`func (o *InlineResponseDefault) GetStringOk() (Foo, bool)`
|
||||||
|
|
||||||
|
GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasString
|
||||||
|
|
||||||
|
`func (o *InlineResponseDefault) HasString() bool`
|
||||||
|
|
||||||
|
HasString returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetString
|
||||||
|
|
||||||
|
`func (o *InlineResponseDefault) SetString(v Foo)`
|
||||||
|
|
||||||
|
SetString gets a reference to the given Foo and assigns it to the String field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# List
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Var123List** | Pointer to **string** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetVar123List
|
||||||
|
|
||||||
|
`func (o *List) GetVar123List() string`
|
||||||
|
|
||||||
|
GetVar123List returns the Var123List field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetVar123ListOk
|
||||||
|
|
||||||
|
`func (o *List) GetVar123ListOk() (string, bool)`
|
||||||
|
|
||||||
|
GetVar123ListOk returns a tuple with the Var123List field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasVar123List
|
||||||
|
|
||||||
|
`func (o *List) HasVar123List() bool`
|
||||||
|
|
||||||
|
HasVar123List returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetVar123List
|
||||||
|
|
||||||
|
`func (o *List) SetVar123List(v string)`
|
||||||
|
|
||||||
|
SetVar123List gets a reference to the given string and assigns it to the Var123List field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
# MapTest
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**MapMapOfString** | Pointer to [**map[string]map[string]string**](map.md) | | [optional]
|
||||||
|
**MapOfEnumString** | Pointer to **map[string]string** | | [optional]
|
||||||
|
**DirectMap** | Pointer to **map[string]bool** | | [optional]
|
||||||
|
**IndirectMap** | Pointer to **map[string]bool** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetMapMapOfString
|
||||||
|
|
||||||
|
`func (o *MapTest) GetMapMapOfString() map[string]map[string]string`
|
||||||
|
|
||||||
|
GetMapMapOfString returns the MapMapOfString field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetMapMapOfStringOk
|
||||||
|
|
||||||
|
`func (o *MapTest) GetMapMapOfStringOk() (map[string]map[string]string, bool)`
|
||||||
|
|
||||||
|
GetMapMapOfStringOk returns a tuple with the MapMapOfString field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasMapMapOfString
|
||||||
|
|
||||||
|
`func (o *MapTest) HasMapMapOfString() bool`
|
||||||
|
|
||||||
|
HasMapMapOfString returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetMapMapOfString
|
||||||
|
|
||||||
|
`func (o *MapTest) SetMapMapOfString(v map[string]map[string]string)`
|
||||||
|
|
||||||
|
SetMapMapOfString gets a reference to the given map[string]map[string]string and assigns it to the MapMapOfString field.
|
||||||
|
|
||||||
|
### GetMapOfEnumString
|
||||||
|
|
||||||
|
`func (o *MapTest) GetMapOfEnumString() map[string]string`
|
||||||
|
|
||||||
|
GetMapOfEnumString returns the MapOfEnumString field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetMapOfEnumStringOk
|
||||||
|
|
||||||
|
`func (o *MapTest) GetMapOfEnumStringOk() (map[string]string, bool)`
|
||||||
|
|
||||||
|
GetMapOfEnumStringOk returns a tuple with the MapOfEnumString field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasMapOfEnumString
|
||||||
|
|
||||||
|
`func (o *MapTest) HasMapOfEnumString() bool`
|
||||||
|
|
||||||
|
HasMapOfEnumString returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetMapOfEnumString
|
||||||
|
|
||||||
|
`func (o *MapTest) SetMapOfEnumString(v map[string]string)`
|
||||||
|
|
||||||
|
SetMapOfEnumString gets a reference to the given map[string]string and assigns it to the MapOfEnumString field.
|
||||||
|
|
||||||
|
### GetDirectMap
|
||||||
|
|
||||||
|
`func (o *MapTest) GetDirectMap() map[string]bool`
|
||||||
|
|
||||||
|
GetDirectMap returns the DirectMap field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetDirectMapOk
|
||||||
|
|
||||||
|
`func (o *MapTest) GetDirectMapOk() (map[string]bool, bool)`
|
||||||
|
|
||||||
|
GetDirectMapOk returns a tuple with the DirectMap field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasDirectMap
|
||||||
|
|
||||||
|
`func (o *MapTest) HasDirectMap() bool`
|
||||||
|
|
||||||
|
HasDirectMap returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetDirectMap
|
||||||
|
|
||||||
|
`func (o *MapTest) SetDirectMap(v map[string]bool)`
|
||||||
|
|
||||||
|
SetDirectMap gets a reference to the given map[string]bool and assigns it to the DirectMap field.
|
||||||
|
|
||||||
|
### GetIndirectMap
|
||||||
|
|
||||||
|
`func (o *MapTest) GetIndirectMap() map[string]bool`
|
||||||
|
|
||||||
|
GetIndirectMap returns the IndirectMap field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetIndirectMapOk
|
||||||
|
|
||||||
|
`func (o *MapTest) GetIndirectMapOk() (map[string]bool, bool)`
|
||||||
|
|
||||||
|
GetIndirectMapOk returns a tuple with the IndirectMap field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasIndirectMap
|
||||||
|
|
||||||
|
`func (o *MapTest) HasIndirectMap() bool`
|
||||||
|
|
||||||
|
HasIndirectMap returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetIndirectMap
|
||||||
|
|
||||||
|
`func (o *MapTest) SetIndirectMap(v map[string]bool)`
|
||||||
|
|
||||||
|
SetIndirectMap gets a reference to the given map[string]bool and assigns it to the IndirectMap field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
# MixedPropertiesAndAdditionalPropertiesClass
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Uuid** | Pointer to **string** | | [optional]
|
||||||
|
**DateTime** | Pointer to [**time.Time**](time.Time.md) | | [optional]
|
||||||
|
**Map** | Pointer to [**map[string]Animal**](Animal.md) | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetUuid
|
||||||
|
|
||||||
|
`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string`
|
||||||
|
|
||||||
|
GetUuid returns the Uuid field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetUuidOk
|
||||||
|
|
||||||
|
`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (string, bool)`
|
||||||
|
|
||||||
|
GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasUuid
|
||||||
|
|
||||||
|
`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUuid() bool`
|
||||||
|
|
||||||
|
HasUuid returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetUuid
|
||||||
|
|
||||||
|
`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUuid(v string)`
|
||||||
|
|
||||||
|
SetUuid gets a reference to the given string and assigns it to the Uuid field.
|
||||||
|
|
||||||
|
### GetDateTime
|
||||||
|
|
||||||
|
`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTime() time.Time`
|
||||||
|
|
||||||
|
GetDateTime returns the DateTime field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetDateTimeOk
|
||||||
|
|
||||||
|
`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTimeOk() (time.Time, bool)`
|
||||||
|
|
||||||
|
GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasDateTime
|
||||||
|
|
||||||
|
`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasDateTime() bool`
|
||||||
|
|
||||||
|
HasDateTime returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetDateTime
|
||||||
|
|
||||||
|
`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetDateTime(v time.Time)`
|
||||||
|
|
||||||
|
SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field.
|
||||||
|
|
||||||
|
### GetMap
|
||||||
|
|
||||||
|
`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMap() map[string]Animal`
|
||||||
|
|
||||||
|
GetMap returns the Map field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetMapOk
|
||||||
|
|
||||||
|
`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMapOk() (map[string]Animal, bool)`
|
||||||
|
|
||||||
|
GetMapOk returns a tuple with the Map field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasMap
|
||||||
|
|
||||||
|
`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasMap() bool`
|
||||||
|
|
||||||
|
HasMap returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetMap
|
||||||
|
|
||||||
|
`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetMap(v map[string]Animal)`
|
||||||
|
|
||||||
|
SetMap gets a reference to the given map[string]Animal and assigns it to the Map field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# Model200Response
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Name** | Pointer to **int32** | | [optional]
|
||||||
|
**Class** | Pointer to **string** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetName
|
||||||
|
|
||||||
|
`func (o *Model200Response) GetName() int32`
|
||||||
|
|
||||||
|
GetName returns the Name field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetNameOk
|
||||||
|
|
||||||
|
`func (o *Model200Response) GetNameOk() (int32, bool)`
|
||||||
|
|
||||||
|
GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasName
|
||||||
|
|
||||||
|
`func (o *Model200Response) HasName() bool`
|
||||||
|
|
||||||
|
HasName returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetName
|
||||||
|
|
||||||
|
`func (o *Model200Response) SetName(v int32)`
|
||||||
|
|
||||||
|
SetName gets a reference to the given int32 and assigns it to the Name field.
|
||||||
|
|
||||||
|
### GetClass
|
||||||
|
|
||||||
|
`func (o *Model200Response) GetClass() string`
|
||||||
|
|
||||||
|
GetClass returns the Class field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetClassOk
|
||||||
|
|
||||||
|
`func (o *Model200Response) GetClassOk() (string, bool)`
|
||||||
|
|
||||||
|
GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasClass
|
||||||
|
|
||||||
|
`func (o *Model200Response) HasClass() bool`
|
||||||
|
|
||||||
|
HasClass returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetClass
|
||||||
|
|
||||||
|
`func (o *Model200Response) SetClass(v string)`
|
||||||
|
|
||||||
|
SetClass gets a reference to the given string and assigns it to the Class field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
# Name
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Name** | Pointer to **int32** | |
|
||||||
|
**SnakeCase** | Pointer to **int32** | | [optional]
|
||||||
|
**Property** | Pointer to **string** | | [optional]
|
||||||
|
**Var123Number** | Pointer to **int32** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetName
|
||||||
|
|
||||||
|
`func (o *Name) GetName() int32`
|
||||||
|
|
||||||
|
GetName returns the Name field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetNameOk
|
||||||
|
|
||||||
|
`func (o *Name) GetNameOk() (int32, bool)`
|
||||||
|
|
||||||
|
GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasName
|
||||||
|
|
||||||
|
`func (o *Name) HasName() bool`
|
||||||
|
|
||||||
|
HasName returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetName
|
||||||
|
|
||||||
|
`func (o *Name) SetName(v int32)`
|
||||||
|
|
||||||
|
SetName gets a reference to the given int32 and assigns it to the Name field.
|
||||||
|
|
||||||
|
### GetSnakeCase
|
||||||
|
|
||||||
|
`func (o *Name) GetSnakeCase() int32`
|
||||||
|
|
||||||
|
GetSnakeCase returns the SnakeCase field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetSnakeCaseOk
|
||||||
|
|
||||||
|
`func (o *Name) GetSnakeCaseOk() (int32, bool)`
|
||||||
|
|
||||||
|
GetSnakeCaseOk returns a tuple with the SnakeCase field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasSnakeCase
|
||||||
|
|
||||||
|
`func (o *Name) HasSnakeCase() bool`
|
||||||
|
|
||||||
|
HasSnakeCase returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetSnakeCase
|
||||||
|
|
||||||
|
`func (o *Name) SetSnakeCase(v int32)`
|
||||||
|
|
||||||
|
SetSnakeCase gets a reference to the given int32 and assigns it to the SnakeCase field.
|
||||||
|
|
||||||
|
### GetProperty
|
||||||
|
|
||||||
|
`func (o *Name) GetProperty() string`
|
||||||
|
|
||||||
|
GetProperty returns the Property field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetPropertyOk
|
||||||
|
|
||||||
|
`func (o *Name) GetPropertyOk() (string, bool)`
|
||||||
|
|
||||||
|
GetPropertyOk returns a tuple with the Property field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasProperty
|
||||||
|
|
||||||
|
`func (o *Name) HasProperty() bool`
|
||||||
|
|
||||||
|
HasProperty returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetProperty
|
||||||
|
|
||||||
|
`func (o *Name) SetProperty(v string)`
|
||||||
|
|
||||||
|
SetProperty gets a reference to the given string and assigns it to the Property field.
|
||||||
|
|
||||||
|
### GetVar123Number
|
||||||
|
|
||||||
|
`func (o *Name) GetVar123Number() int32`
|
||||||
|
|
||||||
|
GetVar123Number returns the Var123Number field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetVar123NumberOk
|
||||||
|
|
||||||
|
`func (o *Name) GetVar123NumberOk() (int32, bool)`
|
||||||
|
|
||||||
|
GetVar123NumberOk returns a tuple with the Var123Number field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasVar123Number
|
||||||
|
|
||||||
|
`func (o *Name) HasVar123Number() bool`
|
||||||
|
|
||||||
|
HasVar123Number returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetVar123Number
|
||||||
|
|
||||||
|
`func (o *Name) SetVar123Number(v int32)`
|
||||||
|
|
||||||
|
SetVar123Number gets a reference to the given int32 and assigns it to the Var123Number field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,395 @@
|
|||||||
|
# NullableClass
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**IntegerProp** | Pointer to **int32** | | [optional]
|
||||||
|
**NumberProp** | Pointer to **float32** | | [optional]
|
||||||
|
**BooleanProp** | Pointer to **bool** | | [optional]
|
||||||
|
**StringProp** | Pointer to **string** | | [optional]
|
||||||
|
**DateProp** | Pointer to **string** | | [optional]
|
||||||
|
**DatetimeProp** | Pointer to [**time.Time**](time.Time.md) | | [optional]
|
||||||
|
**ArrayNullableProp** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | | [optional]
|
||||||
|
**ArrayAndItemsNullableProp** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | | [optional]
|
||||||
|
**ArrayItemsNullable** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | | [optional]
|
||||||
|
**ObjectNullableProp** | Pointer to [**map[string]map[string]interface{}**](map[string]interface{}.md) | | [optional]
|
||||||
|
**ObjectAndItemsNullableProp** | Pointer to [**map[string]map[string]interface{}**](map[string]interface{}.md) | | [optional]
|
||||||
|
**ObjectItemsNullable** | Pointer to [**map[string]map[string]interface{}**](map[string]interface{}.md) | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetIntegerProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetIntegerProp() int32`
|
||||||
|
|
||||||
|
GetIntegerProp returns the IntegerProp field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetIntegerPropOk
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetIntegerPropOk() (int32, bool)`
|
||||||
|
|
||||||
|
GetIntegerPropOk returns a tuple with the IntegerProp field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasIntegerProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) HasIntegerProp() bool`
|
||||||
|
|
||||||
|
HasIntegerProp returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetIntegerProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetIntegerProp(v int32)`
|
||||||
|
|
||||||
|
SetIntegerProp gets a reference to the given int32 and assigns it to the IntegerProp field.
|
||||||
|
|
||||||
|
### SetIntegerPropExplicitNull
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetIntegerPropExplicitNull(b bool)`
|
||||||
|
|
||||||
|
SetIntegerPropExplicitNull (un)sets IntegerProp to be considered as explicit "null" value
|
||||||
|
when serializing to JSON (pass true as argument to set this, false to unset)
|
||||||
|
The IntegerProp value is set to nil even if false is passed
|
||||||
|
### GetNumberProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetNumberProp() float32`
|
||||||
|
|
||||||
|
GetNumberProp returns the NumberProp field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetNumberPropOk
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetNumberPropOk() (float32, bool)`
|
||||||
|
|
||||||
|
GetNumberPropOk returns a tuple with the NumberProp field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasNumberProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) HasNumberProp() bool`
|
||||||
|
|
||||||
|
HasNumberProp returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetNumberProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetNumberProp(v float32)`
|
||||||
|
|
||||||
|
SetNumberProp gets a reference to the given float32 and assigns it to the NumberProp field.
|
||||||
|
|
||||||
|
### SetNumberPropExplicitNull
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetNumberPropExplicitNull(b bool)`
|
||||||
|
|
||||||
|
SetNumberPropExplicitNull (un)sets NumberProp to be considered as explicit "null" value
|
||||||
|
when serializing to JSON (pass true as argument to set this, false to unset)
|
||||||
|
The NumberProp value is set to nil even if false is passed
|
||||||
|
### GetBooleanProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetBooleanProp() bool`
|
||||||
|
|
||||||
|
GetBooleanProp returns the BooleanProp field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetBooleanPropOk
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetBooleanPropOk() (bool, bool)`
|
||||||
|
|
||||||
|
GetBooleanPropOk returns a tuple with the BooleanProp field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasBooleanProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) HasBooleanProp() bool`
|
||||||
|
|
||||||
|
HasBooleanProp returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetBooleanProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetBooleanProp(v bool)`
|
||||||
|
|
||||||
|
SetBooleanProp gets a reference to the given bool and assigns it to the BooleanProp field.
|
||||||
|
|
||||||
|
### SetBooleanPropExplicitNull
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetBooleanPropExplicitNull(b bool)`
|
||||||
|
|
||||||
|
SetBooleanPropExplicitNull (un)sets BooleanProp to be considered as explicit "null" value
|
||||||
|
when serializing to JSON (pass true as argument to set this, false to unset)
|
||||||
|
The BooleanProp value is set to nil even if false is passed
|
||||||
|
### GetStringProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetStringProp() string`
|
||||||
|
|
||||||
|
GetStringProp returns the StringProp field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetStringPropOk
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetStringPropOk() (string, bool)`
|
||||||
|
|
||||||
|
GetStringPropOk returns a tuple with the StringProp field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasStringProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) HasStringProp() bool`
|
||||||
|
|
||||||
|
HasStringProp returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetStringProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetStringProp(v string)`
|
||||||
|
|
||||||
|
SetStringProp gets a reference to the given string and assigns it to the StringProp field.
|
||||||
|
|
||||||
|
### SetStringPropExplicitNull
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetStringPropExplicitNull(b bool)`
|
||||||
|
|
||||||
|
SetStringPropExplicitNull (un)sets StringProp to be considered as explicit "null" value
|
||||||
|
when serializing to JSON (pass true as argument to set this, false to unset)
|
||||||
|
The StringProp value is set to nil even if false is passed
|
||||||
|
### GetDateProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetDateProp() string`
|
||||||
|
|
||||||
|
GetDateProp returns the DateProp field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetDatePropOk
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetDatePropOk() (string, bool)`
|
||||||
|
|
||||||
|
GetDatePropOk returns a tuple with the DateProp field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasDateProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) HasDateProp() bool`
|
||||||
|
|
||||||
|
HasDateProp returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetDateProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetDateProp(v string)`
|
||||||
|
|
||||||
|
SetDateProp gets a reference to the given string and assigns it to the DateProp field.
|
||||||
|
|
||||||
|
### SetDatePropExplicitNull
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetDatePropExplicitNull(b bool)`
|
||||||
|
|
||||||
|
SetDatePropExplicitNull (un)sets DateProp to be considered as explicit "null" value
|
||||||
|
when serializing to JSON (pass true as argument to set this, false to unset)
|
||||||
|
The DateProp value is set to nil even if false is passed
|
||||||
|
### GetDatetimeProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetDatetimeProp() time.Time`
|
||||||
|
|
||||||
|
GetDatetimeProp returns the DatetimeProp field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetDatetimePropOk
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetDatetimePropOk() (time.Time, bool)`
|
||||||
|
|
||||||
|
GetDatetimePropOk returns a tuple with the DatetimeProp field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasDatetimeProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) HasDatetimeProp() bool`
|
||||||
|
|
||||||
|
HasDatetimeProp returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetDatetimeProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetDatetimeProp(v time.Time)`
|
||||||
|
|
||||||
|
SetDatetimeProp gets a reference to the given time.Time and assigns it to the DatetimeProp field.
|
||||||
|
|
||||||
|
### SetDatetimePropExplicitNull
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetDatetimePropExplicitNull(b bool)`
|
||||||
|
|
||||||
|
SetDatetimePropExplicitNull (un)sets DatetimeProp to be considered as explicit "null" value
|
||||||
|
when serializing to JSON (pass true as argument to set this, false to unset)
|
||||||
|
The DatetimeProp value is set to nil even if false is passed
|
||||||
|
### GetArrayNullableProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetArrayNullableProp() []map[string]interface{}`
|
||||||
|
|
||||||
|
GetArrayNullableProp returns the ArrayNullableProp field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetArrayNullablePropOk
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetArrayNullablePropOk() ([]map[string]interface{}, bool)`
|
||||||
|
|
||||||
|
GetArrayNullablePropOk returns a tuple with the ArrayNullableProp field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasArrayNullableProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) HasArrayNullableProp() bool`
|
||||||
|
|
||||||
|
HasArrayNullableProp returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetArrayNullableProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetArrayNullableProp(v []map[string]interface{})`
|
||||||
|
|
||||||
|
SetArrayNullableProp gets a reference to the given []map[string]interface{} and assigns it to the ArrayNullableProp field.
|
||||||
|
|
||||||
|
### SetArrayNullablePropExplicitNull
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetArrayNullablePropExplicitNull(b bool)`
|
||||||
|
|
||||||
|
SetArrayNullablePropExplicitNull (un)sets ArrayNullableProp to be considered as explicit "null" value
|
||||||
|
when serializing to JSON (pass true as argument to set this, false to unset)
|
||||||
|
The ArrayNullableProp value is set to nil even if false is passed
|
||||||
|
### GetArrayAndItemsNullableProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetArrayAndItemsNullableProp() []map[string]interface{}`
|
||||||
|
|
||||||
|
GetArrayAndItemsNullableProp returns the ArrayAndItemsNullableProp field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetArrayAndItemsNullablePropOk
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetArrayAndItemsNullablePropOk() ([]map[string]interface{}, bool)`
|
||||||
|
|
||||||
|
GetArrayAndItemsNullablePropOk returns a tuple with the ArrayAndItemsNullableProp field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasArrayAndItemsNullableProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) HasArrayAndItemsNullableProp() bool`
|
||||||
|
|
||||||
|
HasArrayAndItemsNullableProp returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetArrayAndItemsNullableProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetArrayAndItemsNullableProp(v []map[string]interface{})`
|
||||||
|
|
||||||
|
SetArrayAndItemsNullableProp gets a reference to the given []map[string]interface{} and assigns it to the ArrayAndItemsNullableProp field.
|
||||||
|
|
||||||
|
### SetArrayAndItemsNullablePropExplicitNull
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetArrayAndItemsNullablePropExplicitNull(b bool)`
|
||||||
|
|
||||||
|
SetArrayAndItemsNullablePropExplicitNull (un)sets ArrayAndItemsNullableProp to be considered as explicit "null" value
|
||||||
|
when serializing to JSON (pass true as argument to set this, false to unset)
|
||||||
|
The ArrayAndItemsNullableProp value is set to nil even if false is passed
|
||||||
|
### GetArrayItemsNullable
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetArrayItemsNullable() []map[string]interface{}`
|
||||||
|
|
||||||
|
GetArrayItemsNullable returns the ArrayItemsNullable field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetArrayItemsNullableOk
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetArrayItemsNullableOk() ([]map[string]interface{}, bool)`
|
||||||
|
|
||||||
|
GetArrayItemsNullableOk returns a tuple with the ArrayItemsNullable field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasArrayItemsNullable
|
||||||
|
|
||||||
|
`func (o *NullableClass) HasArrayItemsNullable() bool`
|
||||||
|
|
||||||
|
HasArrayItemsNullable returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetArrayItemsNullable
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetArrayItemsNullable(v []map[string]interface{})`
|
||||||
|
|
||||||
|
SetArrayItemsNullable gets a reference to the given []map[string]interface{} and assigns it to the ArrayItemsNullable field.
|
||||||
|
|
||||||
|
### GetObjectNullableProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetObjectNullableProp() map[string]map[string]interface{}`
|
||||||
|
|
||||||
|
GetObjectNullableProp returns the ObjectNullableProp field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetObjectNullablePropOk
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetObjectNullablePropOk() (map[string]map[string]interface{}, bool)`
|
||||||
|
|
||||||
|
GetObjectNullablePropOk returns a tuple with the ObjectNullableProp field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasObjectNullableProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) HasObjectNullableProp() bool`
|
||||||
|
|
||||||
|
HasObjectNullableProp returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetObjectNullableProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetObjectNullableProp(v map[string]map[string]interface{})`
|
||||||
|
|
||||||
|
SetObjectNullableProp gets a reference to the given map[string]map[string]interface{} and assigns it to the ObjectNullableProp field.
|
||||||
|
|
||||||
|
### SetObjectNullablePropExplicitNull
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetObjectNullablePropExplicitNull(b bool)`
|
||||||
|
|
||||||
|
SetObjectNullablePropExplicitNull (un)sets ObjectNullableProp to be considered as explicit "null" value
|
||||||
|
when serializing to JSON (pass true as argument to set this, false to unset)
|
||||||
|
The ObjectNullableProp value is set to nil even if false is passed
|
||||||
|
### GetObjectAndItemsNullableProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetObjectAndItemsNullableProp() map[string]map[string]interface{}`
|
||||||
|
|
||||||
|
GetObjectAndItemsNullableProp returns the ObjectAndItemsNullableProp field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetObjectAndItemsNullablePropOk
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetObjectAndItemsNullablePropOk() (map[string]map[string]interface{}, bool)`
|
||||||
|
|
||||||
|
GetObjectAndItemsNullablePropOk returns a tuple with the ObjectAndItemsNullableProp field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasObjectAndItemsNullableProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) HasObjectAndItemsNullableProp() bool`
|
||||||
|
|
||||||
|
HasObjectAndItemsNullableProp returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetObjectAndItemsNullableProp
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetObjectAndItemsNullableProp(v map[string]map[string]interface{})`
|
||||||
|
|
||||||
|
SetObjectAndItemsNullableProp gets a reference to the given map[string]map[string]interface{} and assigns it to the ObjectAndItemsNullableProp field.
|
||||||
|
|
||||||
|
### SetObjectAndItemsNullablePropExplicitNull
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetObjectAndItemsNullablePropExplicitNull(b bool)`
|
||||||
|
|
||||||
|
SetObjectAndItemsNullablePropExplicitNull (un)sets ObjectAndItemsNullableProp to be considered as explicit "null" value
|
||||||
|
when serializing to JSON (pass true as argument to set this, false to unset)
|
||||||
|
The ObjectAndItemsNullableProp value is set to nil even if false is passed
|
||||||
|
### GetObjectItemsNullable
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetObjectItemsNullable() map[string]map[string]interface{}`
|
||||||
|
|
||||||
|
GetObjectItemsNullable returns the ObjectItemsNullable field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetObjectItemsNullableOk
|
||||||
|
|
||||||
|
`func (o *NullableClass) GetObjectItemsNullableOk() (map[string]map[string]interface{}, bool)`
|
||||||
|
|
||||||
|
GetObjectItemsNullableOk returns a tuple with the ObjectItemsNullable field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasObjectItemsNullable
|
||||||
|
|
||||||
|
`func (o *NullableClass) HasObjectItemsNullable() bool`
|
||||||
|
|
||||||
|
HasObjectItemsNullable returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetObjectItemsNullable
|
||||||
|
|
||||||
|
`func (o *NullableClass) SetObjectItemsNullable(v map[string]map[string]interface{})`
|
||||||
|
|
||||||
|
SetObjectItemsNullable gets a reference to the given map[string]map[string]interface{} and assigns it to the ObjectItemsNullable field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# NumberOnly
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**JustNumber** | Pointer to **float32** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetJustNumber
|
||||||
|
|
||||||
|
`func (o *NumberOnly) GetJustNumber() float32`
|
||||||
|
|
||||||
|
GetJustNumber returns the JustNumber field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetJustNumberOk
|
||||||
|
|
||||||
|
`func (o *NumberOnly) GetJustNumberOk() (float32, bool)`
|
||||||
|
|
||||||
|
GetJustNumberOk returns a tuple with the JustNumber field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasJustNumber
|
||||||
|
|
||||||
|
`func (o *NumberOnly) HasJustNumber() bool`
|
||||||
|
|
||||||
|
HasJustNumber returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetJustNumber
|
||||||
|
|
||||||
|
`func (o *NumberOnly) SetJustNumber(v float32)`
|
||||||
|
|
||||||
|
SetJustNumber gets a reference to the given float32 and assigns it to the JustNumber field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
# Order
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Id** | Pointer to **int64** | | [optional]
|
||||||
|
**PetId** | Pointer to **int64** | | [optional]
|
||||||
|
**Quantity** | Pointer to **int32** | | [optional]
|
||||||
|
**ShipDate** | Pointer to [**time.Time**](time.Time.md) | | [optional]
|
||||||
|
**Status** | Pointer to **string** | Order Status | [optional]
|
||||||
|
**Complete** | Pointer to **bool** | | [optional] [default to false]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetId
|
||||||
|
|
||||||
|
`func (o *Order) GetId() int64`
|
||||||
|
|
||||||
|
GetId returns the Id field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetIdOk
|
||||||
|
|
||||||
|
`func (o *Order) GetIdOk() (int64, bool)`
|
||||||
|
|
||||||
|
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasId
|
||||||
|
|
||||||
|
`func (o *Order) HasId() bool`
|
||||||
|
|
||||||
|
HasId returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetId
|
||||||
|
|
||||||
|
`func (o *Order) SetId(v int64)`
|
||||||
|
|
||||||
|
SetId gets a reference to the given int64 and assigns it to the Id field.
|
||||||
|
|
||||||
|
### GetPetId
|
||||||
|
|
||||||
|
`func (o *Order) GetPetId() int64`
|
||||||
|
|
||||||
|
GetPetId returns the PetId field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetPetIdOk
|
||||||
|
|
||||||
|
`func (o *Order) GetPetIdOk() (int64, bool)`
|
||||||
|
|
||||||
|
GetPetIdOk returns a tuple with the PetId field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasPetId
|
||||||
|
|
||||||
|
`func (o *Order) HasPetId() bool`
|
||||||
|
|
||||||
|
HasPetId returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetPetId
|
||||||
|
|
||||||
|
`func (o *Order) SetPetId(v int64)`
|
||||||
|
|
||||||
|
SetPetId gets a reference to the given int64 and assigns it to the PetId field.
|
||||||
|
|
||||||
|
### GetQuantity
|
||||||
|
|
||||||
|
`func (o *Order) GetQuantity() int32`
|
||||||
|
|
||||||
|
GetQuantity returns the Quantity field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetQuantityOk
|
||||||
|
|
||||||
|
`func (o *Order) GetQuantityOk() (int32, bool)`
|
||||||
|
|
||||||
|
GetQuantityOk returns a tuple with the Quantity field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasQuantity
|
||||||
|
|
||||||
|
`func (o *Order) HasQuantity() bool`
|
||||||
|
|
||||||
|
HasQuantity returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetQuantity
|
||||||
|
|
||||||
|
`func (o *Order) SetQuantity(v int32)`
|
||||||
|
|
||||||
|
SetQuantity gets a reference to the given int32 and assigns it to the Quantity field.
|
||||||
|
|
||||||
|
### GetShipDate
|
||||||
|
|
||||||
|
`func (o *Order) GetShipDate() time.Time`
|
||||||
|
|
||||||
|
GetShipDate returns the ShipDate field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetShipDateOk
|
||||||
|
|
||||||
|
`func (o *Order) GetShipDateOk() (time.Time, bool)`
|
||||||
|
|
||||||
|
GetShipDateOk returns a tuple with the ShipDate field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasShipDate
|
||||||
|
|
||||||
|
`func (o *Order) HasShipDate() bool`
|
||||||
|
|
||||||
|
HasShipDate returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetShipDate
|
||||||
|
|
||||||
|
`func (o *Order) SetShipDate(v time.Time)`
|
||||||
|
|
||||||
|
SetShipDate gets a reference to the given time.Time and assigns it to the ShipDate field.
|
||||||
|
|
||||||
|
### GetStatus
|
||||||
|
|
||||||
|
`func (o *Order) GetStatus() string`
|
||||||
|
|
||||||
|
GetStatus returns the Status field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetStatusOk
|
||||||
|
|
||||||
|
`func (o *Order) GetStatusOk() (string, bool)`
|
||||||
|
|
||||||
|
GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasStatus
|
||||||
|
|
||||||
|
`func (o *Order) HasStatus() bool`
|
||||||
|
|
||||||
|
HasStatus returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetStatus
|
||||||
|
|
||||||
|
`func (o *Order) SetStatus(v string)`
|
||||||
|
|
||||||
|
SetStatus gets a reference to the given string and assigns it to the Status field.
|
||||||
|
|
||||||
|
### GetComplete
|
||||||
|
|
||||||
|
`func (o *Order) GetComplete() bool`
|
||||||
|
|
||||||
|
GetComplete returns the Complete field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetCompleteOk
|
||||||
|
|
||||||
|
`func (o *Order) GetCompleteOk() (bool, bool)`
|
||||||
|
|
||||||
|
GetCompleteOk returns a tuple with the Complete field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasComplete
|
||||||
|
|
||||||
|
`func (o *Order) HasComplete() bool`
|
||||||
|
|
||||||
|
HasComplete returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetComplete
|
||||||
|
|
||||||
|
`func (o *Order) SetComplete(v bool)`
|
||||||
|
|
||||||
|
SetComplete gets a reference to the given bool and assigns it to the Complete field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
# OuterComposite
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**MyNumber** | Pointer to **float32** | | [optional]
|
||||||
|
**MyString** | Pointer to **string** | | [optional]
|
||||||
|
**MyBoolean** | Pointer to **bool** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetMyNumber
|
||||||
|
|
||||||
|
`func (o *OuterComposite) GetMyNumber() float32`
|
||||||
|
|
||||||
|
GetMyNumber returns the MyNumber field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetMyNumberOk
|
||||||
|
|
||||||
|
`func (o *OuterComposite) GetMyNumberOk() (float32, bool)`
|
||||||
|
|
||||||
|
GetMyNumberOk returns a tuple with the MyNumber field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasMyNumber
|
||||||
|
|
||||||
|
`func (o *OuterComposite) HasMyNumber() bool`
|
||||||
|
|
||||||
|
HasMyNumber returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetMyNumber
|
||||||
|
|
||||||
|
`func (o *OuterComposite) SetMyNumber(v float32)`
|
||||||
|
|
||||||
|
SetMyNumber gets a reference to the given float32 and assigns it to the MyNumber field.
|
||||||
|
|
||||||
|
### GetMyString
|
||||||
|
|
||||||
|
`func (o *OuterComposite) GetMyString() string`
|
||||||
|
|
||||||
|
GetMyString returns the MyString field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetMyStringOk
|
||||||
|
|
||||||
|
`func (o *OuterComposite) GetMyStringOk() (string, bool)`
|
||||||
|
|
||||||
|
GetMyStringOk returns a tuple with the MyString field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasMyString
|
||||||
|
|
||||||
|
`func (o *OuterComposite) HasMyString() bool`
|
||||||
|
|
||||||
|
HasMyString returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetMyString
|
||||||
|
|
||||||
|
`func (o *OuterComposite) SetMyString(v string)`
|
||||||
|
|
||||||
|
SetMyString gets a reference to the given string and assigns it to the MyString field.
|
||||||
|
|
||||||
|
### GetMyBoolean
|
||||||
|
|
||||||
|
`func (o *OuterComposite) GetMyBoolean() bool`
|
||||||
|
|
||||||
|
GetMyBoolean returns the MyBoolean field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetMyBooleanOk
|
||||||
|
|
||||||
|
`func (o *OuterComposite) GetMyBooleanOk() (bool, bool)`
|
||||||
|
|
||||||
|
GetMyBooleanOk returns a tuple with the MyBoolean field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasMyBoolean
|
||||||
|
|
||||||
|
`func (o *OuterComposite) HasMyBoolean() bool`
|
||||||
|
|
||||||
|
HasMyBoolean returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetMyBoolean
|
||||||
|
|
||||||
|
`func (o *OuterComposite) SetMyBoolean(v bool)`
|
||||||
|
|
||||||
|
SetMyBoolean gets a reference to the given bool and assigns it to the MyBoolean field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# OuterEnum
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# OuterEnumDefaultValue
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# OuterEnumInteger
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# OuterEnumIntegerDefaultValue
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
# Pet
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Id** | Pointer to **int64** | | [optional]
|
||||||
|
**Category** | Pointer to [**Category**](Category.md) | | [optional]
|
||||||
|
**Name** | Pointer to **string** | |
|
||||||
|
**PhotoUrls** | Pointer to **[]string** | |
|
||||||
|
**Tags** | Pointer to [**[]Tag**](Tag.md) | | [optional]
|
||||||
|
**Status** | Pointer to **string** | pet status in the store | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetId
|
||||||
|
|
||||||
|
`func (o *Pet) GetId() int64`
|
||||||
|
|
||||||
|
GetId returns the Id field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetIdOk
|
||||||
|
|
||||||
|
`func (o *Pet) GetIdOk() (int64, bool)`
|
||||||
|
|
||||||
|
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasId
|
||||||
|
|
||||||
|
`func (o *Pet) HasId() bool`
|
||||||
|
|
||||||
|
HasId returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetId
|
||||||
|
|
||||||
|
`func (o *Pet) SetId(v int64)`
|
||||||
|
|
||||||
|
SetId gets a reference to the given int64 and assigns it to the Id field.
|
||||||
|
|
||||||
|
### GetCategory
|
||||||
|
|
||||||
|
`func (o *Pet) GetCategory() Category`
|
||||||
|
|
||||||
|
GetCategory returns the Category field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetCategoryOk
|
||||||
|
|
||||||
|
`func (o *Pet) GetCategoryOk() (Category, bool)`
|
||||||
|
|
||||||
|
GetCategoryOk returns a tuple with the Category field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasCategory
|
||||||
|
|
||||||
|
`func (o *Pet) HasCategory() bool`
|
||||||
|
|
||||||
|
HasCategory returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetCategory
|
||||||
|
|
||||||
|
`func (o *Pet) SetCategory(v Category)`
|
||||||
|
|
||||||
|
SetCategory gets a reference to the given Category and assigns it to the Category field.
|
||||||
|
|
||||||
|
### GetName
|
||||||
|
|
||||||
|
`func (o *Pet) GetName() string`
|
||||||
|
|
||||||
|
GetName returns the Name field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetNameOk
|
||||||
|
|
||||||
|
`func (o *Pet) GetNameOk() (string, bool)`
|
||||||
|
|
||||||
|
GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasName
|
||||||
|
|
||||||
|
`func (o *Pet) HasName() bool`
|
||||||
|
|
||||||
|
HasName returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetName
|
||||||
|
|
||||||
|
`func (o *Pet) SetName(v string)`
|
||||||
|
|
||||||
|
SetName gets a reference to the given string and assigns it to the Name field.
|
||||||
|
|
||||||
|
### GetPhotoUrls
|
||||||
|
|
||||||
|
`func (o *Pet) GetPhotoUrls() []string`
|
||||||
|
|
||||||
|
GetPhotoUrls returns the PhotoUrls field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetPhotoUrlsOk
|
||||||
|
|
||||||
|
`func (o *Pet) GetPhotoUrlsOk() ([]string, bool)`
|
||||||
|
|
||||||
|
GetPhotoUrlsOk returns a tuple with the PhotoUrls field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasPhotoUrls
|
||||||
|
|
||||||
|
`func (o *Pet) HasPhotoUrls() bool`
|
||||||
|
|
||||||
|
HasPhotoUrls returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetPhotoUrls
|
||||||
|
|
||||||
|
`func (o *Pet) SetPhotoUrls(v []string)`
|
||||||
|
|
||||||
|
SetPhotoUrls gets a reference to the given []string and assigns it to the PhotoUrls field.
|
||||||
|
|
||||||
|
### GetTags
|
||||||
|
|
||||||
|
`func (o *Pet) GetTags() []Tag`
|
||||||
|
|
||||||
|
GetTags returns the Tags field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetTagsOk
|
||||||
|
|
||||||
|
`func (o *Pet) GetTagsOk() ([]Tag, bool)`
|
||||||
|
|
||||||
|
GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasTags
|
||||||
|
|
||||||
|
`func (o *Pet) HasTags() bool`
|
||||||
|
|
||||||
|
HasTags returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetTags
|
||||||
|
|
||||||
|
`func (o *Pet) SetTags(v []Tag)`
|
||||||
|
|
||||||
|
SetTags gets a reference to the given []Tag and assigns it to the Tags field.
|
||||||
|
|
||||||
|
### GetStatus
|
||||||
|
|
||||||
|
`func (o *Pet) GetStatus() string`
|
||||||
|
|
||||||
|
GetStatus returns the Status field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetStatusOk
|
||||||
|
|
||||||
|
`func (o *Pet) GetStatusOk() (string, bool)`
|
||||||
|
|
||||||
|
GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasStatus
|
||||||
|
|
||||||
|
`func (o *Pet) HasStatus() bool`
|
||||||
|
|
||||||
|
HasStatus returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetStatus
|
||||||
|
|
||||||
|
`func (o *Pet) SetStatus(v string)`
|
||||||
|
|
||||||
|
SetStatus gets a reference to the given string and assigns it to the Status field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,350 @@
|
|||||||
|
# \PetApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**AddPet**](PetApi.md#AddPet) | **Post** /pet | Add a new pet to the store
|
||||||
|
[**DeletePet**](PetApi.md#DeletePet) | **Delete** /pet/{petId} | Deletes a pet
|
||||||
|
[**FindPetsByStatus**](PetApi.md#FindPetsByStatus) | **Get** /pet/findByStatus | Finds Pets by status
|
||||||
|
[**FindPetsByTags**](PetApi.md#FindPetsByTags) | **Get** /pet/findByTags | Finds Pets by tags
|
||||||
|
[**GetPetById**](PetApi.md#GetPetById) | **Get** /pet/{petId} | Find pet by ID
|
||||||
|
[**UpdatePet**](PetApi.md#UpdatePet) | **Put** /pet | Update an existing pet
|
||||||
|
[**UpdatePetWithForm**](PetApi.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data
|
||||||
|
[**UploadFile**](PetApi.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image
|
||||||
|
[**UploadFileWithRequiredFile**](PetApi.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## AddPet
|
||||||
|
|
||||||
|
> AddPet(ctx, pet)
|
||||||
|
Add a new pet to the store
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json, application/xml
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## DeletePet
|
||||||
|
|
||||||
|
> DeletePet(ctx, petId, optional)
|
||||||
|
Deletes a pet
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**petId** | **int64**| Pet id to delete |
|
||||||
|
**optional** | ***DeletePetOpts** | optional parameters | nil if no parameters
|
||||||
|
|
||||||
|
### Optional Parameters
|
||||||
|
|
||||||
|
Optional parameters are passed through a pointer to a DeletePetOpts struct
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**apiKey** | **optional.String**| |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## FindPetsByStatus
|
||||||
|
|
||||||
|
> []Pet FindPetsByStatus(ctx, status)
|
||||||
|
Finds Pets by status
|
||||||
|
|
||||||
|
Multiple status values can be provided with comma separated strings
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**status** | [**[]string**](string.md)| Status values that need to be considered for filter |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**[]Pet**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## FindPetsByTags
|
||||||
|
|
||||||
|
> []Pet FindPetsByTags(ctx, tags)
|
||||||
|
Finds Pets by tags
|
||||||
|
|
||||||
|
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**tags** | [**[]string**](string.md)| Tags to filter by |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**[]Pet**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## GetPetById
|
||||||
|
|
||||||
|
> Pet GetPetById(ctx, petId)
|
||||||
|
Find pet by ID
|
||||||
|
|
||||||
|
Returns a single pet
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**petId** | **int64**| ID of pet to return |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Pet**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[api_key](../README.md#api_key)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## UpdatePet
|
||||||
|
|
||||||
|
> UpdatePet(ctx, pet)
|
||||||
|
Update an existing pet
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json, application/xml
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## UpdatePetWithForm
|
||||||
|
|
||||||
|
> UpdatePetWithForm(ctx, petId, optional)
|
||||||
|
Updates a pet in the store with form data
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**petId** | **int64**| ID of pet that needs to be updated |
|
||||||
|
**optional** | ***UpdatePetWithFormOpts** | optional parameters | nil if no parameters
|
||||||
|
|
||||||
|
### Optional Parameters
|
||||||
|
|
||||||
|
Optional parameters are passed through a pointer to a UpdatePetWithFormOpts struct
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**name** | **optional.String**| Updated name of the pet |
|
||||||
|
**status** | **optional.String**| Updated status of the pet |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/x-www-form-urlencoded
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## UploadFile
|
||||||
|
|
||||||
|
> ApiResponse UploadFile(ctx, petId, optional)
|
||||||
|
uploads an image
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**petId** | **int64**| ID of pet to update |
|
||||||
|
**optional** | ***UploadFileOpts** | optional parameters | nil if no parameters
|
||||||
|
|
||||||
|
### Optional Parameters
|
||||||
|
|
||||||
|
Optional parameters are passed through a pointer to a UploadFileOpts struct
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**additionalMetadata** | **optional.String**| Additional data to pass to server |
|
||||||
|
**file** | **optional.Interface of *os.File****optional.*os.File**| file to upload |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**ApiResponse**](ApiResponse.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: multipart/form-data
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## UploadFileWithRequiredFile
|
||||||
|
|
||||||
|
> ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional)
|
||||||
|
uploads an image (required)
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**petId** | **int64**| ID of pet to update |
|
||||||
|
**requiredFile** | ***os.File*****os.File**| file to upload |
|
||||||
|
**optional** | ***UploadFileWithRequiredFileOpts** | optional parameters | nil if no parameters
|
||||||
|
|
||||||
|
### Optional Parameters
|
||||||
|
|
||||||
|
Optional parameters are passed through a pointer to a UploadFileWithRequiredFileOpts struct
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
**additionalMetadata** | **optional.String**| Additional data to pass to server |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**ApiResponse**](ApiResponse.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: multipart/form-data
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# ReadOnlyFirst
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Bar** | Pointer to **string** | | [optional]
|
||||||
|
**Baz** | Pointer to **string** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetBar
|
||||||
|
|
||||||
|
`func (o *ReadOnlyFirst) GetBar() string`
|
||||||
|
|
||||||
|
GetBar returns the Bar field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetBarOk
|
||||||
|
|
||||||
|
`func (o *ReadOnlyFirst) GetBarOk() (string, bool)`
|
||||||
|
|
||||||
|
GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasBar
|
||||||
|
|
||||||
|
`func (o *ReadOnlyFirst) HasBar() bool`
|
||||||
|
|
||||||
|
HasBar returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetBar
|
||||||
|
|
||||||
|
`func (o *ReadOnlyFirst) SetBar(v string)`
|
||||||
|
|
||||||
|
SetBar gets a reference to the given string and assigns it to the Bar field.
|
||||||
|
|
||||||
|
### GetBaz
|
||||||
|
|
||||||
|
`func (o *ReadOnlyFirst) GetBaz() string`
|
||||||
|
|
||||||
|
GetBaz returns the Baz field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetBazOk
|
||||||
|
|
||||||
|
`func (o *ReadOnlyFirst) GetBazOk() (string, bool)`
|
||||||
|
|
||||||
|
GetBazOk returns a tuple with the Baz field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasBaz
|
||||||
|
|
||||||
|
`func (o *ReadOnlyFirst) HasBaz() bool`
|
||||||
|
|
||||||
|
HasBaz returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetBaz
|
||||||
|
|
||||||
|
`func (o *ReadOnlyFirst) SetBaz(v string)`
|
||||||
|
|
||||||
|
SetBaz gets a reference to the given string and assigns it to the Baz field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# Return
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Return** | Pointer to **int32** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetReturn
|
||||||
|
|
||||||
|
`func (o *Return) GetReturn() int32`
|
||||||
|
|
||||||
|
GetReturn returns the Return field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetReturnOk
|
||||||
|
|
||||||
|
`func (o *Return) GetReturnOk() (int32, bool)`
|
||||||
|
|
||||||
|
GetReturnOk returns a tuple with the Return field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasReturn
|
||||||
|
|
||||||
|
`func (o *Return) HasReturn() bool`
|
||||||
|
|
||||||
|
HasReturn returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetReturn
|
||||||
|
|
||||||
|
`func (o *Return) SetReturn(v int32)`
|
||||||
|
|
||||||
|
SetReturn gets a reference to the given int32 and assigns it to the Return field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# SpecialModelName
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**SpecialPropertyName** | Pointer to **int64** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetSpecialPropertyName
|
||||||
|
|
||||||
|
`func (o *SpecialModelName) GetSpecialPropertyName() int64`
|
||||||
|
|
||||||
|
GetSpecialPropertyName returns the SpecialPropertyName field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetSpecialPropertyNameOk
|
||||||
|
|
||||||
|
`func (o *SpecialModelName) GetSpecialPropertyNameOk() (int64, bool)`
|
||||||
|
|
||||||
|
GetSpecialPropertyNameOk returns a tuple with the SpecialPropertyName field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasSpecialPropertyName
|
||||||
|
|
||||||
|
`func (o *SpecialModelName) HasSpecialPropertyName() bool`
|
||||||
|
|
||||||
|
HasSpecialPropertyName returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetSpecialPropertyName
|
||||||
|
|
||||||
|
`func (o *SpecialModelName) SetSpecialPropertyName(v int64)`
|
||||||
|
|
||||||
|
SetSpecialPropertyName gets a reference to the given int64 and assigns it to the SpecialPropertyName field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,138 @@
|
|||||||
|
# \StoreApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**DeleteOrder**](StoreApi.md#DeleteOrder) | **Delete** /store/order/{order_id} | Delete purchase order by ID
|
||||||
|
[**GetInventory**](StoreApi.md#GetInventory) | **Get** /store/inventory | Returns pet inventories by status
|
||||||
|
[**GetOrderById**](StoreApi.md#GetOrderById) | **Get** /store/order/{order_id} | Find purchase order by ID
|
||||||
|
[**PlaceOrder**](StoreApi.md#PlaceOrder) | **Post** /store/order | Place an order for a pet
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## DeleteOrder
|
||||||
|
|
||||||
|
> DeleteOrder(ctx, orderId)
|
||||||
|
Delete purchase order by ID
|
||||||
|
|
||||||
|
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**orderId** | **string**| ID of the order that needs to be deleted |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## GetInventory
|
||||||
|
|
||||||
|
> map[string]int32 GetInventory(ctx, )
|
||||||
|
Returns pet inventories by status
|
||||||
|
|
||||||
|
Returns a map of status codes to quantities
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**map[string]int32**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[api_key](../README.md#api_key)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## GetOrderById
|
||||||
|
|
||||||
|
> Order GetOrderById(ctx, orderId)
|
||||||
|
Find purchase order by ID
|
||||||
|
|
||||||
|
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**orderId** | **int64**| ID of pet that needs to be fetched |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Order**](Order.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## PlaceOrder
|
||||||
|
|
||||||
|
> Order PlaceOrder(ctx, order)
|
||||||
|
Place an order for a pet
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Order**](Order.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# Tag
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Id** | Pointer to **int64** | | [optional]
|
||||||
|
**Name** | Pointer to **string** | | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetId
|
||||||
|
|
||||||
|
`func (o *Tag) GetId() int64`
|
||||||
|
|
||||||
|
GetId returns the Id field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetIdOk
|
||||||
|
|
||||||
|
`func (o *Tag) GetIdOk() (int64, bool)`
|
||||||
|
|
||||||
|
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasId
|
||||||
|
|
||||||
|
`func (o *Tag) HasId() bool`
|
||||||
|
|
||||||
|
HasId returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetId
|
||||||
|
|
||||||
|
`func (o *Tag) SetId(v int64)`
|
||||||
|
|
||||||
|
SetId gets a reference to the given int64 and assigns it to the Id field.
|
||||||
|
|
||||||
|
### GetName
|
||||||
|
|
||||||
|
`func (o *Tag) GetName() string`
|
||||||
|
|
||||||
|
GetName returns the Name field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetNameOk
|
||||||
|
|
||||||
|
`func (o *Tag) GetNameOk() (string, bool)`
|
||||||
|
|
||||||
|
GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasName
|
||||||
|
|
||||||
|
`func (o *Tag) HasName() bool`
|
||||||
|
|
||||||
|
HasName returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetName
|
||||||
|
|
||||||
|
`func (o *Tag) SetName(v string)`
|
||||||
|
|
||||||
|
SetName gets a reference to the given string and assigns it to the Name field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,221 @@
|
|||||||
|
# User
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Id** | Pointer to **int64** | | [optional]
|
||||||
|
**Username** | Pointer to **string** | | [optional]
|
||||||
|
**FirstName** | Pointer to **string** | | [optional]
|
||||||
|
**LastName** | Pointer to **string** | | [optional]
|
||||||
|
**Email** | Pointer to **string** | | [optional]
|
||||||
|
**Password** | Pointer to **string** | | [optional]
|
||||||
|
**Phone** | Pointer to **string** | | [optional]
|
||||||
|
**UserStatus** | Pointer to **int32** | User Status | [optional]
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### GetId
|
||||||
|
|
||||||
|
`func (o *User) GetId() int64`
|
||||||
|
|
||||||
|
GetId returns the Id field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetIdOk
|
||||||
|
|
||||||
|
`func (o *User) GetIdOk() (int64, bool)`
|
||||||
|
|
||||||
|
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasId
|
||||||
|
|
||||||
|
`func (o *User) HasId() bool`
|
||||||
|
|
||||||
|
HasId returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetId
|
||||||
|
|
||||||
|
`func (o *User) SetId(v int64)`
|
||||||
|
|
||||||
|
SetId gets a reference to the given int64 and assigns it to the Id field.
|
||||||
|
|
||||||
|
### GetUsername
|
||||||
|
|
||||||
|
`func (o *User) GetUsername() string`
|
||||||
|
|
||||||
|
GetUsername returns the Username field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetUsernameOk
|
||||||
|
|
||||||
|
`func (o *User) GetUsernameOk() (string, bool)`
|
||||||
|
|
||||||
|
GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasUsername
|
||||||
|
|
||||||
|
`func (o *User) HasUsername() bool`
|
||||||
|
|
||||||
|
HasUsername returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetUsername
|
||||||
|
|
||||||
|
`func (o *User) SetUsername(v string)`
|
||||||
|
|
||||||
|
SetUsername gets a reference to the given string and assigns it to the Username field.
|
||||||
|
|
||||||
|
### GetFirstName
|
||||||
|
|
||||||
|
`func (o *User) GetFirstName() string`
|
||||||
|
|
||||||
|
GetFirstName returns the FirstName field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetFirstNameOk
|
||||||
|
|
||||||
|
`func (o *User) GetFirstNameOk() (string, bool)`
|
||||||
|
|
||||||
|
GetFirstNameOk returns a tuple with the FirstName field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasFirstName
|
||||||
|
|
||||||
|
`func (o *User) HasFirstName() bool`
|
||||||
|
|
||||||
|
HasFirstName returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetFirstName
|
||||||
|
|
||||||
|
`func (o *User) SetFirstName(v string)`
|
||||||
|
|
||||||
|
SetFirstName gets a reference to the given string and assigns it to the FirstName field.
|
||||||
|
|
||||||
|
### GetLastName
|
||||||
|
|
||||||
|
`func (o *User) GetLastName() string`
|
||||||
|
|
||||||
|
GetLastName returns the LastName field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetLastNameOk
|
||||||
|
|
||||||
|
`func (o *User) GetLastNameOk() (string, bool)`
|
||||||
|
|
||||||
|
GetLastNameOk returns a tuple with the LastName field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasLastName
|
||||||
|
|
||||||
|
`func (o *User) HasLastName() bool`
|
||||||
|
|
||||||
|
HasLastName returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetLastName
|
||||||
|
|
||||||
|
`func (o *User) SetLastName(v string)`
|
||||||
|
|
||||||
|
SetLastName gets a reference to the given string and assigns it to the LastName field.
|
||||||
|
|
||||||
|
### GetEmail
|
||||||
|
|
||||||
|
`func (o *User) GetEmail() string`
|
||||||
|
|
||||||
|
GetEmail returns the Email field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetEmailOk
|
||||||
|
|
||||||
|
`func (o *User) GetEmailOk() (string, bool)`
|
||||||
|
|
||||||
|
GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasEmail
|
||||||
|
|
||||||
|
`func (o *User) HasEmail() bool`
|
||||||
|
|
||||||
|
HasEmail returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetEmail
|
||||||
|
|
||||||
|
`func (o *User) SetEmail(v string)`
|
||||||
|
|
||||||
|
SetEmail gets a reference to the given string and assigns it to the Email field.
|
||||||
|
|
||||||
|
### GetPassword
|
||||||
|
|
||||||
|
`func (o *User) GetPassword() string`
|
||||||
|
|
||||||
|
GetPassword returns the Password field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetPasswordOk
|
||||||
|
|
||||||
|
`func (o *User) GetPasswordOk() (string, bool)`
|
||||||
|
|
||||||
|
GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasPassword
|
||||||
|
|
||||||
|
`func (o *User) HasPassword() bool`
|
||||||
|
|
||||||
|
HasPassword returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetPassword
|
||||||
|
|
||||||
|
`func (o *User) SetPassword(v string)`
|
||||||
|
|
||||||
|
SetPassword gets a reference to the given string and assigns it to the Password field.
|
||||||
|
|
||||||
|
### GetPhone
|
||||||
|
|
||||||
|
`func (o *User) GetPhone() string`
|
||||||
|
|
||||||
|
GetPhone returns the Phone field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetPhoneOk
|
||||||
|
|
||||||
|
`func (o *User) GetPhoneOk() (string, bool)`
|
||||||
|
|
||||||
|
GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasPhone
|
||||||
|
|
||||||
|
`func (o *User) HasPhone() bool`
|
||||||
|
|
||||||
|
HasPhone returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetPhone
|
||||||
|
|
||||||
|
`func (o *User) SetPhone(v string)`
|
||||||
|
|
||||||
|
SetPhone gets a reference to the given string and assigns it to the Phone field.
|
||||||
|
|
||||||
|
### GetUserStatus
|
||||||
|
|
||||||
|
`func (o *User) GetUserStatus() int32`
|
||||||
|
|
||||||
|
GetUserStatus returns the UserStatus field if non-nil, zero value otherwise.
|
||||||
|
|
||||||
|
### GetUserStatusOk
|
||||||
|
|
||||||
|
`func (o *User) GetUserStatusOk() (int32, bool)`
|
||||||
|
|
||||||
|
GetUserStatusOk returns a tuple with the UserStatus field if it's non-nil, zero value otherwise
|
||||||
|
and a boolean to check if the value has been set.
|
||||||
|
|
||||||
|
### HasUserStatus
|
||||||
|
|
||||||
|
`func (o *User) HasUserStatus() bool`
|
||||||
|
|
||||||
|
HasUserStatus returns a boolean if a field has been set.
|
||||||
|
|
||||||
|
### SetUserStatus
|
||||||
|
|
||||||
|
`func (o *User) SetUserStatus(v int32)`
|
||||||
|
|
||||||
|
SetUserStatus gets a reference to the given int32 and assigns it to the UserStatus field.
|
||||||
|
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,268 @@
|
|||||||
|
# \UserApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**CreateUser**](UserApi.md#CreateUser) | **Post** /user | Create user
|
||||||
|
[**CreateUsersWithArrayInput**](UserApi.md#CreateUsersWithArrayInput) | **Post** /user/createWithArray | Creates list of users with given input array
|
||||||
|
[**CreateUsersWithListInput**](UserApi.md#CreateUsersWithListInput) | **Post** /user/createWithList | Creates list of users with given input array
|
||||||
|
[**DeleteUser**](UserApi.md#DeleteUser) | **Delete** /user/{username} | Delete user
|
||||||
|
[**GetUserByName**](UserApi.md#GetUserByName) | **Get** /user/{username} | Get user by user name
|
||||||
|
[**LoginUser**](UserApi.md#LoginUser) | **Get** /user/login | Logs user into the system
|
||||||
|
[**LogoutUser**](UserApi.md#LogoutUser) | **Get** /user/logout | Logs out current logged in user session
|
||||||
|
[**UpdateUser**](UserApi.md#UpdateUser) | **Put** /user/{username} | Updated user
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## CreateUser
|
||||||
|
|
||||||
|
> CreateUser(ctx, user)
|
||||||
|
Create user
|
||||||
|
|
||||||
|
This can only be done by the logged in user.
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**user** | [**User**](User.md)| Created user object |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## CreateUsersWithArrayInput
|
||||||
|
|
||||||
|
> CreateUsersWithArrayInput(ctx, user)
|
||||||
|
Creates list of users with given input array
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**user** | [**[]User**](User.md)| List of user object |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## CreateUsersWithListInput
|
||||||
|
|
||||||
|
> CreateUsersWithListInput(ctx, user)
|
||||||
|
Creates list of users with given input array
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**user** | [**[]User**](User.md)| List of user object |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## DeleteUser
|
||||||
|
|
||||||
|
> DeleteUser(ctx, username)
|
||||||
|
Delete user
|
||||||
|
|
||||||
|
This can only be done by the logged in user.
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**username** | **string**| The name that needs to be deleted |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## GetUserByName
|
||||||
|
|
||||||
|
> User GetUserByName(ctx, username)
|
||||||
|
Get user by user name
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**username** | **string**| The name that needs to be fetched. Use user1 for testing. |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**User**](User.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## LoginUser
|
||||||
|
|
||||||
|
> string LoginUser(ctx, username, password)
|
||||||
|
Logs user into the system
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**username** | **string**| The user name for login |
|
||||||
|
**password** | **string**| The password for login in clear text |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**string**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## LogoutUser
|
||||||
|
|
||||||
|
> LogoutUser(ctx, )
|
||||||
|
Logs out current logged in user session
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## UpdateUser
|
||||||
|
|
||||||
|
> UpdateUser(ctx, username, user)
|
||||||
|
Updated user
|
||||||
|
|
||||||
|
This can only be done by the logged in user.
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**username** | **string**| name that need to be deleted |
|
||||||
|
**user** | [**User**](User.md)| Updated user object |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||||
|
#
|
||||||
|
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
|
||||||
|
|
||||||
|
git_user_id=$1
|
||||||
|
git_repo_id=$2
|
||||||
|
release_note=$3
|
||||||
|
git_host=$4
|
||||||
|
|
||||||
|
if [ "$git_host" = "" ]; then
|
||||||
|
git_host="github.com"
|
||||||
|
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$git_user_id" = "" ]; then
|
||||||
|
git_user_id="GIT_USER_ID"
|
||||||
|
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$git_repo_id" = "" ]; then
|
||||||
|
git_repo_id="GIT_REPO_ID"
|
||||||
|
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$release_note" = "" ]; then
|
||||||
|
release_note="Minor update"
|
||||||
|
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Initialize the local directory as a Git repository
|
||||||
|
git init
|
||||||
|
|
||||||
|
# Adds the files in the local repository and stages them for commit.
|
||||||
|
git add .
|
||||||
|
|
||||||
|
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||||
|
git commit -m "$release_note"
|
||||||
|
|
||||||
|
# Sets the new remote
|
||||||
|
git_remote=`git remote`
|
||||||
|
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||||
|
|
||||||
|
if [ "$GIT_TOKEN" = "" ]; then
|
||||||
|
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||||
|
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
||||||
|
else
|
||||||
|
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
git pull origin master
|
||||||
|
|
||||||
|
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||||
|
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
||||||
|
git push origin master 2>&1 | grep -v 'To https'
|
||||||
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
module github.com/GIT_USER_ID/GIT_REPO_ID
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6
|
||||||
|
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a
|
||||||
|
)
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||||
|
github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q=
|
||||||
|
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
|
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
|
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg=
|
||||||
|
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
|
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA=
|
||||||
|
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
|
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
|
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
// Model200Response Model for testing model name starting with number
|
||||||
|
type Model200Response struct {
|
||||||
|
Name *int32 `json:"name,omitempty"`
|
||||||
|
|
||||||
|
Class *string `json:"class,omitempty"`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetName returns the Name field if non-nil, zero value otherwise.
|
||||||
|
func (o *Model200Response) GetName() int32 {
|
||||||
|
if o == nil || o.Name == nil {
|
||||||
|
var ret int32
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.Name
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Model200Response) GetNameOk() (int32, bool) {
|
||||||
|
if o == nil || o.Name == nil {
|
||||||
|
var ret int32
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.Name, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasName returns a boolean if a field has been set.
|
||||||
|
func (o *Model200Response) HasName() bool {
|
||||||
|
if o != nil && o.Name != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetName gets a reference to the given int32 and assigns it to the Name field.
|
||||||
|
func (o *Model200Response) SetName(v int32) {
|
||||||
|
o.Name = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetClass returns the Class field if non-nil, zero value otherwise.
|
||||||
|
func (o *Model200Response) GetClass() string {
|
||||||
|
if o == nil || o.Class == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.Class
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Model200Response) GetClassOk() (string, bool) {
|
||||||
|
if o == nil || o.Class == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.Class, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasClass returns a boolean if a field has been set.
|
||||||
|
func (o *Model200Response) HasClass() bool {
|
||||||
|
if o != nil && o.Class != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetClass gets a reference to the given string and assigns it to the Class field.
|
||||||
|
func (o *Model200Response) SetClass(v string) {
|
||||||
|
o.Class = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MarshalJSON returns the JSON representation of the model.
|
||||||
|
func (o Model200Response) MarshalJSON() ([]byte, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if o.Name != nil {
|
||||||
|
toSerialize["name"] = o.Name
|
||||||
|
}
|
||||||
|
if o.Class != nil {
|
||||||
|
toSerialize["class"] = o.Class
|
||||||
|
}
|
||||||
|
return json.Marshal(toSerialize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
// SpecialModelName struct for SpecialModelName
|
||||||
|
type SpecialModelName struct {
|
||||||
|
SpecialPropertyName *int64 `json:"$special[property.name],omitempty"`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSpecialPropertyName returns the SpecialPropertyName field if non-nil, zero value otherwise.
|
||||||
|
func (o *SpecialModelName) GetSpecialPropertyName() int64 {
|
||||||
|
if o == nil || o.SpecialPropertyName == nil {
|
||||||
|
var ret int64
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.SpecialPropertyName
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSpecialPropertyNameOk returns a tuple with the SpecialPropertyName field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *SpecialModelName) GetSpecialPropertyNameOk() (int64, bool) {
|
||||||
|
if o == nil || o.SpecialPropertyName == nil {
|
||||||
|
var ret int64
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.SpecialPropertyName, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasSpecialPropertyName returns a boolean if a field has been set.
|
||||||
|
func (o *SpecialModelName) HasSpecialPropertyName() bool {
|
||||||
|
if o != nil && o.SpecialPropertyName != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetSpecialPropertyName gets a reference to the given int64 and assigns it to the SpecialPropertyName field.
|
||||||
|
func (o *SpecialModelName) SetSpecialPropertyName(v int64) {
|
||||||
|
o.SpecialPropertyName = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MarshalJSON returns the JSON representation of the model.
|
||||||
|
func (o SpecialModelName) MarshalJSON() ([]byte, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if o.SpecialPropertyName != nil {
|
||||||
|
toSerialize["$special[property.name]"] = o.SpecialPropertyName
|
||||||
|
}
|
||||||
|
return json.Marshal(toSerialize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
// AdditionalPropertiesClass struct for AdditionalPropertiesClass
|
||||||
|
type AdditionalPropertiesClass struct {
|
||||||
|
MapProperty *map[string]string `json:"map_property,omitempty"`
|
||||||
|
|
||||||
|
MapOfMapProperty *map[string]map[string]string `json:"map_of_map_property,omitempty"`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetMapProperty returns the MapProperty field if non-nil, zero value otherwise.
|
||||||
|
func (o *AdditionalPropertiesClass) GetMapProperty() map[string]string {
|
||||||
|
if o == nil || o.MapProperty == nil {
|
||||||
|
var ret map[string]string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.MapProperty
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetMapPropertyOk returns a tuple with the MapProperty field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *AdditionalPropertiesClass) GetMapPropertyOk() (map[string]string, bool) {
|
||||||
|
if o == nil || o.MapProperty == nil {
|
||||||
|
var ret map[string]string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.MapProperty, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasMapProperty returns a boolean if a field has been set.
|
||||||
|
func (o *AdditionalPropertiesClass) HasMapProperty() bool {
|
||||||
|
if o != nil && o.MapProperty != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetMapProperty gets a reference to the given map[string]string and assigns it to the MapProperty field.
|
||||||
|
func (o *AdditionalPropertiesClass) SetMapProperty(v map[string]string) {
|
||||||
|
o.MapProperty = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetMapOfMapProperty returns the MapOfMapProperty field if non-nil, zero value otherwise.
|
||||||
|
func (o *AdditionalPropertiesClass) GetMapOfMapProperty() map[string]map[string]string {
|
||||||
|
if o == nil || o.MapOfMapProperty == nil {
|
||||||
|
var ret map[string]map[string]string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.MapOfMapProperty
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetMapOfMapPropertyOk returns a tuple with the MapOfMapProperty field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *AdditionalPropertiesClass) GetMapOfMapPropertyOk() (map[string]map[string]string, bool) {
|
||||||
|
if o == nil || o.MapOfMapProperty == nil {
|
||||||
|
var ret map[string]map[string]string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.MapOfMapProperty, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasMapOfMapProperty returns a boolean if a field has been set.
|
||||||
|
func (o *AdditionalPropertiesClass) HasMapOfMapProperty() bool {
|
||||||
|
if o != nil && o.MapOfMapProperty != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetMapOfMapProperty gets a reference to the given map[string]map[string]string and assigns it to the MapOfMapProperty field.
|
||||||
|
func (o *AdditionalPropertiesClass) SetMapOfMapProperty(v map[string]map[string]string) {
|
||||||
|
o.MapOfMapProperty = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MarshalJSON returns the JSON representation of the model.
|
||||||
|
func (o AdditionalPropertiesClass) MarshalJSON() ([]byte, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if o.MapProperty != nil {
|
||||||
|
toSerialize["map_property"] = o.MapProperty
|
||||||
|
}
|
||||||
|
if o.MapOfMapProperty != nil {
|
||||||
|
toSerialize["map_of_map_property"] = o.MapOfMapProperty
|
||||||
|
}
|
||||||
|
return json.Marshal(toSerialize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
|
)
|
||||||
|
// Animal struct for Animal
|
||||||
|
type Animal struct {
|
||||||
|
ClassName *string `json:"className,omitempty"`
|
||||||
|
|
||||||
|
Color *string `json:"color,omitempty"`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetClassName returns the ClassName field if non-nil, zero value otherwise.
|
||||||
|
func (o *Animal) GetClassName() string {
|
||||||
|
if o == nil || o.ClassName == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.ClassName
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Animal) GetClassNameOk() (string, bool) {
|
||||||
|
if o == nil || o.ClassName == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.ClassName, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasClassName returns a boolean if a field has been set.
|
||||||
|
func (o *Animal) HasClassName() bool {
|
||||||
|
if o != nil && o.ClassName != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetClassName gets a reference to the given string and assigns it to the ClassName field.
|
||||||
|
func (o *Animal) SetClassName(v string) {
|
||||||
|
o.ClassName = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetColor returns the Color field if non-nil, zero value otherwise.
|
||||||
|
func (o *Animal) GetColor() string {
|
||||||
|
if o == nil || o.Color == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.Color
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Animal) GetColorOk() (string, bool) {
|
||||||
|
if o == nil || o.Color == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.Color, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasColor returns a boolean if a field has been set.
|
||||||
|
func (o *Animal) HasColor() bool {
|
||||||
|
if o != nil && o.Color != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetColor gets a reference to the given string and assigns it to the Color field.
|
||||||
|
func (o *Animal) SetColor(v string) {
|
||||||
|
o.Color = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MarshalJSON returns the JSON representation of the model.
|
||||||
|
func (o Animal) MarshalJSON() ([]byte, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if o.ClassName == nil {
|
||||||
|
return nil, errors.New("ClassName is required and not nullable, but was not set on Animal")
|
||||||
|
}
|
||||||
|
if o.ClassName != nil {
|
||||||
|
toSerialize["className"] = o.ClassName
|
||||||
|
}
|
||||||
|
if o.Color != nil {
|
||||||
|
toSerialize["color"] = o.Color
|
||||||
|
}
|
||||||
|
return json.Marshal(toSerialize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
// ApiResponse struct for ApiResponse
|
||||||
|
type ApiResponse struct {
|
||||||
|
Code *int32 `json:"code,omitempty"`
|
||||||
|
|
||||||
|
Type *string `json:"type,omitempty"`
|
||||||
|
|
||||||
|
Message *string `json:"message,omitempty"`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCode returns the Code field if non-nil, zero value otherwise.
|
||||||
|
func (o *ApiResponse) GetCode() int32 {
|
||||||
|
if o == nil || o.Code == nil {
|
||||||
|
var ret int32
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.Code
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *ApiResponse) GetCodeOk() (int32, bool) {
|
||||||
|
if o == nil || o.Code == nil {
|
||||||
|
var ret int32
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.Code, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasCode returns a boolean if a field has been set.
|
||||||
|
func (o *ApiResponse) HasCode() bool {
|
||||||
|
if o != nil && o.Code != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetCode gets a reference to the given int32 and assigns it to the Code field.
|
||||||
|
func (o *ApiResponse) SetCode(v int32) {
|
||||||
|
o.Code = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetType returns the Type field if non-nil, zero value otherwise.
|
||||||
|
func (o *ApiResponse) GetType() string {
|
||||||
|
if o == nil || o.Type == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.Type
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *ApiResponse) GetTypeOk() (string, bool) {
|
||||||
|
if o == nil || o.Type == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.Type, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasType returns a boolean if a field has been set.
|
||||||
|
func (o *ApiResponse) HasType() bool {
|
||||||
|
if o != nil && o.Type != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetType gets a reference to the given string and assigns it to the Type field.
|
||||||
|
func (o *ApiResponse) SetType(v string) {
|
||||||
|
o.Type = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetMessage returns the Message field if non-nil, zero value otherwise.
|
||||||
|
func (o *ApiResponse) GetMessage() string {
|
||||||
|
if o == nil || o.Message == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.Message
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *ApiResponse) GetMessageOk() (string, bool) {
|
||||||
|
if o == nil || o.Message == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.Message, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasMessage returns a boolean if a field has been set.
|
||||||
|
func (o *ApiResponse) HasMessage() bool {
|
||||||
|
if o != nil && o.Message != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetMessage gets a reference to the given string and assigns it to the Message field.
|
||||||
|
func (o *ApiResponse) SetMessage(v string) {
|
||||||
|
o.Message = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MarshalJSON returns the JSON representation of the model.
|
||||||
|
func (o ApiResponse) MarshalJSON() ([]byte, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if o.Code != nil {
|
||||||
|
toSerialize["code"] = o.Code
|
||||||
|
}
|
||||||
|
if o.Type != nil {
|
||||||
|
toSerialize["type"] = o.Type
|
||||||
|
}
|
||||||
|
if o.Message != nil {
|
||||||
|
toSerialize["message"] = o.Message
|
||||||
|
}
|
||||||
|
return json.Marshal(toSerialize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
// ArrayOfArrayOfNumberOnly struct for ArrayOfArrayOfNumberOnly
|
||||||
|
type ArrayOfArrayOfNumberOnly struct {
|
||||||
|
ArrayArrayNumber *[][]float32 `json:"ArrayArrayNumber,omitempty"`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetArrayArrayNumber returns the ArrayArrayNumber field if non-nil, zero value otherwise.
|
||||||
|
func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 {
|
||||||
|
if o == nil || o.ArrayArrayNumber == nil {
|
||||||
|
var ret [][]float32
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.ArrayArrayNumber
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() ([][]float32, bool) {
|
||||||
|
if o == nil || o.ArrayArrayNumber == nil {
|
||||||
|
var ret [][]float32
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.ArrayArrayNumber, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasArrayArrayNumber returns a boolean if a field has been set.
|
||||||
|
func (o *ArrayOfArrayOfNumberOnly) HasArrayArrayNumber() bool {
|
||||||
|
if o != nil && o.ArrayArrayNumber != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetArrayArrayNumber gets a reference to the given [][]float32 and assigns it to the ArrayArrayNumber field.
|
||||||
|
func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32) {
|
||||||
|
o.ArrayArrayNumber = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MarshalJSON returns the JSON representation of the model.
|
||||||
|
func (o ArrayOfArrayOfNumberOnly) MarshalJSON() ([]byte, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if o.ArrayArrayNumber != nil {
|
||||||
|
toSerialize["ArrayArrayNumber"] = o.ArrayArrayNumber
|
||||||
|
}
|
||||||
|
return json.Marshal(toSerialize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
// ArrayOfNumberOnly struct for ArrayOfNumberOnly
|
||||||
|
type ArrayOfNumberOnly struct {
|
||||||
|
ArrayNumber *[]float32 `json:"ArrayNumber,omitempty"`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetArrayNumber returns the ArrayNumber field if non-nil, zero value otherwise.
|
||||||
|
func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 {
|
||||||
|
if o == nil || o.ArrayNumber == nil {
|
||||||
|
var ret []float32
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.ArrayNumber
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetArrayNumberOk returns a tuple with the ArrayNumber field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *ArrayOfNumberOnly) GetArrayNumberOk() ([]float32, bool) {
|
||||||
|
if o == nil || o.ArrayNumber == nil {
|
||||||
|
var ret []float32
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.ArrayNumber, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasArrayNumber returns a boolean if a field has been set.
|
||||||
|
func (o *ArrayOfNumberOnly) HasArrayNumber() bool {
|
||||||
|
if o != nil && o.ArrayNumber != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetArrayNumber gets a reference to the given []float32 and assigns it to the ArrayNumber field.
|
||||||
|
func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32) {
|
||||||
|
o.ArrayNumber = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MarshalJSON returns the JSON representation of the model.
|
||||||
|
func (o ArrayOfNumberOnly) MarshalJSON() ([]byte, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if o.ArrayNumber != nil {
|
||||||
|
toSerialize["ArrayNumber"] = o.ArrayNumber
|
||||||
|
}
|
||||||
|
return json.Marshal(toSerialize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
// ArrayTest struct for ArrayTest
|
||||||
|
type ArrayTest struct {
|
||||||
|
ArrayOfString *[]string `json:"array_of_string,omitempty"`
|
||||||
|
|
||||||
|
ArrayArrayOfInteger *[][]int64 `json:"array_array_of_integer,omitempty"`
|
||||||
|
|
||||||
|
ArrayArrayOfModel *[][]ReadOnlyFirst `json:"array_array_of_model,omitempty"`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetArrayOfString returns the ArrayOfString field if non-nil, zero value otherwise.
|
||||||
|
func (o *ArrayTest) GetArrayOfString() []string {
|
||||||
|
if o == nil || o.ArrayOfString == nil {
|
||||||
|
var ret []string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.ArrayOfString
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetArrayOfStringOk returns a tuple with the ArrayOfString field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *ArrayTest) GetArrayOfStringOk() ([]string, bool) {
|
||||||
|
if o == nil || o.ArrayOfString == nil {
|
||||||
|
var ret []string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.ArrayOfString, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasArrayOfString returns a boolean if a field has been set.
|
||||||
|
func (o *ArrayTest) HasArrayOfString() bool {
|
||||||
|
if o != nil && o.ArrayOfString != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetArrayOfString gets a reference to the given []string and assigns it to the ArrayOfString field.
|
||||||
|
func (o *ArrayTest) SetArrayOfString(v []string) {
|
||||||
|
o.ArrayOfString = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetArrayArrayOfInteger returns the ArrayArrayOfInteger field if non-nil, zero value otherwise.
|
||||||
|
func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64 {
|
||||||
|
if o == nil || o.ArrayArrayOfInteger == nil {
|
||||||
|
var ret [][]int64
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.ArrayArrayOfInteger
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *ArrayTest) GetArrayArrayOfIntegerOk() ([][]int64, bool) {
|
||||||
|
if o == nil || o.ArrayArrayOfInteger == nil {
|
||||||
|
var ret [][]int64
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.ArrayArrayOfInteger, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasArrayArrayOfInteger returns a boolean if a field has been set.
|
||||||
|
func (o *ArrayTest) HasArrayArrayOfInteger() bool {
|
||||||
|
if o != nil && o.ArrayArrayOfInteger != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetArrayArrayOfInteger gets a reference to the given [][]int64 and assigns it to the ArrayArrayOfInteger field.
|
||||||
|
func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64) {
|
||||||
|
o.ArrayArrayOfInteger = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetArrayArrayOfModel returns the ArrayArrayOfModel field if non-nil, zero value otherwise.
|
||||||
|
func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst {
|
||||||
|
if o == nil || o.ArrayArrayOfModel == nil {
|
||||||
|
var ret [][]ReadOnlyFirst
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.ArrayArrayOfModel
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *ArrayTest) GetArrayArrayOfModelOk() ([][]ReadOnlyFirst, bool) {
|
||||||
|
if o == nil || o.ArrayArrayOfModel == nil {
|
||||||
|
var ret [][]ReadOnlyFirst
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.ArrayArrayOfModel, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasArrayArrayOfModel returns a boolean if a field has been set.
|
||||||
|
func (o *ArrayTest) HasArrayArrayOfModel() bool {
|
||||||
|
if o != nil && o.ArrayArrayOfModel != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetArrayArrayOfModel gets a reference to the given [][]ReadOnlyFirst and assigns it to the ArrayArrayOfModel field.
|
||||||
|
func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst) {
|
||||||
|
o.ArrayArrayOfModel = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MarshalJSON returns the JSON representation of the model.
|
||||||
|
func (o ArrayTest) MarshalJSON() ([]byte, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if o.ArrayOfString != nil {
|
||||||
|
toSerialize["array_of_string"] = o.ArrayOfString
|
||||||
|
}
|
||||||
|
if o.ArrayArrayOfInteger != nil {
|
||||||
|
toSerialize["array_array_of_integer"] = o.ArrayArrayOfInteger
|
||||||
|
}
|
||||||
|
if o.ArrayArrayOfModel != nil {
|
||||||
|
toSerialize["array_array_of_model"] = o.ArrayArrayOfModel
|
||||||
|
}
|
||||||
|
return json.Marshal(toSerialize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,254 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
// Capitalization struct for Capitalization
|
||||||
|
type Capitalization struct {
|
||||||
|
SmallCamel *string `json:"smallCamel,omitempty"`
|
||||||
|
|
||||||
|
CapitalCamel *string `json:"CapitalCamel,omitempty"`
|
||||||
|
|
||||||
|
SmallSnake *string `json:"small_Snake,omitempty"`
|
||||||
|
|
||||||
|
CapitalSnake *string `json:"Capital_Snake,omitempty"`
|
||||||
|
|
||||||
|
SCAETHFlowPoints *string `json:"SCA_ETH_Flow_Points,omitempty"`
|
||||||
|
|
||||||
|
// Name of the pet
|
||||||
|
ATT_NAME *string `json:"ATT_NAME,omitempty"`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSmallCamel returns the SmallCamel field if non-nil, zero value otherwise.
|
||||||
|
func (o *Capitalization) GetSmallCamel() string {
|
||||||
|
if o == nil || o.SmallCamel == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.SmallCamel
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSmallCamelOk returns a tuple with the SmallCamel field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Capitalization) GetSmallCamelOk() (string, bool) {
|
||||||
|
if o == nil || o.SmallCamel == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.SmallCamel, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasSmallCamel returns a boolean if a field has been set.
|
||||||
|
func (o *Capitalization) HasSmallCamel() bool {
|
||||||
|
if o != nil && o.SmallCamel != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetSmallCamel gets a reference to the given string and assigns it to the SmallCamel field.
|
||||||
|
func (o *Capitalization) SetSmallCamel(v string) {
|
||||||
|
o.SmallCamel = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCapitalCamel returns the CapitalCamel field if non-nil, zero value otherwise.
|
||||||
|
func (o *Capitalization) GetCapitalCamel() string {
|
||||||
|
if o == nil || o.CapitalCamel == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.CapitalCamel
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCapitalCamelOk returns a tuple with the CapitalCamel field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Capitalization) GetCapitalCamelOk() (string, bool) {
|
||||||
|
if o == nil || o.CapitalCamel == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.CapitalCamel, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasCapitalCamel returns a boolean if a field has been set.
|
||||||
|
func (o *Capitalization) HasCapitalCamel() bool {
|
||||||
|
if o != nil && o.CapitalCamel != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetCapitalCamel gets a reference to the given string and assigns it to the CapitalCamel field.
|
||||||
|
func (o *Capitalization) SetCapitalCamel(v string) {
|
||||||
|
o.CapitalCamel = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSmallSnake returns the SmallSnake field if non-nil, zero value otherwise.
|
||||||
|
func (o *Capitalization) GetSmallSnake() string {
|
||||||
|
if o == nil || o.SmallSnake == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.SmallSnake
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSmallSnakeOk returns a tuple with the SmallSnake field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Capitalization) GetSmallSnakeOk() (string, bool) {
|
||||||
|
if o == nil || o.SmallSnake == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.SmallSnake, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasSmallSnake returns a boolean if a field has been set.
|
||||||
|
func (o *Capitalization) HasSmallSnake() bool {
|
||||||
|
if o != nil && o.SmallSnake != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetSmallSnake gets a reference to the given string and assigns it to the SmallSnake field.
|
||||||
|
func (o *Capitalization) SetSmallSnake(v string) {
|
||||||
|
o.SmallSnake = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCapitalSnake returns the CapitalSnake field if non-nil, zero value otherwise.
|
||||||
|
func (o *Capitalization) GetCapitalSnake() string {
|
||||||
|
if o == nil || o.CapitalSnake == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.CapitalSnake
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCapitalSnakeOk returns a tuple with the CapitalSnake field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Capitalization) GetCapitalSnakeOk() (string, bool) {
|
||||||
|
if o == nil || o.CapitalSnake == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.CapitalSnake, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasCapitalSnake returns a boolean if a field has been set.
|
||||||
|
func (o *Capitalization) HasCapitalSnake() bool {
|
||||||
|
if o != nil && o.CapitalSnake != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetCapitalSnake gets a reference to the given string and assigns it to the CapitalSnake field.
|
||||||
|
func (o *Capitalization) SetCapitalSnake(v string) {
|
||||||
|
o.CapitalSnake = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSCAETHFlowPoints returns the SCAETHFlowPoints field if non-nil, zero value otherwise.
|
||||||
|
func (o *Capitalization) GetSCAETHFlowPoints() string {
|
||||||
|
if o == nil || o.SCAETHFlowPoints == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.SCAETHFlowPoints
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSCAETHFlowPointsOk returns a tuple with the SCAETHFlowPoints field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Capitalization) GetSCAETHFlowPointsOk() (string, bool) {
|
||||||
|
if o == nil || o.SCAETHFlowPoints == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.SCAETHFlowPoints, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasSCAETHFlowPoints returns a boolean if a field has been set.
|
||||||
|
func (o *Capitalization) HasSCAETHFlowPoints() bool {
|
||||||
|
if o != nil && o.SCAETHFlowPoints != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetSCAETHFlowPoints gets a reference to the given string and assigns it to the SCAETHFlowPoints field.
|
||||||
|
func (o *Capitalization) SetSCAETHFlowPoints(v string) {
|
||||||
|
o.SCAETHFlowPoints = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetATT_NAME returns the ATT_NAME field if non-nil, zero value otherwise.
|
||||||
|
func (o *Capitalization) GetATT_NAME() string {
|
||||||
|
if o == nil || o.ATT_NAME == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.ATT_NAME
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetATT_NAMEOk returns a tuple with the ATT_NAME field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Capitalization) GetATT_NAMEOk() (string, bool) {
|
||||||
|
if o == nil || o.ATT_NAME == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.ATT_NAME, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasATT_NAME returns a boolean if a field has been set.
|
||||||
|
func (o *Capitalization) HasATT_NAME() bool {
|
||||||
|
if o != nil && o.ATT_NAME != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetATT_NAME gets a reference to the given string and assigns it to the ATT_NAME field.
|
||||||
|
func (o *Capitalization) SetATT_NAME(v string) {
|
||||||
|
o.ATT_NAME = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MarshalJSON returns the JSON representation of the model.
|
||||||
|
func (o Capitalization) MarshalJSON() ([]byte, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if o.SmallCamel != nil {
|
||||||
|
toSerialize["smallCamel"] = o.SmallCamel
|
||||||
|
}
|
||||||
|
if o.CapitalCamel != nil {
|
||||||
|
toSerialize["CapitalCamel"] = o.CapitalCamel
|
||||||
|
}
|
||||||
|
if o.SmallSnake != nil {
|
||||||
|
toSerialize["small_Snake"] = o.SmallSnake
|
||||||
|
}
|
||||||
|
if o.CapitalSnake != nil {
|
||||||
|
toSerialize["Capital_Snake"] = o.CapitalSnake
|
||||||
|
}
|
||||||
|
if o.SCAETHFlowPoints != nil {
|
||||||
|
toSerialize["SCA_ETH_Flow_Points"] = o.SCAETHFlowPoints
|
||||||
|
}
|
||||||
|
if o.ATT_NAME != nil {
|
||||||
|
toSerialize["ATT_NAME"] = o.ATT_NAME
|
||||||
|
}
|
||||||
|
return json.Marshal(toSerialize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,143 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
|
)
|
||||||
|
// Cat struct for Cat
|
||||||
|
type Cat struct {
|
||||||
|
ClassName *string `json:"className,omitempty"`
|
||||||
|
|
||||||
|
Color *string `json:"color,omitempty"`
|
||||||
|
|
||||||
|
Declawed *bool `json:"declawed,omitempty"`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetClassName returns the ClassName field if non-nil, zero value otherwise.
|
||||||
|
func (o *Cat) GetClassName() string {
|
||||||
|
if o == nil || o.ClassName == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.ClassName
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Cat) GetClassNameOk() (string, bool) {
|
||||||
|
if o == nil || o.ClassName == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.ClassName, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasClassName returns a boolean if a field has been set.
|
||||||
|
func (o *Cat) HasClassName() bool {
|
||||||
|
if o != nil && o.ClassName != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetClassName gets a reference to the given string and assigns it to the ClassName field.
|
||||||
|
func (o *Cat) SetClassName(v string) {
|
||||||
|
o.ClassName = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetColor returns the Color field if non-nil, zero value otherwise.
|
||||||
|
func (o *Cat) GetColor() string {
|
||||||
|
if o == nil || o.Color == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.Color
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Cat) GetColorOk() (string, bool) {
|
||||||
|
if o == nil || o.Color == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.Color, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasColor returns a boolean if a field has been set.
|
||||||
|
func (o *Cat) HasColor() bool {
|
||||||
|
if o != nil && o.Color != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetColor gets a reference to the given string and assigns it to the Color field.
|
||||||
|
func (o *Cat) SetColor(v string) {
|
||||||
|
o.Color = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetDeclawed returns the Declawed field if non-nil, zero value otherwise.
|
||||||
|
func (o *Cat) GetDeclawed() bool {
|
||||||
|
if o == nil || o.Declawed == nil {
|
||||||
|
var ret bool
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.Declawed
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Cat) GetDeclawedOk() (bool, bool) {
|
||||||
|
if o == nil || o.Declawed == nil {
|
||||||
|
var ret bool
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.Declawed, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasDeclawed returns a boolean if a field has been set.
|
||||||
|
func (o *Cat) HasDeclawed() bool {
|
||||||
|
if o != nil && o.Declawed != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDeclawed gets a reference to the given bool and assigns it to the Declawed field.
|
||||||
|
func (o *Cat) SetDeclawed(v bool) {
|
||||||
|
o.Declawed = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MarshalJSON returns the JSON representation of the model.
|
||||||
|
func (o Cat) MarshalJSON() ([]byte, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if o.ClassName == nil {
|
||||||
|
return nil, errors.New("ClassName is required and not nullable, but was not set on Cat")
|
||||||
|
}
|
||||||
|
if o.ClassName != nil {
|
||||||
|
toSerialize["className"] = o.ClassName
|
||||||
|
}
|
||||||
|
if o.Color != nil {
|
||||||
|
toSerialize["color"] = o.Color
|
||||||
|
}
|
||||||
|
if o.Declawed != nil {
|
||||||
|
toSerialize["declawed"] = o.Declawed
|
||||||
|
}
|
||||||
|
return json.Marshal(toSerialize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
// CatAllOf struct for CatAllOf
|
||||||
|
type CatAllOf struct {
|
||||||
|
Declawed *bool `json:"declawed,omitempty"`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetDeclawed returns the Declawed field if non-nil, zero value otherwise.
|
||||||
|
func (o *CatAllOf) GetDeclawed() bool {
|
||||||
|
if o == nil || o.Declawed == nil {
|
||||||
|
var ret bool
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.Declawed
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CatAllOf) GetDeclawedOk() (bool, bool) {
|
||||||
|
if o == nil || o.Declawed == nil {
|
||||||
|
var ret bool
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.Declawed, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasDeclawed returns a boolean if a field has been set.
|
||||||
|
func (o *CatAllOf) HasDeclawed() bool {
|
||||||
|
if o != nil && o.Declawed != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDeclawed gets a reference to the given bool and assigns it to the Declawed field.
|
||||||
|
func (o *CatAllOf) SetDeclawed(v bool) {
|
||||||
|
o.Declawed = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MarshalJSON returns the JSON representation of the model.
|
||||||
|
func (o CatAllOf) MarshalJSON() ([]byte, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if o.Declawed != nil {
|
||||||
|
toSerialize["declawed"] = o.Declawed
|
||||||
|
}
|
||||||
|
return json.Marshal(toSerialize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
|
)
|
||||||
|
// Category struct for Category
|
||||||
|
type Category struct {
|
||||||
|
Id *int64 `json:"id,omitempty"`
|
||||||
|
|
||||||
|
Name *string `json:"name,omitempty"`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetId returns the Id field if non-nil, zero value otherwise.
|
||||||
|
func (o *Category) GetId() int64 {
|
||||||
|
if o == nil || o.Id == nil {
|
||||||
|
var ret int64
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.Id
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Category) GetIdOk() (int64, bool) {
|
||||||
|
if o == nil || o.Id == nil {
|
||||||
|
var ret int64
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.Id, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasId returns a boolean if a field has been set.
|
||||||
|
func (o *Category) HasId() bool {
|
||||||
|
if o != nil && o.Id != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetId gets a reference to the given int64 and assigns it to the Id field.
|
||||||
|
func (o *Category) SetId(v int64) {
|
||||||
|
o.Id = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetName returns the Name field if non-nil, zero value otherwise.
|
||||||
|
func (o *Category) GetName() string {
|
||||||
|
if o == nil || o.Name == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.Name
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Category) GetNameOk() (string, bool) {
|
||||||
|
if o == nil || o.Name == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.Name, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasName returns a boolean if a field has been set.
|
||||||
|
func (o *Category) HasName() bool {
|
||||||
|
if o != nil && o.Name != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
||||||
|
func (o *Category) SetName(v string) {
|
||||||
|
o.Name = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MarshalJSON returns the JSON representation of the model.
|
||||||
|
func (o Category) MarshalJSON() ([]byte, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if o.Id != nil {
|
||||||
|
toSerialize["id"] = o.Id
|
||||||
|
}
|
||||||
|
if o.Name == nil {
|
||||||
|
return nil, errors.New("Name is required and not nullable, but was not set on Category")
|
||||||
|
}
|
||||||
|
if o.Name != nil {
|
||||||
|
toSerialize["name"] = o.Name
|
||||||
|
}
|
||||||
|
return json.Marshal(toSerialize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
// ClassModel Model for testing model with \"_class\" property
|
||||||
|
type ClassModel struct {
|
||||||
|
Class *string `json:"_class,omitempty"`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetClass returns the Class field if non-nil, zero value otherwise.
|
||||||
|
func (o *ClassModel) GetClass() string {
|
||||||
|
if o == nil || o.Class == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.Class
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *ClassModel) GetClassOk() (string, bool) {
|
||||||
|
if o == nil || o.Class == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.Class, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasClass returns a boolean if a field has been set.
|
||||||
|
func (o *ClassModel) HasClass() bool {
|
||||||
|
if o != nil && o.Class != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetClass gets a reference to the given string and assigns it to the Class field.
|
||||||
|
func (o *ClassModel) SetClass(v string) {
|
||||||
|
o.Class = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MarshalJSON returns the JSON representation of the model.
|
||||||
|
func (o ClassModel) MarshalJSON() ([]byte, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if o.Class != nil {
|
||||||
|
toSerialize["_class"] = o.Class
|
||||||
|
}
|
||||||
|
return json.Marshal(toSerialize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
// Client struct for Client
|
||||||
|
type Client struct {
|
||||||
|
Client *string `json:"client,omitempty"`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetClient returns the Client field if non-nil, zero value otherwise.
|
||||||
|
func (o *Client) GetClient() string {
|
||||||
|
if o == nil || o.Client == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetClientOk returns a tuple with the Client field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Client) GetClientOk() (string, bool) {
|
||||||
|
if o == nil || o.Client == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.Client, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasClient returns a boolean if a field has been set.
|
||||||
|
func (o *Client) HasClient() bool {
|
||||||
|
if o != nil && o.Client != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetClient gets a reference to the given string and assigns it to the Client field.
|
||||||
|
func (o *Client) SetClient(v string) {
|
||||||
|
o.Client = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MarshalJSON returns the JSON representation of the model.
|
||||||
|
func (o Client) MarshalJSON() ([]byte, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if o.Client != nil {
|
||||||
|
toSerialize["client"] = o.Client
|
||||||
|
}
|
||||||
|
return json.Marshal(toSerialize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,143 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
|
)
|
||||||
|
// Dog struct for Dog
|
||||||
|
type Dog struct {
|
||||||
|
ClassName *string `json:"className,omitempty"`
|
||||||
|
|
||||||
|
Color *string `json:"color,omitempty"`
|
||||||
|
|
||||||
|
Breed *string `json:"breed,omitempty"`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetClassName returns the ClassName field if non-nil, zero value otherwise.
|
||||||
|
func (o *Dog) GetClassName() string {
|
||||||
|
if o == nil || o.ClassName == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.ClassName
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Dog) GetClassNameOk() (string, bool) {
|
||||||
|
if o == nil || o.ClassName == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.ClassName, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasClassName returns a boolean if a field has been set.
|
||||||
|
func (o *Dog) HasClassName() bool {
|
||||||
|
if o != nil && o.ClassName != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetClassName gets a reference to the given string and assigns it to the ClassName field.
|
||||||
|
func (o *Dog) SetClassName(v string) {
|
||||||
|
o.ClassName = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetColor returns the Color field if non-nil, zero value otherwise.
|
||||||
|
func (o *Dog) GetColor() string {
|
||||||
|
if o == nil || o.Color == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.Color
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Dog) GetColorOk() (string, bool) {
|
||||||
|
if o == nil || o.Color == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.Color, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasColor returns a boolean if a field has been set.
|
||||||
|
func (o *Dog) HasColor() bool {
|
||||||
|
if o != nil && o.Color != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetColor gets a reference to the given string and assigns it to the Color field.
|
||||||
|
func (o *Dog) SetColor(v string) {
|
||||||
|
o.Color = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetBreed returns the Breed field if non-nil, zero value otherwise.
|
||||||
|
func (o *Dog) GetBreed() string {
|
||||||
|
if o == nil || o.Breed == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.Breed
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Dog) GetBreedOk() (string, bool) {
|
||||||
|
if o == nil || o.Breed == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.Breed, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasBreed returns a boolean if a field has been set.
|
||||||
|
func (o *Dog) HasBreed() bool {
|
||||||
|
if o != nil && o.Breed != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetBreed gets a reference to the given string and assigns it to the Breed field.
|
||||||
|
func (o *Dog) SetBreed(v string) {
|
||||||
|
o.Breed = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MarshalJSON returns the JSON representation of the model.
|
||||||
|
func (o Dog) MarshalJSON() ([]byte, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if o.ClassName == nil {
|
||||||
|
return nil, errors.New("ClassName is required and not nullable, but was not set on Dog")
|
||||||
|
}
|
||||||
|
if o.ClassName != nil {
|
||||||
|
toSerialize["className"] = o.ClassName
|
||||||
|
}
|
||||||
|
if o.Color != nil {
|
||||||
|
toSerialize["color"] = o.Color
|
||||||
|
}
|
||||||
|
if o.Breed != nil {
|
||||||
|
toSerialize["breed"] = o.Breed
|
||||||
|
}
|
||||||
|
return json.Marshal(toSerialize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
// DogAllOf struct for DogAllOf
|
||||||
|
type DogAllOf struct {
|
||||||
|
Breed *string `json:"breed,omitempty"`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetBreed returns the Breed field if non-nil, zero value otherwise.
|
||||||
|
func (o *DogAllOf) GetBreed() string {
|
||||||
|
if o == nil || o.Breed == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.Breed
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *DogAllOf) GetBreedOk() (string, bool) {
|
||||||
|
if o == nil || o.Breed == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.Breed, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasBreed returns a boolean if a field has been set.
|
||||||
|
func (o *DogAllOf) HasBreed() bool {
|
||||||
|
if o != nil && o.Breed != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetBreed gets a reference to the given string and assigns it to the Breed field.
|
||||||
|
func (o *DogAllOf) SetBreed(v string) {
|
||||||
|
o.Breed = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MarshalJSON returns the JSON representation of the model.
|
||||||
|
func (o DogAllOf) MarshalJSON() ([]byte, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if o.Breed != nil {
|
||||||
|
toSerialize["breed"] = o.Breed
|
||||||
|
}
|
||||||
|
return json.Marshal(toSerialize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
// EnumArrays struct for EnumArrays
|
||||||
|
type EnumArrays struct {
|
||||||
|
JustSymbol *string `json:"just_symbol,omitempty"`
|
||||||
|
|
||||||
|
ArrayEnum *[]string `json:"array_enum,omitempty"`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetJustSymbol returns the JustSymbol field if non-nil, zero value otherwise.
|
||||||
|
func (o *EnumArrays) GetJustSymbol() string {
|
||||||
|
if o == nil || o.JustSymbol == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.JustSymbol
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetJustSymbolOk returns a tuple with the JustSymbol field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *EnumArrays) GetJustSymbolOk() (string, bool) {
|
||||||
|
if o == nil || o.JustSymbol == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.JustSymbol, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasJustSymbol returns a boolean if a field has been set.
|
||||||
|
func (o *EnumArrays) HasJustSymbol() bool {
|
||||||
|
if o != nil && o.JustSymbol != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetJustSymbol gets a reference to the given string and assigns it to the JustSymbol field.
|
||||||
|
func (o *EnumArrays) SetJustSymbol(v string) {
|
||||||
|
o.JustSymbol = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetArrayEnum returns the ArrayEnum field if non-nil, zero value otherwise.
|
||||||
|
func (o *EnumArrays) GetArrayEnum() []string {
|
||||||
|
if o == nil || o.ArrayEnum == nil {
|
||||||
|
var ret []string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.ArrayEnum
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetArrayEnumOk returns a tuple with the ArrayEnum field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *EnumArrays) GetArrayEnumOk() ([]string, bool) {
|
||||||
|
if o == nil || o.ArrayEnum == nil {
|
||||||
|
var ret []string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.ArrayEnum, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasArrayEnum returns a boolean if a field has been set.
|
||||||
|
func (o *EnumArrays) HasArrayEnum() bool {
|
||||||
|
if o != nil && o.ArrayEnum != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetArrayEnum gets a reference to the given []string and assigns it to the ArrayEnum field.
|
||||||
|
func (o *EnumArrays) SetArrayEnum(v []string) {
|
||||||
|
o.ArrayEnum = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MarshalJSON returns the JSON representation of the model.
|
||||||
|
func (o EnumArrays) MarshalJSON() ([]byte, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if o.JustSymbol != nil {
|
||||||
|
toSerialize["just_symbol"] = o.JustSymbol
|
||||||
|
}
|
||||||
|
if o.ArrayEnum != nil {
|
||||||
|
toSerialize["array_enum"] = o.ArrayEnum
|
||||||
|
}
|
||||||
|
return json.Marshal(toSerialize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
// EnumClass the model 'EnumClass'
|
||||||
|
type EnumClass string
|
||||||
|
|
||||||
|
// List of EnumClass
|
||||||
|
const (
|
||||||
|
ABC EnumClass = "_abc"
|
||||||
|
EFG EnumClass = "-efg"
|
||||||
|
XYZ EnumClass = "(xyz)"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,344 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
|
)
|
||||||
|
// EnumTest struct for EnumTest
|
||||||
|
type EnumTest struct {
|
||||||
|
EnumString *string `json:"enum_string,omitempty"`
|
||||||
|
|
||||||
|
EnumStringRequired *string `json:"enum_string_required,omitempty"`
|
||||||
|
|
||||||
|
EnumInteger *int32 `json:"enum_integer,omitempty"`
|
||||||
|
|
||||||
|
EnumNumber *float64 `json:"enum_number,omitempty"`
|
||||||
|
|
||||||
|
OuterEnum *OuterEnum `json:"outerEnum,omitempty"`
|
||||||
|
isExplicitNullOuterEnum bool `json:"-"`
|
||||||
|
OuterEnumInteger *OuterEnumInteger `json:"outerEnumInteger,omitempty"`
|
||||||
|
|
||||||
|
OuterEnumDefaultValue *OuterEnumDefaultValue `json:"outerEnumDefaultValue,omitempty"`
|
||||||
|
|
||||||
|
OuterEnumIntegerDefaultValue *OuterEnumIntegerDefaultValue `json:"outerEnumIntegerDefaultValue,omitempty"`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetEnumString returns the EnumString field if non-nil, zero value otherwise.
|
||||||
|
func (o *EnumTest) GetEnumString() string {
|
||||||
|
if o == nil || o.EnumString == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.EnumString
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetEnumStringOk returns a tuple with the EnumString field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *EnumTest) GetEnumStringOk() (string, bool) {
|
||||||
|
if o == nil || o.EnumString == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.EnumString, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasEnumString returns a boolean if a field has been set.
|
||||||
|
func (o *EnumTest) HasEnumString() bool {
|
||||||
|
if o != nil && o.EnumString != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetEnumString gets a reference to the given string and assigns it to the EnumString field.
|
||||||
|
func (o *EnumTest) SetEnumString(v string) {
|
||||||
|
o.EnumString = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetEnumStringRequired returns the EnumStringRequired field if non-nil, zero value otherwise.
|
||||||
|
func (o *EnumTest) GetEnumStringRequired() string {
|
||||||
|
if o == nil || o.EnumStringRequired == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.EnumStringRequired
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetEnumStringRequiredOk returns a tuple with the EnumStringRequired field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *EnumTest) GetEnumStringRequiredOk() (string, bool) {
|
||||||
|
if o == nil || o.EnumStringRequired == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.EnumStringRequired, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasEnumStringRequired returns a boolean if a field has been set.
|
||||||
|
func (o *EnumTest) HasEnumStringRequired() bool {
|
||||||
|
if o != nil && o.EnumStringRequired != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetEnumStringRequired gets a reference to the given string and assigns it to the EnumStringRequired field.
|
||||||
|
func (o *EnumTest) SetEnumStringRequired(v string) {
|
||||||
|
o.EnumStringRequired = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetEnumInteger returns the EnumInteger field if non-nil, zero value otherwise.
|
||||||
|
func (o *EnumTest) GetEnumInteger() int32 {
|
||||||
|
if o == nil || o.EnumInteger == nil {
|
||||||
|
var ret int32
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.EnumInteger
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetEnumIntegerOk returns a tuple with the EnumInteger field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *EnumTest) GetEnumIntegerOk() (int32, bool) {
|
||||||
|
if o == nil || o.EnumInteger == nil {
|
||||||
|
var ret int32
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.EnumInteger, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasEnumInteger returns a boolean if a field has been set.
|
||||||
|
func (o *EnumTest) HasEnumInteger() bool {
|
||||||
|
if o != nil && o.EnumInteger != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetEnumInteger gets a reference to the given int32 and assigns it to the EnumInteger field.
|
||||||
|
func (o *EnumTest) SetEnumInteger(v int32) {
|
||||||
|
o.EnumInteger = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetEnumNumber returns the EnumNumber field if non-nil, zero value otherwise.
|
||||||
|
func (o *EnumTest) GetEnumNumber() float64 {
|
||||||
|
if o == nil || o.EnumNumber == nil {
|
||||||
|
var ret float64
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.EnumNumber
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetEnumNumberOk returns a tuple with the EnumNumber field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *EnumTest) GetEnumNumberOk() (float64, bool) {
|
||||||
|
if o == nil || o.EnumNumber == nil {
|
||||||
|
var ret float64
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.EnumNumber, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasEnumNumber returns a boolean if a field has been set.
|
||||||
|
func (o *EnumTest) HasEnumNumber() bool {
|
||||||
|
if o != nil && o.EnumNumber != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetEnumNumber gets a reference to the given float64 and assigns it to the EnumNumber field.
|
||||||
|
func (o *EnumTest) SetEnumNumber(v float64) {
|
||||||
|
o.EnumNumber = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOuterEnum returns the OuterEnum field if non-nil, zero value otherwise.
|
||||||
|
func (o *EnumTest) GetOuterEnum() OuterEnum {
|
||||||
|
if o == nil || o.OuterEnum == nil {
|
||||||
|
var ret OuterEnum
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.OuterEnum
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOuterEnumOk returns a tuple with the OuterEnum field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *EnumTest) GetOuterEnumOk() (OuterEnum, bool) {
|
||||||
|
if o == nil || o.OuterEnum == nil {
|
||||||
|
var ret OuterEnum
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.OuterEnum, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasOuterEnum returns a boolean if a field has been set.
|
||||||
|
func (o *EnumTest) HasOuterEnum() bool {
|
||||||
|
if o != nil && o.OuterEnum != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOuterEnum gets a reference to the given OuterEnum and assigns it to the OuterEnum field.
|
||||||
|
func (o *EnumTest) SetOuterEnum(v OuterEnum) {
|
||||||
|
o.OuterEnum = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOuterEnumExplicitNull (un)sets OuterEnum to be considered as explicit "null" value
|
||||||
|
// when serializing to JSON (pass true as argument to set this, false to unset)
|
||||||
|
// The OuterEnum value is set to nil even if false is passed
|
||||||
|
func (o *EnumTest) SetOuterEnumExplicitNull(b bool) {
|
||||||
|
o.OuterEnum = nil
|
||||||
|
o.isExplicitNullOuterEnum = b
|
||||||
|
}
|
||||||
|
// GetOuterEnumInteger returns the OuterEnumInteger field if non-nil, zero value otherwise.
|
||||||
|
func (o *EnumTest) GetOuterEnumInteger() OuterEnumInteger {
|
||||||
|
if o == nil || o.OuterEnumInteger == nil {
|
||||||
|
var ret OuterEnumInteger
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.OuterEnumInteger
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOuterEnumIntegerOk returns a tuple with the OuterEnumInteger field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *EnumTest) GetOuterEnumIntegerOk() (OuterEnumInteger, bool) {
|
||||||
|
if o == nil || o.OuterEnumInteger == nil {
|
||||||
|
var ret OuterEnumInteger
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.OuterEnumInteger, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasOuterEnumInteger returns a boolean if a field has been set.
|
||||||
|
func (o *EnumTest) HasOuterEnumInteger() bool {
|
||||||
|
if o != nil && o.OuterEnumInteger != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOuterEnumInteger gets a reference to the given OuterEnumInteger and assigns it to the OuterEnumInteger field.
|
||||||
|
func (o *EnumTest) SetOuterEnumInteger(v OuterEnumInteger) {
|
||||||
|
o.OuterEnumInteger = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOuterEnumDefaultValue returns the OuterEnumDefaultValue field if non-nil, zero value otherwise.
|
||||||
|
func (o *EnumTest) GetOuterEnumDefaultValue() OuterEnumDefaultValue {
|
||||||
|
if o == nil || o.OuterEnumDefaultValue == nil {
|
||||||
|
var ret OuterEnumDefaultValue
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.OuterEnumDefaultValue
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOuterEnumDefaultValueOk returns a tuple with the OuterEnumDefaultValue field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *EnumTest) GetOuterEnumDefaultValueOk() (OuterEnumDefaultValue, bool) {
|
||||||
|
if o == nil || o.OuterEnumDefaultValue == nil {
|
||||||
|
var ret OuterEnumDefaultValue
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.OuterEnumDefaultValue, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasOuterEnumDefaultValue returns a boolean if a field has been set.
|
||||||
|
func (o *EnumTest) HasOuterEnumDefaultValue() bool {
|
||||||
|
if o != nil && o.OuterEnumDefaultValue != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOuterEnumDefaultValue gets a reference to the given OuterEnumDefaultValue and assigns it to the OuterEnumDefaultValue field.
|
||||||
|
func (o *EnumTest) SetOuterEnumDefaultValue(v OuterEnumDefaultValue) {
|
||||||
|
o.OuterEnumDefaultValue = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOuterEnumIntegerDefaultValue returns the OuterEnumIntegerDefaultValue field if non-nil, zero value otherwise.
|
||||||
|
func (o *EnumTest) GetOuterEnumIntegerDefaultValue() OuterEnumIntegerDefaultValue {
|
||||||
|
if o == nil || o.OuterEnumIntegerDefaultValue == nil {
|
||||||
|
var ret OuterEnumIntegerDefaultValue
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.OuterEnumIntegerDefaultValue
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOuterEnumIntegerDefaultValueOk returns a tuple with the OuterEnumIntegerDefaultValue field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *EnumTest) GetOuterEnumIntegerDefaultValueOk() (OuterEnumIntegerDefaultValue, bool) {
|
||||||
|
if o == nil || o.OuterEnumIntegerDefaultValue == nil {
|
||||||
|
var ret OuterEnumIntegerDefaultValue
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.OuterEnumIntegerDefaultValue, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasOuterEnumIntegerDefaultValue returns a boolean if a field has been set.
|
||||||
|
func (o *EnumTest) HasOuterEnumIntegerDefaultValue() bool {
|
||||||
|
if o != nil && o.OuterEnumIntegerDefaultValue != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOuterEnumIntegerDefaultValue gets a reference to the given OuterEnumIntegerDefaultValue and assigns it to the OuterEnumIntegerDefaultValue field.
|
||||||
|
func (o *EnumTest) SetOuterEnumIntegerDefaultValue(v OuterEnumIntegerDefaultValue) {
|
||||||
|
o.OuterEnumIntegerDefaultValue = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MarshalJSON returns the JSON representation of the model.
|
||||||
|
func (o EnumTest) MarshalJSON() ([]byte, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if o.EnumString != nil {
|
||||||
|
toSerialize["enum_string"] = o.EnumString
|
||||||
|
}
|
||||||
|
if o.EnumStringRequired == nil {
|
||||||
|
return nil, errors.New("EnumStringRequired is required and not nullable, but was not set on EnumTest")
|
||||||
|
}
|
||||||
|
if o.EnumStringRequired != nil {
|
||||||
|
toSerialize["enum_string_required"] = o.EnumStringRequired
|
||||||
|
}
|
||||||
|
if o.EnumInteger != nil {
|
||||||
|
toSerialize["enum_integer"] = o.EnumInteger
|
||||||
|
}
|
||||||
|
if o.EnumNumber != nil {
|
||||||
|
toSerialize["enum_number"] = o.EnumNumber
|
||||||
|
}
|
||||||
|
if o.OuterEnum == nil {
|
||||||
|
if o.isExplicitNullOuterEnum {
|
||||||
|
toSerialize["outerEnum"] = o.OuterEnum
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
toSerialize["outerEnum"] = o.OuterEnum
|
||||||
|
}
|
||||||
|
if o.OuterEnumInteger != nil {
|
||||||
|
toSerialize["outerEnumInteger"] = o.OuterEnumInteger
|
||||||
|
}
|
||||||
|
if o.OuterEnumDefaultValue != nil {
|
||||||
|
toSerialize["outerEnumDefaultValue"] = o.OuterEnumDefaultValue
|
||||||
|
}
|
||||||
|
if o.OuterEnumIntegerDefaultValue != nil {
|
||||||
|
toSerialize["outerEnumIntegerDefaultValue"] = o.OuterEnumIntegerDefaultValue
|
||||||
|
}
|
||||||
|
return json.Marshal(toSerialize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
// File Must be named `File` for test.
|
||||||
|
type File struct {
|
||||||
|
// Test capitalization
|
||||||
|
SourceURI *string `json:"sourceURI,omitempty"`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSourceURI returns the SourceURI field if non-nil, zero value otherwise.
|
||||||
|
func (o *File) GetSourceURI() string {
|
||||||
|
if o == nil || o.SourceURI == nil {
|
||||||
|
var ret string
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.SourceURI
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSourceURIOk returns a tuple with the SourceURI field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *File) GetSourceURIOk() (string, bool) {
|
||||||
|
if o == nil || o.SourceURI == nil {
|
||||||
|
var ret string
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.SourceURI, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasSourceURI returns a boolean if a field has been set.
|
||||||
|
func (o *File) HasSourceURI() bool {
|
||||||
|
if o != nil && o.SourceURI != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetSourceURI gets a reference to the given string and assigns it to the SourceURI field.
|
||||||
|
func (o *File) SetSourceURI(v string) {
|
||||||
|
o.SourceURI = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MarshalJSON returns the JSON representation of the model.
|
||||||
|
func (o File) MarshalJSON() ([]byte, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if o.SourceURI != nil {
|
||||||
|
toSerialize["sourceURI"] = o.SourceURI
|
||||||
|
}
|
||||||
|
return json.Marshal(toSerialize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* API version: 1.0.0
|
||||||
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
*/
|
||||||
|
|
||||||
|
package openapi
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
// FileSchemaTestClass struct for FileSchemaTestClass
|
||||||
|
type FileSchemaTestClass struct {
|
||||||
|
File *File `json:"file,omitempty"`
|
||||||
|
|
||||||
|
Files *[]File `json:"files,omitempty"`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetFile returns the File field if non-nil, zero value otherwise.
|
||||||
|
func (o *FileSchemaTestClass) GetFile() File {
|
||||||
|
if o == nil || o.File == nil {
|
||||||
|
var ret File
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.File
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *FileSchemaTestClass) GetFileOk() (File, bool) {
|
||||||
|
if o == nil || o.File == nil {
|
||||||
|
var ret File
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.File, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasFile returns a boolean if a field has been set.
|
||||||
|
func (o *FileSchemaTestClass) HasFile() bool {
|
||||||
|
if o != nil && o.File != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetFile gets a reference to the given File and assigns it to the File field.
|
||||||
|
func (o *FileSchemaTestClass) SetFile(v File) {
|
||||||
|
o.File = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetFiles returns the Files field if non-nil, zero value otherwise.
|
||||||
|
func (o *FileSchemaTestClass) GetFiles() []File {
|
||||||
|
if o == nil || o.Files == nil {
|
||||||
|
var ret []File
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
return *o.Files
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetFilesOk returns a tuple with the Files field if it's non-nil, zero value otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *FileSchemaTestClass) GetFilesOk() ([]File, bool) {
|
||||||
|
if o == nil || o.Files == nil {
|
||||||
|
var ret []File
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *o.Files, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasFiles returns a boolean if a field has been set.
|
||||||
|
func (o *FileSchemaTestClass) HasFiles() bool {
|
||||||
|
if o != nil && o.Files != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetFiles gets a reference to the given []File and assigns it to the Files field.
|
||||||
|
func (o *FileSchemaTestClass) SetFiles(v []File) {
|
||||||
|
o.Files = &v
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MarshalJSON returns the JSON representation of the model.
|
||||||
|
func (o FileSchemaTestClass) MarshalJSON() ([]byte, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if o.File != nil {
|
||||||
|
toSerialize["file"] = o.File
|
||||||
|
}
|
||||||
|
if o.Files != nil {
|
||||||
|
toSerialize["files"] = o.Files
|
||||||
|
}
|
||||||
|
return json.Marshal(toSerialize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user