mirror of
https://github.com/openziti/zrok.git
synced 2025-08-15 02:22:32 +02:00
initial cut at admin api operations (#537)
This commit is contained in:
@ -16,6 +16,7 @@ model/createFrontendRequest.ts
|
||||
model/createFrontendResponse.ts
|
||||
model/createIdentity201Response.ts
|
||||
model/createIdentityRequest.ts
|
||||
model/createOrganizationRequest.ts
|
||||
model/deleteFrontendRequest.ts
|
||||
model/disableRequest.ts
|
||||
model/enableRequest.ts
|
||||
@ -26,6 +27,7 @@ model/frontend.ts
|
||||
model/grantsRequest.ts
|
||||
model/inviteRequest.ts
|
||||
model/inviteTokenGenerateRequest.ts
|
||||
model/listOrganizationMembers200Response.ts
|
||||
model/loginRequest.ts
|
||||
model/metrics.ts
|
||||
model/metricsSample.ts
|
||||
|
@ -20,9 +20,11 @@ import { CreateFrontendRequest } from '../model/createFrontendRequest';
|
||||
import { CreateFrontendResponse } from '../model/createFrontendResponse';
|
||||
import { CreateIdentity201Response } from '../model/createIdentity201Response';
|
||||
import { CreateIdentityRequest } from '../model/createIdentityRequest';
|
||||
import { CreateOrganizationRequest } from '../model/createOrganizationRequest';
|
||||
import { DeleteFrontendRequest } from '../model/deleteFrontendRequest';
|
||||
import { GrantsRequest } from '../model/grantsRequest';
|
||||
import { InviteTokenGenerateRequest } from '../model/inviteTokenGenerateRequest';
|
||||
import { ListOrganizationMembers200Response } from '../model/listOrganizationMembers200Response';
|
||||
import { PublicFrontend } from '../model/publicFrontend';
|
||||
import { RegenerateToken200Response } from '../model/regenerateToken200Response';
|
||||
import { UpdateFrontendRequest } from '../model/updateFrontendRequest';
|
||||
@ -99,6 +101,64 @@ export class AdminApi {
|
||||
this.interceptors.push(interceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param body
|
||||
*/
|
||||
public async addOrganizationMember (body?: GrantsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/organization/add';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "GrantsRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.key.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.key.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param body
|
||||
@ -297,6 +357,72 @@ export class AdminApi {
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param body
|
||||
*/
|
||||
public async createOrganization (body?: CreateOrganizationRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: RegenerateToken200Response; }> {
|
||||
const localVarPath = this.basePath + '/organization';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/zrok.v1+json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "CreateOrganizationRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.key.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.key.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: RegenerateToken200Response; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "RegenerateToken200Response");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param body
|
||||
@ -355,6 +481,64 @@ export class AdminApi {
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param body
|
||||
*/
|
||||
public async deleteOrganization (body?: RegenerateToken200Response, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/organization';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'DELETE',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "RegenerateToken200Response")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.key.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.key.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param body
|
||||
@ -535,6 +719,130 @@ export class AdminApi {
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param body
|
||||
*/
|
||||
public async listOrganizationMembers (body?: RegenerateToken200Response, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ListOrganizationMembers200Response; }> {
|
||||
const localVarPath = this.basePath + '/organization/members';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
const produces = ['application/zrok.v1+json'];
|
||||
// give precedence to 'application/json'
|
||||
if (produces.indexOf('application/json') >= 0) {
|
||||
localVarHeaderParams.Accept = 'application/json';
|
||||
} else {
|
||||
localVarHeaderParams.Accept = produces.join(',');
|
||||
}
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "RegenerateToken200Response")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.key.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.key.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: ListOrganizationMembers200Response; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "ListOrganizationMembers200Response");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param body
|
||||
*/
|
||||
public async removeOrganizationMember (body?: GrantsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/organization/remove';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
let localVarFormParams: any = {};
|
||||
|
||||
(<any>Object).assign(localVarHeaderParams, options.headers);
|
||||
|
||||
let localVarUseFormData = false;
|
||||
|
||||
let localVarRequestOptions: localVarRequest.Options = {
|
||||
method: 'POST',
|
||||
qs: localVarQueryParameters,
|
||||
headers: localVarHeaderParams,
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "GrantsRequest")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
if (this.authentications.key.apiKey) {
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.key.applyToRequest(localVarRequestOptions));
|
||||
}
|
||||
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||
|
||||
let interceptorPromise = authenticationPromise;
|
||||
for (const interceptor of this.interceptors) {
|
||||
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
||||
}
|
||||
|
||||
return interceptorPromise.then(() => {
|
||||
if (Object.keys(localVarFormParams).length) {
|
||||
if (localVarUseFormData) {
|
||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||
} else {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param body
|
||||
|
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* zrok
|
||||
* zrok client access
|
||||
*
|
||||
* The version of the OpenAPI document: 0.3.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
|
||||
export class CreateOrganizationRequest {
|
||||
'description'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "description",
|
||||
"baseName": "description",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return CreateOrganizationRequest.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,32 @@
|
||||
/**
|
||||
* zrok
|
||||
* zrok client access
|
||||
*
|
||||
* The version of the OpenAPI document: 0.3.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { RequestFile } from './models';
|
||||
import { GrantsRequest } from './grantsRequest';
|
||||
|
||||
export class ListOrganizationMembers200Response {
|
||||
'members'?: Array<GrantsRequest>;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "members",
|
||||
"baseName": "members",
|
||||
"type": "Array<GrantsRequest>"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return ListOrganizationMembers200Response.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ export * from './createFrontendRequest';
|
||||
export * from './createFrontendResponse';
|
||||
export * from './createIdentity201Response';
|
||||
export * from './createIdentityRequest';
|
||||
export * from './createOrganizationRequest';
|
||||
export * from './deleteFrontendRequest';
|
||||
export * from './disableRequest';
|
||||
export * from './enableRequest';
|
||||
@ -20,6 +21,7 @@ export * from './frontend';
|
||||
export * from './grantsRequest';
|
||||
export * from './inviteRequest';
|
||||
export * from './inviteTokenGenerateRequest';
|
||||
export * from './listOrganizationMembers200Response';
|
||||
export * from './loginRequest';
|
||||
export * from './metrics';
|
||||
export * from './metricsSample';
|
||||
@ -66,6 +68,7 @@ import { CreateFrontendRequest } from './createFrontendRequest';
|
||||
import { CreateFrontendResponse } from './createFrontendResponse';
|
||||
import { CreateIdentity201Response } from './createIdentity201Response';
|
||||
import { CreateIdentityRequest } from './createIdentityRequest';
|
||||
import { CreateOrganizationRequest } from './createOrganizationRequest';
|
||||
import { DeleteFrontendRequest } from './deleteFrontendRequest';
|
||||
import { DisableRequest } from './disableRequest';
|
||||
import { EnableRequest } from './enableRequest';
|
||||
@ -76,6 +79,7 @@ import { Frontend } from './frontend';
|
||||
import { GrantsRequest } from './grantsRequest';
|
||||
import { InviteRequest } from './inviteRequest';
|
||||
import { InviteTokenGenerateRequest } from './inviteTokenGenerateRequest';
|
||||
import { ListOrganizationMembers200Response } from './listOrganizationMembers200Response';
|
||||
import { LoginRequest } from './loginRequest';
|
||||
import { Metrics } from './metrics';
|
||||
import { MetricsSample } from './metricsSample';
|
||||
@ -130,6 +134,7 @@ let typeMap: {[index: string]: any} = {
|
||||
"CreateFrontendResponse": CreateFrontendResponse,
|
||||
"CreateIdentity201Response": CreateIdentity201Response,
|
||||
"CreateIdentityRequest": CreateIdentityRequest,
|
||||
"CreateOrganizationRequest": CreateOrganizationRequest,
|
||||
"DeleteFrontendRequest": DeleteFrontendRequest,
|
||||
"DisableRequest": DisableRequest,
|
||||
"EnableRequest": EnableRequest,
|
||||
@ -140,6 +145,7 @@ let typeMap: {[index: string]: any} = {
|
||||
"GrantsRequest": GrantsRequest,
|
||||
"InviteRequest": InviteRequest,
|
||||
"InviteTokenGenerateRequest": InviteTokenGenerateRequest,
|
||||
"ListOrganizationMembers200Response": ListOrganizationMembers200Response,
|
||||
"LoginRequest": LoginRequest,
|
||||
"Metrics": Metrics,
|
||||
"MetricsSample": MetricsSample,
|
||||
|
@ -45,6 +45,7 @@ from zrok_api.models.frontends import Frontends
|
||||
from zrok_api.models.grants_body import GrantsBody
|
||||
from zrok_api.models.identity_body import IdentityBody
|
||||
from zrok_api.models.inline_response200 import InlineResponse200
|
||||
from zrok_api.models.inline_response2001 import InlineResponse2001
|
||||
from zrok_api.models.inline_response201 import InlineResponse201
|
||||
from zrok_api.models.invite_request import InviteRequest
|
||||
from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest
|
||||
@ -52,6 +53,11 @@ from zrok_api.models.login_request import LoginRequest
|
||||
from zrok_api.models.login_response import LoginResponse
|
||||
from zrok_api.models.metrics import Metrics
|
||||
from zrok_api.models.metrics_sample import MetricsSample
|
||||
from zrok_api.models.organization_add_body import OrganizationAddBody
|
||||
from zrok_api.models.organization_body import OrganizationBody
|
||||
from zrok_api.models.organization_body1 import OrganizationBody1
|
||||
from zrok_api.models.organization_members_body import OrganizationMembersBody
|
||||
from zrok_api.models.organization_remove_body import OrganizationRemoveBody
|
||||
from zrok_api.models.overview import Overview
|
||||
from zrok_api.models.password_requirements import PasswordRequirements
|
||||
from zrok_api.models.principal import Principal
|
||||
|
@ -32,6 +32,95 @@ class AdminApi(object):
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def add_organization_member(self, **kwargs): # noqa: E501
|
||||
"""add_organization_member # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.add_organization_member(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param OrganizationAddBody body:
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.add_organization_member_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.add_organization_member_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def add_organization_member_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""add_organization_member # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.add_organization_member_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param OrganizationAddBody body:
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method add_organization_member" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/zrok.v1+json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['key'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/organization/add', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def create_account(self, **kwargs): # noqa: E501
|
||||
"""create_account # noqa: E501
|
||||
|
||||
@ -311,6 +400,99 @@ class AdminApi(object):
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def create_organization(self, **kwargs): # noqa: E501
|
||||
"""create_organization # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.create_organization(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param OrganizationBody body:
|
||||
:return: InlineResponse200
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.create_organization_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.create_organization_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def create_organization_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""create_organization # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.create_organization_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param OrganizationBody body:
|
||||
:return: InlineResponse200
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method create_organization" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/zrok.v1+json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/zrok.v1+json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['key'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/organization', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='InlineResponse200', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def delete_frontend(self, **kwargs): # noqa: E501
|
||||
"""delete_frontend # noqa: E501
|
||||
|
||||
@ -400,6 +582,95 @@ class AdminApi(object):
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def delete_organization(self, **kwargs): # noqa: E501
|
||||
"""delete_organization # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_organization(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param OrganizationBody1 body:
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_organization_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_organization_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_organization_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""delete_organization # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_organization_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param OrganizationBody1 body:
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_organization" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/zrok.v1+json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['key'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/organization', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def grants(self, **kwargs): # noqa: E501
|
||||
"""grants # noqa: E501
|
||||
|
||||
@ -663,6 +934,188 @@ class AdminApi(object):
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def list_organization_members(self, **kwargs): # noqa: E501
|
||||
"""list_organization_members # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.list_organization_members(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param OrganizationMembersBody body:
|
||||
:return: InlineResponse2001
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.list_organization_members_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.list_organization_members_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def list_organization_members_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""list_organization_members # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.list_organization_members_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param OrganizationMembersBody body:
|
||||
:return: InlineResponse2001
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method list_organization_members" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/zrok.v1+json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/zrok.v1+json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['key'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/organization/members', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='InlineResponse2001', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def remove_organization_member(self, **kwargs): # noqa: E501
|
||||
"""remove_organization_member # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.remove_organization_member(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param OrganizationRemoveBody body:
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.remove_organization_member_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.remove_organization_member_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def remove_organization_member_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""remove_organization_member # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.remove_organization_member_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param OrganizationRemoveBody body:
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method remove_organization_member" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/zrok.v1+json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['key'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/organization/remove', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def update_frontend(self, **kwargs): # noqa: E501
|
||||
"""update_frontend # noqa: E501
|
||||
|
||||
|
@ -35,6 +35,7 @@ from zrok_api.models.frontends import Frontends
|
||||
from zrok_api.models.grants_body import GrantsBody
|
||||
from zrok_api.models.identity_body import IdentityBody
|
||||
from zrok_api.models.inline_response200 import InlineResponse200
|
||||
from zrok_api.models.inline_response2001 import InlineResponse2001
|
||||
from zrok_api.models.inline_response201 import InlineResponse201
|
||||
from zrok_api.models.invite_request import InviteRequest
|
||||
from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest
|
||||
@ -42,6 +43,11 @@ from zrok_api.models.login_request import LoginRequest
|
||||
from zrok_api.models.login_response import LoginResponse
|
||||
from zrok_api.models.metrics import Metrics
|
||||
from zrok_api.models.metrics_sample import MetricsSample
|
||||
from zrok_api.models.organization_add_body import OrganizationAddBody
|
||||
from zrok_api.models.organization_body import OrganizationBody
|
||||
from zrok_api.models.organization_body1 import OrganizationBody1
|
||||
from zrok_api.models.organization_members_body import OrganizationMembersBody
|
||||
from zrok_api.models.organization_remove_body import OrganizationRemoveBody
|
||||
from zrok_api.models.overview import Overview
|
||||
from zrok_api.models.password_requirements import PasswordRequirements
|
||||
from zrok_api.models.principal import Principal
|
||||
|
110
sdk/python/sdk/zrok/zrok_api/models/inline_response2001.py
Normal file
110
sdk/python/sdk/zrok/zrok_api/models/inline_response2001.py
Normal file
@ -0,0 +1,110 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
zrok
|
||||
|
||||
zrok client access # noqa: E501
|
||||
|
||||
OpenAPI spec version: 0.3.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
|
||||
import six
|
||||
|
||||
class InlineResponse2001(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
"""
|
||||
Attributes:
|
||||
swagger_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
attribute_map (dict): The key is attribute name
|
||||
and the value is json key in definition.
|
||||
"""
|
||||
swagger_types = {
|
||||
'members': 'list[OrganizationRemoveBody]'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'members': 'members'
|
||||
}
|
||||
|
||||
def __init__(self, members=None): # noqa: E501
|
||||
"""InlineResponse2001 - a model defined in Swagger""" # noqa: E501
|
||||
self._members = None
|
||||
self.discriminator = None
|
||||
if members is not None:
|
||||
self.members = members
|
||||
|
||||
@property
|
||||
def members(self):
|
||||
"""Gets the members of this InlineResponse2001. # noqa: E501
|
||||
|
||||
|
||||
:return: The members of this InlineResponse2001. # noqa: E501
|
||||
:rtype: list[OrganizationRemoveBody]
|
||||
"""
|
||||
return self._members
|
||||
|
||||
@members.setter
|
||||
def members(self, members):
|
||||
"""Sets the members of this InlineResponse2001.
|
||||
|
||||
|
||||
:param members: The members of this InlineResponse2001. # noqa: E501
|
||||
:type: list[OrganizationRemoveBody]
|
||||
"""
|
||||
|
||||
self._members = members
|
||||
|
||||
def to_dict(self):
|
||||
"""Returns the model properties as a dict"""
|
||||
result = {}
|
||||
|
||||
for attr, _ in six.iteritems(self.swagger_types):
|
||||
value = getattr(self, attr)
|
||||
if isinstance(value, list):
|
||||
result[attr] = list(map(
|
||||
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
||||
value
|
||||
))
|
||||
elif hasattr(value, "to_dict"):
|
||||
result[attr] = value.to_dict()
|
||||
elif isinstance(value, dict):
|
||||
result[attr] = dict(map(
|
||||
lambda item: (item[0], item[1].to_dict())
|
||||
if hasattr(item[1], "to_dict") else item,
|
||||
value.items()
|
||||
))
|
||||
else:
|
||||
result[attr] = value
|
||||
if issubclass(InlineResponse2001, dict):
|
||||
for key, value in self.items():
|
||||
result[key] = value
|
||||
|
||||
return result
|
||||
|
||||
def to_str(self):
|
||||
"""Returns the string representation of the model"""
|
||||
return pprint.pformat(self.to_dict())
|
||||
|
||||
def __repr__(self):
|
||||
"""For `print` and `pprint`"""
|
||||
return self.to_str()
|
||||
|
||||
def __eq__(self, other):
|
||||
"""Returns true if both objects are equal"""
|
||||
if not isinstance(other, InlineResponse2001):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
110
sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py
Normal file
110
sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py
Normal file
@ -0,0 +1,110 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
zrok
|
||||
|
||||
zrok client access # noqa: E501
|
||||
|
||||
OpenAPI spec version: 0.3.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
|
||||
import six
|
||||
|
||||
class OrganizationAddBody(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
"""
|
||||
Attributes:
|
||||
swagger_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
attribute_map (dict): The key is attribute name
|
||||
and the value is json key in definition.
|
||||
"""
|
||||
swagger_types = {
|
||||
'email': 'str'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'email': 'email'
|
||||
}
|
||||
|
||||
def __init__(self, email=None): # noqa: E501
|
||||
"""OrganizationAddBody - a model defined in Swagger""" # noqa: E501
|
||||
self._email = None
|
||||
self.discriminator = None
|
||||
if email is not None:
|
||||
self.email = email
|
||||
|
||||
@property
|
||||
def email(self):
|
||||
"""Gets the email of this OrganizationAddBody. # noqa: E501
|
||||
|
||||
|
||||
:return: The email of this OrganizationAddBody. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._email
|
||||
|
||||
@email.setter
|
||||
def email(self, email):
|
||||
"""Sets the email of this OrganizationAddBody.
|
||||
|
||||
|
||||
:param email: The email of this OrganizationAddBody. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._email = email
|
||||
|
||||
def to_dict(self):
|
||||
"""Returns the model properties as a dict"""
|
||||
result = {}
|
||||
|
||||
for attr, _ in six.iteritems(self.swagger_types):
|
||||
value = getattr(self, attr)
|
||||
if isinstance(value, list):
|
||||
result[attr] = list(map(
|
||||
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
||||
value
|
||||
))
|
||||
elif hasattr(value, "to_dict"):
|
||||
result[attr] = value.to_dict()
|
||||
elif isinstance(value, dict):
|
||||
result[attr] = dict(map(
|
||||
lambda item: (item[0], item[1].to_dict())
|
||||
if hasattr(item[1], "to_dict") else item,
|
||||
value.items()
|
||||
))
|
||||
else:
|
||||
result[attr] = value
|
||||
if issubclass(OrganizationAddBody, dict):
|
||||
for key, value in self.items():
|
||||
result[key] = value
|
||||
|
||||
return result
|
||||
|
||||
def to_str(self):
|
||||
"""Returns the string representation of the model"""
|
||||
return pprint.pformat(self.to_dict())
|
||||
|
||||
def __repr__(self):
|
||||
"""For `print` and `pprint`"""
|
||||
return self.to_str()
|
||||
|
||||
def __eq__(self, other):
|
||||
"""Returns true if both objects are equal"""
|
||||
if not isinstance(other, OrganizationAddBody):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
110
sdk/python/sdk/zrok/zrok_api/models/organization_body.py
Normal file
110
sdk/python/sdk/zrok/zrok_api/models/organization_body.py
Normal file
@ -0,0 +1,110 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
zrok
|
||||
|
||||
zrok client access # noqa: E501
|
||||
|
||||
OpenAPI spec version: 0.3.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
|
||||
import six
|
||||
|
||||
class OrganizationBody(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
"""
|
||||
Attributes:
|
||||
swagger_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
attribute_map (dict): The key is attribute name
|
||||
and the value is json key in definition.
|
||||
"""
|
||||
swagger_types = {
|
||||
'description': 'str'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'description': 'description'
|
||||
}
|
||||
|
||||
def __init__(self, description=None): # noqa: E501
|
||||
"""OrganizationBody - a model defined in Swagger""" # noqa: E501
|
||||
self._description = None
|
||||
self.discriminator = None
|
||||
if description is not None:
|
||||
self.description = description
|
||||
|
||||
@property
|
||||
def description(self):
|
||||
"""Gets the description of this OrganizationBody. # noqa: E501
|
||||
|
||||
|
||||
:return: The description of this OrganizationBody. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._description
|
||||
|
||||
@description.setter
|
||||
def description(self, description):
|
||||
"""Sets the description of this OrganizationBody.
|
||||
|
||||
|
||||
:param description: The description of this OrganizationBody. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._description = description
|
||||
|
||||
def to_dict(self):
|
||||
"""Returns the model properties as a dict"""
|
||||
result = {}
|
||||
|
||||
for attr, _ in six.iteritems(self.swagger_types):
|
||||
value = getattr(self, attr)
|
||||
if isinstance(value, list):
|
||||
result[attr] = list(map(
|
||||
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
||||
value
|
||||
))
|
||||
elif hasattr(value, "to_dict"):
|
||||
result[attr] = value.to_dict()
|
||||
elif isinstance(value, dict):
|
||||
result[attr] = dict(map(
|
||||
lambda item: (item[0], item[1].to_dict())
|
||||
if hasattr(item[1], "to_dict") else item,
|
||||
value.items()
|
||||
))
|
||||
else:
|
||||
result[attr] = value
|
||||
if issubclass(OrganizationBody, dict):
|
||||
for key, value in self.items():
|
||||
result[key] = value
|
||||
|
||||
return result
|
||||
|
||||
def to_str(self):
|
||||
"""Returns the string representation of the model"""
|
||||
return pprint.pformat(self.to_dict())
|
||||
|
||||
def __repr__(self):
|
||||
"""For `print` and `pprint`"""
|
||||
return self.to_str()
|
||||
|
||||
def __eq__(self, other):
|
||||
"""Returns true if both objects are equal"""
|
||||
if not isinstance(other, OrganizationBody):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
110
sdk/python/sdk/zrok/zrok_api/models/organization_body1.py
Normal file
110
sdk/python/sdk/zrok/zrok_api/models/organization_body1.py
Normal file
@ -0,0 +1,110 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
zrok
|
||||
|
||||
zrok client access # noqa: E501
|
||||
|
||||
OpenAPI spec version: 0.3.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
|
||||
import six
|
||||
|
||||
class OrganizationBody1(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
"""
|
||||
Attributes:
|
||||
swagger_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
attribute_map (dict): The key is attribute name
|
||||
and the value is json key in definition.
|
||||
"""
|
||||
swagger_types = {
|
||||
'token': 'str'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'token': 'token'
|
||||
}
|
||||
|
||||
def __init__(self, token=None): # noqa: E501
|
||||
"""OrganizationBody1 - a model defined in Swagger""" # noqa: E501
|
||||
self._token = None
|
||||
self.discriminator = None
|
||||
if token is not None:
|
||||
self.token = token
|
||||
|
||||
@property
|
||||
def token(self):
|
||||
"""Gets the token of this OrganizationBody1. # noqa: E501
|
||||
|
||||
|
||||
:return: The token of this OrganizationBody1. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._token
|
||||
|
||||
@token.setter
|
||||
def token(self, token):
|
||||
"""Sets the token of this OrganizationBody1.
|
||||
|
||||
|
||||
:param token: The token of this OrganizationBody1. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._token = token
|
||||
|
||||
def to_dict(self):
|
||||
"""Returns the model properties as a dict"""
|
||||
result = {}
|
||||
|
||||
for attr, _ in six.iteritems(self.swagger_types):
|
||||
value = getattr(self, attr)
|
||||
if isinstance(value, list):
|
||||
result[attr] = list(map(
|
||||
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
||||
value
|
||||
))
|
||||
elif hasattr(value, "to_dict"):
|
||||
result[attr] = value.to_dict()
|
||||
elif isinstance(value, dict):
|
||||
result[attr] = dict(map(
|
||||
lambda item: (item[0], item[1].to_dict())
|
||||
if hasattr(item[1], "to_dict") else item,
|
||||
value.items()
|
||||
))
|
||||
else:
|
||||
result[attr] = value
|
||||
if issubclass(OrganizationBody1, dict):
|
||||
for key, value in self.items():
|
||||
result[key] = value
|
||||
|
||||
return result
|
||||
|
||||
def to_str(self):
|
||||
"""Returns the string representation of the model"""
|
||||
return pprint.pformat(self.to_dict())
|
||||
|
||||
def __repr__(self):
|
||||
"""For `print` and `pprint`"""
|
||||
return self.to_str()
|
||||
|
||||
def __eq__(self, other):
|
||||
"""Returns true if both objects are equal"""
|
||||
if not isinstance(other, OrganizationBody1):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
110
sdk/python/sdk/zrok/zrok_api/models/organization_members_body.py
Normal file
110
sdk/python/sdk/zrok/zrok_api/models/organization_members_body.py
Normal file
@ -0,0 +1,110 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
zrok
|
||||
|
||||
zrok client access # noqa: E501
|
||||
|
||||
OpenAPI spec version: 0.3.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
|
||||
import six
|
||||
|
||||
class OrganizationMembersBody(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
"""
|
||||
Attributes:
|
||||
swagger_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
attribute_map (dict): The key is attribute name
|
||||
and the value is json key in definition.
|
||||
"""
|
||||
swagger_types = {
|
||||
'token': 'str'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'token': 'token'
|
||||
}
|
||||
|
||||
def __init__(self, token=None): # noqa: E501
|
||||
"""OrganizationMembersBody - a model defined in Swagger""" # noqa: E501
|
||||
self._token = None
|
||||
self.discriminator = None
|
||||
if token is not None:
|
||||
self.token = token
|
||||
|
||||
@property
|
||||
def token(self):
|
||||
"""Gets the token of this OrganizationMembersBody. # noqa: E501
|
||||
|
||||
|
||||
:return: The token of this OrganizationMembersBody. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._token
|
||||
|
||||
@token.setter
|
||||
def token(self, token):
|
||||
"""Sets the token of this OrganizationMembersBody.
|
||||
|
||||
|
||||
:param token: The token of this OrganizationMembersBody. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._token = token
|
||||
|
||||
def to_dict(self):
|
||||
"""Returns the model properties as a dict"""
|
||||
result = {}
|
||||
|
||||
for attr, _ in six.iteritems(self.swagger_types):
|
||||
value = getattr(self, attr)
|
||||
if isinstance(value, list):
|
||||
result[attr] = list(map(
|
||||
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
||||
value
|
||||
))
|
||||
elif hasattr(value, "to_dict"):
|
||||
result[attr] = value.to_dict()
|
||||
elif isinstance(value, dict):
|
||||
result[attr] = dict(map(
|
||||
lambda item: (item[0], item[1].to_dict())
|
||||
if hasattr(item[1], "to_dict") else item,
|
||||
value.items()
|
||||
))
|
||||
else:
|
||||
result[attr] = value
|
||||
if issubclass(OrganizationMembersBody, dict):
|
||||
for key, value in self.items():
|
||||
result[key] = value
|
||||
|
||||
return result
|
||||
|
||||
def to_str(self):
|
||||
"""Returns the string representation of the model"""
|
||||
return pprint.pformat(self.to_dict())
|
||||
|
||||
def __repr__(self):
|
||||
"""For `print` and `pprint`"""
|
||||
return self.to_str()
|
||||
|
||||
def __eq__(self, other):
|
||||
"""Returns true if both objects are equal"""
|
||||
if not isinstance(other, OrganizationMembersBody):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
110
sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py
Normal file
110
sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py
Normal file
@ -0,0 +1,110 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
zrok
|
||||
|
||||
zrok client access # noqa: E501
|
||||
|
||||
OpenAPI spec version: 0.3.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
|
||||
import six
|
||||
|
||||
class OrganizationRemoveBody(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
"""
|
||||
Attributes:
|
||||
swagger_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
attribute_map (dict): The key is attribute name
|
||||
and the value is json key in definition.
|
||||
"""
|
||||
swagger_types = {
|
||||
'email': 'str'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'email': 'email'
|
||||
}
|
||||
|
||||
def __init__(self, email=None): # noqa: E501
|
||||
"""OrganizationRemoveBody - a model defined in Swagger""" # noqa: E501
|
||||
self._email = None
|
||||
self.discriminator = None
|
||||
if email is not None:
|
||||
self.email = email
|
||||
|
||||
@property
|
||||
def email(self):
|
||||
"""Gets the email of this OrganizationRemoveBody. # noqa: E501
|
||||
|
||||
|
||||
:return: The email of this OrganizationRemoveBody. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._email
|
||||
|
||||
@email.setter
|
||||
def email(self, email):
|
||||
"""Sets the email of this OrganizationRemoveBody.
|
||||
|
||||
|
||||
:param email: The email of this OrganizationRemoveBody. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._email = email
|
||||
|
||||
def to_dict(self):
|
||||
"""Returns the model properties as a dict"""
|
||||
result = {}
|
||||
|
||||
for attr, _ in six.iteritems(self.swagger_types):
|
||||
value = getattr(self, attr)
|
||||
if isinstance(value, list):
|
||||
result[attr] = list(map(
|
||||
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
||||
value
|
||||
))
|
||||
elif hasattr(value, "to_dict"):
|
||||
result[attr] = value.to_dict()
|
||||
elif isinstance(value, dict):
|
||||
result[attr] = dict(map(
|
||||
lambda item: (item[0], item[1].to_dict())
|
||||
if hasattr(item[1], "to_dict") else item,
|
||||
value.items()
|
||||
))
|
||||
else:
|
||||
result[attr] = value
|
||||
if issubclass(OrganizationRemoveBody, dict):
|
||||
for key, value in self.items():
|
||||
result[key] = value
|
||||
|
||||
return result
|
||||
|
||||
def to_str(self):
|
||||
"""Returns the string representation of the model"""
|
||||
return pprint.pformat(self.to_dict())
|
||||
|
||||
def __repr__(self):
|
||||
"""For `print` and `pprint`"""
|
||||
return self.to_str()
|
||||
|
||||
def __eq__(self, other):
|
||||
"""Returns true if both objects are equal"""
|
||||
if not isinstance(other, OrganizationRemoveBody):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
Reference in New Issue
Block a user