udpate openapi spec
This commit is contained in:
@@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
|
||||
|
||||
- API version: 0.1.0
|
||||
- Package version: 1.0.0
|
||||
- Generator version: 7.24.0-SNAPSHOT
|
||||
- Generator version: 7.25.0-SNAPSHOT
|
||||
- Build package: org.openapitools.codegen.languages.GoClientCodegen
|
||||
|
||||
## Installation
|
||||
@@ -78,13 +78,15 @@ Class | Method | HTTP request | Description
|
||||
*AccessAuthAPI* | [**GetAllAccessauthsApiV1AaGet**](docs/AccessAuthAPI.md#getallaccessauthsapiv1aaget) | **Get** /api/v1/aa/ | Get All Accessauths
|
||||
*AccessAuthAPI* | [**GetOneAccessauthApiV1AaAaIdGet**](docs/AccessAuthAPI.md#getoneaccessauthapiv1aaaaidget) | **Get** /api/v1/aa/{aa_id} | Get One Accessauth
|
||||
*AccessAuthAPI* | [**UnassignAccessauthApiV1AaUnassignGroupIdAaIdPut**](docs/AccessAuthAPI.md#unassignaccessauthapiv1aaunassigngroupidaaidput) | **Put** /api/v1/aa/unassign/{group_id}/{aa_id} | Unassign Accessauth
|
||||
*CardAPI* | [**AddCardApiV1CardsGroupIdPost**](docs/CardAPI.md#addcardapiv1cardsgroupidpost) | **Post** /api/v1/cards/{group_id} | Add Card
|
||||
*CardAPI* | [**DelCardApiV1CardsDeleteGet**](docs/CardAPI.md#delcardapiv1cardsdeleteget) | **Get** /api/v1/cards/delete | Del Card
|
||||
*CardAPI* | [**AddCardApiV1CardsPost**](docs/CardAPI.md#addcardapiv1cardspost) | **Post** /api/v1/cards/ | Add Card
|
||||
*CardAPI* | [**DelCardApiV1CardsDelete**](docs/CardAPI.md#delcardapiv1cardsdelete) | **Delete** /api/v1/cards/ | Del Card
|
||||
*CardAPI* | [**GetCardsApiV1CardsGroupIdGet**](docs/CardAPI.md#getcardsapiv1cardsgroupidget) | **Get** /api/v1/cards/{group_id} | Get Cards
|
||||
*DebugItemsMaybeDontShowThisInUIAPI* | [**AddCardManuallyApiV1DebugAddcardGroupidCardKeyGet**](docs/DebugItemsMaybeDontShowThisInUIAPI.md#addcardmanuallyapiv1debugaddcardgroupidcardkeyget) | **Get** /api/v1/debug/addcard/{groupid}/{card_key} | Add Card Manually
|
||||
*CardAPI* | [**UpdateCardApiV1CardsCardIdPatch**](docs/CardAPI.md#updatecardapiv1cardscardidpatch) | **Patch** /api/v1/cards/{card_id} | Update Card
|
||||
*DebugItemsMaybeDontShowThisInUIAPI* | [**AddCardManuallyApiV1DebugAddcardPut**](docs/DebugItemsMaybeDontShowThisInUIAPI.md#addcardmanuallyapiv1debugaddcardput) | **Put** /api/v1/debug/addcard/ | Add Card Manually
|
||||
*DebugItemsMaybeDontShowThisInUIAPI* | [**ListAllCardsApiV1DebugGetcardsPut**](docs/DebugItemsMaybeDontShowThisInUIAPI.md#listallcardsapiv1debuggetcardsput) | **Put** /api/v1/debug/getcards | List All Cards
|
||||
*DebugItemsMaybeDontShowThisInUIAPI* | [**RemoveCardManuallyApiV1DebugRmcardCardKeyGet**](docs/DebugItemsMaybeDontShowThisInUIAPI.md#removecardmanuallyapiv1debugrmcardcardkeyget) | **Get** /api/v1/debug/rmcard/{card_key} | Remove Card Manually
|
||||
*DoorAPI* | [**OpenDoorApiV1DoorClosePut**](docs/DoorAPI.md#opendoorapiv1doorcloseput) | **Put** /api/v1/door/close | Open Door
|
||||
*DebugItemsMaybeDontShowThisInUIAPI* | [**RemoveCardManuallyApiV1DebugRmcardCardIdGet**](docs/DebugItemsMaybeDontShowThisInUIAPI.md#removecardmanuallyapiv1debugrmcardcardidget) | **Get** /api/v1/debug/rmcard/{card_id} | Remove Card Manually
|
||||
*DoorAPI* | [**CloseDoorApiV1DoorClosePut**](docs/DoorAPI.md#closedoorapiv1doorcloseput) | **Put** /api/v1/door/close | Close Door
|
||||
*DoorAPI* | [**IsDoorOpenApiV1DoorStatusPut**](docs/DoorAPI.md#isdooropenapiv1doorstatusput) | **Put** /api/v1/door/status | Is Door Open
|
||||
*DoorAPI* | [**OpenDoorApiV1DoorOpenPut**](docs/DoorAPI.md#opendoorapiv1dooropenput) | **Put** /api/v1/door/open | Open Door
|
||||
*DoorAPI* | [**TestAccessApiV1DoorTestPost**](docs/DoorAPI.md#testaccessapiv1doortestpost) | **Post** /api/v1/door/test | Test Access
|
||||
*GroupAPI* | [**CreateGroupApiV1GroupsPost**](docs/GroupAPI.md#creategroupapiv1groupspost) | **Post** /api/v1/groups/ | Create Group
|
||||
@@ -107,11 +109,14 @@ Class | Method | HTTP request | Description
|
||||
- [AccessAuthorizationResponse](docs/AccessAuthorizationResponse.md)
|
||||
- [AccessAuthorizationUpdate](docs/AccessAuthorizationUpdate.md)
|
||||
- [Card](docs/Card.md)
|
||||
- [CardCreate](docs/CardCreate.md)
|
||||
- [CardUpdate](docs/CardUpdate.md)
|
||||
- [GroupCreate](docs/GroupCreate.md)
|
||||
- [GroupDB](docs/GroupDB.md)
|
||||
- [GroupResponse](docs/GroupResponse.md)
|
||||
- [HTTPValidationError](docs/HTTPValidationError.md)
|
||||
- [LocationInner](docs/LocationInner.md)
|
||||
- [OneShotAccessBase](docs/OneShotAccessBase.md)
|
||||
- [Timetable](docs/Timetable.md)
|
||||
- [TimetableCreate](docs/TimetableCreate.md)
|
||||
- [Token](docs/Token.md)
|
||||
|
||||
@@ -272,6 +272,46 @@ paths:
|
||||
summary: Delete Group
|
||||
tags:
|
||||
- Group
|
||||
/api/v1/cards/:
|
||||
delete:
|
||||
operationId: del_card_api_v1_cards__delete
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema: {}
|
||||
description: Successful Response
|
||||
security:
|
||||
- OAuth2PasswordBearer: []
|
||||
summary: Del Card
|
||||
tags:
|
||||
- Card
|
||||
post:
|
||||
operationId: add_card_api_v1_cards__post
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/CardCreate"
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Card"
|
||||
description: Successful Response
|
||||
"422":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/HTTPValidationError"
|
||||
description: Validation Error
|
||||
security:
|
||||
- OAuth2PasswordBearer: []
|
||||
summary: Add Card
|
||||
tags:
|
||||
- Card
|
||||
/api/v1/cards/{group_id}:
|
||||
get:
|
||||
operationId: get_cards_api_v1_cards__group_id__get
|
||||
@@ -306,17 +346,24 @@ paths:
|
||||
summary: Get Cards
|
||||
tags:
|
||||
- Card
|
||||
post:
|
||||
operationId: add_card_api_v1_cards__group_id__post
|
||||
/api/v1/cards/{card_id}:
|
||||
patch:
|
||||
operationId: update_card_api_v1_cards__card_id__patch
|
||||
parameters:
|
||||
- explode: false
|
||||
in: path
|
||||
name: group_id
|
||||
name: card_id
|
||||
required: true
|
||||
schema:
|
||||
title: Group Id
|
||||
title: Card Id
|
||||
type: integer
|
||||
style: simple
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/CardUpdate"
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
@@ -332,21 +379,7 @@ paths:
|
||||
description: Validation Error
|
||||
security:
|
||||
- OAuth2PasswordBearer: []
|
||||
summary: Add Card
|
||||
tags:
|
||||
- Card
|
||||
/api/v1/cards/delete:
|
||||
get:
|
||||
operationId: del_card_api_v1_cards_delete_get
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema: {}
|
||||
description: Successful Response
|
||||
security:
|
||||
- OAuth2PasswordBearer: []
|
||||
summary: Del Card
|
||||
summary: Update Card
|
||||
tags:
|
||||
- Card
|
||||
/api/v1/aa/:
|
||||
@@ -579,7 +612,7 @@ paths:
|
||||
- Door
|
||||
/api/v1/door/close:
|
||||
put:
|
||||
operationId: open_door_api_v1_door_close_put
|
||||
operationId: close_door_api_v1_door_close_put
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
@@ -588,7 +621,21 @@ paths:
|
||||
description: Successful Response
|
||||
security:
|
||||
- OAuth2PasswordBearer: []
|
||||
summary: Open Door
|
||||
summary: Close Door
|
||||
tags:
|
||||
- Door
|
||||
/api/v1/door/status:
|
||||
put:
|
||||
operationId: is_door_open_api_v1_door_status_put
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema: {}
|
||||
description: Successful Response
|
||||
security:
|
||||
- OAuth2PasswordBearer: []
|
||||
summary: Is Door Open
|
||||
tags:
|
||||
- Door
|
||||
/api/v1/door/test:
|
||||
@@ -618,27 +665,43 @@ paths:
|
||||
summary: Test Access
|
||||
tags:
|
||||
- Door
|
||||
/api/v1/debug/addcard/{groupid}/{card_key}:
|
||||
get:
|
||||
/api/v1/debug/addcard/:
|
||||
put:
|
||||
description: Add cards manually (you also have to delete them manually)
|
||||
operationId: add_card_manually_api_v1_debug_addcard__groupid___card_key__get
|
||||
operationId: add_card_manually_api_v1_debug_addcard__put
|
||||
parameters:
|
||||
- explode: false
|
||||
in: path
|
||||
- explode: true
|
||||
in: query
|
||||
name: groupid
|
||||
required: true
|
||||
schema:
|
||||
title: Groupid
|
||||
type: integer
|
||||
style: simple
|
||||
- explode: false
|
||||
in: path
|
||||
style: form
|
||||
- explode: true
|
||||
in: query
|
||||
name: card_key
|
||||
required: true
|
||||
schema:
|
||||
title: Card Key
|
||||
type: string
|
||||
style: simple
|
||||
style: form
|
||||
- explode: true
|
||||
in: query
|
||||
name: name
|
||||
required: true
|
||||
schema:
|
||||
title: Name
|
||||
type: string
|
||||
style: form
|
||||
- explode: true
|
||||
in: query
|
||||
name: enabled
|
||||
required: true
|
||||
schema:
|
||||
title: Enabled
|
||||
type: boolean
|
||||
style: form
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
@@ -656,16 +719,16 @@ paths:
|
||||
summary: Add Card Manually
|
||||
tags:
|
||||
- Debug items - maybe dont show this in UI
|
||||
/api/v1/debug/rmcard/{card_key}:
|
||||
/api/v1/debug/rmcard/{card_id}:
|
||||
get:
|
||||
operationId: remove_card_manually_api_v1_debug_rmcard__card_key__get
|
||||
operationId: remove_card_manually_api_v1_debug_rmcard__card_id__get
|
||||
parameters:
|
||||
- explode: false
|
||||
in: path
|
||||
name: card_key
|
||||
name: card_id
|
||||
required: true
|
||||
schema:
|
||||
title: Card Key
|
||||
title: Card Id
|
||||
type: string
|
||||
style: simple
|
||||
responses:
|
||||
@@ -704,6 +767,7 @@ components:
|
||||
AccessAuthorizationCreate:
|
||||
example:
|
||||
name: name
|
||||
type: timetable
|
||||
is_active: true
|
||||
timetables:
|
||||
- weekday: 0
|
||||
@@ -712,33 +776,49 @@ components:
|
||||
- weekday: 0
|
||||
starttime: starttime
|
||||
duration: 867
|
||||
oneshot: ""
|
||||
properties:
|
||||
name:
|
||||
title: Name
|
||||
type: string
|
||||
type:
|
||||
enum:
|
||||
- timetable
|
||||
- oneshot
|
||||
- somefuturespec
|
||||
title: Type
|
||||
type: string
|
||||
is_active:
|
||||
title: Is Active
|
||||
type: boolean
|
||||
timetables:
|
||||
default: []
|
||||
items:
|
||||
$ref: "#/components/schemas/TimetableCreate"
|
||||
title: Timetables
|
||||
type: array
|
||||
default: null
|
||||
oneshot:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/OneShotAccessBase"
|
||||
nullable: true
|
||||
required:
|
||||
- is_active
|
||||
- name
|
||||
- timetables
|
||||
- type
|
||||
title: AccessAuthorizationCreate
|
||||
AccessAuthorizationDB:
|
||||
example:
|
||||
name: name
|
||||
type: type
|
||||
is_active: true
|
||||
id: 5
|
||||
properties:
|
||||
name:
|
||||
title: Name
|
||||
type: string
|
||||
type:
|
||||
title: Type
|
||||
type: string
|
||||
is_active:
|
||||
title: Is Active
|
||||
type: boolean
|
||||
@@ -748,10 +828,12 @@ components:
|
||||
required:
|
||||
- is_active
|
||||
- name
|
||||
- type
|
||||
title: AccessAuthorizationDB
|
||||
AccessAuthorizationResponse:
|
||||
example:
|
||||
name: name
|
||||
type: timetable
|
||||
is_active: true
|
||||
id: 0
|
||||
timetables:
|
||||
@@ -765,6 +847,7 @@ components:
|
||||
duration: 211
|
||||
id: 5
|
||||
accessauth_id: 5
|
||||
oneshot: ""
|
||||
groups:
|
||||
- name: name
|
||||
id: 2
|
||||
@@ -774,6 +857,13 @@ components:
|
||||
name:
|
||||
title: Name
|
||||
type: string
|
||||
type:
|
||||
enum:
|
||||
- timetable
|
||||
- oneshot
|
||||
- somefuturespec
|
||||
title: Type
|
||||
type: string
|
||||
is_active:
|
||||
title: Is Active
|
||||
type: boolean
|
||||
@@ -781,11 +871,15 @@ components:
|
||||
title: Id
|
||||
type: integer
|
||||
timetables:
|
||||
default: []
|
||||
items:
|
||||
$ref: "#/components/schemas/Timetable"
|
||||
title: Timetables
|
||||
type: array
|
||||
default: null
|
||||
oneshot:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/OneShotAccessBase"
|
||||
nullable: true
|
||||
groups:
|
||||
items:
|
||||
$ref: "#/components/schemas/GroupDB"
|
||||
@@ -797,11 +891,12 @@ components:
|
||||
- id
|
||||
- is_active
|
||||
- name
|
||||
- timetables
|
||||
- type
|
||||
title: AccessAuthorizationResponse
|
||||
AccessAuthorizationUpdate:
|
||||
example:
|
||||
name: name
|
||||
type: timetable
|
||||
is_active: true
|
||||
timetables:
|
||||
- weekday: 0
|
||||
@@ -810,10 +905,18 @@ components:
|
||||
- weekday: 0
|
||||
starttime: starttime
|
||||
duration: 867
|
||||
oneshot: ""
|
||||
properties:
|
||||
name:
|
||||
nullable: true
|
||||
type: string
|
||||
type:
|
||||
enum:
|
||||
- timetable
|
||||
- oneshot
|
||||
- somefuturespec
|
||||
nullable: true
|
||||
type: string
|
||||
is_active:
|
||||
nullable: true
|
||||
type: boolean
|
||||
@@ -823,6 +926,10 @@ components:
|
||||
nullable: true
|
||||
type: array
|
||||
default: null
|
||||
oneshot:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/OneShotAccessBase"
|
||||
nullable: true
|
||||
title: AccessAuthorizationUpdate
|
||||
Body_login_for_access_token_api_v1_token_post:
|
||||
properties:
|
||||
@@ -854,21 +961,74 @@ components:
|
||||
Card:
|
||||
example:
|
||||
id: 6
|
||||
uuid: uuid
|
||||
key: key
|
||||
card_serial: card_serial
|
||||
enabled: true
|
||||
name: name
|
||||
group_id: 1
|
||||
properties:
|
||||
id:
|
||||
nullable: true
|
||||
type: integer
|
||||
uuid:
|
||||
title: Uuid
|
||||
key:
|
||||
title: Key
|
||||
type: string
|
||||
card_serial:
|
||||
title: Card Serial
|
||||
type: string
|
||||
enabled:
|
||||
default: true
|
||||
title: Enabled
|
||||
type: boolean
|
||||
name:
|
||||
maxLength: 32
|
||||
title: Name
|
||||
type: string
|
||||
group_id:
|
||||
nullable: true
|
||||
type: integer
|
||||
required:
|
||||
- uuid
|
||||
- card_serial
|
||||
- key
|
||||
- name
|
||||
title: Card
|
||||
CardCreate:
|
||||
example:
|
||||
name: name
|
||||
enabled: true
|
||||
group_id: 0
|
||||
properties:
|
||||
name:
|
||||
maxLength: 32
|
||||
title: Name
|
||||
type: string
|
||||
enabled:
|
||||
default: true
|
||||
title: Enabled
|
||||
type: boolean
|
||||
group_id:
|
||||
title: Group Id
|
||||
type: integer
|
||||
required:
|
||||
- group_id
|
||||
- name
|
||||
title: CardCreate
|
||||
CardUpdate:
|
||||
example:
|
||||
name: name
|
||||
enabled: true
|
||||
group_id: 0
|
||||
properties:
|
||||
name:
|
||||
nullable: true
|
||||
type: string
|
||||
enabled:
|
||||
nullable: true
|
||||
type: boolean
|
||||
group_id:
|
||||
nullable: true
|
||||
type: integer
|
||||
title: CardUpdate
|
||||
GroupCreate:
|
||||
example:
|
||||
name: name
|
||||
@@ -899,16 +1059,24 @@ components:
|
||||
id: 0
|
||||
cards:
|
||||
- id: 6
|
||||
uuid: uuid
|
||||
key: key
|
||||
card_serial: card_serial
|
||||
enabled: true
|
||||
name: name
|
||||
group_id: 1
|
||||
- id: 6
|
||||
uuid: uuid
|
||||
key: key
|
||||
card_serial: card_serial
|
||||
enabled: true
|
||||
name: name
|
||||
group_id: 1
|
||||
accessauths:
|
||||
- name: name
|
||||
type: type
|
||||
is_active: true
|
||||
id: 5
|
||||
- name: name
|
||||
type: type
|
||||
is_active: true
|
||||
id: 5
|
||||
properties:
|
||||
@@ -961,6 +1129,19 @@ components:
|
||||
type: array
|
||||
default: null
|
||||
title: HTTPValidationError
|
||||
OneShotAccessBase:
|
||||
properties:
|
||||
uses:
|
||||
default: 1
|
||||
title: Uses
|
||||
type: integer
|
||||
ends_at:
|
||||
format: date-time
|
||||
title: Ends At
|
||||
type: string
|
||||
required:
|
||||
- ends_at
|
||||
title: OneShotAccessBase
|
||||
Timetable:
|
||||
example:
|
||||
weekday: 3
|
||||
|
||||
@@ -23,34 +23,37 @@ import (
|
||||
// CardAPIService CardAPI service
|
||||
type CardAPIService service
|
||||
|
||||
type ApiAddCardApiV1CardsGroupIdPostRequest struct {
|
||||
type ApiAddCardApiV1CardsPostRequest struct {
|
||||
ctx context.Context
|
||||
ApiService *CardAPIService
|
||||
groupId int32
|
||||
cardCreate *CardCreate
|
||||
}
|
||||
|
||||
func (r ApiAddCardApiV1CardsGroupIdPostRequest) Execute() (*Card, *http.Response, error) {
|
||||
return r.ApiService.AddCardApiV1CardsGroupIdPostExecute(r)
|
||||
func (r ApiAddCardApiV1CardsPostRequest) CardCreate(cardCreate CardCreate) ApiAddCardApiV1CardsPostRequest {
|
||||
r.cardCreate = &cardCreate
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiAddCardApiV1CardsPostRequest) Execute() (*Card, *http.Response, error) {
|
||||
return r.ApiService.AddCardApiV1CardsPostExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
AddCardApiV1CardsGroupIdPost Add Card
|
||||
AddCardApiV1CardsPost Add Card
|
||||
|
||||
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
@param groupId
|
||||
@return ApiAddCardApiV1CardsGroupIdPostRequest
|
||||
@return ApiAddCardApiV1CardsPostRequest
|
||||
*/
|
||||
func (a *CardAPIService) AddCardApiV1CardsGroupIdPost(ctx context.Context, groupId int32) ApiAddCardApiV1CardsGroupIdPostRequest {
|
||||
return ApiAddCardApiV1CardsGroupIdPostRequest{
|
||||
func (a *CardAPIService) AddCardApiV1CardsPost(ctx context.Context) ApiAddCardApiV1CardsPostRequest {
|
||||
return ApiAddCardApiV1CardsPostRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
groupId: groupId,
|
||||
}
|
||||
}
|
||||
|
||||
// Execute executes the request
|
||||
// @return Card
|
||||
func (a *CardAPIService) AddCardApiV1CardsGroupIdPostExecute(r ApiAddCardApiV1CardsGroupIdPostRequest) (*Card, *http.Response, error) {
|
||||
func (a *CardAPIService) AddCardApiV1CardsPostExecute(r ApiAddCardApiV1CardsPostRequest) (*Card, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodPost
|
||||
localVarPostBody interface{}
|
||||
@@ -58,20 +61,22 @@ func (a *CardAPIService) AddCardApiV1CardsGroupIdPostExecute(r ApiAddCardApiV1Ca
|
||||
localVarReturnValue *Card
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CardAPIService.AddCardApiV1CardsGroupIdPost")
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CardAPIService.AddCardApiV1CardsPost")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/api/v1/cards/{group_id}"
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", url.PathEscape(parameterValueToString(r.groupId, "groupId")), -1)
|
||||
localVarPath := localBasePath + "/api/v1/cards/"
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
if r.cardCreate == nil {
|
||||
return localVarReturnValue, nil, reportError("cardCreate is required and must be specified")
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
localVarHTTPContentTypes := []string{"application/json"}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
@@ -87,6 +92,8 @@ func (a *CardAPIService) AddCardApiV1CardsGroupIdPostExecute(r ApiAddCardApiV1Ca
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
// body params
|
||||
localVarPostBody = r.cardCreate
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
@@ -134,23 +141,23 @@ func (a *CardAPIService) AddCardApiV1CardsGroupIdPostExecute(r ApiAddCardApiV1Ca
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiDelCardApiV1CardsDeleteGetRequest struct {
|
||||
type ApiDelCardApiV1CardsDeleteRequest struct {
|
||||
ctx context.Context
|
||||
ApiService *CardAPIService
|
||||
}
|
||||
|
||||
func (r ApiDelCardApiV1CardsDeleteGetRequest) Execute() (interface{}, *http.Response, error) {
|
||||
return r.ApiService.DelCardApiV1CardsDeleteGetExecute(r)
|
||||
func (r ApiDelCardApiV1CardsDeleteRequest) Execute() (interface{}, *http.Response, error) {
|
||||
return r.ApiService.DelCardApiV1CardsDeleteExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
DelCardApiV1CardsDeleteGet Del Card
|
||||
DelCardApiV1CardsDelete Del Card
|
||||
|
||||
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
@return ApiDelCardApiV1CardsDeleteGetRequest
|
||||
@return ApiDelCardApiV1CardsDeleteRequest
|
||||
*/
|
||||
func (a *CardAPIService) DelCardApiV1CardsDeleteGet(ctx context.Context) ApiDelCardApiV1CardsDeleteGetRequest {
|
||||
return ApiDelCardApiV1CardsDeleteGetRequest{
|
||||
func (a *CardAPIService) DelCardApiV1CardsDelete(ctx context.Context) ApiDelCardApiV1CardsDeleteRequest {
|
||||
return ApiDelCardApiV1CardsDeleteRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
}
|
||||
@@ -158,20 +165,20 @@ func (a *CardAPIService) DelCardApiV1CardsDeleteGet(ctx context.Context) ApiDelC
|
||||
|
||||
// Execute executes the request
|
||||
// @return interface{}
|
||||
func (a *CardAPIService) DelCardApiV1CardsDeleteGetExecute(r ApiDelCardApiV1CardsDeleteGetRequest) (interface{}, *http.Response, error) {
|
||||
func (a *CardAPIService) DelCardApiV1CardsDeleteExecute(r ApiDelCardApiV1CardsDeleteRequest) (interface{}, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodGet
|
||||
localVarHTTPMethod = http.MethodDelete
|
||||
localVarPostBody interface{}
|
||||
formFiles []formFile
|
||||
localVarReturnValue interface{}
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CardAPIService.DelCardApiV1CardsDeleteGet")
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CardAPIService.DelCardApiV1CardsDelete")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/api/v1/cards/delete"
|
||||
localVarPath := localBasePath + "/api/v1/cards/"
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
@@ -341,3 +348,125 @@ func (a *CardAPIService) GetCardsApiV1CardsGroupIdGetExecute(r ApiGetCardsApiV1C
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiUpdateCardApiV1CardsCardIdPatchRequest struct {
|
||||
ctx context.Context
|
||||
ApiService *CardAPIService
|
||||
cardId int32
|
||||
cardUpdate *CardUpdate
|
||||
}
|
||||
|
||||
func (r ApiUpdateCardApiV1CardsCardIdPatchRequest) CardUpdate(cardUpdate CardUpdate) ApiUpdateCardApiV1CardsCardIdPatchRequest {
|
||||
r.cardUpdate = &cardUpdate
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiUpdateCardApiV1CardsCardIdPatchRequest) Execute() (*Card, *http.Response, error) {
|
||||
return r.ApiService.UpdateCardApiV1CardsCardIdPatchExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
UpdateCardApiV1CardsCardIdPatch Update Card
|
||||
|
||||
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
@param cardId
|
||||
@return ApiUpdateCardApiV1CardsCardIdPatchRequest
|
||||
*/
|
||||
func (a *CardAPIService) UpdateCardApiV1CardsCardIdPatch(ctx context.Context, cardId int32) ApiUpdateCardApiV1CardsCardIdPatchRequest {
|
||||
return ApiUpdateCardApiV1CardsCardIdPatchRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
cardId: cardId,
|
||||
}
|
||||
}
|
||||
|
||||
// Execute executes the request
|
||||
// @return Card
|
||||
func (a *CardAPIService) UpdateCardApiV1CardsCardIdPatchExecute(r ApiUpdateCardApiV1CardsCardIdPatchRequest) (*Card, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodPatch
|
||||
localVarPostBody interface{}
|
||||
formFiles []formFile
|
||||
localVarReturnValue *Card
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CardAPIService.UpdateCardApiV1CardsCardIdPatch")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/api/v1/cards/{card_id}"
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"card_id"+"}", url.PathEscape(parameterValueToString(r.cardId, "cardId")), -1)
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
if r.cardUpdate == nil {
|
||||
return localVarReturnValue, nil, reportError("cardUpdate is required and must be specified")
|
||||
}
|
||||
|
||||
// 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 = r.cardUpdate
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 422 {
|
||||
var v HTTPValidationError
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
|
||||
newErr.model = v
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
@@ -23,59 +23,91 @@ import (
|
||||
// DebugItemsMaybeDontShowThisInUIAPIService DebugItemsMaybeDontShowThisInUIAPI service
|
||||
type DebugItemsMaybeDontShowThisInUIAPIService service
|
||||
|
||||
type ApiAddCardManuallyApiV1DebugAddcardGroupidCardKeyGetRequest struct {
|
||||
type ApiAddCardManuallyApiV1DebugAddcardPutRequest struct {
|
||||
ctx context.Context
|
||||
ApiService *DebugItemsMaybeDontShowThisInUIAPIService
|
||||
groupid int32
|
||||
cardKey string
|
||||
groupid *int32
|
||||
cardKey *string
|
||||
name *string
|
||||
enabled *bool
|
||||
}
|
||||
|
||||
func (r ApiAddCardManuallyApiV1DebugAddcardGroupidCardKeyGetRequest) Execute() (interface{}, *http.Response, error) {
|
||||
return r.ApiService.AddCardManuallyApiV1DebugAddcardGroupidCardKeyGetExecute(r)
|
||||
func (r ApiAddCardManuallyApiV1DebugAddcardPutRequest) Groupid(groupid int32) ApiAddCardManuallyApiV1DebugAddcardPutRequest {
|
||||
r.groupid = &groupid
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiAddCardManuallyApiV1DebugAddcardPutRequest) CardKey(cardKey string) ApiAddCardManuallyApiV1DebugAddcardPutRequest {
|
||||
r.cardKey = &cardKey
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiAddCardManuallyApiV1DebugAddcardPutRequest) Name(name string) ApiAddCardManuallyApiV1DebugAddcardPutRequest {
|
||||
r.name = &name
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiAddCardManuallyApiV1DebugAddcardPutRequest) Enabled(enabled bool) ApiAddCardManuallyApiV1DebugAddcardPutRequest {
|
||||
r.enabled = &enabled
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiAddCardManuallyApiV1DebugAddcardPutRequest) Execute() (interface{}, *http.Response, error) {
|
||||
return r.ApiService.AddCardManuallyApiV1DebugAddcardPutExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
AddCardManuallyApiV1DebugAddcardGroupidCardKeyGet Add Card Manually
|
||||
AddCardManuallyApiV1DebugAddcardPut Add Card Manually
|
||||
|
||||
Add cards manually (you also have to delete them manually)
|
||||
|
||||
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
@param groupid
|
||||
@param cardKey
|
||||
@return ApiAddCardManuallyApiV1DebugAddcardGroupidCardKeyGetRequest
|
||||
@return ApiAddCardManuallyApiV1DebugAddcardPutRequest
|
||||
*/
|
||||
func (a *DebugItemsMaybeDontShowThisInUIAPIService) AddCardManuallyApiV1DebugAddcardGroupidCardKeyGet(ctx context.Context, groupid int32, cardKey string) ApiAddCardManuallyApiV1DebugAddcardGroupidCardKeyGetRequest {
|
||||
return ApiAddCardManuallyApiV1DebugAddcardGroupidCardKeyGetRequest{
|
||||
func (a *DebugItemsMaybeDontShowThisInUIAPIService) AddCardManuallyApiV1DebugAddcardPut(ctx context.Context) ApiAddCardManuallyApiV1DebugAddcardPutRequest {
|
||||
return ApiAddCardManuallyApiV1DebugAddcardPutRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
groupid: groupid,
|
||||
cardKey: cardKey,
|
||||
}
|
||||
}
|
||||
|
||||
// Execute executes the request
|
||||
// @return interface{}
|
||||
func (a *DebugItemsMaybeDontShowThisInUIAPIService) AddCardManuallyApiV1DebugAddcardGroupidCardKeyGetExecute(r ApiAddCardManuallyApiV1DebugAddcardGroupidCardKeyGetRequest) (interface{}, *http.Response, error) {
|
||||
func (a *DebugItemsMaybeDontShowThisInUIAPIService) AddCardManuallyApiV1DebugAddcardPutExecute(r ApiAddCardManuallyApiV1DebugAddcardPutRequest) (interface{}, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodGet
|
||||
localVarHTTPMethod = http.MethodPut
|
||||
localVarPostBody interface{}
|
||||
formFiles []formFile
|
||||
localVarReturnValue interface{}
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DebugItemsMaybeDontShowThisInUIAPIService.AddCardManuallyApiV1DebugAddcardGroupidCardKeyGet")
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DebugItemsMaybeDontShowThisInUIAPIService.AddCardManuallyApiV1DebugAddcardPut")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/api/v1/debug/addcard/{groupid}/{card_key}"
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"groupid"+"}", url.PathEscape(parameterValueToString(r.groupid, "groupid")), -1)
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"card_key"+"}", url.PathEscape(parameterValueToString(r.cardKey, "cardKey")), -1)
|
||||
localVarPath := localBasePath + "/api/v1/debug/addcard/"
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
if r.groupid == nil {
|
||||
return localVarReturnValue, nil, reportError("groupid is required and must be specified")
|
||||
}
|
||||
if r.cardKey == nil {
|
||||
return localVarReturnValue, nil, reportError("cardKey is required and must be specified")
|
||||
}
|
||||
if r.name == nil {
|
||||
return localVarReturnValue, nil, reportError("name is required and must be specified")
|
||||
}
|
||||
if r.enabled == nil {
|
||||
return localVarReturnValue, nil, reportError("enabled is required and must be specified")
|
||||
}
|
||||
|
||||
parameterAddToHeaderOrQuery(localVarQueryParams, "groupid", r.groupid, "form", "")
|
||||
parameterAddToHeaderOrQuery(localVarQueryParams, "card_key", r.cardKey, "form", "")
|
||||
parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "")
|
||||
parameterAddToHeaderOrQuery(localVarQueryParams, "enabled", r.enabled, "form", "")
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
@@ -237,34 +269,34 @@ func (a *DebugItemsMaybeDontShowThisInUIAPIService) ListAllCardsApiV1DebugGetcar
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiRemoveCardManuallyApiV1DebugRmcardCardKeyGetRequest struct {
|
||||
type ApiRemoveCardManuallyApiV1DebugRmcardCardIdGetRequest struct {
|
||||
ctx context.Context
|
||||
ApiService *DebugItemsMaybeDontShowThisInUIAPIService
|
||||
cardKey string
|
||||
cardId string
|
||||
}
|
||||
|
||||
func (r ApiRemoveCardManuallyApiV1DebugRmcardCardKeyGetRequest) Execute() (interface{}, *http.Response, error) {
|
||||
return r.ApiService.RemoveCardManuallyApiV1DebugRmcardCardKeyGetExecute(r)
|
||||
func (r ApiRemoveCardManuallyApiV1DebugRmcardCardIdGetRequest) Execute() (interface{}, *http.Response, error) {
|
||||
return r.ApiService.RemoveCardManuallyApiV1DebugRmcardCardIdGetExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
RemoveCardManuallyApiV1DebugRmcardCardKeyGet Remove Card Manually
|
||||
RemoveCardManuallyApiV1DebugRmcardCardIdGet Remove Card Manually
|
||||
|
||||
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
@param cardKey
|
||||
@return ApiRemoveCardManuallyApiV1DebugRmcardCardKeyGetRequest
|
||||
@param cardId
|
||||
@return ApiRemoveCardManuallyApiV1DebugRmcardCardIdGetRequest
|
||||
*/
|
||||
func (a *DebugItemsMaybeDontShowThisInUIAPIService) RemoveCardManuallyApiV1DebugRmcardCardKeyGet(ctx context.Context, cardKey string) ApiRemoveCardManuallyApiV1DebugRmcardCardKeyGetRequest {
|
||||
return ApiRemoveCardManuallyApiV1DebugRmcardCardKeyGetRequest{
|
||||
func (a *DebugItemsMaybeDontShowThisInUIAPIService) RemoveCardManuallyApiV1DebugRmcardCardIdGet(ctx context.Context, cardId string) ApiRemoveCardManuallyApiV1DebugRmcardCardIdGetRequest {
|
||||
return ApiRemoveCardManuallyApiV1DebugRmcardCardIdGetRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
cardKey: cardKey,
|
||||
cardId: cardId,
|
||||
}
|
||||
}
|
||||
|
||||
// Execute executes the request
|
||||
// @return interface{}
|
||||
func (a *DebugItemsMaybeDontShowThisInUIAPIService) RemoveCardManuallyApiV1DebugRmcardCardKeyGetExecute(r ApiRemoveCardManuallyApiV1DebugRmcardCardKeyGetRequest) (interface{}, *http.Response, error) {
|
||||
func (a *DebugItemsMaybeDontShowThisInUIAPIService) RemoveCardManuallyApiV1DebugRmcardCardIdGetExecute(r ApiRemoveCardManuallyApiV1DebugRmcardCardIdGetRequest) (interface{}, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
@@ -272,13 +304,13 @@ func (a *DebugItemsMaybeDontShowThisInUIAPIService) RemoveCardManuallyApiV1Debug
|
||||
localVarReturnValue interface{}
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DebugItemsMaybeDontShowThisInUIAPIService.RemoveCardManuallyApiV1DebugRmcardCardKeyGet")
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DebugItemsMaybeDontShowThisInUIAPIService.RemoveCardManuallyApiV1DebugRmcardCardIdGet")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/api/v1/debug/rmcard/{card_key}"
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"card_key"+"}", url.PathEscape(parameterValueToString(r.cardKey, "cardKey")), -1)
|
||||
localVarPath := localBasePath + "/api/v1/debug/rmcard/{card_id}"
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"card_id"+"}", url.PathEscape(parameterValueToString(r.cardId, "cardId")), -1)
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
|
||||
@@ -22,23 +22,23 @@ import (
|
||||
// DoorAPIService DoorAPI service
|
||||
type DoorAPIService service
|
||||
|
||||
type ApiOpenDoorApiV1DoorClosePutRequest struct {
|
||||
type ApiCloseDoorApiV1DoorClosePutRequest struct {
|
||||
ctx context.Context
|
||||
ApiService *DoorAPIService
|
||||
}
|
||||
|
||||
func (r ApiOpenDoorApiV1DoorClosePutRequest) Execute() (interface{}, *http.Response, error) {
|
||||
return r.ApiService.OpenDoorApiV1DoorClosePutExecute(r)
|
||||
func (r ApiCloseDoorApiV1DoorClosePutRequest) Execute() (interface{}, *http.Response, error) {
|
||||
return r.ApiService.CloseDoorApiV1DoorClosePutExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
OpenDoorApiV1DoorClosePut Open Door
|
||||
CloseDoorApiV1DoorClosePut Close Door
|
||||
|
||||
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
@return ApiOpenDoorApiV1DoorClosePutRequest
|
||||
@return ApiCloseDoorApiV1DoorClosePutRequest
|
||||
*/
|
||||
func (a *DoorAPIService) OpenDoorApiV1DoorClosePut(ctx context.Context) ApiOpenDoorApiV1DoorClosePutRequest {
|
||||
return ApiOpenDoorApiV1DoorClosePutRequest{
|
||||
func (a *DoorAPIService) CloseDoorApiV1DoorClosePut(ctx context.Context) ApiCloseDoorApiV1DoorClosePutRequest {
|
||||
return ApiCloseDoorApiV1DoorClosePutRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
}
|
||||
@@ -46,7 +46,7 @@ func (a *DoorAPIService) OpenDoorApiV1DoorClosePut(ctx context.Context) ApiOpenD
|
||||
|
||||
// Execute executes the request
|
||||
// @return interface{}
|
||||
func (a *DoorAPIService) OpenDoorApiV1DoorClosePutExecute(r ApiOpenDoorApiV1DoorClosePutRequest) (interface{}, *http.Response, error) {
|
||||
func (a *DoorAPIService) CloseDoorApiV1DoorClosePutExecute(r ApiCloseDoorApiV1DoorClosePutRequest) (interface{}, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodPut
|
||||
localVarPostBody interface{}
|
||||
@@ -54,7 +54,7 @@ func (a *DoorAPIService) OpenDoorApiV1DoorClosePutExecute(r ApiOpenDoorApiV1Door
|
||||
localVarReturnValue interface{}
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DoorAPIService.OpenDoorApiV1DoorClosePut")
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DoorAPIService.CloseDoorApiV1DoorClosePut")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
@@ -119,6 +119,103 @@ func (a *DoorAPIService) OpenDoorApiV1DoorClosePutExecute(r ApiOpenDoorApiV1Door
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiIsDoorOpenApiV1DoorStatusPutRequest struct {
|
||||
ctx context.Context
|
||||
ApiService *DoorAPIService
|
||||
}
|
||||
|
||||
func (r ApiIsDoorOpenApiV1DoorStatusPutRequest) Execute() (interface{}, *http.Response, error) {
|
||||
return r.ApiService.IsDoorOpenApiV1DoorStatusPutExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
IsDoorOpenApiV1DoorStatusPut Is Door Open
|
||||
|
||||
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
@return ApiIsDoorOpenApiV1DoorStatusPutRequest
|
||||
*/
|
||||
func (a *DoorAPIService) IsDoorOpenApiV1DoorStatusPut(ctx context.Context) ApiIsDoorOpenApiV1DoorStatusPutRequest {
|
||||
return ApiIsDoorOpenApiV1DoorStatusPutRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// Execute executes the request
|
||||
// @return interface{}
|
||||
func (a *DoorAPIService) IsDoorOpenApiV1DoorStatusPutExecute(r ApiIsDoorOpenApiV1DoorStatusPutRequest) (interface{}, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodPut
|
||||
localVarPostBody interface{}
|
||||
formFiles []formFile
|
||||
localVarReturnValue interface{}
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DoorAPIService.IsDoorOpenApiV1DoorStatusPut")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/api/v1/door/status"
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.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
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
type ApiOpenDoorApiV1DoorOpenPutRequest struct {
|
||||
ctx context.Context
|
||||
ApiService *DoorAPIService
|
||||
|
||||
@@ -33,7 +33,7 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
accessAuthorizationCreate := *openapiclient.NewAccessAuthorizationCreate("Name_example", false, []openapiclient.TimetableCreate{*openapiclient.NewTimetableCreate(int32(123), "Starttime_example", int32(123))}) // AccessAuthorizationCreate |
|
||||
accessAuthorizationCreate := *openapiclient.NewAccessAuthorizationCreate("Name_example", "Type_example", false) // AccessAuthorizationCreate |
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
|
||||
@@ -5,14 +5,16 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **string** | |
|
||||
**Type** | **string** | |
|
||||
**IsActive** | **bool** | |
|
||||
**Timetables** | [**[]TimetableCreate**](TimetableCreate.md) | |
|
||||
**Timetables** | Pointer to [**[]TimetableCreate**](TimetableCreate.md) | | [optional] [default to {}]
|
||||
**Oneshot** | Pointer to [**NullableOneShotAccessBase**](OneShotAccessBase.md) | | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewAccessAuthorizationCreate
|
||||
|
||||
`func NewAccessAuthorizationCreate(name string, isActive bool, timetables []TimetableCreate, ) *AccessAuthorizationCreate`
|
||||
`func NewAccessAuthorizationCreate(name string, type_ string, isActive bool, ) *AccessAuthorizationCreate`
|
||||
|
||||
NewAccessAuthorizationCreate instantiates a new AccessAuthorizationCreate object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
@@ -47,6 +49,26 @@ and a boolean to check if the value has been set.
|
||||
SetName sets Name field to given value.
|
||||
|
||||
|
||||
### GetType
|
||||
|
||||
`func (o *AccessAuthorizationCreate) GetType() string`
|
||||
|
||||
GetType returns the Type field if non-nil, zero value otherwise.
|
||||
|
||||
### GetTypeOk
|
||||
|
||||
`func (o *AccessAuthorizationCreate) 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.
|
||||
|
||||
### SetType
|
||||
|
||||
`func (o *AccessAuthorizationCreate) SetType(v string)`
|
||||
|
||||
SetType sets Type field to given value.
|
||||
|
||||
|
||||
### GetIsActive
|
||||
|
||||
`func (o *AccessAuthorizationCreate) GetIsActive() bool`
|
||||
@@ -86,7 +108,47 @@ and a boolean to check if the value has been set.
|
||||
|
||||
SetTimetables sets Timetables field to given value.
|
||||
|
||||
### HasTimetables
|
||||
|
||||
`func (o *AccessAuthorizationCreate) HasTimetables() bool`
|
||||
|
||||
HasTimetables returns a boolean if a field has been set.
|
||||
|
||||
### GetOneshot
|
||||
|
||||
`func (o *AccessAuthorizationCreate) GetOneshot() OneShotAccessBase`
|
||||
|
||||
GetOneshot returns the Oneshot field if non-nil, zero value otherwise.
|
||||
|
||||
### GetOneshotOk
|
||||
|
||||
`func (o *AccessAuthorizationCreate) GetOneshotOk() (*OneShotAccessBase, bool)`
|
||||
|
||||
GetOneshotOk returns a tuple with the Oneshot field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetOneshot
|
||||
|
||||
`func (o *AccessAuthorizationCreate) SetOneshot(v OneShotAccessBase)`
|
||||
|
||||
SetOneshot sets Oneshot field to given value.
|
||||
|
||||
### HasOneshot
|
||||
|
||||
`func (o *AccessAuthorizationCreate) HasOneshot() bool`
|
||||
|
||||
HasOneshot returns a boolean if a field has been set.
|
||||
|
||||
### SetOneshotNil
|
||||
|
||||
`func (o *AccessAuthorizationCreate) SetOneshotNil(b bool)`
|
||||
|
||||
SetOneshotNil sets the value for Oneshot to be an explicit nil
|
||||
|
||||
### UnsetOneshot
|
||||
`func (o *AccessAuthorizationCreate) UnsetOneshot()`
|
||||
|
||||
UnsetOneshot ensures that no value is present for Oneshot, not even an explicit nil
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **string** | |
|
||||
**Type** | **string** | |
|
||||
**IsActive** | **bool** | |
|
||||
**Id** | Pointer to **NullableInt32** | | [optional]
|
||||
|
||||
@@ -12,7 +13,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### NewAccessAuthorizationDB
|
||||
|
||||
`func NewAccessAuthorizationDB(name string, isActive bool, ) *AccessAuthorizationDB`
|
||||
`func NewAccessAuthorizationDB(name string, type_ string, isActive bool, ) *AccessAuthorizationDB`
|
||||
|
||||
NewAccessAuthorizationDB instantiates a new AccessAuthorizationDB object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
@@ -47,6 +48,26 @@ and a boolean to check if the value has been set.
|
||||
SetName sets Name field to given value.
|
||||
|
||||
|
||||
### GetType
|
||||
|
||||
`func (o *AccessAuthorizationDB) GetType() string`
|
||||
|
||||
GetType returns the Type field if non-nil, zero value otherwise.
|
||||
|
||||
### GetTypeOk
|
||||
|
||||
`func (o *AccessAuthorizationDB) 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.
|
||||
|
||||
### SetType
|
||||
|
||||
`func (o *AccessAuthorizationDB) SetType(v string)`
|
||||
|
||||
SetType sets Type field to given value.
|
||||
|
||||
|
||||
### GetIsActive
|
||||
|
||||
`func (o *AccessAuthorizationDB) GetIsActive() bool`
|
||||
|
||||
@@ -5,16 +5,18 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **string** | |
|
||||
**Type** | **string** | |
|
||||
**IsActive** | **bool** | |
|
||||
**Id** | **int32** | |
|
||||
**Timetables** | [**[]Timetable**](Timetable.md) | |
|
||||
**Timetables** | Pointer to [**[]Timetable**](Timetable.md) | | [optional] [default to {}]
|
||||
**Oneshot** | Pointer to [**NullableOneShotAccessBase**](OneShotAccessBase.md) | | [optional]
|
||||
**Groups** | [**[]GroupDB**](GroupDB.md) | |
|
||||
|
||||
## Methods
|
||||
|
||||
### NewAccessAuthorizationResponse
|
||||
|
||||
`func NewAccessAuthorizationResponse(name string, isActive bool, id int32, timetables []Timetable, groups []GroupDB, ) *AccessAuthorizationResponse`
|
||||
`func NewAccessAuthorizationResponse(name string, type_ string, isActive bool, id int32, groups []GroupDB, ) *AccessAuthorizationResponse`
|
||||
|
||||
NewAccessAuthorizationResponse instantiates a new AccessAuthorizationResponse object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
@@ -49,6 +51,26 @@ and a boolean to check if the value has been set.
|
||||
SetName sets Name field to given value.
|
||||
|
||||
|
||||
### GetType
|
||||
|
||||
`func (o *AccessAuthorizationResponse) GetType() string`
|
||||
|
||||
GetType returns the Type field if non-nil, zero value otherwise.
|
||||
|
||||
### GetTypeOk
|
||||
|
||||
`func (o *AccessAuthorizationResponse) 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.
|
||||
|
||||
### SetType
|
||||
|
||||
`func (o *AccessAuthorizationResponse) SetType(v string)`
|
||||
|
||||
SetType sets Type field to given value.
|
||||
|
||||
|
||||
### GetIsActive
|
||||
|
||||
`func (o *AccessAuthorizationResponse) GetIsActive() bool`
|
||||
@@ -108,7 +130,47 @@ and a boolean to check if the value has been set.
|
||||
|
||||
SetTimetables sets Timetables field to given value.
|
||||
|
||||
### HasTimetables
|
||||
|
||||
`func (o *AccessAuthorizationResponse) HasTimetables() bool`
|
||||
|
||||
HasTimetables returns a boolean if a field has been set.
|
||||
|
||||
### GetOneshot
|
||||
|
||||
`func (o *AccessAuthorizationResponse) GetOneshot() OneShotAccessBase`
|
||||
|
||||
GetOneshot returns the Oneshot field if non-nil, zero value otherwise.
|
||||
|
||||
### GetOneshotOk
|
||||
|
||||
`func (o *AccessAuthorizationResponse) GetOneshotOk() (*OneShotAccessBase, bool)`
|
||||
|
||||
GetOneshotOk returns a tuple with the Oneshot field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetOneshot
|
||||
|
||||
`func (o *AccessAuthorizationResponse) SetOneshot(v OneShotAccessBase)`
|
||||
|
||||
SetOneshot sets Oneshot field to given value.
|
||||
|
||||
### HasOneshot
|
||||
|
||||
`func (o *AccessAuthorizationResponse) HasOneshot() bool`
|
||||
|
||||
HasOneshot returns a boolean if a field has been set.
|
||||
|
||||
### SetOneshotNil
|
||||
|
||||
`func (o *AccessAuthorizationResponse) SetOneshotNil(b bool)`
|
||||
|
||||
SetOneshotNil sets the value for Oneshot to be an explicit nil
|
||||
|
||||
### UnsetOneshot
|
||||
`func (o *AccessAuthorizationResponse) UnsetOneshot()`
|
||||
|
||||
UnsetOneshot ensures that no value is present for Oneshot, not even an explicit nil
|
||||
### GetGroups
|
||||
|
||||
`func (o *AccessAuthorizationResponse) GetGroups() []GroupDB`
|
||||
|
||||
@@ -5,8 +5,10 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | Pointer to **NullableString** | | [optional]
|
||||
**Type** | Pointer to **NullableString** | | [optional]
|
||||
**IsActive** | Pointer to **NullableBool** | | [optional]
|
||||
**Timetables** | Pointer to [**[]TimetableCreate**](TimetableCreate.md) | | [optional]
|
||||
**Oneshot** | Pointer to [**NullableOneShotAccessBase**](OneShotAccessBase.md) | | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -62,6 +64,41 @@ HasName returns a boolean if a field has been set.
|
||||
`func (o *AccessAuthorizationUpdate) UnsetName()`
|
||||
|
||||
UnsetName ensures that no value is present for Name, not even an explicit nil
|
||||
### GetType
|
||||
|
||||
`func (o *AccessAuthorizationUpdate) GetType() string`
|
||||
|
||||
GetType returns the Type field if non-nil, zero value otherwise.
|
||||
|
||||
### GetTypeOk
|
||||
|
||||
`func (o *AccessAuthorizationUpdate) 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.
|
||||
|
||||
### SetType
|
||||
|
||||
`func (o *AccessAuthorizationUpdate) SetType(v string)`
|
||||
|
||||
SetType sets Type field to given value.
|
||||
|
||||
### HasType
|
||||
|
||||
`func (o *AccessAuthorizationUpdate) HasType() bool`
|
||||
|
||||
HasType returns a boolean if a field has been set.
|
||||
|
||||
### SetTypeNil
|
||||
|
||||
`func (o *AccessAuthorizationUpdate) SetTypeNil(b bool)`
|
||||
|
||||
SetTypeNil sets the value for Type to be an explicit nil
|
||||
|
||||
### UnsetType
|
||||
`func (o *AccessAuthorizationUpdate) UnsetType()`
|
||||
|
||||
UnsetType ensures that no value is present for Type, not even an explicit nil
|
||||
### GetIsActive
|
||||
|
||||
`func (o *AccessAuthorizationUpdate) GetIsActive() bool`
|
||||
@@ -132,6 +169,41 @@ HasTimetables returns a boolean if a field has been set.
|
||||
`func (o *AccessAuthorizationUpdate) UnsetTimetables()`
|
||||
|
||||
UnsetTimetables ensures that no value is present for Timetables, not even an explicit nil
|
||||
### GetOneshot
|
||||
|
||||
`func (o *AccessAuthorizationUpdate) GetOneshot() OneShotAccessBase`
|
||||
|
||||
GetOneshot returns the Oneshot field if non-nil, zero value otherwise.
|
||||
|
||||
### GetOneshotOk
|
||||
|
||||
`func (o *AccessAuthorizationUpdate) GetOneshotOk() (*OneShotAccessBase, bool)`
|
||||
|
||||
GetOneshotOk returns a tuple with the Oneshot field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetOneshot
|
||||
|
||||
`func (o *AccessAuthorizationUpdate) SetOneshot(v OneShotAccessBase)`
|
||||
|
||||
SetOneshot sets Oneshot field to given value.
|
||||
|
||||
### HasOneshot
|
||||
|
||||
`func (o *AccessAuthorizationUpdate) HasOneshot() bool`
|
||||
|
||||
HasOneshot returns a boolean if a field has been set.
|
||||
|
||||
### SetOneshotNil
|
||||
|
||||
`func (o *AccessAuthorizationUpdate) SetOneshotNil(b bool)`
|
||||
|
||||
SetOneshotNil sets the value for Oneshot to be an explicit nil
|
||||
|
||||
### UnsetOneshot
|
||||
`func (o *AccessAuthorizationUpdate) UnsetOneshot()`
|
||||
|
||||
UnsetOneshot ensures that no value is present for Oneshot, not even an explicit nil
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -5,14 +5,17 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | Pointer to **NullableInt32** | | [optional]
|
||||
**Uuid** | **string** | |
|
||||
**Key** | **string** | |
|
||||
**CardSerial** | **string** | |
|
||||
**Enabled** | Pointer to **bool** | | [optional] [default to true]
|
||||
**Name** | **string** | |
|
||||
**GroupId** | Pointer to **NullableInt32** | | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewCard
|
||||
|
||||
`func NewCard(uuid string, ) *Card`
|
||||
`func NewCard(key string, cardSerial string, name string, ) *Card`
|
||||
|
||||
NewCard instantiates a new Card object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
@@ -62,24 +65,89 @@ HasId returns a boolean if a field has been set.
|
||||
`func (o *Card) UnsetId()`
|
||||
|
||||
UnsetId ensures that no value is present for Id, not even an explicit nil
|
||||
### GetUuid
|
||||
### GetKey
|
||||
|
||||
`func (o *Card) GetUuid() string`
|
||||
`func (o *Card) GetKey() string`
|
||||
|
||||
GetUuid returns the Uuid field if non-nil, zero value otherwise.
|
||||
GetKey returns the Key field if non-nil, zero value otherwise.
|
||||
|
||||
### GetUuidOk
|
||||
### GetKeyOk
|
||||
|
||||
`func (o *Card) GetUuidOk() (*string, bool)`
|
||||
`func (o *Card) GetKeyOk() (*string, bool)`
|
||||
|
||||
GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise
|
||||
GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetUuid
|
||||
### SetKey
|
||||
|
||||
`func (o *Card) SetUuid(v string)`
|
||||
`func (o *Card) SetKey(v string)`
|
||||
|
||||
SetUuid sets Uuid field to given value.
|
||||
SetKey sets Key field to given value.
|
||||
|
||||
|
||||
### GetCardSerial
|
||||
|
||||
`func (o *Card) GetCardSerial() string`
|
||||
|
||||
GetCardSerial returns the CardSerial field if non-nil, zero value otherwise.
|
||||
|
||||
### GetCardSerialOk
|
||||
|
||||
`func (o *Card) GetCardSerialOk() (*string, bool)`
|
||||
|
||||
GetCardSerialOk returns a tuple with the CardSerial field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetCardSerial
|
||||
|
||||
`func (o *Card) SetCardSerial(v string)`
|
||||
|
||||
SetCardSerial sets CardSerial field to given value.
|
||||
|
||||
|
||||
### GetEnabled
|
||||
|
||||
`func (o *Card) GetEnabled() bool`
|
||||
|
||||
GetEnabled returns the Enabled field if non-nil, zero value otherwise.
|
||||
|
||||
### GetEnabledOk
|
||||
|
||||
`func (o *Card) GetEnabledOk() (*bool, bool)`
|
||||
|
||||
GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetEnabled
|
||||
|
||||
`func (o *Card) SetEnabled(v bool)`
|
||||
|
||||
SetEnabled sets Enabled field to given value.
|
||||
|
||||
### HasEnabled
|
||||
|
||||
`func (o *Card) HasEnabled() bool`
|
||||
|
||||
HasEnabled returns a boolean if a field has been set.
|
||||
|
||||
### GetName
|
||||
|
||||
`func (o *Card) GetName() string`
|
||||
|
||||
GetName returns the Name field if non-nil, zero value otherwise.
|
||||
|
||||
### GetNameOk
|
||||
|
||||
`func (o *Card) 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.
|
||||
|
||||
### SetName
|
||||
|
||||
`func (o *Card) SetName(v string)`
|
||||
|
||||
SetName sets Name field to given value.
|
||||
|
||||
|
||||
### GetGroupId
|
||||
|
||||
@@ -4,15 +4,16 @@ All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**AddCardApiV1CardsGroupIdPost**](CardAPI.md#AddCardApiV1CardsGroupIdPost) | **Post** /api/v1/cards/{group_id} | Add Card
|
||||
[**DelCardApiV1CardsDeleteGet**](CardAPI.md#DelCardApiV1CardsDeleteGet) | **Get** /api/v1/cards/delete | Del Card
|
||||
[**AddCardApiV1CardsPost**](CardAPI.md#AddCardApiV1CardsPost) | **Post** /api/v1/cards/ | Add Card
|
||||
[**DelCardApiV1CardsDelete**](CardAPI.md#DelCardApiV1CardsDelete) | **Delete** /api/v1/cards/ | Del Card
|
||||
[**GetCardsApiV1CardsGroupIdGet**](CardAPI.md#GetCardsApiV1CardsGroupIdGet) | **Get** /api/v1/cards/{group_id} | Get Cards
|
||||
[**UpdateCardApiV1CardsCardIdPatch**](CardAPI.md#UpdateCardApiV1CardsCardIdPatch) | **Patch** /api/v1/cards/{card_id} | Update Card
|
||||
|
||||
|
||||
|
||||
## AddCardApiV1CardsGroupIdPost
|
||||
## AddCardApiV1CardsPost
|
||||
|
||||
> Card AddCardApiV1CardsGroupIdPost(ctx, groupId).Execute()
|
||||
> Card AddCardApiV1CardsPost(ctx).CardCreate(cardCreate).Execute()
|
||||
|
||||
Add Card
|
||||
|
||||
@@ -29,36 +30,32 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
groupId := int32(56) // int32 |
|
||||
cardCreate := *openapiclient.NewCardCreate("Name_example", int32(123)) // CardCreate |
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.CardAPI.AddCardApiV1CardsGroupIdPost(context.Background(), groupId).Execute()
|
||||
resp, r, err := apiClient.CardAPI.AddCardApiV1CardsPost(context.Background()).CardCreate(cardCreate).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `CardAPI.AddCardApiV1CardsGroupIdPost``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `CardAPI.AddCardApiV1CardsPost``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `AddCardApiV1CardsGroupIdPost`: Card
|
||||
fmt.Fprintf(os.Stdout, "Response from `CardAPI.AddCardApiV1CardsGroupIdPost`: %v\n", resp)
|
||||
// response from `AddCardApiV1CardsPost`: Card
|
||||
fmt.Fprintf(os.Stdout, "Response from `CardAPI.AddCardApiV1CardsPost`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**groupId** | **int32** | |
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiAddCardApiV1CardsGroupIdPostRequest struct via the builder pattern
|
||||
Other parameters are passed through a pointer to a apiAddCardApiV1CardsPostRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
|
||||
**cardCreate** | [**CardCreate**](CardCreate.md) | |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -70,7 +67,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
@@ -78,9 +75,9 @@ Name | Type | Description | Notes
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## DelCardApiV1CardsDeleteGet
|
||||
## DelCardApiV1CardsDelete
|
||||
|
||||
> interface{} DelCardApiV1CardsDeleteGet(ctx).Execute()
|
||||
> interface{} DelCardApiV1CardsDelete(ctx).Execute()
|
||||
|
||||
Del Card
|
||||
|
||||
@@ -100,13 +97,13 @@ func main() {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.CardAPI.DelCardApiV1CardsDeleteGet(context.Background()).Execute()
|
||||
resp, r, err := apiClient.CardAPI.DelCardApiV1CardsDelete(context.Background()).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `CardAPI.DelCardApiV1CardsDeleteGet``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `CardAPI.DelCardApiV1CardsDelete``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `DelCardApiV1CardsDeleteGet`: interface{}
|
||||
fmt.Fprintf(os.Stdout, "Response from `CardAPI.DelCardApiV1CardsDeleteGet`: %v\n", resp)
|
||||
// response from `DelCardApiV1CardsDelete`: interface{}
|
||||
fmt.Fprintf(os.Stdout, "Response from `CardAPI.DelCardApiV1CardsDelete`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
@@ -116,7 +113,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiDelCardApiV1CardsDeleteGetRequest struct via the builder pattern
|
||||
Other parameters are passed through a pointer to a apiDelCardApiV1CardsDeleteRequest struct via the builder pattern
|
||||
|
||||
|
||||
### Return type
|
||||
@@ -204,3 +201,73 @@ Name | Type | Description | Notes
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## UpdateCardApiV1CardsCardIdPatch
|
||||
|
||||
> Card UpdateCardApiV1CardsCardIdPatch(ctx, cardId).CardUpdate(cardUpdate).Execute()
|
||||
|
||||
Update Card
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
||||
)
|
||||
|
||||
func main() {
|
||||
cardId := int32(56) // int32 |
|
||||
cardUpdate := *openapiclient.NewCardUpdate() // CardUpdate |
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.CardAPI.UpdateCardApiV1CardsCardIdPatch(context.Background(), cardId).CardUpdate(cardUpdate).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `CardAPI.UpdateCardApiV1CardsCardIdPatch``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `UpdateCardApiV1CardsCardIdPatch`: Card
|
||||
fmt.Fprintf(os.Stdout, "Response from `CardAPI.UpdateCardApiV1CardsCardIdPatch`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**cardId** | **int32** | |
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiUpdateCardApiV1CardsCardIdPatchRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
|
||||
**cardUpdate** | [**CardUpdate**](CardUpdate.md) | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Card**](Card.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer)
|
||||
|
||||
### 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)
|
||||
|
||||
|
||||
98
openapi/docs/CardCreate.md
Normal file
98
openapi/docs/CardCreate.md
Normal file
@@ -0,0 +1,98 @@
|
||||
# CardCreate
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **string** | |
|
||||
**Enabled** | Pointer to **bool** | | [optional] [default to true]
|
||||
**GroupId** | **int32** | |
|
||||
|
||||
## Methods
|
||||
|
||||
### NewCardCreate
|
||||
|
||||
`func NewCardCreate(name string, groupId int32, ) *CardCreate`
|
||||
|
||||
NewCardCreate instantiates a new CardCreate object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewCardCreateWithDefaults
|
||||
|
||||
`func NewCardCreateWithDefaults() *CardCreate`
|
||||
|
||||
NewCardCreateWithDefaults instantiates a new CardCreate object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetName
|
||||
|
||||
`func (o *CardCreate) GetName() string`
|
||||
|
||||
GetName returns the Name field if non-nil, zero value otherwise.
|
||||
|
||||
### GetNameOk
|
||||
|
||||
`func (o *CardCreate) 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.
|
||||
|
||||
### SetName
|
||||
|
||||
`func (o *CardCreate) SetName(v string)`
|
||||
|
||||
SetName sets Name field to given value.
|
||||
|
||||
|
||||
### GetEnabled
|
||||
|
||||
`func (o *CardCreate) GetEnabled() bool`
|
||||
|
||||
GetEnabled returns the Enabled field if non-nil, zero value otherwise.
|
||||
|
||||
### GetEnabledOk
|
||||
|
||||
`func (o *CardCreate) GetEnabledOk() (*bool, bool)`
|
||||
|
||||
GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetEnabled
|
||||
|
||||
`func (o *CardCreate) SetEnabled(v bool)`
|
||||
|
||||
SetEnabled sets Enabled field to given value.
|
||||
|
||||
### HasEnabled
|
||||
|
||||
`func (o *CardCreate) HasEnabled() bool`
|
||||
|
||||
HasEnabled returns a boolean if a field has been set.
|
||||
|
||||
### GetGroupId
|
||||
|
||||
`func (o *CardCreate) GetGroupId() int32`
|
||||
|
||||
GetGroupId returns the GroupId field if non-nil, zero value otherwise.
|
||||
|
||||
### GetGroupIdOk
|
||||
|
||||
`func (o *CardCreate) GetGroupIdOk() (*int32, bool)`
|
||||
|
||||
GetGroupIdOk returns a tuple with the GroupId field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetGroupId
|
||||
|
||||
`func (o *CardCreate) SetGroupId(v int32)`
|
||||
|
||||
SetGroupId sets GroupId field to given value.
|
||||
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
138
openapi/docs/CardUpdate.md
Normal file
138
openapi/docs/CardUpdate.md
Normal file
@@ -0,0 +1,138 @@
|
||||
# CardUpdate
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | Pointer to **NullableString** | | [optional]
|
||||
**Enabled** | Pointer to **NullableBool** | | [optional]
|
||||
**GroupId** | Pointer to **NullableInt32** | | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewCardUpdate
|
||||
|
||||
`func NewCardUpdate() *CardUpdate`
|
||||
|
||||
NewCardUpdate instantiates a new CardUpdate object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewCardUpdateWithDefaults
|
||||
|
||||
`func NewCardUpdateWithDefaults() *CardUpdate`
|
||||
|
||||
NewCardUpdateWithDefaults instantiates a new CardUpdate object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetName
|
||||
|
||||
`func (o *CardUpdate) GetName() string`
|
||||
|
||||
GetName returns the Name field if non-nil, zero value otherwise.
|
||||
|
||||
### GetNameOk
|
||||
|
||||
`func (o *CardUpdate) 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.
|
||||
|
||||
### SetName
|
||||
|
||||
`func (o *CardUpdate) SetName(v string)`
|
||||
|
||||
SetName sets Name field to given value.
|
||||
|
||||
### HasName
|
||||
|
||||
`func (o *CardUpdate) HasName() bool`
|
||||
|
||||
HasName returns a boolean if a field has been set.
|
||||
|
||||
### SetNameNil
|
||||
|
||||
`func (o *CardUpdate) SetNameNil(b bool)`
|
||||
|
||||
SetNameNil sets the value for Name to be an explicit nil
|
||||
|
||||
### UnsetName
|
||||
`func (o *CardUpdate) UnsetName()`
|
||||
|
||||
UnsetName ensures that no value is present for Name, not even an explicit nil
|
||||
### GetEnabled
|
||||
|
||||
`func (o *CardUpdate) GetEnabled() bool`
|
||||
|
||||
GetEnabled returns the Enabled field if non-nil, zero value otherwise.
|
||||
|
||||
### GetEnabledOk
|
||||
|
||||
`func (o *CardUpdate) GetEnabledOk() (*bool, bool)`
|
||||
|
||||
GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetEnabled
|
||||
|
||||
`func (o *CardUpdate) SetEnabled(v bool)`
|
||||
|
||||
SetEnabled sets Enabled field to given value.
|
||||
|
||||
### HasEnabled
|
||||
|
||||
`func (o *CardUpdate) HasEnabled() bool`
|
||||
|
||||
HasEnabled returns a boolean if a field has been set.
|
||||
|
||||
### SetEnabledNil
|
||||
|
||||
`func (o *CardUpdate) SetEnabledNil(b bool)`
|
||||
|
||||
SetEnabledNil sets the value for Enabled to be an explicit nil
|
||||
|
||||
### UnsetEnabled
|
||||
`func (o *CardUpdate) UnsetEnabled()`
|
||||
|
||||
UnsetEnabled ensures that no value is present for Enabled, not even an explicit nil
|
||||
### GetGroupId
|
||||
|
||||
`func (o *CardUpdate) GetGroupId() int32`
|
||||
|
||||
GetGroupId returns the GroupId field if non-nil, zero value otherwise.
|
||||
|
||||
### GetGroupIdOk
|
||||
|
||||
`func (o *CardUpdate) GetGroupIdOk() (*int32, bool)`
|
||||
|
||||
GetGroupIdOk returns a tuple with the GroupId field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetGroupId
|
||||
|
||||
`func (o *CardUpdate) SetGroupId(v int32)`
|
||||
|
||||
SetGroupId sets GroupId field to given value.
|
||||
|
||||
### HasGroupId
|
||||
|
||||
`func (o *CardUpdate) HasGroupId() bool`
|
||||
|
||||
HasGroupId returns a boolean if a field has been set.
|
||||
|
||||
### SetGroupIdNil
|
||||
|
||||
`func (o *CardUpdate) SetGroupIdNil(b bool)`
|
||||
|
||||
SetGroupIdNil sets the value for GroupId to be an explicit nil
|
||||
|
||||
### UnsetGroupId
|
||||
`func (o *CardUpdate) UnsetGroupId()`
|
||||
|
||||
UnsetGroupId ensures that no value is present for GroupId, not even an explicit nil
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -4,15 +4,15 @@ All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**AddCardManuallyApiV1DebugAddcardGroupidCardKeyGet**](DebugItemsMaybeDontShowThisInUIAPI.md#AddCardManuallyApiV1DebugAddcardGroupidCardKeyGet) | **Get** /api/v1/debug/addcard/{groupid}/{card_key} | Add Card Manually
|
||||
[**AddCardManuallyApiV1DebugAddcardPut**](DebugItemsMaybeDontShowThisInUIAPI.md#AddCardManuallyApiV1DebugAddcardPut) | **Put** /api/v1/debug/addcard/ | Add Card Manually
|
||||
[**ListAllCardsApiV1DebugGetcardsPut**](DebugItemsMaybeDontShowThisInUIAPI.md#ListAllCardsApiV1DebugGetcardsPut) | **Put** /api/v1/debug/getcards | List All Cards
|
||||
[**RemoveCardManuallyApiV1DebugRmcardCardKeyGet**](DebugItemsMaybeDontShowThisInUIAPI.md#RemoveCardManuallyApiV1DebugRmcardCardKeyGet) | **Get** /api/v1/debug/rmcard/{card_key} | Remove Card Manually
|
||||
[**RemoveCardManuallyApiV1DebugRmcardCardIdGet**](DebugItemsMaybeDontShowThisInUIAPI.md#RemoveCardManuallyApiV1DebugRmcardCardIdGet) | **Get** /api/v1/debug/rmcard/{card_id} | Remove Card Manually
|
||||
|
||||
|
||||
|
||||
## AddCardManuallyApiV1DebugAddcardGroupidCardKeyGet
|
||||
## AddCardManuallyApiV1DebugAddcardPut
|
||||
|
||||
> interface{} AddCardManuallyApiV1DebugAddcardGroupidCardKeyGet(ctx, groupid, cardKey).Execute()
|
||||
> interface{} AddCardManuallyApiV1DebugAddcardPut(ctx).Groupid(groupid).CardKey(cardKey).Name(name).Enabled(enabled).Execute()
|
||||
|
||||
Add Card Manually
|
||||
|
||||
@@ -33,37 +33,36 @@ import (
|
||||
func main() {
|
||||
groupid := int32(56) // int32 |
|
||||
cardKey := "cardKey_example" // string |
|
||||
name := "name_example" // string |
|
||||
enabled := true // bool |
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.DebugItemsMaybeDontShowThisInUIAPI.AddCardManuallyApiV1DebugAddcardGroupidCardKeyGet(context.Background(), groupid, cardKey).Execute()
|
||||
resp, r, err := apiClient.DebugItemsMaybeDontShowThisInUIAPI.AddCardManuallyApiV1DebugAddcardPut(context.Background()).Groupid(groupid).CardKey(cardKey).Name(name).Enabled(enabled).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `DebugItemsMaybeDontShowThisInUIAPI.AddCardManuallyApiV1DebugAddcardGroupidCardKeyGet``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `DebugItemsMaybeDontShowThisInUIAPI.AddCardManuallyApiV1DebugAddcardPut``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `AddCardManuallyApiV1DebugAddcardGroupidCardKeyGet`: interface{}
|
||||
fmt.Fprintf(os.Stdout, "Response from `DebugItemsMaybeDontShowThisInUIAPI.AddCardManuallyApiV1DebugAddcardGroupidCardKeyGet`: %v\n", resp)
|
||||
// response from `AddCardManuallyApiV1DebugAddcardPut`: interface{}
|
||||
fmt.Fprintf(os.Stdout, "Response from `DebugItemsMaybeDontShowThisInUIAPI.AddCardManuallyApiV1DebugAddcardPut`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**groupid** | **int32** | |
|
||||
**cardKey** | **string** | |
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiAddCardManuallyApiV1DebugAddcardGroupidCardKeyGetRequest struct via the builder pattern
|
||||
Other parameters are passed through a pointer to a apiAddCardManuallyApiV1DebugAddcardPutRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
|
||||
|
||||
**groupid** | **int32** | |
|
||||
**cardKey** | **string** | |
|
||||
**name** | **string** | |
|
||||
**enabled** | **bool** | |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -142,9 +141,9 @@ Other parameters are passed through a pointer to a apiListAllCardsApiV1DebugGetc
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## RemoveCardManuallyApiV1DebugRmcardCardKeyGet
|
||||
## RemoveCardManuallyApiV1DebugRmcardCardIdGet
|
||||
|
||||
> interface{} RemoveCardManuallyApiV1DebugRmcardCardKeyGet(ctx, cardKey).Execute()
|
||||
> interface{} RemoveCardManuallyApiV1DebugRmcardCardIdGet(ctx, cardId).Execute()
|
||||
|
||||
Remove Card Manually
|
||||
|
||||
@@ -161,17 +160,17 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
cardKey := "cardKey_example" // string |
|
||||
cardId := "cardId_example" // string |
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.DebugItemsMaybeDontShowThisInUIAPI.RemoveCardManuallyApiV1DebugRmcardCardKeyGet(context.Background(), cardKey).Execute()
|
||||
resp, r, err := apiClient.DebugItemsMaybeDontShowThisInUIAPI.RemoveCardManuallyApiV1DebugRmcardCardIdGet(context.Background(), cardId).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `DebugItemsMaybeDontShowThisInUIAPI.RemoveCardManuallyApiV1DebugRmcardCardKeyGet``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `DebugItemsMaybeDontShowThisInUIAPI.RemoveCardManuallyApiV1DebugRmcardCardIdGet``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `RemoveCardManuallyApiV1DebugRmcardCardKeyGet`: interface{}
|
||||
fmt.Fprintf(os.Stdout, "Response from `DebugItemsMaybeDontShowThisInUIAPI.RemoveCardManuallyApiV1DebugRmcardCardKeyGet`: %v\n", resp)
|
||||
// response from `RemoveCardManuallyApiV1DebugRmcardCardIdGet`: interface{}
|
||||
fmt.Fprintf(os.Stdout, "Response from `DebugItemsMaybeDontShowThisInUIAPI.RemoveCardManuallyApiV1DebugRmcardCardIdGet`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
@@ -181,11 +180,11 @@ func main() {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**cardKey** | **string** | |
|
||||
**cardId** | **string** | |
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiRemoveCardManuallyApiV1DebugRmcardCardKeyGetRequest struct via the builder pattern
|
||||
Other parameters are passed through a pointer to a apiRemoveCardManuallyApiV1DebugRmcardCardIdGetRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
|
||||
@@ -4,17 +4,18 @@ All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**OpenDoorApiV1DoorClosePut**](DoorAPI.md#OpenDoorApiV1DoorClosePut) | **Put** /api/v1/door/close | Open Door
|
||||
[**CloseDoorApiV1DoorClosePut**](DoorAPI.md#CloseDoorApiV1DoorClosePut) | **Put** /api/v1/door/close | Close Door
|
||||
[**IsDoorOpenApiV1DoorStatusPut**](DoorAPI.md#IsDoorOpenApiV1DoorStatusPut) | **Put** /api/v1/door/status | Is Door Open
|
||||
[**OpenDoorApiV1DoorOpenPut**](DoorAPI.md#OpenDoorApiV1DoorOpenPut) | **Put** /api/v1/door/open | Open Door
|
||||
[**TestAccessApiV1DoorTestPost**](DoorAPI.md#TestAccessApiV1DoorTestPost) | **Post** /api/v1/door/test | Test Access
|
||||
|
||||
|
||||
|
||||
## OpenDoorApiV1DoorClosePut
|
||||
## CloseDoorApiV1DoorClosePut
|
||||
|
||||
> interface{} OpenDoorApiV1DoorClosePut(ctx).Execute()
|
||||
> interface{} CloseDoorApiV1DoorClosePut(ctx).Execute()
|
||||
|
||||
Open Door
|
||||
Close Door
|
||||
|
||||
### Example
|
||||
|
||||
@@ -32,13 +33,13 @@ func main() {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.DoorAPI.OpenDoorApiV1DoorClosePut(context.Background()).Execute()
|
||||
resp, r, err := apiClient.DoorAPI.CloseDoorApiV1DoorClosePut(context.Background()).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `DoorAPI.OpenDoorApiV1DoorClosePut``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `DoorAPI.CloseDoorApiV1DoorClosePut``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `OpenDoorApiV1DoorClosePut`: interface{}
|
||||
fmt.Fprintf(os.Stdout, "Response from `DoorAPI.OpenDoorApiV1DoorClosePut`: %v\n", resp)
|
||||
// response from `CloseDoorApiV1DoorClosePut`: interface{}
|
||||
fmt.Fprintf(os.Stdout, "Response from `DoorAPI.CloseDoorApiV1DoorClosePut`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
@@ -48,7 +49,66 @@ This endpoint does not need any parameter.
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiOpenDoorApiV1DoorClosePutRequest struct via the builder pattern
|
||||
Other parameters are passed through a pointer to a apiCloseDoorApiV1DoorClosePutRequest struct via the builder pattern
|
||||
|
||||
|
||||
### Return type
|
||||
|
||||
**interface{}**
|
||||
|
||||
### Authorization
|
||||
|
||||
[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer)
|
||||
|
||||
### 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)
|
||||
|
||||
|
||||
## IsDoorOpenApiV1DoorStatusPut
|
||||
|
||||
> interface{} IsDoorOpenApiV1DoorStatusPut(ctx).Execute()
|
||||
|
||||
Is Door Open
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.DoorAPI.IsDoorOpenApiV1DoorStatusPut(context.Background()).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `DoorAPI.IsDoorOpenApiV1DoorStatusPut``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `IsDoorOpenApiV1DoorStatusPut`: interface{}
|
||||
fmt.Fprintf(os.Stdout, "Response from `DoorAPI.IsDoorOpenApiV1DoorStatusPut`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiIsDoorOpenApiV1DoorStatusPutRequest struct via the builder pattern
|
||||
|
||||
|
||||
### Return type
|
||||
|
||||
77
openapi/docs/OneShotAccessBase.md
Normal file
77
openapi/docs/OneShotAccessBase.md
Normal file
@@ -0,0 +1,77 @@
|
||||
# OneShotAccessBase
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Uses** | Pointer to **int32** | | [optional] [default to 1]
|
||||
**EndsAt** | **time.Time** | |
|
||||
|
||||
## Methods
|
||||
|
||||
### NewOneShotAccessBase
|
||||
|
||||
`func NewOneShotAccessBase(endsAt time.Time, ) *OneShotAccessBase`
|
||||
|
||||
NewOneShotAccessBase instantiates a new OneShotAccessBase object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewOneShotAccessBaseWithDefaults
|
||||
|
||||
`func NewOneShotAccessBaseWithDefaults() *OneShotAccessBase`
|
||||
|
||||
NewOneShotAccessBaseWithDefaults instantiates a new OneShotAccessBase object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetUses
|
||||
|
||||
`func (o *OneShotAccessBase) GetUses() int32`
|
||||
|
||||
GetUses returns the Uses field if non-nil, zero value otherwise.
|
||||
|
||||
### GetUsesOk
|
||||
|
||||
`func (o *OneShotAccessBase) GetUsesOk() (*int32, bool)`
|
||||
|
||||
GetUsesOk returns a tuple with the Uses field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetUses
|
||||
|
||||
`func (o *OneShotAccessBase) SetUses(v int32)`
|
||||
|
||||
SetUses sets Uses field to given value.
|
||||
|
||||
### HasUses
|
||||
|
||||
`func (o *OneShotAccessBase) HasUses() bool`
|
||||
|
||||
HasUses returns a boolean if a field has been set.
|
||||
|
||||
### GetEndsAt
|
||||
|
||||
`func (o *OneShotAccessBase) GetEndsAt() time.Time`
|
||||
|
||||
GetEndsAt returns the EndsAt field if non-nil, zero value otherwise.
|
||||
|
||||
### GetEndsAtOk
|
||||
|
||||
`func (o *OneShotAccessBase) GetEndsAtOk() (*time.Time, bool)`
|
||||
|
||||
GetEndsAtOk returns a tuple with the EndsAt field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetEndsAt
|
||||
|
||||
`func (o *OneShotAccessBase) SetEndsAt(v time.Time)`
|
||||
|
||||
SetEndsAt sets EndsAt field to given value.
|
||||
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -22,8 +22,10 @@ var _ MappedNullable = &AccessAuthorizationCreate{}
|
||||
// AccessAuthorizationCreate struct for AccessAuthorizationCreate
|
||||
type AccessAuthorizationCreate struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
IsActive bool `json:"is_active"`
|
||||
Timetables []TimetableCreate `json:"timetables"`
|
||||
Timetables []TimetableCreate `json:"timetables,omitempty"`
|
||||
Oneshot NullableOneShotAccessBase `json:"oneshot,omitempty"`
|
||||
}
|
||||
|
||||
type _AccessAuthorizationCreate AccessAuthorizationCreate
|
||||
@@ -32,11 +34,11 @@ type _AccessAuthorizationCreate AccessAuthorizationCreate
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewAccessAuthorizationCreate(name string, isActive bool, timetables []TimetableCreate) *AccessAuthorizationCreate {
|
||||
func NewAccessAuthorizationCreate(name string, type_ string, isActive bool) *AccessAuthorizationCreate {
|
||||
this := AccessAuthorizationCreate{}
|
||||
this.Name = name
|
||||
this.Type = type_
|
||||
this.IsActive = isActive
|
||||
this.Timetables = timetables
|
||||
return &this
|
||||
}
|
||||
|
||||
@@ -72,6 +74,30 @@ func (o *AccessAuthorizationCreate) SetName(v string) {
|
||||
o.Name = v
|
||||
}
|
||||
|
||||
// GetType returns the Type field value
|
||||
func (o *AccessAuthorizationCreate) GetType() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Type
|
||||
}
|
||||
|
||||
// GetTypeOk returns a tuple with the Type field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AccessAuthorizationCreate) GetTypeOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Type, true
|
||||
}
|
||||
|
||||
// SetType sets field value
|
||||
func (o *AccessAuthorizationCreate) SetType(v string) {
|
||||
o.Type = v
|
||||
}
|
||||
|
||||
// GetIsActive returns the IsActive field value
|
||||
func (o *AccessAuthorizationCreate) GetIsActive() bool {
|
||||
if o == nil {
|
||||
@@ -96,30 +122,80 @@ func (o *AccessAuthorizationCreate) SetIsActive(v bool) {
|
||||
o.IsActive = v
|
||||
}
|
||||
|
||||
// GetTimetables returns the Timetables field value
|
||||
// GetTimetables returns the Timetables field value if set, zero value otherwise.
|
||||
func (o *AccessAuthorizationCreate) GetTimetables() []TimetableCreate {
|
||||
if o == nil {
|
||||
if o == nil || IsNil(o.Timetables) {
|
||||
var ret []TimetableCreate
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Timetables
|
||||
}
|
||||
|
||||
// GetTimetablesOk returns a tuple with the Timetables field value
|
||||
// GetTimetablesOk returns a tuple with the Timetables field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AccessAuthorizationCreate) GetTimetablesOk() ([]TimetableCreate, bool) {
|
||||
if o == nil {
|
||||
if o == nil || IsNil(o.Timetables) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Timetables, true
|
||||
}
|
||||
|
||||
// SetTimetables sets field value
|
||||
// HasTimetables returns a boolean if a field has been set.
|
||||
func (o *AccessAuthorizationCreate) HasTimetables() bool {
|
||||
if o != nil && !IsNil(o.Timetables) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTimetables gets a reference to the given []TimetableCreate and assigns it to the Timetables field.
|
||||
func (o *AccessAuthorizationCreate) SetTimetables(v []TimetableCreate) {
|
||||
o.Timetables = v
|
||||
}
|
||||
|
||||
// GetOneshot returns the Oneshot field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *AccessAuthorizationCreate) GetOneshot() OneShotAccessBase {
|
||||
if o == nil || IsNil(o.Oneshot.Get()) {
|
||||
var ret OneShotAccessBase
|
||||
return ret
|
||||
}
|
||||
return *o.Oneshot.Get()
|
||||
}
|
||||
|
||||
// GetOneshotOk returns a tuple with the Oneshot field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *AccessAuthorizationCreate) GetOneshotOk() (*OneShotAccessBase, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Oneshot.Get(), o.Oneshot.IsSet()
|
||||
}
|
||||
|
||||
// HasOneshot returns a boolean if a field has been set.
|
||||
func (o *AccessAuthorizationCreate) HasOneshot() bool {
|
||||
if o != nil && o.Oneshot.IsSet() {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetOneshot gets a reference to the given NullableOneShotAccessBase and assigns it to the Oneshot field.
|
||||
func (o *AccessAuthorizationCreate) SetOneshot(v OneShotAccessBase) {
|
||||
o.Oneshot.Set(&v)
|
||||
}
|
||||
// SetOneshotNil sets the value for Oneshot to be an explicit nil
|
||||
func (o *AccessAuthorizationCreate) SetOneshotNil() {
|
||||
o.Oneshot.Set(nil)
|
||||
}
|
||||
|
||||
// UnsetOneshot ensures that no value is present for Oneshot, not even an explicit nil
|
||||
func (o *AccessAuthorizationCreate) UnsetOneshot() {
|
||||
o.Oneshot.Unset()
|
||||
}
|
||||
|
||||
func (o AccessAuthorizationCreate) MarshalJSON() ([]byte, error) {
|
||||
toSerialize,err := o.ToMap()
|
||||
if err != nil {
|
||||
@@ -131,8 +207,14 @@ func (o AccessAuthorizationCreate) MarshalJSON() ([]byte, error) {
|
||||
func (o AccessAuthorizationCreate) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["name"] = o.Name
|
||||
toSerialize["type"] = o.Type
|
||||
toSerialize["is_active"] = o.IsActive
|
||||
toSerialize["timetables"] = o.Timetables
|
||||
if !IsNil(o.Timetables) {
|
||||
toSerialize["timetables"] = o.Timetables
|
||||
}
|
||||
if o.Oneshot.IsSet() {
|
||||
toSerialize["oneshot"] = o.Oneshot.Get()
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
@@ -142,8 +224,8 @@ func (o *AccessAuthorizationCreate) UnmarshalJSON(data []byte) (err error) {
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"name",
|
||||
"type",
|
||||
"is_active",
|
||||
"timetables",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
@@ -22,6 +22,7 @@ var _ MappedNullable = &AccessAuthorizationDB{}
|
||||
// AccessAuthorizationDB struct for AccessAuthorizationDB
|
||||
type AccessAuthorizationDB struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
IsActive bool `json:"is_active"`
|
||||
Id NullableInt32 `json:"id,omitempty"`
|
||||
}
|
||||
@@ -32,9 +33,10 @@ type _AccessAuthorizationDB AccessAuthorizationDB
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewAccessAuthorizationDB(name string, isActive bool) *AccessAuthorizationDB {
|
||||
func NewAccessAuthorizationDB(name string, type_ string, isActive bool) *AccessAuthorizationDB {
|
||||
this := AccessAuthorizationDB{}
|
||||
this.Name = name
|
||||
this.Type = type_
|
||||
this.IsActive = isActive
|
||||
return &this
|
||||
}
|
||||
@@ -71,6 +73,30 @@ func (o *AccessAuthorizationDB) SetName(v string) {
|
||||
o.Name = v
|
||||
}
|
||||
|
||||
// GetType returns the Type field value
|
||||
func (o *AccessAuthorizationDB) GetType() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Type
|
||||
}
|
||||
|
||||
// GetTypeOk returns a tuple with the Type field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AccessAuthorizationDB) GetTypeOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Type, true
|
||||
}
|
||||
|
||||
// SetType sets field value
|
||||
func (o *AccessAuthorizationDB) SetType(v string) {
|
||||
o.Type = v
|
||||
}
|
||||
|
||||
// GetIsActive returns the IsActive field value
|
||||
func (o *AccessAuthorizationDB) GetIsActive() bool {
|
||||
if o == nil {
|
||||
@@ -148,6 +174,7 @@ func (o AccessAuthorizationDB) MarshalJSON() ([]byte, error) {
|
||||
func (o AccessAuthorizationDB) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["name"] = o.Name
|
||||
toSerialize["type"] = o.Type
|
||||
toSerialize["is_active"] = o.IsActive
|
||||
if o.Id.IsSet() {
|
||||
toSerialize["id"] = o.Id.Get()
|
||||
@@ -161,6 +188,7 @@ func (o *AccessAuthorizationDB) UnmarshalJSON(data []byte) (err error) {
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"name",
|
||||
"type",
|
||||
"is_active",
|
||||
}
|
||||
|
||||
|
||||
@@ -22,9 +22,11 @@ var _ MappedNullable = &AccessAuthorizationResponse{}
|
||||
// AccessAuthorizationResponse struct for AccessAuthorizationResponse
|
||||
type AccessAuthorizationResponse struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
IsActive bool `json:"is_active"`
|
||||
Id int32 `json:"id"`
|
||||
Timetables []Timetable `json:"timetables"`
|
||||
Timetables []Timetable `json:"timetables,omitempty"`
|
||||
Oneshot NullableOneShotAccessBase `json:"oneshot,omitempty"`
|
||||
Groups []GroupDB `json:"groups"`
|
||||
}
|
||||
|
||||
@@ -34,12 +36,12 @@ type _AccessAuthorizationResponse AccessAuthorizationResponse
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewAccessAuthorizationResponse(name string, isActive bool, id int32, timetables []Timetable, groups []GroupDB) *AccessAuthorizationResponse {
|
||||
func NewAccessAuthorizationResponse(name string, type_ string, isActive bool, id int32, groups []GroupDB) *AccessAuthorizationResponse {
|
||||
this := AccessAuthorizationResponse{}
|
||||
this.Name = name
|
||||
this.Type = type_
|
||||
this.IsActive = isActive
|
||||
this.Id = id
|
||||
this.Timetables = timetables
|
||||
this.Groups = groups
|
||||
return &this
|
||||
}
|
||||
@@ -76,6 +78,30 @@ func (o *AccessAuthorizationResponse) SetName(v string) {
|
||||
o.Name = v
|
||||
}
|
||||
|
||||
// GetType returns the Type field value
|
||||
func (o *AccessAuthorizationResponse) GetType() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Type
|
||||
}
|
||||
|
||||
// GetTypeOk returns a tuple with the Type field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AccessAuthorizationResponse) GetTypeOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Type, true
|
||||
}
|
||||
|
||||
// SetType sets field value
|
||||
func (o *AccessAuthorizationResponse) SetType(v string) {
|
||||
o.Type = v
|
||||
}
|
||||
|
||||
// GetIsActive returns the IsActive field value
|
||||
func (o *AccessAuthorizationResponse) GetIsActive() bool {
|
||||
if o == nil {
|
||||
@@ -124,30 +150,80 @@ func (o *AccessAuthorizationResponse) SetId(v int32) {
|
||||
o.Id = v
|
||||
}
|
||||
|
||||
// GetTimetables returns the Timetables field value
|
||||
// GetTimetables returns the Timetables field value if set, zero value otherwise.
|
||||
func (o *AccessAuthorizationResponse) GetTimetables() []Timetable {
|
||||
if o == nil {
|
||||
if o == nil || IsNil(o.Timetables) {
|
||||
var ret []Timetable
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Timetables
|
||||
}
|
||||
|
||||
// GetTimetablesOk returns a tuple with the Timetables field value
|
||||
// GetTimetablesOk returns a tuple with the Timetables field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AccessAuthorizationResponse) GetTimetablesOk() ([]Timetable, bool) {
|
||||
if o == nil {
|
||||
if o == nil || IsNil(o.Timetables) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Timetables, true
|
||||
}
|
||||
|
||||
// SetTimetables sets field value
|
||||
// HasTimetables returns a boolean if a field has been set.
|
||||
func (o *AccessAuthorizationResponse) HasTimetables() bool {
|
||||
if o != nil && !IsNil(o.Timetables) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTimetables gets a reference to the given []Timetable and assigns it to the Timetables field.
|
||||
func (o *AccessAuthorizationResponse) SetTimetables(v []Timetable) {
|
||||
o.Timetables = v
|
||||
}
|
||||
|
||||
// GetOneshot returns the Oneshot field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *AccessAuthorizationResponse) GetOneshot() OneShotAccessBase {
|
||||
if o == nil || IsNil(o.Oneshot.Get()) {
|
||||
var ret OneShotAccessBase
|
||||
return ret
|
||||
}
|
||||
return *o.Oneshot.Get()
|
||||
}
|
||||
|
||||
// GetOneshotOk returns a tuple with the Oneshot field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *AccessAuthorizationResponse) GetOneshotOk() (*OneShotAccessBase, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Oneshot.Get(), o.Oneshot.IsSet()
|
||||
}
|
||||
|
||||
// HasOneshot returns a boolean if a field has been set.
|
||||
func (o *AccessAuthorizationResponse) HasOneshot() bool {
|
||||
if o != nil && o.Oneshot.IsSet() {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetOneshot gets a reference to the given NullableOneShotAccessBase and assigns it to the Oneshot field.
|
||||
func (o *AccessAuthorizationResponse) SetOneshot(v OneShotAccessBase) {
|
||||
o.Oneshot.Set(&v)
|
||||
}
|
||||
// SetOneshotNil sets the value for Oneshot to be an explicit nil
|
||||
func (o *AccessAuthorizationResponse) SetOneshotNil() {
|
||||
o.Oneshot.Set(nil)
|
||||
}
|
||||
|
||||
// UnsetOneshot ensures that no value is present for Oneshot, not even an explicit nil
|
||||
func (o *AccessAuthorizationResponse) UnsetOneshot() {
|
||||
o.Oneshot.Unset()
|
||||
}
|
||||
|
||||
// GetGroups returns the Groups field value
|
||||
func (o *AccessAuthorizationResponse) GetGroups() []GroupDB {
|
||||
if o == nil {
|
||||
@@ -183,9 +259,15 @@ func (o AccessAuthorizationResponse) MarshalJSON() ([]byte, error) {
|
||||
func (o AccessAuthorizationResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["name"] = o.Name
|
||||
toSerialize["type"] = o.Type
|
||||
toSerialize["is_active"] = o.IsActive
|
||||
toSerialize["id"] = o.Id
|
||||
toSerialize["timetables"] = o.Timetables
|
||||
if !IsNil(o.Timetables) {
|
||||
toSerialize["timetables"] = o.Timetables
|
||||
}
|
||||
if o.Oneshot.IsSet() {
|
||||
toSerialize["oneshot"] = o.Oneshot.Get()
|
||||
}
|
||||
toSerialize["groups"] = o.Groups
|
||||
return toSerialize, nil
|
||||
}
|
||||
@@ -196,9 +278,9 @@ func (o *AccessAuthorizationResponse) UnmarshalJSON(data []byte) (err error) {
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"name",
|
||||
"type",
|
||||
"is_active",
|
||||
"id",
|
||||
"timetables",
|
||||
"groups",
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,10 @@ var _ MappedNullable = &AccessAuthorizationUpdate{}
|
||||
// AccessAuthorizationUpdate struct for AccessAuthorizationUpdate
|
||||
type AccessAuthorizationUpdate struct {
|
||||
Name NullableString `json:"name,omitempty"`
|
||||
Type NullableString `json:"type,omitempty"`
|
||||
IsActive NullableBool `json:"is_active,omitempty"`
|
||||
Timetables []TimetableCreate `json:"timetables,omitempty"`
|
||||
Oneshot NullableOneShotAccessBase `json:"oneshot,omitempty"`
|
||||
}
|
||||
|
||||
// NewAccessAuthorizationUpdate instantiates a new AccessAuthorizationUpdate object
|
||||
@@ -83,6 +85,48 @@ func (o *AccessAuthorizationUpdate) UnsetName() {
|
||||
o.Name.Unset()
|
||||
}
|
||||
|
||||
// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *AccessAuthorizationUpdate) GetType() string {
|
||||
if o == nil || IsNil(o.Type.Get()) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Type.Get()
|
||||
}
|
||||
|
||||
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *AccessAuthorizationUpdate) GetTypeOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Type.Get(), o.Type.IsSet()
|
||||
}
|
||||
|
||||
// HasType returns a boolean if a field has been set.
|
||||
func (o *AccessAuthorizationUpdate) HasType() bool {
|
||||
if o != nil && o.Type.IsSet() {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetType gets a reference to the given NullableString and assigns it to the Type field.
|
||||
func (o *AccessAuthorizationUpdate) SetType(v string) {
|
||||
o.Type.Set(&v)
|
||||
}
|
||||
// SetTypeNil sets the value for Type to be an explicit nil
|
||||
func (o *AccessAuthorizationUpdate) SetTypeNil() {
|
||||
o.Type.Set(nil)
|
||||
}
|
||||
|
||||
// UnsetType ensures that no value is present for Type, not even an explicit nil
|
||||
func (o *AccessAuthorizationUpdate) UnsetType() {
|
||||
o.Type.Unset()
|
||||
}
|
||||
|
||||
// GetIsActive returns the IsActive field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *AccessAuthorizationUpdate) GetIsActive() bool {
|
||||
if o == nil || IsNil(o.IsActive.Get()) {
|
||||
@@ -158,6 +202,48 @@ func (o *AccessAuthorizationUpdate) SetTimetables(v []TimetableCreate) {
|
||||
o.Timetables = v
|
||||
}
|
||||
|
||||
// GetOneshot returns the Oneshot field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *AccessAuthorizationUpdate) GetOneshot() OneShotAccessBase {
|
||||
if o == nil || IsNil(o.Oneshot.Get()) {
|
||||
var ret OneShotAccessBase
|
||||
return ret
|
||||
}
|
||||
return *o.Oneshot.Get()
|
||||
}
|
||||
|
||||
// GetOneshotOk returns a tuple with the Oneshot field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *AccessAuthorizationUpdate) GetOneshotOk() (*OneShotAccessBase, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Oneshot.Get(), o.Oneshot.IsSet()
|
||||
}
|
||||
|
||||
// HasOneshot returns a boolean if a field has been set.
|
||||
func (o *AccessAuthorizationUpdate) HasOneshot() bool {
|
||||
if o != nil && o.Oneshot.IsSet() {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetOneshot gets a reference to the given NullableOneShotAccessBase and assigns it to the Oneshot field.
|
||||
func (o *AccessAuthorizationUpdate) SetOneshot(v OneShotAccessBase) {
|
||||
o.Oneshot.Set(&v)
|
||||
}
|
||||
// SetOneshotNil sets the value for Oneshot to be an explicit nil
|
||||
func (o *AccessAuthorizationUpdate) SetOneshotNil() {
|
||||
o.Oneshot.Set(nil)
|
||||
}
|
||||
|
||||
// UnsetOneshot ensures that no value is present for Oneshot, not even an explicit nil
|
||||
func (o *AccessAuthorizationUpdate) UnsetOneshot() {
|
||||
o.Oneshot.Unset()
|
||||
}
|
||||
|
||||
func (o AccessAuthorizationUpdate) MarshalJSON() ([]byte, error) {
|
||||
toSerialize,err := o.ToMap()
|
||||
if err != nil {
|
||||
@@ -171,12 +257,18 @@ func (o AccessAuthorizationUpdate) ToMap() (map[string]interface{}, error) {
|
||||
if o.Name.IsSet() {
|
||||
toSerialize["name"] = o.Name.Get()
|
||||
}
|
||||
if o.Type.IsSet() {
|
||||
toSerialize["type"] = o.Type.Get()
|
||||
}
|
||||
if o.IsActive.IsSet() {
|
||||
toSerialize["is_active"] = o.IsActive.Get()
|
||||
}
|
||||
if o.Timetables != nil {
|
||||
toSerialize["timetables"] = o.Timetables
|
||||
}
|
||||
if o.Oneshot.IsSet() {
|
||||
toSerialize["oneshot"] = o.Oneshot.Get()
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,10 @@ var _ MappedNullable = &Card{}
|
||||
// Card struct for Card
|
||||
type Card struct {
|
||||
Id NullableInt32 `json:"id,omitempty"`
|
||||
Uuid string `json:"uuid"`
|
||||
Key string `json:"key"`
|
||||
CardSerial string `json:"card_serial"`
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
Name string `json:"name"`
|
||||
GroupId NullableInt32 `json:"group_id,omitempty"`
|
||||
}
|
||||
|
||||
@@ -32,9 +35,13 @@ type _Card Card
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewCard(uuid string) *Card {
|
||||
func NewCard(key string, cardSerial string, name string) *Card {
|
||||
this := Card{}
|
||||
this.Uuid = uuid
|
||||
this.Key = key
|
||||
this.CardSerial = cardSerial
|
||||
var enabled bool = true
|
||||
this.Enabled = &enabled
|
||||
this.Name = name
|
||||
return &this
|
||||
}
|
||||
|
||||
@@ -43,6 +50,8 @@ func NewCard(uuid string) *Card {
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewCardWithDefaults() *Card {
|
||||
this := Card{}
|
||||
var enabled bool = true
|
||||
this.Enabled = &enabled
|
||||
return &this
|
||||
}
|
||||
|
||||
@@ -88,28 +97,108 @@ func (o *Card) UnsetId() {
|
||||
o.Id.Unset()
|
||||
}
|
||||
|
||||
// GetUuid returns the Uuid field value
|
||||
func (o *Card) GetUuid() string {
|
||||
// GetKey returns the Key field value
|
||||
func (o *Card) GetKey() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Uuid
|
||||
return o.Key
|
||||
}
|
||||
|
||||
// GetUuidOk returns a tuple with the Uuid field value
|
||||
// GetKeyOk returns a tuple with the Key field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Card) GetUuidOk() (*string, bool) {
|
||||
func (o *Card) GetKeyOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Uuid, true
|
||||
return &o.Key, true
|
||||
}
|
||||
|
||||
// SetUuid sets field value
|
||||
func (o *Card) SetUuid(v string) {
|
||||
o.Uuid = v
|
||||
// SetKey sets field value
|
||||
func (o *Card) SetKey(v string) {
|
||||
o.Key = v
|
||||
}
|
||||
|
||||
// GetCardSerial returns the CardSerial field value
|
||||
func (o *Card) GetCardSerial() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.CardSerial
|
||||
}
|
||||
|
||||
// GetCardSerialOk returns a tuple with the CardSerial field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Card) GetCardSerialOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.CardSerial, true
|
||||
}
|
||||
|
||||
// SetCardSerial sets field value
|
||||
func (o *Card) SetCardSerial(v string) {
|
||||
o.CardSerial = v
|
||||
}
|
||||
|
||||
// GetEnabled returns the Enabled field value if set, zero value otherwise.
|
||||
func (o *Card) GetEnabled() bool {
|
||||
if o == nil || IsNil(o.Enabled) {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.Enabled
|
||||
}
|
||||
|
||||
// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Card) GetEnabledOk() (*bool, bool) {
|
||||
if o == nil || IsNil(o.Enabled) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Enabled, true
|
||||
}
|
||||
|
||||
// HasEnabled returns a boolean if a field has been set.
|
||||
func (o *Card) HasEnabled() bool {
|
||||
if o != nil && !IsNil(o.Enabled) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetEnabled gets a reference to the given bool and assigns it to the Enabled field.
|
||||
func (o *Card) SetEnabled(v bool) {
|
||||
o.Enabled = &v
|
||||
}
|
||||
|
||||
// GetName returns the Name field value
|
||||
func (o *Card) GetName() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Name
|
||||
}
|
||||
|
||||
// GetNameOk returns a tuple with the Name field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Card) GetNameOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Name, true
|
||||
}
|
||||
|
||||
// SetName sets field value
|
||||
func (o *Card) SetName(v string) {
|
||||
o.Name = v
|
||||
}
|
||||
|
||||
// GetGroupId returns the GroupId field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
@@ -167,7 +256,12 @@ func (o Card) ToMap() (map[string]interface{}, error) {
|
||||
if o.Id.IsSet() {
|
||||
toSerialize["id"] = o.Id.Get()
|
||||
}
|
||||
toSerialize["uuid"] = o.Uuid
|
||||
toSerialize["key"] = o.Key
|
||||
toSerialize["card_serial"] = o.CardSerial
|
||||
if !IsNil(o.Enabled) {
|
||||
toSerialize["enabled"] = o.Enabled
|
||||
}
|
||||
toSerialize["name"] = o.Name
|
||||
if o.GroupId.IsSet() {
|
||||
toSerialize["group_id"] = o.GroupId.Get()
|
||||
}
|
||||
@@ -179,7 +273,9 @@ func (o *Card) UnmarshalJSON(data []byte) (err error) {
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"uuid",
|
||||
"key",
|
||||
"card_serial",
|
||||
"name",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
226
openapi/model_card_create.go
Normal file
226
openapi/model_card_create.go
Normal file
@@ -0,0 +1,226 @@
|
||||
/*
|
||||
FastAPI
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
API version: 0.1.0
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package openapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"bytes"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the CardCreate type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CardCreate{}
|
||||
|
||||
// CardCreate struct for CardCreate
|
||||
type CardCreate struct {
|
||||
Name string `json:"name"`
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
GroupId int32 `json:"group_id"`
|
||||
}
|
||||
|
||||
type _CardCreate CardCreate
|
||||
|
||||
// NewCardCreate instantiates a new CardCreate object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewCardCreate(name string, groupId int32) *CardCreate {
|
||||
this := CardCreate{}
|
||||
this.Name = name
|
||||
var enabled bool = true
|
||||
this.Enabled = &enabled
|
||||
this.GroupId = groupId
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCardCreateWithDefaults instantiates a new CardCreate object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewCardCreateWithDefaults() *CardCreate {
|
||||
this := CardCreate{}
|
||||
var enabled bool = true
|
||||
this.Enabled = &enabled
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetName returns the Name field value
|
||||
func (o *CardCreate) GetName() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Name
|
||||
}
|
||||
|
||||
// GetNameOk returns a tuple with the Name field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CardCreate) GetNameOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Name, true
|
||||
}
|
||||
|
||||
// SetName sets field value
|
||||
func (o *CardCreate) SetName(v string) {
|
||||
o.Name = v
|
||||
}
|
||||
|
||||
// GetEnabled returns the Enabled field value if set, zero value otherwise.
|
||||
func (o *CardCreate) GetEnabled() bool {
|
||||
if o == nil || IsNil(o.Enabled) {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.Enabled
|
||||
}
|
||||
|
||||
// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CardCreate) GetEnabledOk() (*bool, bool) {
|
||||
if o == nil || IsNil(o.Enabled) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Enabled, true
|
||||
}
|
||||
|
||||
// HasEnabled returns a boolean if a field has been set.
|
||||
func (o *CardCreate) HasEnabled() bool {
|
||||
if o != nil && !IsNil(o.Enabled) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetEnabled gets a reference to the given bool and assigns it to the Enabled field.
|
||||
func (o *CardCreate) SetEnabled(v bool) {
|
||||
o.Enabled = &v
|
||||
}
|
||||
|
||||
// GetGroupId returns the GroupId field value
|
||||
func (o *CardCreate) GetGroupId() int32 {
|
||||
if o == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.GroupId
|
||||
}
|
||||
|
||||
// GetGroupIdOk returns a tuple with the GroupId field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CardCreate) GetGroupIdOk() (*int32, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.GroupId, true
|
||||
}
|
||||
|
||||
// SetGroupId sets field value
|
||||
func (o *CardCreate) SetGroupId(v int32) {
|
||||
o.GroupId = v
|
||||
}
|
||||
|
||||
func (o CardCreate) MarshalJSON() ([]byte, error) {
|
||||
toSerialize,err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o CardCreate) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["name"] = o.Name
|
||||
if !IsNil(o.Enabled) {
|
||||
toSerialize["enabled"] = o.Enabled
|
||||
}
|
||||
toSerialize["group_id"] = o.GroupId
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *CardCreate) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"name",
|
||||
"group_id",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err;
|
||||
}
|
||||
|
||||
for _, requiredProperty := range(requiredProperties) {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varCardCreate := _CardCreate{}
|
||||
|
||||
decoder := json.NewDecoder(bytes.NewReader(data))
|
||||
decoder.DisallowUnknownFields()
|
||||
err = decoder.Decode(&varCardCreate)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = CardCreate(varCardCreate)
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableCardCreate struct {
|
||||
value *CardCreate
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCardCreate) Get() *CardCreate {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCardCreate) Set(val *CardCreate) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCardCreate) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCardCreate) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCardCreate(val *CardCreate) *NullableCardCreate {
|
||||
return &NullableCardCreate{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCardCreate) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCardCreate) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
||||
228
openapi/model_card_update.go
Normal file
228
openapi/model_card_update.go
Normal file
@@ -0,0 +1,228 @@
|
||||
/*
|
||||
FastAPI
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
API version: 0.1.0
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package openapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CardUpdate type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CardUpdate{}
|
||||
|
||||
// CardUpdate struct for CardUpdate
|
||||
type CardUpdate struct {
|
||||
Name NullableString `json:"name,omitempty"`
|
||||
Enabled NullableBool `json:"enabled,omitempty"`
|
||||
GroupId NullableInt32 `json:"group_id,omitempty"`
|
||||
}
|
||||
|
||||
// NewCardUpdate instantiates a new CardUpdate object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewCardUpdate() *CardUpdate {
|
||||
this := CardUpdate{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCardUpdateWithDefaults instantiates a new CardUpdate object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewCardUpdateWithDefaults() *CardUpdate {
|
||||
this := CardUpdate{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *CardUpdate) GetName() string {
|
||||
if o == nil || IsNil(o.Name.Get()) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Name.Get()
|
||||
}
|
||||
|
||||
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *CardUpdate) GetNameOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Name.Get(), o.Name.IsSet()
|
||||
}
|
||||
|
||||
// HasName returns a boolean if a field has been set.
|
||||
func (o *CardUpdate) HasName() bool {
|
||||
if o != nil && o.Name.IsSet() {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetName gets a reference to the given NullableString and assigns it to the Name field.
|
||||
func (o *CardUpdate) SetName(v string) {
|
||||
o.Name.Set(&v)
|
||||
}
|
||||
// SetNameNil sets the value for Name to be an explicit nil
|
||||
func (o *CardUpdate) SetNameNil() {
|
||||
o.Name.Set(nil)
|
||||
}
|
||||
|
||||
// UnsetName ensures that no value is present for Name, not even an explicit nil
|
||||
func (o *CardUpdate) UnsetName() {
|
||||
o.Name.Unset()
|
||||
}
|
||||
|
||||
// GetEnabled returns the Enabled field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *CardUpdate) GetEnabled() bool {
|
||||
if o == nil || IsNil(o.Enabled.Get()) {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.Enabled.Get()
|
||||
}
|
||||
|
||||
// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *CardUpdate) GetEnabledOk() (*bool, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Enabled.Get(), o.Enabled.IsSet()
|
||||
}
|
||||
|
||||
// HasEnabled returns a boolean if a field has been set.
|
||||
func (o *CardUpdate) HasEnabled() bool {
|
||||
if o != nil && o.Enabled.IsSet() {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetEnabled gets a reference to the given NullableBool and assigns it to the Enabled field.
|
||||
func (o *CardUpdate) SetEnabled(v bool) {
|
||||
o.Enabled.Set(&v)
|
||||
}
|
||||
// SetEnabledNil sets the value for Enabled to be an explicit nil
|
||||
func (o *CardUpdate) SetEnabledNil() {
|
||||
o.Enabled.Set(nil)
|
||||
}
|
||||
|
||||
// UnsetEnabled ensures that no value is present for Enabled, not even an explicit nil
|
||||
func (o *CardUpdate) UnsetEnabled() {
|
||||
o.Enabled.Unset()
|
||||
}
|
||||
|
||||
// GetGroupId returns the GroupId field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *CardUpdate) GetGroupId() int32 {
|
||||
if o == nil || IsNil(o.GroupId.Get()) {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.GroupId.Get()
|
||||
}
|
||||
|
||||
// GetGroupIdOk returns a tuple with the GroupId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *CardUpdate) GetGroupIdOk() (*int32, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.GroupId.Get(), o.GroupId.IsSet()
|
||||
}
|
||||
|
||||
// HasGroupId returns a boolean if a field has been set.
|
||||
func (o *CardUpdate) HasGroupId() bool {
|
||||
if o != nil && o.GroupId.IsSet() {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetGroupId gets a reference to the given NullableInt32 and assigns it to the GroupId field.
|
||||
func (o *CardUpdate) SetGroupId(v int32) {
|
||||
o.GroupId.Set(&v)
|
||||
}
|
||||
// SetGroupIdNil sets the value for GroupId to be an explicit nil
|
||||
func (o *CardUpdate) SetGroupIdNil() {
|
||||
o.GroupId.Set(nil)
|
||||
}
|
||||
|
||||
// UnsetGroupId ensures that no value is present for GroupId, not even an explicit nil
|
||||
func (o *CardUpdate) UnsetGroupId() {
|
||||
o.GroupId.Unset()
|
||||
}
|
||||
|
||||
func (o CardUpdate) MarshalJSON() ([]byte, error) {
|
||||
toSerialize,err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o CardUpdate) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Name.IsSet() {
|
||||
toSerialize["name"] = o.Name.Get()
|
||||
}
|
||||
if o.Enabled.IsSet() {
|
||||
toSerialize["enabled"] = o.Enabled.Get()
|
||||
}
|
||||
if o.GroupId.IsSet() {
|
||||
toSerialize["group_id"] = o.GroupId.Get()
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCardUpdate struct {
|
||||
value *CardUpdate
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCardUpdate) Get() *CardUpdate {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCardUpdate) Set(val *CardUpdate) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCardUpdate) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCardUpdate) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCardUpdate(val *CardUpdate) *NullableCardUpdate {
|
||||
return &NullableCardUpdate{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCardUpdate) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCardUpdate) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
||||
199
openapi/model_one_shot_access_base.go
Normal file
199
openapi/model_one_shot_access_base.go
Normal file
@@ -0,0 +1,199 @@
|
||||
/*
|
||||
FastAPI
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
API version: 0.1.0
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package openapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
"bytes"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the OneShotAccessBase type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &OneShotAccessBase{}
|
||||
|
||||
// OneShotAccessBase struct for OneShotAccessBase
|
||||
type OneShotAccessBase struct {
|
||||
Uses *int32 `json:"uses,omitempty"`
|
||||
EndsAt time.Time `json:"ends_at"`
|
||||
}
|
||||
|
||||
type _OneShotAccessBase OneShotAccessBase
|
||||
|
||||
// NewOneShotAccessBase instantiates a new OneShotAccessBase object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewOneShotAccessBase(endsAt time.Time) *OneShotAccessBase {
|
||||
this := OneShotAccessBase{}
|
||||
var uses int32 = 1
|
||||
this.Uses = &uses
|
||||
this.EndsAt = endsAt
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewOneShotAccessBaseWithDefaults instantiates a new OneShotAccessBase object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewOneShotAccessBaseWithDefaults() *OneShotAccessBase {
|
||||
this := OneShotAccessBase{}
|
||||
var uses int32 = 1
|
||||
this.Uses = &uses
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetUses returns the Uses field value if set, zero value otherwise.
|
||||
func (o *OneShotAccessBase) GetUses() int32 {
|
||||
if o == nil || IsNil(o.Uses) {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Uses
|
||||
}
|
||||
|
||||
// GetUsesOk returns a tuple with the Uses field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *OneShotAccessBase) GetUsesOk() (*int32, bool) {
|
||||
if o == nil || IsNil(o.Uses) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Uses, true
|
||||
}
|
||||
|
||||
// HasUses returns a boolean if a field has been set.
|
||||
func (o *OneShotAccessBase) HasUses() bool {
|
||||
if o != nil && !IsNil(o.Uses) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUses gets a reference to the given int32 and assigns it to the Uses field.
|
||||
func (o *OneShotAccessBase) SetUses(v int32) {
|
||||
o.Uses = &v
|
||||
}
|
||||
|
||||
// GetEndsAt returns the EndsAt field value
|
||||
func (o *OneShotAccessBase) GetEndsAt() time.Time {
|
||||
if o == nil {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.EndsAt
|
||||
}
|
||||
|
||||
// GetEndsAtOk returns a tuple with the EndsAt field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *OneShotAccessBase) GetEndsAtOk() (*time.Time, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.EndsAt, true
|
||||
}
|
||||
|
||||
// SetEndsAt sets field value
|
||||
func (o *OneShotAccessBase) SetEndsAt(v time.Time) {
|
||||
o.EndsAt = v
|
||||
}
|
||||
|
||||
func (o OneShotAccessBase) MarshalJSON() ([]byte, error) {
|
||||
toSerialize,err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o OneShotAccessBase) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Uses) {
|
||||
toSerialize["uses"] = o.Uses
|
||||
}
|
||||
toSerialize["ends_at"] = o.EndsAt
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *OneShotAccessBase) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"ends_at",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err;
|
||||
}
|
||||
|
||||
for _, requiredProperty := range(requiredProperties) {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varOneShotAccessBase := _OneShotAccessBase{}
|
||||
|
||||
decoder := json.NewDecoder(bytes.NewReader(data))
|
||||
decoder.DisallowUnknownFields()
|
||||
err = decoder.Decode(&varOneShotAccessBase)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = OneShotAccessBase(varOneShotAccessBase)
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableOneShotAccessBase struct {
|
||||
value *OneShotAccessBase
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableOneShotAccessBase) Get() *OneShotAccessBase {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableOneShotAccessBase) Set(val *OneShotAccessBase) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableOneShotAccessBase) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableOneShotAccessBase) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableOneShotAccessBase(val *OneShotAccessBase) *NullableOneShotAccessBase {
|
||||
return &NullableOneShotAccessBase{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableOneShotAccessBase) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableOneShotAccessBase) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
||||
121
openapi/test/api_access_auth_test.go
Normal file
121
openapi/test/api_access_auth_test.go
Normal file
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
FastAPI
|
||||
|
||||
Testing AccessAuthAPIService
|
||||
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||
|
||||
package openapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
||||
)
|
||||
|
||||
func Test_openapi_AccessAuthAPIService(t *testing.T) {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
|
||||
t.Run("Test AccessAuthAPIService AddAccessauthAaPost", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
resp, httpRes, err := apiClient.AccessAuthAPI.AddAccessauthAaPost(context.Background()).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test AccessAuthAPIService AssignAccessauthAaAssignGroupIdAaIdPut", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var groupId int32
|
||||
var aaId int32
|
||||
|
||||
resp, httpRes, err := apiClient.AccessAuthAPI.AssignAccessauthAaAssignGroupIdAaIdPut(context.Background(), groupId, aaId).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test AccessAuthAPIService ChangeAccessauthAaAaIdPatch", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var aaId int32
|
||||
|
||||
resp, httpRes, err := apiClient.AccessAuthAPI.ChangeAccessauthAaAaIdPatch(context.Background(), aaId).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test AccessAuthAPIService DeleteAccessauthAaAaIdDelete", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var aaId int32
|
||||
|
||||
resp, httpRes, err := apiClient.AccessAuthAPI.DeleteAccessauthAaAaIdDelete(context.Background(), aaId).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test AccessAuthAPIService GetAllAccessauthsAaGet", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
resp, httpRes, err := apiClient.AccessAuthAPI.GetAllAccessauthsAaGet(context.Background()).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test AccessAuthAPIService GetOneAccessauthAaAaIdGet", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var aaId int32
|
||||
|
||||
resp, httpRes, err := apiClient.AccessAuthAPI.GetOneAccessauthAaAaIdGet(context.Background(), aaId).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test AccessAuthAPIService UnassignAccessauthAaUnassignGroupIdAaIdPut", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var groupId int32
|
||||
var aaId int32
|
||||
|
||||
resp, httpRes, err := apiClient.AccessAuthAPI.UnassignAccessauthAaUnassignGroupIdAaIdPut(context.Background(), groupId, aaId).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
65
openapi/test/api_card_test.go
Normal file
65
openapi/test/api_card_test.go
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
FastAPI
|
||||
|
||||
Testing CardAPIService
|
||||
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||
|
||||
package openapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
||||
)
|
||||
|
||||
func Test_openapi_CardAPIService(t *testing.T) {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
|
||||
t.Run("Test CardAPIService AddCardCardsGroupIdPost", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var groupId int32
|
||||
|
||||
resp, httpRes, err := apiClient.CardAPI.AddCardCardsGroupIdPost(context.Background(), groupId).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test CardAPIService DelCardCardsDeleteGet", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
resp, httpRes, err := apiClient.CardAPI.DelCardCardsDeleteGet(context.Background()).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test CardAPIService GetCardsCardsGroupIdGet", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var groupId int32
|
||||
|
||||
resp, httpRes, err := apiClient.CardAPI.GetCardsCardsGroupIdGet(context.Background(), groupId).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
FastAPI
|
||||
|
||||
Testing DebugItemsMaybeDontShowThisInUIAPIService
|
||||
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||
|
||||
package openapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
||||
)
|
||||
|
||||
func Test_openapi_DebugItemsMaybeDontShowThisInUIAPIService(t *testing.T) {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
|
||||
t.Run("Test DebugItemsMaybeDontShowThisInUIAPIService AddCardManuallyDebugAddcardGroupidCardKeyGet", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var groupid int32
|
||||
var cardKey string
|
||||
|
||||
resp, httpRes, err := apiClient.DebugItemsMaybeDontShowThisInUIAPI.AddCardManuallyDebugAddcardGroupidCardKeyGet(context.Background(), groupid, cardKey).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test DebugItemsMaybeDontShowThisInUIAPIService ListAllCardsDebugGetcardsPut", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
resp, httpRes, err := apiClient.DebugItemsMaybeDontShowThisInUIAPI.ListAllCardsDebugGetcardsPut(context.Background()).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test DebugItemsMaybeDontShowThisInUIAPIService RemoveCardManuallyDebugRmcardCardKeyGet", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var cardKey string
|
||||
|
||||
resp, httpRes, err := apiClient.DebugItemsMaybeDontShowThisInUIAPI.RemoveCardManuallyDebugRmcardCardKeyGet(context.Background(), cardKey).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
61
openapi/test/api_door_test.go
Normal file
61
openapi/test/api_door_test.go
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
FastAPI
|
||||
|
||||
Testing DoorAPIService
|
||||
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||
|
||||
package openapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
||||
)
|
||||
|
||||
func Test_openapi_DoorAPIService(t *testing.T) {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
|
||||
t.Run("Test DoorAPIService OpenDoorDoorClosePut", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
resp, httpRes, err := apiClient.DoorAPI.OpenDoorDoorClosePut(context.Background()).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test DoorAPIService OpenDoorDoorOpenPut", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
resp, httpRes, err := apiClient.DoorAPI.OpenDoorDoorOpenPut(context.Background()).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test DoorAPIService TestAccessDoorTestPost", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
resp, httpRes, err := apiClient.DoorAPI.TestAccessDoorTestPost(context.Background()).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
63
openapi/test/api_group_test.go
Normal file
63
openapi/test/api_group_test.go
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
FastAPI
|
||||
|
||||
Testing GroupAPIService
|
||||
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||
|
||||
package openapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
||||
)
|
||||
|
||||
func Test_openapi_GroupAPIService(t *testing.T) {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
|
||||
t.Run("Test GroupAPIService CreateGroupGroupsPost", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
resp, httpRes, err := apiClient.GroupAPI.CreateGroupGroupsPost(context.Background()).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test GroupAPIService DeleteGroupGroupsGroupIdDelete", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var groupId int32
|
||||
|
||||
resp, httpRes, err := apiClient.GroupAPI.DeleteGroupGroupsGroupIdDelete(context.Background(), groupId).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test GroupAPIService GetGroupsGroupsGet", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
resp, httpRes, err := apiClient.GroupAPI.GetGroupsGroupsGet(context.Background()).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
49
openapi/test/api_token_test.go
Normal file
49
openapi/test/api_token_test.go
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
FastAPI
|
||||
|
||||
Testing TokenAPIService
|
||||
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||
|
||||
package openapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
||||
)
|
||||
|
||||
func Test_openapi_TokenAPIService(t *testing.T) {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
|
||||
t.Run("Test TokenAPIService LoginForAccessTokenTokenPost", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
resp, httpRes, err := apiClient.TokenAPI.LoginForAccessTokenTokenPost(context.Background()).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test TokenAPIService TestLoginTestLoginGet", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
resp, httpRes, err := apiClient.TokenAPI.TestLoginTestLoginGet(context.Background()).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
91
openapi/test/api_users_test.go
Normal file
91
openapi/test/api_users_test.go
Normal file
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
FastAPI
|
||||
|
||||
Testing UsersAPIService
|
||||
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||
|
||||
package openapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
||||
)
|
||||
|
||||
func Test_openapi_UsersAPIService(t *testing.T) {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
|
||||
t.Run("Test UsersAPIService CreateUserUsersPost", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
resp, httpRes, err := apiClient.UsersAPI.CreateUserUsersPost(context.Background()).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test UsersAPIService DeleteUserUsersUserIdDelete", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var userId int32
|
||||
|
||||
resp, httpRes, err := apiClient.UsersAPI.DeleteUserUsersUserIdDelete(context.Background(), userId).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test UsersAPIService ReadUserUsersUserIdGet", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var userId int32
|
||||
|
||||
resp, httpRes, err := apiClient.UsersAPI.ReadUserUsersUserIdGet(context.Background(), userId).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test UsersAPIService ReadUsersUsersGet", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
resp, httpRes, err := apiClient.UsersAPI.ReadUsersUsersGet(context.Background()).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test UsersAPIService UpdateUserUsersUserIdPatch", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var userId int32
|
||||
|
||||
resp, httpRes, err := apiClient.UsersAPI.UpdateUserUsersUserIdPatch(context.Background(), userId).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user