commit cdbd38b28284d5100eb8952cb934f9f507f4bf58 Author: liuyafei Date: Wed Dec 27 20:14:28 2023 +0800 :tada: init project diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..35f0869 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,30 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven +# +# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech) + +name: Java CI with Maven + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build: + name: Build IDMesh-Dev + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '8' ] + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: ${{ matrix.java }} + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --no-transfer-progress --file pom.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2506507 --- /dev/null +++ b/.gitignore @@ -0,0 +1,60 @@ +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# exclude jar for gradle wrapper +!gradle/wrapper/*.jar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# build files +**/target +target +.gradle +build + +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES new file mode 100644 index 0000000..1d6a58e --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,271 @@ +.github/workflows/maven.yml +.gitignore +.travis.yml +README.md +api/openapi.yaml +build.gradle +build.sbt +docs/App.md +docs/AppApi.md +docs/AppConfig.md +docs/AppConfigAllowedIdProvider.md +docs/AppDetail.md +docs/AppSubAccount.md +docs/Au.md +docs/AuResourceSet.md +docs/AuthRuleArg.md +docs/AuthUnit.md +docs/AuthUnitResouce.md +docs/AuthUnitResourceSet.md +docs/AuthorizeApplicationsRequest.md +docs/AuthzApp.md +docs/Bucket.md +docs/CoreObject.md +docs/Create200Response.md +docs/CreateAccountRequest.md +docs/CreateNodeRequest.md +docs/CreateOrganization200Response.md +docs/CreateOrganizationRequest.md +docs/CreateRequest.md +docs/CreateRequest1.md +docs/CreateRequest1ConfigProp.md +docs/CreateRequest1ConfigPropAccessPolicy.md +docs/CreateRequest1ConfigPropAllowedLoginMethod.md +docs/CreateRequest1ConfigPropAllowedSocialLoginProvider.md +docs/CreateRequest1ProtocolProp.md +docs/CreateRequest1ProtocolPropResponseAttrInner.md +docs/CreateSecrets200Response.md +docs/CreateSecrets200ResponseData.md +docs/CreateStoreCredential200Response.md +docs/CreateStoreCredentialRequest.md +docs/CronJob.md +docs/Delete200Response.md +docs/Delete200Response1.md +docs/DeleteAuthUnitRulesRequest.md +docs/DeleteMembersRequest.md +docs/DeleteNode200Response.md +docs/DeleteOrganization200Response.md +docs/DeleteResourcesRequest.md +docs/Disable200Response.md +docs/EmptyObject.md +docs/EmptyObject1.md +docs/EmptyObject10.md +docs/EmptyObject11.md +docs/EmptyObject12.md +docs/EmptyObject12ResourceActionsInner.md +docs/EmptyObject13.md +docs/EmptyObject2.md +docs/EmptyObject3.md +docs/EmptyObject3ActionsInner.md +docs/EmptyObject4.md +docs/EmptyObject4Application.md +docs/EmptyObject4Resource.md +docs/EmptyObject4ResourceSet.md +docs/EmptyObject5.md +docs/EmptyObject5ActionsInner.md +docs/EmptyObject6.md +docs/EmptyObject7.md +docs/EmptyObject8.md +docs/EmptyObject9.md +docs/Enable200Response.md +docs/Get200Response.md +docs/Get400Response.md +docs/GetAccountsByApp200Response.md +docs/GetAuthUnits200Response.md +docs/GetConfig200Response.md +docs/GetConfig200ResponseMfaConfig.md +docs/GetMembers200ResponseInner.md +docs/GetNodeMembers200Response.md +docs/GetNodeMembers200ResponseDataInner.md +docs/GetNodeMembers200ResponseDataInnerNodeInfoInner.md +docs/GetOrganization200ResponseInner.md +docs/GetOrganizations200ResponseInner.md +docs/GetPrivileges200Response.md +docs/GetResource200Response.md +docs/GetResourceMembers200Response.md +docs/GetResourceSets200Response.md +docs/GetResources200Response.md +docs/GetStoredCredentials200Response.md +docs/GetTemplate200Response.md +docs/GetTemplate200ResponseDataInner.md +docs/GetTemplate200ResponseDataInnerConfigProp.md +docs/GetTemplate200ResponseDataInnerProtocolProp.md +docs/IdentityObj.md +docs/Injection.md +docs/Job.md +docs/List200Response.md +docs/List200Response1.md +docs/List200Response1DataInner.md +docs/List200Response1DataInnerAllowedProviderIdInner.md +docs/List200ResponseDataInner.md +docs/MFA.md +docs/ModelObject.md +docs/Modify200Response.md +docs/Modify200Response1.md +docs/ModifyAccountRequest.md +docs/ModifyConfigRequest.md +docs/ModifyRequest.md +docs/ModifyRequest1.md +docs/NullInner.md +docs/OrganizationApi.md +docs/PermissionApi.md +docs/Privilege.md +docs/Resource.md +docs/ResourceSet.md +docs/ResourceSetMember.md +docs/ResourceSetMemberResourceActions.md +docs/SaveObjectRequest.md +docs/StorageApi.md +docs/TreeNode.md +docs/TreeUser.md +docs/UpdateMemberRequest.md +docs/UpdateNode200Response.md +docs/UpdateNodeRequest.md +docs/UpdateOrganizationRequest.md +docs/UserApi.md +git_push.sh +gradle.properties +gradle/wrapper/gradle-wrapper.jar +gradle/wrapper/gradle-wrapper.properties +gradlew +gradlew.bat +pom.xml +settings.gradle +src/main/AndroidManifest.xml +src/main/java/com/idmesh/ApiCallback.java +src/main/java/com/idmesh/ApiClient.java +src/main/java/com/idmesh/ApiException.java +src/main/java/com/idmesh/ApiResponse.java +src/main/java/com/idmesh/Configuration.java +src/main/java/com/idmesh/GzipRequestInterceptor.java +src/main/java/com/idmesh/JSON.java +src/main/java/com/idmesh/Pair.java +src/main/java/com/idmesh/ProgressRequestBody.java +src/main/java/com/idmesh/ProgressResponseBody.java +src/main/java/com/idmesh/ServerConfiguration.java +src/main/java/com/idmesh/ServerVariable.java +src/main/java/com/idmesh/StringUtil.java +src/main/java/com/idmesh/api/AppApi.java +src/main/java/com/idmesh/api/OrganizationApi.java +src/main/java/com/idmesh/api/PermissionApi.java +src/main/java/com/idmesh/api/StorageApi.java +src/main/java/com/idmesh/api/UserApi.java +src/main/java/com/idmesh/auth/AccessKeyAuth.java +src/main/java/com/idmesh/auth/ApiKeyAuth.java +src/main/java/com/idmesh/auth/Authentication.java +src/main/java/com/idmesh/auth/HttpBasicAuth.java +src/main/java/com/idmesh/auth/HttpBearerAuth.java +src/main/java/com/idmesh/model/AbstractOpenApiSchema.java +src/main/java/com/idmesh/model/App.java +src/main/java/com/idmesh/model/AppConfig.java +src/main/java/com/idmesh/model/AppConfigAllowedIdProvider.java +src/main/java/com/idmesh/model/AppDetail.java +src/main/java/com/idmesh/model/AppSubAccount.java +src/main/java/com/idmesh/model/Au.java +src/main/java/com/idmesh/model/AuResourceSet.java +src/main/java/com/idmesh/model/AuthRuleArg.java +src/main/java/com/idmesh/model/AuthUnit.java +src/main/java/com/idmesh/model/AuthUnitResouce.java +src/main/java/com/idmesh/model/AuthUnitResourceSet.java +src/main/java/com/idmesh/model/AuthorizeApplicationsRequest.java +src/main/java/com/idmesh/model/AuthzApp.java +src/main/java/com/idmesh/model/Bucket.java +src/main/java/com/idmesh/model/CoreObject.java +src/main/java/com/idmesh/model/Create200Response.java +src/main/java/com/idmesh/model/CreateAccountRequest.java +src/main/java/com/idmesh/model/CreateNodeRequest.java +src/main/java/com/idmesh/model/CreateOrganization200Response.java +src/main/java/com/idmesh/model/CreateOrganizationRequest.java +src/main/java/com/idmesh/model/CreateRequest.java +src/main/java/com/idmesh/model/CreateRequest1.java +src/main/java/com/idmesh/model/CreateRequest1ConfigProp.java +src/main/java/com/idmesh/model/CreateRequest1ConfigPropAccessPolicy.java +src/main/java/com/idmesh/model/CreateRequest1ConfigPropAllowedLoginMethod.java +src/main/java/com/idmesh/model/CreateRequest1ConfigPropAllowedSocialLoginProvider.java +src/main/java/com/idmesh/model/CreateRequest1ProtocolProp.java +src/main/java/com/idmesh/model/CreateRequest1ProtocolPropResponseAttrInner.java +src/main/java/com/idmesh/model/CreateSecrets200Response.java +src/main/java/com/idmesh/model/CreateSecrets200ResponseData.java +src/main/java/com/idmesh/model/CreateStoreCredential200Response.java +src/main/java/com/idmesh/model/CreateStoreCredentialRequest.java +src/main/java/com/idmesh/model/CronJob.java +src/main/java/com/idmesh/model/Delete200Response.java +src/main/java/com/idmesh/model/Delete200Response1.java +src/main/java/com/idmesh/model/DeleteAuthUnitRulesRequest.java +src/main/java/com/idmesh/model/DeleteMembersRequest.java +src/main/java/com/idmesh/model/DeleteNode200Response.java +src/main/java/com/idmesh/model/DeleteOrganization200Response.java +src/main/java/com/idmesh/model/DeleteResourcesRequest.java +src/main/java/com/idmesh/model/Disable200Response.java +src/main/java/com/idmesh/model/EmptyObject.java +src/main/java/com/idmesh/model/EmptyObject1.java +src/main/java/com/idmesh/model/EmptyObject10.java +src/main/java/com/idmesh/model/EmptyObject11.java +src/main/java/com/idmesh/model/EmptyObject12.java +src/main/java/com/idmesh/model/EmptyObject12ResourceActionsInner.java +src/main/java/com/idmesh/model/EmptyObject13.java +src/main/java/com/idmesh/model/EmptyObject2.java +src/main/java/com/idmesh/model/EmptyObject3.java +src/main/java/com/idmesh/model/EmptyObject3ActionsInner.java +src/main/java/com/idmesh/model/EmptyObject4.java +src/main/java/com/idmesh/model/EmptyObject4Application.java +src/main/java/com/idmesh/model/EmptyObject4Resource.java +src/main/java/com/idmesh/model/EmptyObject4ResourceSet.java +src/main/java/com/idmesh/model/EmptyObject5.java +src/main/java/com/idmesh/model/EmptyObject5ActionsInner.java +src/main/java/com/idmesh/model/EmptyObject6.java +src/main/java/com/idmesh/model/EmptyObject7.java +src/main/java/com/idmesh/model/EmptyObject8.java +src/main/java/com/idmesh/model/EmptyObject9.java +src/main/java/com/idmesh/model/Enable200Response.java +src/main/java/com/idmesh/model/Get200Response.java +src/main/java/com/idmesh/model/Get400Response.java +src/main/java/com/idmesh/model/GetAccountsByApp200Response.java +src/main/java/com/idmesh/model/GetAuthUnits200Response.java +src/main/java/com/idmesh/model/GetConfig200Response.java +src/main/java/com/idmesh/model/GetConfig200ResponseMfaConfig.java +src/main/java/com/idmesh/model/GetMembers200ResponseInner.java +src/main/java/com/idmesh/model/GetNodeMembers200Response.java +src/main/java/com/idmesh/model/GetNodeMembers200ResponseDataInner.java +src/main/java/com/idmesh/model/GetNodeMembers200ResponseDataInnerNodeInfoInner.java +src/main/java/com/idmesh/model/GetOrganization200ResponseInner.java +src/main/java/com/idmesh/model/GetOrganizations200ResponseInner.java +src/main/java/com/idmesh/model/GetPrivileges200Response.java +src/main/java/com/idmesh/model/GetResource200Response.java +src/main/java/com/idmesh/model/GetResourceMembers200Response.java +src/main/java/com/idmesh/model/GetResourceSets200Response.java +src/main/java/com/idmesh/model/GetResources200Response.java +src/main/java/com/idmesh/model/GetStoredCredentials200Response.java +src/main/java/com/idmesh/model/GetTemplate200Response.java +src/main/java/com/idmesh/model/GetTemplate200ResponseDataInner.java +src/main/java/com/idmesh/model/GetTemplate200ResponseDataInnerConfigProp.java +src/main/java/com/idmesh/model/GetTemplate200ResponseDataInnerProtocolProp.java +src/main/java/com/idmesh/model/IdentityObj.java +src/main/java/com/idmesh/model/Injection.java +src/main/java/com/idmesh/model/Job.java +src/main/java/com/idmesh/model/List200Response.java +src/main/java/com/idmesh/model/List200Response1.java +src/main/java/com/idmesh/model/List200Response1DataInner.java +src/main/java/com/idmesh/model/List200Response1DataInnerAllowedProviderIdInner.java +src/main/java/com/idmesh/model/List200ResponseDataInner.java +src/main/java/com/idmesh/model/MFA.java +src/main/java/com/idmesh/model/ModelObject.java +src/main/java/com/idmesh/model/Modify200Response.java +src/main/java/com/idmesh/model/Modify200Response1.java +src/main/java/com/idmesh/model/ModifyAccountRequest.java +src/main/java/com/idmesh/model/ModifyConfigRequest.java +src/main/java/com/idmesh/model/ModifyRequest.java +src/main/java/com/idmesh/model/ModifyRequest1.java +src/main/java/com/idmesh/model/NullInner.java +src/main/java/com/idmesh/model/Privilege.java +src/main/java/com/idmesh/model/Resource.java +src/main/java/com/idmesh/model/ResourceSet.java +src/main/java/com/idmesh/model/ResourceSetMember.java +src/main/java/com/idmesh/model/ResourceSetMemberResourceActions.java +src/main/java/com/idmesh/model/SaveObjectRequest.java +src/main/java/com/idmesh/model/TreeNode.java +src/main/java/com/idmesh/model/TreeUser.java +src/main/java/com/idmesh/model/UpdateMemberRequest.java +src/main/java/com/idmesh/model/UpdateNode200Response.java +src/main/java/com/idmesh/model/UpdateNodeRequest.java +src/main/java/com/idmesh/model/UpdateOrganizationRequest.java diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 0000000..717311e --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +unset \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..1b6741c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +# +# Generated by OpenAPI Generator: https://openapi-generator.tech +# +# Ref: https://docs.travis-ci.com/user/languages/java/ +# +language: java +jdk: + - openjdk12 + - openjdk11 + - openjdk10 + - openjdk9 + - openjdk8 +before_install: + # ensure gradlew has proper permission + - chmod a+x ./gradlew +script: + # test using maven + #- mvn test + # test using gradle + - gradle test + # test using sbt + # - sbt test diff --git a/README.md b/README.md new file mode 100644 index 0000000..53cf75e --- /dev/null +++ b/README.md @@ -0,0 +1,339 @@ +# idmesh-api-sdk-java + +IDMesh-Dev +- API version: 1.0.0 + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + +*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* + + +## Requirements + +Building the API client library requires: +1. Java 1.8+ +2. Maven (3.8.3+)/Gradle (7.2+) + +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn clean install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn clean deploy +``` + +Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + com.idmesh + idmesh-api-sdk-java + 1.0.0 + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy + repositories { + mavenCentral() // Needed if the 'idmesh-api-sdk-java' jar has been published to maven central. + mavenLocal() // Needed if the 'idmesh-api-sdk-java' jar has been published to the local maven repo. + } + + dependencies { + implementation "com.idmesh:idmesh-api-sdk-java:1.0.0" + } +``` + +### Others + +At first generate the JAR by executing: + +```shell +mvn clean package +``` + +Then manually install the following JARs: + +* `target/idmesh-api-sdk-java-1.0.0.jar` +* `target/lib/*.jar` + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java + +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String name = "name_example"; // String | 应用名称 + String type = ""; // String | 应用类型 + String pageSort = "time_created[desc]"; // String | 排序,格式:字段名[顺序] + String types = "1,2"; // String | 应用类型列表,逗号分隔 + try { + List200Response1 result = apiInstance.callList() + .name(name) + .type(type) + .pageSort(pageSort) + .types(types) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#callList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AppApi* | [**callList**](docs/AppApi.md#callList) | **GET** /v1/applications | 查询应用列表 +*AppApi* | [**create**](docs/AppApi.md#create) | **POST** /v1/applications | 创建应用 +*AppApi* | [**createAccount**](docs/AppApi.md#createAccount) | **POST** /v1/applications/{id}/accounts | 创建应用子账号 +*AppApi* | [**createIDP**](docs/AppApi.md#createIDP) | **POST** /v1/applications/{id}/idp | 创建应用认证源 +*AppApi* | [**createMFA**](docs/AppApi.md#createMFA) | **POST** /v1/applications/{id}/mfa | 启用应用多因素认证配置 +*AppApi* | [**createSecrets**](docs/AppApi.md#createSecrets) | **POST** /v1/applications/{id}/secrets | 刷新应用安全码 +*AppApi* | [**delete**](docs/AppApi.md#delete) | **DELETE** /v1/applications/{id} | 删除应用 +*AppApi* | [**deleteAccount**](docs/AppApi.md#deleteAccount) | **DELETE** /v1/applications/{app_id}/accounts/{id} | 删除应用子账号 +*AppApi* | [**deleteIDPConfig**](docs/AppApi.md#deleteIDPConfig) | **DELETE** /v1/applications/{app_id}/idp/{config_id} | 删除应用认证源 +*AppApi* | [**deleteMFA**](docs/AppApi.md#deleteMFA) | **DELETE** /v1/applications/{app_id}/mfa/{config_id} | 禁用应用多因素认证配置 +*AppApi* | [**disable**](docs/AppApi.md#disable) | **POST** /v1/applications/{id}/disable | 禁用应用 +*AppApi* | [**disableAccount**](docs/AppApi.md#disableAccount) | **POST** /v1/applications/{app_id}/accounts/{id}/disable | 禁用应用子账号 +*AppApi* | [**disableProtocol**](docs/AppApi.md#disableProtocol) | **POST** /v1/applications/{app_id}/protocols/{protocol_type}/disable | 禁用应用认证协议 +*AppApi* | [**disableSSO**](docs/AppApi.md#disableSSO) | **POST** /v1/applications/{id}/sso/disable | 禁用应用单点登录 +*AppApi* | [**enable**](docs/AppApi.md#enable) | **POST** /v1/applications/{id}/enable | 启用应用 +*AppApi* | [**enableAccount**](docs/AppApi.md#enableAccount) | **POST** /v1/applications/{app_id}/accounts/{id}/enable | 启用应用子账号 +*AppApi* | [**enableProtocol**](docs/AppApi.md#enableProtocol) | **POST** /v1/applications/{app_id}/protocols/{protocol_type}/enable | 启用应用认证协议 +*AppApi* | [**enableSSO**](docs/AppApi.md#enableSSO) | **POST** /v1/applications/{id}/sso/enable | 启用应用单点登录 +*AppApi* | [**get**](docs/AppApi.md#get) | **GET** /v1/applications/{id} | 按 ID 查询应用 +*AppApi* | [**getAccount**](docs/AppApi.md#getAccount) | **GET** /v1/applications/{app_id}/accounts/{id} | 按 ID 查询应用子账号 +*AppApi* | [**getAccounts**](docs/AppApi.md#getAccounts) | **GET** /v1/application-accounts | 查询应用子账号列表 +*AppApi* | [**getAccountsByApp**](docs/AppApi.md#getAccountsByApp) | **GET** /v1/applications/{app_id}/accounts | 按 APP ID 查询应用子账号列表 +*AppApi* | [**getByDomain**](docs/AppApi.md#getByDomain) | **GET** /v1/application | 按条件查询应用 +*AppApi* | [**getConfig**](docs/AppApi.md#getConfig) | **GET** /v1/applications/{id}/configs | 查询应用配置信息 +*AppApi* | [**getProtocol**](docs/AppApi.md#getProtocol) | **GET** /v1/applications/{app_id}/protocols/{protocol_type} | 查询应用认证协议 +*AppApi* | [**getProtocols**](docs/AppApi.md#getProtocols) | **GET** /v1/applications/{id}/protocols | 查询应用认证协议列表 +*AppApi* | [**getTemplate**](docs/AppApi.md#getTemplate) | **GET** /v1/application-templates | 查询应用模板列表 +*AppApi* | [**modify**](docs/AppApi.md#modify) | **PATCH** /v1/applications/{id} | 更新应用基本信息 +*AppApi* | [**modifyAccount**](docs/AppApi.md#modifyAccount) | **PUT** /v1/applications/{app_id}/accounts/{id} | 更新应用子账号 +*AppApi* | [**modifyConfig**](docs/AppApi.md#modifyConfig) | **PATCH** /v1/applications/{id}/configs | 更新应用配置 +*AppApi* | [**modifyProtocol**](docs/AppApi.md#modifyProtocol) | **PUT** /v1/applications/{app_id}/protocols/{protocol_type} | 更新应用认证协议 +*OrganizationApi* | [**createNode**](docs/OrganizationApi.md#createNode) | **POST** /v1/tree-nodes | 创建节点 +*OrganizationApi* | [**createOrganization**](docs/OrganizationApi.md#createOrganization) | **POST** /v1/core-objects | 创建组织关系 +*OrganizationApi* | [**deleteMembers**](docs/OrganizationApi.md#deleteMembers) | **DELETE** /v1/tree-users | 从节点移除用户 +*OrganizationApi* | [**deleteNode**](docs/OrganizationApi.md#deleteNode) | **DELETE** /v1/tree-nodes/{id} | 删除节点 +*OrganizationApi* | [**deleteOrganization**](docs/OrganizationApi.md#deleteOrganization) | **DELETE** /v1/core-objects/{id} | 删除组织关系 +*OrganizationApi* | [**getChildrenNodes**](docs/OrganizationApi.md#getChildrenNodes) | **GET** /v1/tree-nodes/{id}/children | 获取子节点列表 +*OrganizationApi* | [**getMembers**](docs/OrganizationApi.md#getMembers) | **GET** /v1/tree-users | 获取与用户关联的组织关系列表 +*OrganizationApi* | [**getNode**](docs/OrganizationApi.md#getNode) | **GET** /v1/tree-nodes/{id} | 查询节点信息 +*OrganizationApi* | [**getNodeMembers**](docs/OrganizationApi.md#getNodeMembers) | **GET** /v1/tree-nodes/{id}/tree-users | 获取成员信息列表 +*OrganizationApi* | [**getNodeParent**](docs/OrganizationApi.md#getNodeParent) | **GET** /v1/tree-nodes/{id}/parent | 查询父节点 +*OrganizationApi* | [**getNodes**](docs/OrganizationApi.md#getNodes) | **GET** /v1/tree-nodes | 查询节点信息列表 +*OrganizationApi* | [**getOrganization**](docs/OrganizationApi.md#getOrganization) | **GET** /v1/core-objects/{id} | 获取组织关系基本信息 +*OrganizationApi* | [**getOrganizations**](docs/OrganizationApi.md#getOrganizations) | **GET** /v1/core-objects | 获取组织关系列表 +*OrganizationApi* | [**updateMember**](docs/OrganizationApi.md#updateMember) | **PATCH** /v1/tree-users/{id} | 更新用户节点 +*OrganizationApi* | [**updateNode**](docs/OrganizationApi.md#updateNode) | **PATCH** /v1/tree-nodes/{id} | 编辑节点 +*OrganizationApi* | [**updateOrganization**](docs/OrganizationApi.md#updateOrganization) | **PATCH** /v1/core-objects/{id} | 修改组织关系基本信息 +*PermissionApi* | [**authorizeApplications**](docs/PermissionApi.md#authorizeApplications) | **POST** /v1/batch/authz-apps | 授权应用 +*PermissionApi* | [**createAuthUnitRules**](docs/PermissionApi.md#createAuthUnitRules) | **POST** /v1/batch/auth-unit-rules | 批量创建授权规则 +*PermissionApi* | [**createResource**](docs/PermissionApi.md#createResource) | **POST** /v1/resources | 创建资源 +*PermissionApi* | [**createResourceSet**](docs/PermissionApi.md#createResourceSet) | **POST** /v1/resource-sets | 创建资源集合 +*PermissionApi* | [**createResourceSetMember**](docs/PermissionApi.md#createResourceSetMember) | **POST** /v1/resource-sets/{id}/members | 创建资源集合成员 +*PermissionApi* | [**deleteAuthUnitRules**](docs/PermissionApi.md#deleteAuthUnitRules) | **DELETE** /v1/batch/auth-unit-rules | 批量删除授权规则 +*PermissionApi* | [**deleteResources**](docs/PermissionApi.md#deleteResources) | **DELETE** /v1/batch/resources | 删除资源 +*PermissionApi* | [**getAuthUnit**](docs/PermissionApi.md#getAuthUnit) | **GET** /v1/auth-units/{id} | 按 ID 查询授权单元 +*PermissionApi* | [**getAuthUnits**](docs/PermissionApi.md#getAuthUnits) | **GET** /v1/auth-units | 获取授权单元列表 +*PermissionApi* | [**getAuthUnitsRules**](docs/PermissionApi.md#getAuthUnitsRules) | **GET** /v1/auth-units/{rid}/rules | 查询授权单元下的授权规则列表 +*PermissionApi* | [**getPrivileges**](docs/PermissionApi.md#getPrivileges) | **GET** /v1/privileges | 获取权限列表 +*PermissionApi* | [**getResource**](docs/PermissionApi.md#getResource) | **GET** /v1/resources/{id} | 按 ID 查询资源 +*PermissionApi* | [**getResourceMember**](docs/PermissionApi.md#getResourceMember) | **GET** /v1/resource-sets/{sid}/members/{mid} | 按 ID 查询资源集合成员 +*PermissionApi* | [**getResourceMembers**](docs/PermissionApi.md#getResourceMembers) | **GET** /v1/resource-sets/{sid}/members | 查询资源集合成员列表 +*PermissionApi* | [**getResourceSet**](docs/PermissionApi.md#getResourceSet) | **GET** /v1/resource-sets/{id} | 按 ID 查询资源集合 +*PermissionApi* | [**getResourceSets**](docs/PermissionApi.md#getResourceSets) | **GET** /v1/resource-sets | 查询资源集合列表 +*PermissionApi* | [**getResources**](docs/PermissionApi.md#getResources) | **GET** /v1/resources | 查询资源列表 +*PermissionApi* | [**listAuthorizedApplications**](docs/PermissionApi.md#listAuthorizedApplications) | **GET** /v1/authz-apps | 查询已授权应用列表 +*PermissionApi* | [**modifyAuthUnit**](docs/PermissionApi.md#modifyAuthUnit) | **PUT** /v1/auth-units/{rid}/rules/{tid} | 更新授权规则 +*PermissionApi* | [**modifyResource**](docs/PermissionApi.md#modifyResource) | **PUT** /v1/resources/{id} | 更新资源 +*PermissionApi* | [**modifyResourceSet**](docs/PermissionApi.md#modifyResourceSet) | **PUT** /v1/resource-sets/{id} | 更新资源集合 +*PermissionApi* | [**modifyResourceSetMember**](docs/PermissionApi.md#modifyResourceSetMember) | **PUT** /v1/resource-sets/{sid}/members/{mid} | 更新资源集合成员 +*PermissionApi* | [**queryAuthUnitsRules**](docs/PermissionApi.md#queryAuthUnitsRules) | **GET** /v1/auth-unit-rules | 查询授权规则列表 +*StorageApi* | [**deleteBucket**](docs/StorageApi.md#deleteBucket) | **DELETE** /v1/buckets/{bucket} | 删除 Bucket +*StorageApi* | [**deleteObject**](docs/StorageApi.md#deleteObject) | **DELETE** /v1/buckets/{bucket}/objects/{key} | 删除 Object +*StorageApi* | [**getBucket**](docs/StorageApi.md#getBucket) | **GET** /v1/buckets/{bucket} | 获取 Bucket 详情 +*StorageApi* | [**getBuckets**](docs/StorageApi.md#getBuckets) | **GET** /v1/buckets | 获取 Bucket 列表 +*StorageApi* | [**getObject**](docs/StorageApi.md#getObject) | **GET** /v1/buckets/{bucket}/objects/{key} | 获取 Object 详情 +*StorageApi* | [**getObjects**](docs/StorageApi.md#getObjects) | **GET** /v1/buckets/{bucket}/objects | 获取 Object 列表 +*StorageApi* | [**saveObject**](docs/StorageApi.md#saveObject) | **POST** /v1/buckets/{bucket}/objects | 创建 Object +*UserApi* | [**callList**](docs/UserApi.md#callList) | **GET** /v1/users | 查询用户列表 +*UserApi* | [**create**](docs/UserApi.md#create) | **POST** /v1/users | 创建用户 +*UserApi* | [**createStoreCredential**](docs/UserApi.md#createStoreCredential) | **POST** /v1/user-stored-credentials | 创建用户存储凭证 +*UserApi* | [**delete**](docs/UserApi.md#delete) | **DELETE** /v1/users/{id} | 删除用户 +*UserApi* | [**get**](docs/UserApi.md#get) | **GET** /v1/users/{id} | 查询用户详情 +*UserApi* | [**getStoredCredentials**](docs/UserApi.md#getStoredCredentials) | **GET** /v1/user-stored-credentials | 查询用户存储凭证列表 +*UserApi* | [**modify**](docs/UserApi.md#modify) | **PATCH** /v1/users/{id} | 编辑用户 + + +## Documentation for Models + + - [App](docs/App.md) + - [AppConfig](docs/AppConfig.md) + - [AppConfigAllowedIdProvider](docs/AppConfigAllowedIdProvider.md) + - [AppDetail](docs/AppDetail.md) + - [AppSubAccount](docs/AppSubAccount.md) + - [Au](docs/Au.md) + - [AuResourceSet](docs/AuResourceSet.md) + - [AuthRuleArg](docs/AuthRuleArg.md) + - [AuthUnit](docs/AuthUnit.md) + - [AuthUnitResouce](docs/AuthUnitResouce.md) + - [AuthUnitResourceSet](docs/AuthUnitResourceSet.md) + - [AuthorizeApplicationsRequest](docs/AuthorizeApplicationsRequest.md) + - [AuthzApp](docs/AuthzApp.md) + - [Bucket](docs/Bucket.md) + - [CoreObject](docs/CoreObject.md) + - [Create200Response](docs/Create200Response.md) + - [CreateAccountRequest](docs/CreateAccountRequest.md) + - [CreateNodeRequest](docs/CreateNodeRequest.md) + - [CreateOrganization200Response](docs/CreateOrganization200Response.md) + - [CreateOrganizationRequest](docs/CreateOrganizationRequest.md) + - [CreateRequest](docs/CreateRequest.md) + - [CreateRequest1](docs/CreateRequest1.md) + - [CreateRequest1ConfigProp](docs/CreateRequest1ConfigProp.md) + - [CreateRequest1ConfigPropAccessPolicy](docs/CreateRequest1ConfigPropAccessPolicy.md) + - [CreateRequest1ConfigPropAllowedLoginMethod](docs/CreateRequest1ConfigPropAllowedLoginMethod.md) + - [CreateRequest1ConfigPropAllowedSocialLoginProvider](docs/CreateRequest1ConfigPropAllowedSocialLoginProvider.md) + - [CreateRequest1ProtocolProp](docs/CreateRequest1ProtocolProp.md) + - [CreateRequest1ProtocolPropResponseAttrInner](docs/CreateRequest1ProtocolPropResponseAttrInner.md) + - [CreateSecrets200Response](docs/CreateSecrets200Response.md) + - [CreateSecrets200ResponseData](docs/CreateSecrets200ResponseData.md) + - [CreateStoreCredential200Response](docs/CreateStoreCredential200Response.md) + - [CreateStoreCredentialRequest](docs/CreateStoreCredentialRequest.md) + - [CronJob](docs/CronJob.md) + - [Delete200Response](docs/Delete200Response.md) + - [Delete200Response1](docs/Delete200Response1.md) + - [DeleteAuthUnitRulesRequest](docs/DeleteAuthUnitRulesRequest.md) + - [DeleteMembersRequest](docs/DeleteMembersRequest.md) + - [DeleteNode200Response](docs/DeleteNode200Response.md) + - [DeleteOrganization200Response](docs/DeleteOrganization200Response.md) + - [DeleteResourcesRequest](docs/DeleteResourcesRequest.md) + - [Disable200Response](docs/Disable200Response.md) + - [EmptyObject](docs/EmptyObject.md) + - [EmptyObject1](docs/EmptyObject1.md) + - [EmptyObject10](docs/EmptyObject10.md) + - [EmptyObject11](docs/EmptyObject11.md) + - [EmptyObject12](docs/EmptyObject12.md) + - [EmptyObject12ResourceActionsInner](docs/EmptyObject12ResourceActionsInner.md) + - [EmptyObject13](docs/EmptyObject13.md) + - [EmptyObject2](docs/EmptyObject2.md) + - [EmptyObject3](docs/EmptyObject3.md) + - [EmptyObject3ActionsInner](docs/EmptyObject3ActionsInner.md) + - [EmptyObject4](docs/EmptyObject4.md) + - [EmptyObject4Application](docs/EmptyObject4Application.md) + - [EmptyObject4Resource](docs/EmptyObject4Resource.md) + - [EmptyObject4ResourceSet](docs/EmptyObject4ResourceSet.md) + - [EmptyObject5](docs/EmptyObject5.md) + - [EmptyObject5ActionsInner](docs/EmptyObject5ActionsInner.md) + - [EmptyObject6](docs/EmptyObject6.md) + - [EmptyObject7](docs/EmptyObject7.md) + - [EmptyObject8](docs/EmptyObject8.md) + - [EmptyObject9](docs/EmptyObject9.md) + - [Enable200Response](docs/Enable200Response.md) + - [Get200Response](docs/Get200Response.md) + - [Get400Response](docs/Get400Response.md) + - [GetAccountsByApp200Response](docs/GetAccountsByApp200Response.md) + - [GetAuthUnits200Response](docs/GetAuthUnits200Response.md) + - [GetConfig200Response](docs/GetConfig200Response.md) + - [GetConfig200ResponseMfaConfig](docs/GetConfig200ResponseMfaConfig.md) + - [GetMembers200ResponseInner](docs/GetMembers200ResponseInner.md) + - [GetNodeMembers200Response](docs/GetNodeMembers200Response.md) + - [GetNodeMembers200ResponseDataInner](docs/GetNodeMembers200ResponseDataInner.md) + - [GetNodeMembers200ResponseDataInnerNodeInfoInner](docs/GetNodeMembers200ResponseDataInnerNodeInfoInner.md) + - [GetOrganization200ResponseInner](docs/GetOrganization200ResponseInner.md) + - [GetOrganizations200ResponseInner](docs/GetOrganizations200ResponseInner.md) + - [GetPrivileges200Response](docs/GetPrivileges200Response.md) + - [GetResource200Response](docs/GetResource200Response.md) + - [GetResourceMembers200Response](docs/GetResourceMembers200Response.md) + - [GetResourceSets200Response](docs/GetResourceSets200Response.md) + - [GetResources200Response](docs/GetResources200Response.md) + - [GetStoredCredentials200Response](docs/GetStoredCredentials200Response.md) + - [GetTemplate200Response](docs/GetTemplate200Response.md) + - [GetTemplate200ResponseDataInner](docs/GetTemplate200ResponseDataInner.md) + - [GetTemplate200ResponseDataInnerConfigProp](docs/GetTemplate200ResponseDataInnerConfigProp.md) + - [GetTemplate200ResponseDataInnerProtocolProp](docs/GetTemplate200ResponseDataInnerProtocolProp.md) + - [IdentityObj](docs/IdentityObj.md) + - [Injection](docs/Injection.md) + - [Job](docs/Job.md) + - [List200Response](docs/List200Response.md) + - [List200Response1](docs/List200Response1.md) + - [List200Response1DataInner](docs/List200Response1DataInner.md) + - [List200Response1DataInnerAllowedProviderIdInner](docs/List200Response1DataInnerAllowedProviderIdInner.md) + - [List200ResponseDataInner](docs/List200ResponseDataInner.md) + - [MFA](docs/MFA.md) + - [ModelObject](docs/ModelObject.md) + - [Modify200Response](docs/Modify200Response.md) + - [Modify200Response1](docs/Modify200Response1.md) + - [ModifyAccountRequest](docs/ModifyAccountRequest.md) + - [ModifyConfigRequest](docs/ModifyConfigRequest.md) + - [ModifyRequest](docs/ModifyRequest.md) + - [ModifyRequest1](docs/ModifyRequest1.md) + - [NullInner](docs/NullInner.md) + - [Privilege](docs/Privilege.md) + - [Resource](docs/Resource.md) + - [ResourceSet](docs/ResourceSet.md) + - [ResourceSetMember](docs/ResourceSetMember.md) + - [ResourceSetMemberResourceActions](docs/ResourceSetMemberResourceActions.md) + - [SaveObjectRequest](docs/SaveObjectRequest.md) + - [TreeNode](docs/TreeNode.md) + - [TreeUser](docs/TreeUser.md) + - [UpdateMemberRequest](docs/UpdateMemberRequest.md) + - [UpdateNode200Response](docs/UpdateNode200Response.md) + - [UpdateNodeRequest](docs/UpdateNodeRequest.md) + - [UpdateOrganizationRequest](docs/UpdateOrganizationRequest.md) + + + +## Documentation for Authorization + +Endpoints do not require authorization. + + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Author + + + diff --git a/api/openapi.yaml b/api/openapi.yaml new file mode 100644 index 0000000..3751fca --- /dev/null +++ b/api/openapi.yaml @@ -0,0 +1,10854 @@ +openapi: 3.0.1 +info: + description: "" + title: IDMesh-Dev + version: 1.0.0 +servers: +- url: / +tags: +- name: 认证 API +- name: 管理 API +- name: 管理 API/用户 +- name: 管理 API/应用 +- name: 管理 API/权限及资源 +- name: 管理 API/权限及资源/权限 +- name: 管理 API/权限及资源/授权单元 & 授权规则 +- name: 管理 API/权限及资源/资源 & 资源集合 +- name: 管理 API/权限及资源/应用授权 +- name: 管理 API/组织关系 +- name: 管理 API/身份源 +- name: 管理 API/KV 存储 +- name: 管理 API/定时任务 +- name: 管理 API/FaaS(Node.js) +paths: + /v1/users/{id}: + delete: + deprecated: false + description: "" + operationId: delete + parameters: + - description: "" + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/x-www-form-urlencoded + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/delete_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 删除用户 + tags: + - User + x-apifox-folder: 管理 API/用户 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992496-run + x-accepts: application/json + get: + deprecated: false + description: "" + operationId: get + parameters: + - description: "" + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/get_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 查询用户详情 + tags: + - User + x-apifox-folder: 管理 API/用户 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992510-run + x-accepts: application/json + patch: + deprecated: false + description: "" + operationId: modify + parameters: + - description: "" + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/modify_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/modify_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 编辑用户 + tags: + - User + x-apifox-folder: 管理 API/用户 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992506-run + x-content-type: application/json + x-accepts: application/json + /v1/users: + get: + deprecated: false + description: "" + operationId: list + parameters: + - description: "" + example: "10" + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: "" + example: "1" + explode: true + in: query + name: page_num + required: false + schema: + type: integer + style: form + - description: 默认按用户基础字段搜索;当值为:generic时,全文检索 + example: "" + explode: true + in: query + name: search_type + required: false + schema: + type: string + style: form + - description: 检索值 + example: "" + explode: true + in: query + name: keyword + required: false + schema: + type: string + style: form + - description: 开始时间 + explode: true + in: query + name: time_modified_from + required: false + schema: + type: string + style: form + - description: 结束时间 + explode: true + in: query + name: time_modified_to + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/list_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 查询用户列表 + tags: + - User + x-apifox-folder: 管理 API/用户 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992507-run + x-accepts: application/json + post: + deprecated: false + description: "" + operationId: create + parameters: + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/create_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/modify_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 创建用户 + tags: + - User + x-apifox-folder: 管理 API/用户 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992504-run + x-content-type: application/json + x-accepts: application/json + /v1/user-stored-credentials: + get: + deprecated: false + description: "" + operationId: getStoredCredentials + parameters: + - description: 用户id标识 + example: "" + explode: true + in: query + name: user_id + required: false + schema: + type: number + style: form + - description: 社会化登录提供者的code + example: "" + explode: true + in: query + name: provider_code + required: false + schema: + type: string + style: form + - description: 社会化登录配置的ID + example: "" + explode: true + in: query + name: idp_config_id + required: false + schema: + type: number + style: form + - description: 社会化身份标识1,约定此字段保存用户唯一标识,如openid + example: "" + explode: true + in: query + name: id1 + required: false + schema: + type: string + style: form + - description: 社会化身份标识2,如unionid + example: "" + explode: true + in: query + name: id2 + required: false + schema: + type: string + style: form + - description: 更多社会化身份标识 + example: "" + explode: true + in: query + name: metadata + required: false + schema: + type: string + style: form + - description: 状态 + example: "" + explode: true + in: query + name: status + required: false + schema: + type: string + style: form + - description: 用户名 + explode: true + in: query + name: username + required: false + schema: + type: string + style: form + - description: 显示名 + explode: true + in: query + name: display_name + required: false + schema: + type: string + style: form + - description: "" + example: "" + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: "" + example: "" + explode: true + in: query + name: page_num + required: false + schema: + type: integer + style: form + - description: "" + example: application/x-www-form-urlencoded + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getStoredCredentials_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 查询用户存储凭证列表 + tags: + - User + x-apifox-folder: 管理 API/用户 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992521-run + x-accepts: application/json + post: + deprecated: false + description: "" + operationId: createStoreCredential + parameters: + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/createStoreCredential_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/createStoreCredential_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 创建用户存储凭证 + tags: + - User + x-apifox-folder: 管理 API/用户 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992520-run + x-content-type: application/json + x-accepts: application/json + /v1/applications/{id}: + delete: + deprecated: false + description: "" + operationId: delete + parameters: + - description: "" + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/x-www-form-urlencoded + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/delete_200_response_1' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 删除应用 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992530-run + x-accepts: application/json + get: + deprecated: false + description: "" + operationId: get + parameters: + - description: 唯一标识 + example: "11123321123321123321123" + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AppDetail' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 按 ID 查询应用 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992534-run + x-accepts: application/json + patch: + deprecated: false + description: "" + operationId: modify + parameters: + - description: "" + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/modify_request_1' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/modify_200_response_1' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 更新应用基本信息 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992524-run + x-content-type: application/json + x-accepts: application/json + /v1/applications: + get: + deprecated: false + description: "" + operationId: list + parameters: + - description: 应用名称 + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: 应用类型 + example: "" + explode: true + in: query + name: type + required: false + schema: + type: string + style: form + - description: "排序,格式:字段名[顺序]" + example: "time_created[desc]" + explode: true + in: query + name: page_sort + required: false + schema: + type: string + style: form + - description: 应用类型列表,逗号分隔 + example: "1,2" + explode: true + in: query + name: types + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/list_200_response_1' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 查询应用列表 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992526-run + x-accepts: application/json + post: + deprecated: false + description: "" + operationId: create + parameters: + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/create_request_1' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/create_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 创建应用 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992525-run + x-content-type: application/json + x-accepts: application/json + /v1/application-templates: + get: + deprecated: false + description: "" + operationId: getTemplate + parameters: + - description: 应用名称 + explode: true + in: query + name: name + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getTemplate_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 查询应用模板列表 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992527-run + x-accepts: application/json + /v1/application: + get: + deprecated: false + description: "" + operationId: getByDomain + parameters: + - description: 域名 + example: sense + explode: true + in: query + name: domain + required: false + schema: + type: string + style: form + - description: 域名简写 + explode: true + in: query + name: domain_sn + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AppDetail' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 按条件查询应用 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992528-run + x-accepts: application/json + /v1/applications/{id}/enable: + post: + deprecated: false + description: "" + operationId: enable + parameters: + - description: 应用标识 + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/x-www-form-urlencoded + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/enable_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 启用应用 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992529-run + x-accepts: application/json + /v1/applications/{id}/disable: + post: + deprecated: false + description: "" + operationId: disable + parameters: + - description: 应用标识 + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/x-www-form-urlencoded + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/disable_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 禁用应用 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992531-run + x-accepts: application/json + /v1/applications/{id}/secrets: + post: + deprecated: false + description: "" + operationId: createSecrets + parameters: + - description: "" + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/x-www-form-urlencoded + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/createSecrets_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 刷新应用安全码 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992532-run + x-accepts: application/json + /v1/applications/{id}/configs: + get: + deprecated: false + description: "" + operationId: getConfig + parameters: + - description: 应用ID + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getConfig_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 查询应用配置信息 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992535-run + x-accepts: application/json + patch: + deprecated: false + description: "" + operationId: modifyConfig + parameters: + - description: "" + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/modifyConfig_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/modify_200_response_1' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 更新应用配置 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-57153234-run + x-content-type: application/json + x-accepts: application/json + /v1/applications/{id}/sso/disable: + post: + deprecated: false + description: "" + operationId: disableSSO + parameters: + - description: 应用标识 + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 禁用应用单点登录 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992536-run + x-accepts: application/json + /v1/applications/{id}/sso/enable: + post: + deprecated: false + description: "" + operationId: enableSSO + parameters: + - description: 应用标识 + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 启用应用单点登录 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992537-run + x-accepts: application/json + /v1/applications/{app_id}/protocols/{protocol_type}/disable: + post: + deprecated: false + description: "" + operationId: disableProtocol + parameters: + - description: 应用 id + explode: false + in: path + name: app_id + required: true + schema: + type: string + style: simple + - description: 协议名称,如 oidc + explode: false + in: path + name: protocol_type + required: true + schema: + type: string + style: simple + - description: "" + example: application/x-www-form-urlencoded + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 禁用应用认证协议 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992538-run + x-accepts: application/json + /v1/applications/{app_id}/idp/{config_id}: + delete: + deprecated: false + description: "" + operationId: deleteIDPConfig + parameters: + - description: 应用id + explode: false + in: path + name: app_id + required: true + schema: + type: string + style: simple + - description: "" + explode: false + in: path + name: config_id + required: true + schema: + type: string + style: simple + - description: "" + example: application/x-www-form-urlencoded + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 删除应用认证源 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992539-run + x-accepts: application/json + /v1/applications/{app_id}/protocols/{protocol_type}/enable: + post: + deprecated: false + description: "" + operationId: enableProtocol + parameters: + - description: 应用 id + explode: false + in: path + name: app_id + required: true + schema: + type: string + style: simple + - description: 协议名称,如 oidc + example: oidc + explode: false + in: path + name: protocol_type + required: true + schema: + type: string + style: simple + - description: "" + example: application/x-www-form-urlencoded + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/modify_200_response_1' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 启用应用认证协议 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992540-run + x-accepts: application/json + /v1/applications/{id}/idp: + post: + deprecated: false + description: "" + operationId: createIDP + parameters: + - description: 应用id + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/empty_object' + responses: + "200": + content: + application/json: + schema: + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 创建应用认证源 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992541-run + x-content-type: application/json + x-accepts: application/json + /v1/applications/{id}/protocols: + get: + deprecated: false + description: "" + operationId: getProtocols + parameters: + - description: 应用唯一标识ID + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "启用状态 1, 0" + example: "1" + explode: true + in: query + name: status + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/AppProtocal' + type: array + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 查询应用认证协议列表 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992543-run + x-accepts: application/json + /v1/applications/{app_id}/protocols/{protocol_type}: + get: + deprecated: false + description: "" + operationId: getProtocol + parameters: + - description: 应用id + explode: false + in: path + name: app_id + required: true + schema: + type: string + style: simple + - description: 单点类型,cas、oauth2、saml、oidc、sxp + explode: false + in: path + name: protocol_type + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AppProtocal' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 查询应用认证协议 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992544-run + x-accepts: application/json + put: + deprecated: false + description: |2 + + 具体入参参考:[https://thoughts.teambition.com/workspaces/607401bc94422600473bb8a7/docs/62207129fb49bf000106a046](https://thoughts.teambition.com/workspaces/607401bc94422600473bb8a7/docs/62207129fb49bf000106a046) + operationId: modifyProtocol + parameters: + - description: 应用id + explode: false + in: path + name: app_id + required: true + schema: + type: string + style: simple + - description: 单点类型,cas、oauth2、saml、oidc、sxp + explode: false + in: path + name: protocol_type + required: true + schema: + type: string + style: simple + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/empty_object_1' + responses: + "200": + content: + application/json: + schema: + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 更新应用认证协议 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992547-run + x-content-type: application/json + x-accepts: application/json + /v1/applications/{id}/accounts: + post: + deprecated: false + description: "" + operationId: createAccount + parameters: + - description: 应用id + example: "" + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/createAccount_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/modify_200_response_1' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 创建应用子账号 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992545-run + x-content-type: application/json + x-accepts: application/json + /v1/applications/{app_id}/accounts/{id}: + delete: + deprecated: false + description: "" + operationId: deleteAccount + parameters: + - description: 应用id + explode: false + in: path + name: app_id + required: true + schema: + type: string + style: simple + - description: 子账号id + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/x-www-form-urlencoded + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 删除应用子账号 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-51363577-run + x-accepts: application/json + get: + deprecated: false + description: "" + operationId: getAccount + parameters: + - description: 应用id + example: "" + explode: false + in: path + name: app_id + required: true + schema: + type: string + style: simple + - description: 子账号id + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AppSubAccount' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 按 ID 查询应用子账号 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-113520248-run + x-accepts: application/json + put: + deprecated: false + description: "" + operationId: modifyAccount + parameters: + - description: 应用id + explode: false + in: path + name: app_id + required: true + schema: + type: string + style: simple + - description: 子账号id + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/modifyAccount_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/modify_200_response_1' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 更新应用子账号 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992546-run + x-content-type: application/json + x-accepts: application/json + /v1/auth-units/{id}: + get: + deprecated: false + description: "" + operationId: getAuthUnit + parameters: + - description: au id + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AuthUnit' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 按 ID 查询授权单元 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/授权单元 & 授权规则 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992549-run + x-accepts: application/json + /v1/applications/{app_id}/accounts/{id}/disable: + post: + deprecated: false + description: "" + operationId: disableAccount + parameters: + - description: 应用id + explode: false + in: path + name: app_id + required: true + schema: + type: string + style: simple + - description: 子账号id + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/x-www-form-urlencoded + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + multipart/form-data: + schema: + properties: {} + type: object + responses: + "200": + content: + application/json: + schema: + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 禁用应用子账号 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992550-run + x-content-type: multipart/form-data + x-accepts: application/json + /v1/applications/{app_id}/accounts/{id}/enable: + post: + deprecated: false + description: "" + operationId: enableAccount + parameters: + - description: 应用id + explode: false + in: path + name: app_id + required: true + schema: + type: string + style: simple + - description: 子账号id + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + explode: true + in: query + name: id + required: true + schema: + type: string + style: form + - description: "" + example: application/x-www-form-urlencoded + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 启用应用子账号 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992552-run + x-accepts: application/json + /v1/auth-units: + get: + deprecated: false + description: "" + operationId: getAuthUnits + parameters: + - description: 主体id + explode: true + in: query + name: identity_id + required: false + schema: + type: string + style: form + - description: 主体类型 + example: "" + explode: true + in: query + name: identity_type + required: false + schema: + type: string + style: form + - description: 主体名称 + example: "" + explode: true + in: query + name: identity_name + required: false + schema: + type: string + style: form + - description: 起始页,默认1 + example: "" + explode: true + in: query + name: page_num + required: false + schema: + type: string + style: form + - description: 页大小,默认20 + example: "" + explode: true + in: query + name: page_size + required: false + schema: + type: string + style: form + - description: "排序方式,格式:字段[排序方式]" + example: "" + explode: true + in: query + name: page_sort + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getAuthUnits_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 获取授权单元列表 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/授权单元 & 授权规则 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992553-run + x-accepts: application/json + /v1/privileges: + get: + deprecated: false + description: "" + operationId: getPrivileges + parameters: + - description: 主体id + example: "" + explode: true + in: query + name: identity_id + required: false + schema: + type: string + style: form + - description: 主体类型 + example: "" + explode: true + in: query + name: identity_type + required: false + schema: + type: string + style: form + - description: 主体名称 + example: "" + explode: true + in: query + name: identity_name + required: false + schema: + type: string + style: form + - description: 应用id + example: "" + explode: true + in: query + name: application_id + required: true + schema: + type: string + style: form + - description: "对象类型(可选值: data, api, ui, res_set, app)" + example: "" + explode: true + in: query + name: object_type + required: false + schema: + type: string + style: form + - description: 对象代码 + example: "" + explode: true + in: query + name: object_code + required: false + schema: + type: string + style: form + - description: "作用方式(affect,deny)" + explode: true + in: query + name: affect + required: false + schema: + type: string + style: form + - description: 起始页,默认1 + example: "" + explode: true + in: query + name: page_num + required: false + schema: + type: string + style: form + - description: 页大小,默认20 + example: "" + explode: true + in: query + name: page_size + required: false + schema: + type: string + style: form + - description: "排序方式,格式:字段[排序方式]" + example: "" + explode: true + in: query + name: page_sort + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getPrivileges_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 获取权限列表 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/权限 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992556-run + x-accepts: application/json + /v1/batch/auth-unit-rules: + delete: + deprecated: false + description: "" + operationId: deleteAuthUnitRules + parameters: + - description: "" + example: application/x-www-form-urlencoded + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/deleteAuthUnitRules_request' + responses: + "200": + content: + application/json: + schema: + properties: {} + title: empty object + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 批量删除授权规则 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/授权单元 & 授权规则 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992558-run + x-content-type: application/json + x-accepts: application/json + post: + deprecated: false + description: "" + operationId: createAuthUnitRules + parameters: + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/empty_object_2' + responses: + "200": + content: + application/json: + schema: + properties: {} + title: empty object + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 批量创建授权规则 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/授权单元 & 授权规则 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992557-run + x-content-type: application/json + x-accepts: application/json + /v1/resources/{id}: + get: + deprecated: false + description: "" + operationId: getResource + parameters: + - description: 资源id + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: 应用id + example: "" + explode: true + in: query + name: application_id + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getResource_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 按 ID 查询资源 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/资源 & 资源集合 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992565-run + x-accepts: application/json + put: + deprecated: true + description: "" + operationId: modifyResource + parameters: + - description: 资源id + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/empty_object_3' + responses: + "200": + content: + application/json: + schema: + properties: {} + title: empty object + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 更新资源 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/资源 & 资源集合 + x-apifox-status: deprecated + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992559-run + x-content-type: application/json + x-accepts: application/json + /v1/auth-units/{rid}/rules/{tid}: + put: + deprecated: false + description: "" + operationId: modifyAuthUnit + parameters: + - description: AU id + explode: false + in: path + name: rid + required: true + schema: + type: string + style: simple + - description: 规则id + explode: false + in: path + name: tid + required: true + schema: + type: string + style: simple + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/empty_object_4' + responses: + "200": + content: + application/json: + schema: + properties: {} + title: empty object + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 更新授权规则 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/授权单元 & 授权规则 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992560-run + x-content-type: application/json + x-accepts: application/json + /v1/resources: + get: + deprecated: false + description: "" + operationId: getResources + parameters: + - description: 应用id + example: "" + explode: true + in: query + name: application_id + required: true + schema: + type: string + style: form + - description: 资源类型 + example: "" + explode: true + in: query + name: type + required: false + schema: + type: string + style: form + - description: 资源代码 + example: "" + explode: true + in: query + name: code + required: false + schema: + type: string + style: form + - description: 是否查询包含全局资源 + example: "true" + explode: true + in: query + name: include_global + required: false + schema: + type: string + style: form + - description: 起始页,默认1 + example: "" + explode: true + in: query + name: page_num + required: false + schema: + type: string + style: form + - description: 页大小,默认20 + example: "" + explode: true + in: query + name: page_size + required: false + schema: + type: string + style: form + - description: "排序方式,格式:字段[排序方式]" + example: "" + explode: true + in: query + name: page_sort + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getResources_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 查询资源列表 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/资源 & 资源集合 + x-apifox-status: developing + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992562-run + x-accepts: application/json + post: + deprecated: false + description: "" + operationId: createResource + parameters: + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/empty_object_5' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/empty_object_6' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 创建资源 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/资源 & 资源集合 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992561-run + x-content-type: application/json + x-accepts: application/json + /v1/auth-units/{rid}/rules: + get: + deprecated: false + description: "" + operationId: getAuthUnitsRules + parameters: + - description: AU id + explode: false + in: path + name: rid + required: true + schema: + type: string + style: simple + - description: 应用id + explode: true + in: query + name: application_id + required: false + schema: + type: string + style: form + - description: 规则类型 + example: "res,res_set,data,ui,app" + explode: true + in: query + name: type + required: false + schema: + type: string + style: form + - description: 资源或资源集合code + example: "" + explode: true + in: query + name: code + required: false + schema: + type: string + style: form + - description: 只查询指定主体下的授权 + example: "true" + explode: true + in: query + name: self_only + required: false + schema: + type: string + style: form + - description: "资源id,当type=api,ui,data时有效" + example: "" + explode: true + in: query + name: resource_id + required: false + schema: + type: string + style: form + - description: 匹配所有资源,当type=res时有效 + example: "false" + explode: true + in: query + name: resource_match_all_resources + required: false + schema: + type: string + style: form + - description: 匹配所有资源操作,当type=res时有效 + example: "false" + explode: true + in: query + name: resource_match_all_actions + required: false + schema: + type: string + style: form + - description: 资源集合id,当type=res_set + example: "" + explode: true + in: query + name: resource_set_id + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Au' + type: array + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 查询授权单元下的授权规则列表 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/授权单元 & 授权规则 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992563-run + x-accepts: application/json + /v1/batch/resources: + delete: + deprecated: false + description: "" + operationId: deleteResources + parameters: + - description: "" + example: application/x-www-form-urlencoded + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/deleteResources_request' + responses: + "200": + content: + application/json: + schema: + properties: {} + title: empty object + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 删除资源 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/资源 & 资源集合 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992566-run + x-content-type: application/json + x-accepts: application/json + /v1/resource-sets/{id}: + get: + deprecated: false + description: "" + operationId: getResourceSet + parameters: + - description: 资源集合id + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceSet' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 按 ID 查询资源集合 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/资源 & 资源集合 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992576-run + x-accepts: application/json + put: + deprecated: false + description: "" + operationId: modifyResourceSet + parameters: + - description: 集合id + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + - description: 租户id + explode: false + in: header + name: X-Tenant-Id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/empty_object_7' + responses: + "200": + content: + application/json: + schema: + properties: {} + title: empty object + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 更新资源集合 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/资源 & 资源集合 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992571-run + x-content-type: application/json + x-accepts: application/json + /v1/resource-sets: + get: + deprecated: false + description: "" + operationId: getResourceSets + parameters: + - description: 集合代码 + explode: true + in: query + name: code + required: false + schema: + type: string + style: form + - description: 应用id + example: "" + explode: true + in: query + name: application_id + required: true + schema: + type: string + style: form + - description: 查询是否包含全局资源集合 + example: "true" + explode: true + in: query + name: include_global + required: false + schema: + type: string + style: form + - description: 起始页,默认1 + example: "" + explode: true + in: query + name: page_num + required: false + schema: + type: string + style: form + - description: 页大小,默认20 + example: "" + explode: true + in: query + name: page_size + required: false + schema: + type: string + style: form + - description: "排序方式,格式:字段[排序方式]" + example: "" + explode: true + in: query + name: page_sort + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getResourceSets_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 查询资源集合列表 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/资源 & 资源集合 + x-apifox-status: developing + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992575-run + x-accepts: application/json + post: + deprecated: false + description: "" + operationId: createResourceSet + parameters: + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + - description: 租户id + example: "123" + explode: false + in: header + name: X-Tenant-id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/empty_object_8' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/empty_object_9' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 创建资源集合 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/资源 & 资源集合 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992572-run + x-content-type: application/json + x-accepts: application/json + /v1/resource-sets/{id}/members: + post: + deprecated: false + description: "" + operationId: createResourceSetMember + parameters: + - description: 集合id + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/empty_object_10' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/empty_object_11' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 创建资源集合成员 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/资源 & 资源集合 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992574-run + x-content-type: application/json + x-accepts: application/json + /v1/resource-sets/{sid}/members/{mid}: + get: + deprecated: false + description: "" + operationId: getResourceMember + parameters: + - description: 资源集合id + explode: false + in: path + name: sid + required: true + schema: + type: string + style: simple + - description: 成员id + explode: false + in: path + name: mid + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceSetMember' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 按 ID 查询资源集合成员 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/资源 & 资源集合 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992582-run + x-accepts: application/json + put: + deprecated: false + description: "" + operationId: modifyResourceSetMember + parameters: + - description: 资源集合id + explode: false + in: path + name: sid + required: true + schema: + type: string + style: simple + - description: 资源集合成员id + explode: false + in: path + name: mid + required: true + schema: + type: string + style: simple + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/empty_object_12' + responses: + "200": + content: + application/json: + schema: + properties: {} + title: empty object + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 更新资源集合成员 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/资源 & 资源集合 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992577-run + x-content-type: application/json + x-accepts: application/json + /v1/tree-nodes/{id}/parent: + get: + deprecated: false + description: "" + operationId: getNodeParent + parameters: + - description: "" + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/TreeNode' + type: array + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 查询父节点 + tags: + - Organization + x-apifox-folder: 管理 API/组织关系 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992579-run + x-accepts: application/json + /v1/resource-sets/{sid}/members: + get: + deprecated: false + description: "" + operationId: getResourceMembers + parameters: + - description: 资源集合id + explode: false + in: path + name: sid + required: true + schema: + type: string + style: simple + - description: 资源代码 + example: "" + explode: true + in: query + name: resource_code + required: false + schema: + type: string + style: form + - description: 资源类型 + example: "" + explode: true + in: query + name: resource_type + required: false + schema: + type: string + style: form + - description: 起始页,默认1 + example: "" + explode: true + in: query + name: page_num + required: false + schema: + type: string + style: form + - description: 页大小,默认20 + example: "" + explode: true + in: query + name: page_size + required: false + schema: + type: string + style: form + - description: "排序方式,格式:字段[排序方式]" + example: "" + explode: true + in: query + name: page_sort + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getResourceMembers_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 查询资源集合成员列表 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/资源 & 资源集合 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992581-run + x-accepts: application/json + /v1/tree-nodes/{id}: + delete: + deprecated: false + description: 如果该节点有子节点则不可删除,需要先删除所有子节点。 + operationId: deleteNode + parameters: + - description: "" + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: 树对象code + example: org_tree + explode: true + in: query + name: object_code + required: true + schema: + type: string + style: form + - description: "" + example: application/x-www-form-urlencoded + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/deleteNode_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 删除节点 + tags: + - Organization + x-apifox-folder: 管理 API/组织关系 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992583-run + x-accepts: application/json + get: + deprecated: false + description: 根据ID查询节点信息 + operationId: getNode + parameters: + - description: "" + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TreeNode' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 查询节点信息 + tags: + - Organization + x-apifox-folder: 管理 API/组织关系 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992600-run + x-accepts: application/json + patch: + deprecated: false + description: |2 + + 移动节点修改parent_id + operationId: updateNode + parameters: + - description: 更新树节点 + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/updateNode_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/updateNode_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 编辑节点 + tags: + - Organization + x-apifox-folder: 管理 API/组织关系 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992597-run + x-content-type: application/json + x-accepts: application/json + /v1/core-objects: + get: + deprecated: false + description: "" + operationId: getOrganizations + parameters: [] + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/getOrganizations_200_response_inner' + type: array + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 获取组织关系列表 + tags: + - Organization + x-apifox-folder: 管理 API/组织关系 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992586-run + x-accepts: application/json + post: + deprecated: false + description: 创建组织关系的元数据,同时创建根节点 + operationId: createOrganization + parameters: + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/createOrganization_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/createOrganization_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 创建组织关系 + tags: + - Organization + x-apifox-folder: 管理 API/组织关系 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992584-run + x-content-type: application/json + x-accepts: application/json + /v1/core-objects/{id}: + delete: + deprecated: false + description: 如果该组织关系有子节点则不可删 + operationId: deleteOrganization + parameters: + - description: "" + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/x-www-form-urlencoded + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + multipart/form-data: + schema: + properties: {} + type: object + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/deleteOrganization_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 删除组织关系 + tags: + - Organization + x-apifox-folder: 管理 API/组织关系 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992588-run + x-content-type: multipart/form-data + x-accepts: application/json + get: + deprecated: false + description: "" + operationId: getOrganization + parameters: + - description: "" + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + explode: true + in: query + name: code + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/getOrganization_200_response_inner' + type: array + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 获取组织关系基本信息 + tags: + - Organization + x-apifox-folder: 管理 API/组织关系 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992587-run + x-accepts: application/json + patch: + deprecated: false + description: "" + operationId: updateOrganization + parameters: + - description: "" + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/updateOrganization_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/deleteOrganization_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 修改组织关系基本信息 + tags: + - Organization + x-apifox-folder: 管理 API/组织关系 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992585-run + x-content-type: application/json + x-accepts: application/json + /v1/tree-users: + delete: + deprecated: false + description: "移除用户,uri参数中的ID和json中的参数,至少有其一" + operationId: deleteMembers + parameters: + - description: "" + example: application/x-www-form-urlencoded + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/deleteMembers_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/deleteOrganization_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 从节点移除用户 + tags: + - Organization + x-apifox-folder: 管理 API/组织关系 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-121323985-run + x-content-type: application/json + x-accepts: application/json + get: + deprecated: false + description: 根据用户id获取与用户关联的组织关系列表 + operationId: getMembers + parameters: + - description: 用户ID + explode: true + in: query + name: user_id + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/getMembers_200_response_inner' + type: array + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 获取与用户关联的组织关系列表 + tags: + - Organization + x-apifox-folder: 管理 API/组织关系 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992590-run + x-accepts: application/json + /v1/tree-nodes: + get: + deprecated: false + description: "" + operationId: getNodes + parameters: + - description: 组织编码 + example: "" + explode: true + in: query + name: object_code + required: true + schema: + type: string + style: form + - description: 名字,支持前缀搜索 + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: 编号 + example: "" + explode: true + in: query + name: code + required: false + schema: + type: string + style: form + - description: 标签 + explode: true + in: query + name: tag + required: false + schema: + type: string + style: form + - description: 更新时间起点 + example: "" + explode: true + in: query + name: time_modified_from + required: false + schema: + type: string + style: form + - description: 更新时间终点,默认至今 + example: "" + explode: true + in: query + name: time_modified_to + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/TreeNode' + type: array + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 查询节点信息列表 + tags: + - Organization + x-apifox-folder: 管理 API/组织关系 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992595-run + x-accepts: application/json + post: + deprecated: false + description: "" + operationId: createNode + parameters: + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/createNode_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/deleteOrganization_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 创建节点 + tags: + - Organization + x-apifox-folder: 管理 API/组织关系 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992591-run + x-content-type: application/json + x-accepts: application/json + /v1/tree-nodes/{id}/tree-users: + get: + deprecated: false + description: 根据组织节点ID获取成员信息列表 + operationId: getNodeMembers + parameters: + - description: node id + example: "" + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: 关联类型,用于区分多重关联 + explode: true + in: query + name: relation_type + required: false + schema: + type: string + style: form + - description: 是否默认关系 1是,0否 + explode: true + in: query + name: is_default + required: false + schema: + type: string + style: form + - description: 用户显示名 + explode: true + in: query + name: display_name + required: false + schema: + type: string + style: form + - description: 用户名,支持模糊搜索(仅前缀) + example: "" + explode: true + in: query + name: username + required: false + schema: + type: string + style: form + - description: |- + // mode - 低->高 bit + // 第1位:是否获得指针节点所对应的真实结点,1-是,0-否 + // 第2位:是否展开WeakNode,即节点中类型不同的节点,1-展开,0-不展开 + // 第3位:是否递归地展开节点(不建议) + example: "000" + explode: true + in: query + name: mode + required: false + schema: + type: string + style: form + - description: 起始页,默认1 + example: "" + explode: true + in: query + name: page_num + required: false + schema: + type: integer + style: form + - description: 页大小,默认10 + example: "" + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: "排序方式,格式:字段[排序方式]" + example: "" + explode: true + in: query + name: page_sort + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getNodeMembers_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 获取成员信息列表 + tags: + - Organization + x-apifox-folder: 管理 API/组织关系 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992593-run + x-accepts: application/json + /v1/tree-nodes/{id}/children: + get: + deprecated: false + description: "" + operationId: getChildrenNodes + parameters: + - description: "" + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: |- + // mode - 低->高 bit + // 第1位:是否获得指针节点所对应的真实结点,1-是,0-否 + // 第2位:是否展开WeakNode,即节点中类型不同的节点,1-展开,0-不展开 + // 第3位:是否递归地展开节点(不建议) + example: "001" + explode: true + in: query + name: mode + required: true + schema: + type: string + style: form + - description: 当id = 0时必填,创建树时的object_code + explode: true + in: query + name: object_code + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/TreeNode' + type: array + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 获取子节点列表 + tags: + - Organization + x-apifox-folder: 管理 API/组织关系 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-35992603-run + x-accepts: application/json + /v1/tree-users/{id}: + patch: + deprecated: false + description: "" + operationId: updateMember + parameters: + - description: "" + example: 用户ID + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/updateMember_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/empty_object_13' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 更新用户节点 + tags: + - Organization + x-apifox-folder: 管理 API/组织关系 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-49937043-run + x-content-type: application/json + x-accepts: application/json + /v1/applications/{id}/mfa: + post: + deprecated: false + description: "" + operationId: createMFA + parameters: + - description: 应用id + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "" + example: application/json + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/empty_object' + responses: + "200": + content: + application/json: + schema: + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 启用应用多因素认证配置 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-52293563-run + x-content-type: application/json + x-accepts: application/json + /v1/applications/{app_id}/mfa/{config_id}: + delete: + deprecated: false + description: "" + operationId: deleteMFA + parameters: + - description: 应用id + explode: false + in: path + name: app_id + required: true + schema: + type: string + style: simple + - description: "" + explode: false + in: path + name: config_id + required: true + schema: + type: string + style: simple + - description: "" + example: application/x-www-form-urlencoded + explode: false + in: header + name: Content-Type + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 禁用应用多因素认证配置 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-52293568-run + x-accepts: application/json + /v1/auth-unit-rules: + get: + deprecated: false + description: "" + operationId: queryAuthUnitsRules + parameters: + - description: 应用id + explode: true + in: query + name: application_id + required: false + schema: + type: string + style: form + - description: 规则类型 + example: "api, ui, data, res_set, app" + explode: true + in: query + name: type + required: false + schema: + type: string + style: form + - description: 资源或资源集合code + explode: true + in: query + name: code + required: false + schema: + type: string + style: form + - description: 主体id + explode: true + in: query + name: identity_id + required: true + schema: + type: string + style: form + - description: 主体类型 + example: "user, node" + explode: true + in: query + name: identity_type + required: true + schema: + type: string + style: form + - description: 主体名称 + explode: true + in: query + name: identity_name + required: false + schema: + type: string + style: form + - description: 只查询指定主体下的授权 + example: "true" + explode: true + in: query + name: self_only + required: false + schema: + type: string + style: form + - description: "资源id,当type=api,ui,data时有效" + explode: true + in: query + name: resource_id + required: false + schema: + type: string + style: form + - description: 匹配所有资源,当type=res时有效 + explode: true + in: query + name: resource_match_all_resources + required: false + schema: + type: string + style: form + - description: 匹配所有资源操作,当type=res时有效 + explode: true + in: query + name: resource_match_all_actions + required: false + schema: + type: string + style: form + - description: 资源集合id,当type=res_set + explode: true + in: query + name: resource_set_id + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Au' + type: array + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 查询授权规则列表 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/授权单元 & 授权规则 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-58118129-run + x-accepts: application/json + /v1/batch/authz-apps: + post: + deprecated: false + description: "" + operationId: authorizeApplications + parameters: + - description: 租户id + example: "" + explode: false + in: header + name: X-Tenant-Id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/authorizeApplications_request' + responses: + "200": + content: + application/json: + schema: + properties: {} + type: object + x-apifox-ignore-properties: [] + x-apifox-orders: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 授权应用 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/应用授权 + x-apifox-status: testing + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-58768643-run + x-content-type: application/json + x-accepts: application/json + /v1/authz-apps: + get: + deprecated: false + description: "" + operationId: listAuthorizedApplications + parameters: + - description: 授权主体 id + example: "" + explode: true + in: query + name: identity_id + required: true + schema: + type: string + style: form + - description: 授权主体类型 + example: user + explode: true + in: query + name: identity_type + required: true + schema: + type: string + style: form + - description: "应用类型: 0-默认应用 1-自建应用 2-模板应用 3-组件应用" + example: "1,3" + explode: true + in: query + name: type + required: false + schema: + type: string + style: form + - description: 租户id + example: "" + explode: false + in: header + name: X-Tenant-Id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/AuthzApp' + type: array + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 查询已授权应用列表 + tags: + - Permission + x-apifox-folder: 管理 API/权限及资源/应用授权 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-58769185-run + x-accepts: application/json + /v1/buckets: + get: + deprecated: false + description: "" + operationId: getBuckets + parameters: + - description: 最后一个bucket的名字 + example: "" + explode: true + in: query + name: last + required: false + schema: + type: string + style: form + - description: 页大小 + example: "" + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Bucket' + type: array + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 获取 Bucket 列表 + tags: + - Storage + x-apifox-folder: 管理 API/KV 存储 + x-apifox-status: testing + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-82059883-run + x-accepts: application/json + /v1/buckets/{bucket}: + delete: + deprecated: false + description: 删除bucket会间接删掉bucket下所有object + operationId: deleteBucket + parameters: + - description: bucket 名称 + explode: false + in: path + name: bucket + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + properties: {} + type: object + x-apifox-ignore-properties: [] + x-apifox-orders: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 删除 Bucket + tags: + - Storage + x-apifox-folder: 管理 API/KV 存储 + x-apifox-status: testing + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-82062974-run + x-accepts: application/json + get: + deprecated: false + description: "" + operationId: getBucket + parameters: + - description: bucket 名称 + explode: false + in: path + name: bucket + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Bucket' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 获取 Bucket 详情 + tags: + - Storage + x-apifox-folder: 管理 API/KV 存储 + x-apifox-status: testing + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-82060551-run + x-accepts: application/json + /v1/buckets/{bucket}/objects: + get: + deprecated: false + description: "" + operationId: getObjects + parameters: + - description: bucket名称 + explode: false + in: path + name: bucket + required: true + schema: + type: string + style: simple + - description: 最后一个object的名字 + example: "" + explode: true + in: query + name: last + required: false + schema: + type: string + style: form + - description: 页大小 + example: "" + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Object' + type: array + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 获取 Object 列表 + tags: + - Storage + x-apifox-folder: 管理 API/KV 存储 + x-apifox-status: testing + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-82061508-run + x-accepts: application/json + post: + deprecated: false + description: |- + - 如果path中的bucket没有创建,会默认创建 + - 如果key已经存在,会更新原有的值 + operationId: saveObject + parameters: + - description: bucket名称 + explode: false + in: path + name: bucket + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/saveObject_request' + responses: + "200": + content: + application/json: + schema: + properties: {} + type: object + x-apifox-ignore-properties: [] + x-apifox-orders: [] + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 创建 Object + tags: + - Storage + x-apifox-folder: 管理 API/KV 存储 + x-apifox-status: testing + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-82073109-run + x-content-type: application/json + x-accepts: application/json + /v1/buckets/{bucket}/objects/{key}: + delete: + deprecated: false + description: "" + operationId: deleteObject + parameters: + - description: bucket名称 + explode: false + in: path + name: bucket + required: true + schema: + type: string + style: simple + - description: 键 + explode: false + in: path + name: key + required: true + schema: + type: string + style: simple + - description: 将键名称作为前缀执行删除 + example: "false" + explode: true + in: query + name: key_as_prefix + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 删除 Object + tags: + - Storage + x-apifox-folder: 管理 API/KV 存储 + x-apifox-status: testing + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-82074159-run + x-accepts: application/json + get: + deprecated: false + description: "" + operationId: getObject + parameters: + - description: bucket名称 + explode: false + in: path + name: bucket + required: true + schema: + type: string + style: simple + - description: 键 + explode: false + in: path + name: key + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 获取 Object 详情 + tags: + - Storage + x-apifox-folder: 管理 API/KV 存储 + x-apifox-status: testing + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-82073166-run + x-accepts: application/json + /v1/applications/{app_id}/accounts: + get: + deprecated: false + description: "" + operationId: getAccountsByApp + parameters: + - description: 应用id + explode: false + in: path + name: app_id + required: true + schema: + type: string + style: simple + - description: 用户id + explode: true + in: query + name: user_id + required: false + schema: + type: string + style: form + - description: 账号状态 1-活跃 0-冻结 + explode: true + in: query + name: acc_status + required: false + schema: + type: string + style: form + - description: 账号名称 + example: "" + explode: true + in: query + name: acc_name + required: false + schema: + type: string + style: form + - description: 页数 + explode: true + in: query + name: page_num + required: false + schema: + type: integer + style: form + - description: 页大小 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: 排序字段 + example: "time_created[asc]" + explode: true + in: query + name: page_sort + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getAccountsByApp_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 按 APP ID 查询应用子账号列表 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-116622678-run + x-accepts: application/json + /v1/application-accounts: + get: + deprecated: false + description: "" + operationId: getAccounts + parameters: + - description: 应用id + explode: true + in: query + name: app_id + required: false + schema: + type: string + style: form + - description: 用户id + explode: true + in: query + name: user_id + required: false + schema: + type: string + style: form + - description: 账号状态 1-活跃 0-冻结 + explode: true + in: query + name: acc_status + required: false + schema: + type: string + style: form + - description: 账号名称 + example: "" + explode: true + in: query + name: acc_name + required: false + schema: + type: string + style: form + - description: 页数 + explode: true + in: query + name: page_num + required: false + schema: + type: integer + style: form + - description: 页大小 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: 排序字段 + example: "time_created[asc]" + explode: true + in: query + name: page_sort + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getAccountsByApp_200_response' + description: 成功 + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/get_400_response' + description: 参数错误 + summary: 查询应用子账号列表 + tags: + - App + x-apifox-folder: 管理 API/应用 + x-apifox-status: released + x-run-in-apifox: https://apifox.com/web/project/1500707/apis/api-124695117-run + x-accepts: application/json +components: + schemas: + AppSubAccount: + example: + tenant_id: tenant_id + acc_source: acc_source + acc_status: acc_status + acc_password: acc_password + app_name: app_name + acc_name: acc_name + time_modified: time_modified + acc_name_displayed: acc_name_displayed + acc_sync_status: acc_sync_status + user_id: user_id + time_created: time_created + id: id + acc_prop: "{}" + app_id: app_id + developer_id: developer_id + username: username + properties: + id: + title: 账号id + type: string + user_id: + title: 用户id + type: string + username: + title: 账户名称 + type: string + app_id: + title: 应用id + type: string + app_name: + title: 应用名称 + type: string + acc_name: + type: string + acc_name_displayed: + type: string + acc_source: + type: string + developer_id: + type: string + tenant_id: + type: string + acc_password: + type: string + acc_status: + type: string + acc_sync_status: + type: string + acc_prop: + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + time_created: + type: string + time_modified: + type: string + required: + - acc_name + - acc_name_displayed + - acc_password + - acc_prop + - acc_source + - acc_status + - acc_sync_status + - app_id + - app_name + - developer_id + - id + - tenant_id + - time_created + - time_modified + - user_id + - username + title: 应用子账号 + type: object + x-apifox-orders: + - id + - user_id + - username + - app_id + - app_name + - acc_name + - acc_name_displayed + - acc_source + - developer_id + - tenant_id + - acc_password + - acc_status + - acc_sync_status + - acc_prop + - time_created + - time_modified + x-apifox-ignore-properties: [] + x-apifox-folder: 应用 + Job: + properties: + id: + title: 任务id + type: integer + cron_job_id: + title: 定时任务状态 + type: string + cron_job_kind: + title: 定时任务类型 + type: string + cron_job_name: + title: 定时任务名称 + type: string + namespace: + title: 任务分组 + type: string + name: + title: 任务名称 + type: string + start_time: + description: 任务开始执行时间,rfc3339格式 + title: 开始时间 + type: string + completion_time: + description: 任务结束执行时间,rfc3339格式 + title: 结束时间 + type: string + status: + description: |- + - running 执行中 + - failed 执行失败 + - success 执行成功 + title: 任务状态 + type: string + time_started: + description: rfc3339 + title: 任务开始时间 + type: string + time_completed: + description: rfc3339 + title: 任务完成时间 + type: string + time_created: + description: rfc3339 + title: 数据创建时间 + type: string + time_modified: + description: rfc3339 + title: 数据更新时间 + type: string + required: + - cron_job_id + - cron_job_kind + - cron_job_name + - id + - name + - namespace + - start_time + - status + - time_created + - time_modified + title: 任务 + type: object + x-apifox-orders: + - id + - cron_job_id + - cron_job_kind + - cron_job_name + - namespace + - name + - start_time + - completion_time + - status + - time_started + - time_completed + - time_created + - time_modified + x-apifox-ignore-properties: [] + x-apifox-folder: 定时任务 + Injection: + properties: + key: + title: 参数名 + type: string + alias: + description: 注入时的别名,为空则为 key + title: 别名 + type: string + value: + title: 参数值 + type: string + required: + - key + - value + title: 注入参数 + type: object + x-apifox-orders: + - key + - alias + - value + x-apifox-ignore-properties: [] + x-apifox-folder: 定时任务 + CronJob: + properties: + id: + title: 任务id + type: string + developer_id: + title: 开发者id + type: string + tenant_id: + title: 租户id + type: string + namespace: + description: 定时任务所属的命名空间,也可以当做分组 + title: 命名空间 + type: string + name: + title: 名称 + type: string + descr: + title: 描述 + type: string + tags: + items: + type: string + title: 标签 + type: array + config: + description: json raw + properties: {} + title: 配置 + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + kind: + title: 任务类型 + type: string + from: + title: 生效时间 + type: string + exec_frequency: + enum: + - monthly + - weekly + - daily + - hourly + - every_12_hour + - every_6_hour + - every_3_hour + - every_2_hour + - every_30_minute + title: 执行频率 + type: string + x-apifox: + enumDescriptions: + monthly: 每月 + weekly: 每周 + daily: 每天 + hourly: 每小时 + every_12_hour: 每12小时 + every_6_hour: 每6小时 + every_3_hour: 每3小时 + every_2_hour: 每2小时 + every_30_minute: 每30分钟 + exec_cmd: + title: 启动命令 + type: string + injections: + items: + $ref: '#/components/schemas/Injection' + title: 注入参数 + type: array + status: + description: |- + - running 运行中 + - suspended 挂起 + title: 任务状态 + type: string + time_created: + description: rfc3339 + title: 创建时间 + type: string + time_modified: + description: rfc3339 + title: 最近更新时间 + type: string + required: + - config + - developer_id + - from + - id + - kind + - name + - namespace + - status + - tags + - tenant_id + - time_created + - time_modified + title: 定时任务 + type: object + x-apifox-orders: + - id + - developer_id + - tenant_id + - namespace + - name + - descr + - tags + - config + - kind + - from + - exec_frequency + - exec_cmd + - injections + - status + - time_created + - time_modified + x-apifox-ignore-properties: [] + x-apifox-folder: 定时任务 + Object: + example: + bucket: bucket + updated_at: updated_at + created_at: created_at + value: value + key: key + properties: + bucket: + title: bucket名称 + type: string + key: + title: 键 + type: string + value: + title: 值 + type: string + updated_at: + description: rfc3339 + title: 更新时间 + type: string + created_at: + description: rfc3339 + title: 创建时间 + type: string + required: + - bucket + - created_at + - key + - updated_at + - value + title: 对象信息 + type: object + x-apifox-orders: + - bucket + - key + - value + - updated_at + - created_at + x-apifox-ignore-properties: [] + x-apifox-folder: kv + Bucket: + example: + bucket: bucket + data_size: 0 + object_count: 6 + properties: + bucket: + title: bucket名称 + type: string + data_size: + description: 单位:byte + title: 数据大小 + type: integer + object_count: + title: 对象数量 + type: integer + required: + - bucket + - data_size + - object_count + title: bucket信息 + type: object + x-apifox-orders: + - bucket + - data_size + - object_count + x-apifox-ignore-properties: [] + x-apifox-folder: kv + AuthzApp: + example: + tenant_id: tenant_id + time_modified: time_modified + access_url: access_url + name: name + access_policy: access_policy + logo: logo + time_created: time_created + enabled_protocols: + - enabled_protocols + - enabled_protocols + id: id + type: type + developer_id: developer_id + decr: decr + properties: + id: + title: "" + type: string + developer_id: + title: 开发者id + type: string + tenant_id: + title: 租户id + type: string + name: + title: 应用名称 + type: string + type: + description: |- + - 0 默认应用 + - 1 自建应用 + - 2 模板应用 + - 3 组件应用 + title: 应用类型 + type: string + access_policy: + title: 访问策略 + type: string + decr: + title: 应用描述 + type: string + logo: + description: base64编码 + title: 应用logo + type: string + access_url: + title: 访问地址 + type: string + enabled_protocols: + description: oidc/saml/sxp 等 + items: + type: string + title: 启用的协议 + type: array + time_modified: + description: rfc3339 + title: 修改时间 + type: string + time_created: + description: rfc3339 + title: 创建时间 + type: string + required: + - access_policy + - access_url + - developer_id + - id + - logo + - name + - tenant_id + - time_created + - time_modified + - type + title: 授权应用 + type: object + x-apifox-orders: + - id + - developer_id + - tenant_id + - name + - type + - access_policy + - decr + - logo + - access_url + - enabled_protocols + - time_modified + - time_created + x-apifox-ignore-properties: [] + x-apifox-folder: 权限 + tree_user: + description: 核心-树型对象(组织、角色等)用户关系表 + properties: + id: + description: 全局唯一ID + maxLength: 20 + minimum: 1 + type: string + developer_id: + description: 开发者ID + maxLength: 20 + type: string + tenant_id: + description: 租户ID + maxLength: 20 + type: string + node_id: + description: 节点ID + maxLength: 20 + type: string + user_id: + description: 用户ID + maxLength: 20 + type: string + path: + description: 所属组织关系路径 + type: string + display_name: + description: 显示名 + maxLength: 50 + type: string + username: + description: 用户名 + maxLength: 30 + type: string + relation_type: + description: 关联类型(用于区分多重关联) + maxLength: 5 + type: string + relation_data: + description: 关联扩展信息 + type: string + is_default: + description: 是否默认关系 + maxLength: 5 + type: string + time_created: + description: 创建时间 + format: date-time + type: string + time_modified: + description: 修改时间 + format: date-time + type: string + status: + description: 状态 + maxLength: 10 + type: string + required: + - developer_id + - display_name + - id + - node_id + - path + - status + - tenant_id + - time_created + - time_modified + - user_id + - username + title: tree_user + type: object + x-apifox-orders: + - id + - developer_id + - tenant_id + - node_id + - user_id + - path + - display_name + - username + - relation_type + - relation_data + - is_default + - time_created + - time_modified + - status + x-apifox-ignore-properties: [] + x-apifox-folder: tree + CoreObject: + properties: + id: + title: id + type: string + object_display_name: + title: 组织名称 + type: string + object_type: + description: ' 固定值:tree' + title: '组织类型 ' + type: string + object_code: + description: 唯一,不可改,外键关联引用 + title: 组织编码 + type: string + object_props: + title: 组织额外属性 + type: string + is_default: + description: 是否默认组织关系,1是,0否 + title: 是否默认组织关系 + type: string + status: + title: 状态 + type: string + developer_id: + title: 开发者ID + type: string + tenant_id: + title: 租户ID + type: string + time_created: + title: 创建时间 + type: string + time_modified: + title: 最后修改时间 + type: string + required: + - id + - object_code + - object_display_name + - object_type + type: object + x-apifox-orders: + - id + - object_display_name + - object_type + - object_code + - object_props + - is_default + - status + - developer_id + - tenant_id + - time_created + - time_modified + x-apifox-ignore-properties: [] + x-apifox-folder: tree + ResourceSetMember: + example: + tenant_id: tenant_id + resource_code: resource_code + resource_type: resource_type + is_global: true + match_all_resource_actions: true + application_id: application_id + time_modified: time_modified + application_name: application_name + resource_id: resource_id + resource_actions: + code: code + description: description + time_created: time_created + set_id: set_id + id: id + resource_scope: resource_scope + developer_id: developer_id + selected_resource_actions: + - selected_resource_actions + - selected_resource_actions + properties: + id: + title: 成员id + type: string + set_id: + title: 集合id + type: string + developer_id: + title: 开发者id + type: string + tenant_id: + title: 租户id + type: string + resource_id: + title: 资源id + type: string + application_id: + title: 应用id + type: string + application_name: + title: 应用名称 + type: string + is_global: + title: 是否为全局 + type: boolean + resource_type: + title: 资源类型 + type: string + resource_code: + title: 资源代码 + type: string + resource_scope: + title: 作用范围 + type: string + resource_actions: + $ref: '#/components/schemas/ResourceSetMember_resource_actions' + selected_resource_actions: + items: + type: string + title: 选中的操作列表 + type: array + match_all_resource_actions: + title: 匹配所有资源操作 + type: boolean + time_modified: + title: 更新时间 rfc3339 + type: string + time_created: + title: 创建时间 rfc3339 + type: string + required: + - match_all_resource_actions + title: 资源集合成员 + type: object + x-apifox-orders: + - id + - set_id + - developer_id + - tenant_id + - resource_id + - application_id + - application_name + - is_global + - resource_type + - resource_code + - resource_scope + - resource_actions + - selected_resource_actions + - match_all_resource_actions + - time_modified + - time_created + x-apifox-ignore-properties: [] + x-apifox-folder: 权限 + TreeNode: + example: + tenant_id: tenant_id + sys_code: sys_code + code: code + is_pointer: is_pointer + operator_id: operator_id + description: description + perm_namespace_arn: perm_namespace_arn + sys_ext_props: "{}" + pointer_id: pointer_id + time_modified: time_modified + condition: condition + parent_id: parent_id + name: name + is_dynamic: is_dynamic + time_created: time_created + object_code: object_code + id: id + tag: tag + free_ext_props: "{}" + arn: arn + developer_id: developer_id + seq: 0 + status: status + properties: + id: + description: 节点ID + title: 节点ID + type: string + developer_id: + description: 开发者ID + title: 开发者ID + type: string + tenant_id: + description: 租户ID + title: 租户ID + type: string + arn: + type: string + time_created: + description: 创建时间 + title: 创建时间 + type: string + tag: + description: 用于定义节点类型,目前支持:org(组织),role(角色),position(岗位),group(组) + title: 标签 + type: string + status: + description: 状态 + title: 状态 + type: string + is_pointer: + description: 是否指针类型 + title: 是否指针类型 + type: string + code: + description: 节点code + title: 节点code + type: string + name: + description: 节点名字 + title: 节点名字 + type: string + perm_namespace_arn: + description: 抽象权限容器的ARN + title: 抽象权限容器的ARN + type: string + condition: + type: string + is_dynamic: + description: 是否动态节点(0普通结点,1动态结点) + title: 是否动态节点(0普通结点,1动态结点) + type: string + sys_code: + description: 系统code + title: 系统code + type: string + operator_id: + description: 操作者id + title: 操作者id + type: string + pointer_id: + description: 指针指向的实体节点 + title: 指针指向的实体节点 + type: string + seq: + description: 序号 + title: 序号 + type: integer + description: + description: 描述 + title: 描述 + type: string + time_modified: + description: 最后修改时间 + title: 最后修改时间 + type: string + object_code: + description: OBJ_ID,组织,角色,岗位,职级等 + title: 节点类型 + type: string + parent_id: + description: 父节点id + title: 父节点id + type: string + sys_ext_props: + description: 额外属性,需要先定义schema + properties: {} + title: 额外属性 + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + free_ext_props: + description: 可以自由扩展 + properties: {} + title: 额外属性 + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + required: + - code + - name + - object_code + - sys_code + type: object + x-apifox-orders: + - id + - developer_id + - tenant_id + - arn + - time_created + - tag + - status + - is_pointer + - code + - name + - perm_namespace_arn + - condition + - is_dynamic + - sys_code + - operator_id + - pointer_id + - seq + - description + - time_modified + - object_code + - parent_id + - sys_ext_props + - free_ext_props + x-apifox-ignore-properties: [] + x-apifox-folder: tree + ResourceSet: + example: + time_modified: time_modified + application_name: application_name + code: code + is_global: true + description: description + time_created: time_created + id: id + application_id: application_id + properties: + id: + title: 集合id + type: string + application_id: + title: 应用id + type: string + application_name: + title: 应用名 + type: string + is_global: + title: 是否为全局 + type: boolean + code: + title: 集合代码 + type: string + description: + title: 集合描述 + type: string + time_modified: + title: 更新时间 rfc3339 + type: string + time_created: + title: 创建时间 rfc3339 + type: string + title: 资源集合 + type: object + x-apifox-orders: + - id + - application_id + - application_name + - is_global + - code + - description + - time_modified + - time_created + x-apifox-ignore-properties: [] + x-apifox-folder: 权限 + Au: + example: + code: code + resource: "{}" + identity_id: identity_id + affect: affect + resource_type: resource_type + identity_name: identity_name + description: description + resource_set: + time_modified: time_modified + application_name: application_name + code: code + members: + - tenant_id: tenant_id + resource_code: resource_code + resource_type: resource_type + is_global: true + match_all_resource_actions: true + application_id: application_id + time_modified: time_modified + application_name: application_name + resource_id: resource_id + resource_actions: + code: code + description: description + time_created: time_created + set_id: set_id + id: id + resource_scope: resource_scope + developer_id: developer_id + selected_resource_actions: + - selected_resource_actions + - selected_resource_actions + - tenant_id: tenant_id + resource_code: resource_code + resource_type: resource_type + is_global: true + match_all_resource_actions: true + application_id: application_id + time_modified: time_modified + application_name: application_name + resource_id: resource_id + resource_actions: + code: code + description: description + time_created: time_created + set_id: set_id + id: id + resource_scope: resource_scope + developer_id: developer_id + selected_resource_actions: + - selected_resource_actions + - selected_resource_actions + match_all_resources: true + is_global: true + description: description + time_created: time_created + id: id + application_id: application_id + application_name: application_name + inherited: true + auth_unit_id: auth_unit_id + id: id + identity_type: identity_type + properties: + id: + title: 规则id + type: string + auth_unit_id: + title: au id + type: string + resource: + properties: {} + title: 授权的资源 + type: object + resource_set: + $ref: '#/components/schemas/Au_resource_set' + affect: + description: allow/deny + title: 作用 + type: string + resource_type: + description: 当resource存在时 + title: 资源类型 + type: string + code: + description: |- + 当 resource 存在时表示 resource_code + + 当 resource_set存在时表示 resource_set_code + title: 代码 + type: string + description: + title: 描述 + type: string + application_name: + title: 应用名称 + type: string + identity_id: + title: 授权主体id + type: string + identity_type: + title: 授权主体类型 + type: string + identity_name: + title: 授权主体名称 + type: string + inherited: + title: 是否为继承权限 + type: boolean + required: + - affect + - application_name + - auth_unit_id + - code + - id + - identity_id + - identity_name + - identity_type + - inherited + type: object + x-apifox-orders: + - id + - auth_unit_id + - resource + - resource_set + - affect + - resource_type + - code + - description + - application_name + - identity_id + - identity_type + - identity_name + - inherited + x-apifox-ignore-properties: [] + x-apifox-folder: 权限 + AuthUnitResourceSet: + properties: + id: + title: 集合id + type: string + application_id: + title: 应用id + type: string + application_name: + title: 应用名 + type: string + is_global: + title: 是否为全局 + type: boolean + code: + title: 集合代码 + type: string + description: + title: 集合描述 + type: string + time_modified: + title: 更新时间 rfc3339 + type: string + time_created: + title: 创建时间 rfc3339 + type: string + members: + items: + $ref: '#/components/schemas/ResourceSetMember' + title: 资源集合成员 + type: array + match_all_resources: + title: 匹配所有资源 + type: boolean + title: 授权规则-资源集合 + type: object + x-apifox-refs: + "01GM5JSBCWH4GJZ55YRM77XNJY": + $ref: '#/components/schemas/ResourceSet' + x-apifox-overrides: {} + x-apifox-orders: + - 01GM5JSBCWH4GJZ55YRM77XNJY + - members + - match_all_resources + x-apifox-ignore-properties: + - id + - application_id + - application_name + - is_global + - code + - description + - time_modified + - time_created + x-apifox-folder: 权限 + AuthUnitResouce: + properties: + id: + title: 资源id + type: string + developer_id: + title: 开发者id + type: string + tenant_id: + title: 租户id + type: string + application_id: + title: 应用id + type: string + applicatioin_name: + title: 应用名称 + type: string + is_global: + title: 是否为全局 + type: boolean + description: + title: 描述 + type: string + type: + title: 类型 + type: string + code: + title: 代码 + type: string + uri: + title: uri + type: string + time_modified: + title: 修改时间 rfc3339 + type: string + time_created: + title: 创建时间 rfc3339 + type: string + scope: + title: 授权范围 + type: string + selected_actions: + items: + type: string + nullable: true + title: 选中的操作code列表 + type: array + match_all_actions: + nullable: true + title: 匹配所有操作 + type: boolean + match_all_resources: + nullable: true + title: 匹配所有资源 + type: boolean + required: + - applicatioin_name + - application_id + - code + - description + - developer_id + - id + - is_global + - scope + - tenant_id + - time_created + - time_modified + - type + title: 授权规则-资源 + type: object + x-apifox-refs: + "01GM5JMNJ5JCQ4K1TQVRA62TTB": + $ref: '#/components/schemas/Resource' + x-apifox-overrides: {} + x-apifox-orders: + - 01GM5JMNJ5JCQ4K1TQVRA62TTB + - scope + - selected_actions + - match_all_actions + - match_all_resources + x-apifox-ignore-properties: + - id + - developer_id + - tenant_id + - application_id + - applicatioin_name + - is_global + - description + - type + - code + - uri + - time_modified + - time_created + x-apifox-folder: 权限 + Resource: + properties: + id: + title: 资源id + type: string + developer_id: + title: 开发者id + type: string + tenant_id: + title: 租户id + type: string + application_id: + title: 应用id + type: string + applicatioin_name: + title: 应用名称 + type: string + is_global: + title: 是否为全局 + type: boolean + description: + title: 描述 + type: string + type: + title: 类型 + type: string + code: + title: 代码 + type: string + uri: + title: uri + type: string + time_modified: + title: 修改时间 rfc3339 + type: string + time_created: + title: 创建时间 rfc3339 + type: string + required: + - applicatioin_name + - application_id + - code + - description + - developer_id + - id + - is_global + - tenant_id + - time_created + - time_modified + - type + title: 资源 + type: object + x-apifox-orders: + - id + - developer_id + - tenant_id + - application_id + - applicatioin_name + - is_global + - description + - type + - code + - uri + - time_modified + - time_created + x-apifox-ignore-properties: [] + x-apifox-folder: 权限 + AuthRuleArg: + properties: + resource: + $ref: '#/components/schemas/empty_object_4_resource' + resource_set: + $ref: '#/components/schemas/empty_object_4_resource_set' + application: + $ref: '#/components/schemas/empty_object_4_application' + affect: + description: allow/deny + title: 生效 + type: string + owner_app_id: + description: 用于标识应用(尤其是在使用全局资源的场景下) + title: 应用id + type: string + required: + - affect + - owner_app_id + title: 授权规则参数 + type: object + x-apifox-orders: + - resource + - resource_set + - application + - affect + - owner_app_id + x-apifox-ignore-properties: [] + x-apifox-folder: 权限 + IdentityObj: + properties: + identity_id: + title: 实体id + type: string + identity_name: + title: 实体名称 + type: string + identity_type: + description: user 用户 ,programmer 编程者,node 组织/自定义关系 + title: 实体类型 + type: string + required: + - identity_id + - identity_name + - identity_type + title: 授权实体 + type: object + x-apifox-orders: + - identity_id + - identity_name + - identity_type + x-apifox-ignore-properties: [] + x-apifox-folder: 权限 + Privilege: + example: + time_modified: time_modified + affect_scope: affect_scope + identity_id: identity_id + object_type: object_type + affect: affect + auth_unit_rule_id: auth_unit_rule_id + time_created: time_created + object_code: object_code + id: 1.4658129805029452 + identity_type: identity_type + application_id: application_id + properties: + id: + type: number + identity_type: + title: 主体类型 + type: string + identity_id: + title: 主体id + type: string + auth_unit_rule_id: + title: 授权条目id + type: string + application_id: + title: 应用id + type: string + object_type: + title: 对象类型 + type: string + object_code: + title: 对象代码 + type: string + affect_scope: + title: 作用范围 + type: string + affect: + title: 作用 + type: string + time_created: + title: 创建时间 rfc3339 + type: string + time_modified: + title: 更新时间 rfc3339 + type: string + required: + - affect + - affect_scope + - application_id + - auth_unit_rule_id + - id + - identity_id + - identity_type + - object_code + - object_type + - time_created + - time_modified + title: 权限 + type: object + x-apifox-orders: + - id + - identity_type + - identity_id + - auth_unit_rule_id + - application_id + - object_type + - object_code + - affect_scope + - affect + - time_created + - time_modified + x-apifox-ignore-properties: [] + x-apifox-folder: 权限 + AuthUnit: + example: + time_modified: time_modified + identity_id: identity_id + identity_name: identity_name + time_created: time_created + rules: + - code: code + resource: "{}" + identity_id: identity_id + affect: affect + resource_type: resource_type + identity_name: identity_name + description: description + resource_set: + time_modified: time_modified + application_name: application_name + code: code + members: + - tenant_id: tenant_id + resource_code: resource_code + resource_type: resource_type + is_global: true + match_all_resource_actions: true + application_id: application_id + time_modified: time_modified + application_name: application_name + resource_id: resource_id + resource_actions: + code: code + description: description + time_created: time_created + set_id: set_id + id: id + resource_scope: resource_scope + developer_id: developer_id + selected_resource_actions: + - selected_resource_actions + - selected_resource_actions + - tenant_id: tenant_id + resource_code: resource_code + resource_type: resource_type + is_global: true + match_all_resource_actions: true + application_id: application_id + time_modified: time_modified + application_name: application_name + resource_id: resource_id + resource_actions: + code: code + description: description + time_created: time_created + set_id: set_id + id: id + resource_scope: resource_scope + developer_id: developer_id + selected_resource_actions: + - selected_resource_actions + - selected_resource_actions + match_all_resources: true + is_global: true + description: description + time_created: time_created + id: id + application_id: application_id + application_name: application_name + inherited: true + auth_unit_id: auth_unit_id + id: id + identity_type: identity_type + - code: code + resource: "{}" + identity_id: identity_id + affect: affect + resource_type: resource_type + identity_name: identity_name + description: description + resource_set: + time_modified: time_modified + application_name: application_name + code: code + members: + - tenant_id: tenant_id + resource_code: resource_code + resource_type: resource_type + is_global: true + match_all_resource_actions: true + application_id: application_id + time_modified: time_modified + application_name: application_name + resource_id: resource_id + resource_actions: + code: code + description: description + time_created: time_created + set_id: set_id + id: id + resource_scope: resource_scope + developer_id: developer_id + selected_resource_actions: + - selected_resource_actions + - selected_resource_actions + - tenant_id: tenant_id + resource_code: resource_code + resource_type: resource_type + is_global: true + match_all_resource_actions: true + application_id: application_id + time_modified: time_modified + application_name: application_name + resource_id: resource_id + resource_actions: + code: code + description: description + time_created: time_created + set_id: set_id + id: id + resource_scope: resource_scope + developer_id: developer_id + selected_resource_actions: + - selected_resource_actions + - selected_resource_actions + match_all_resources: true + is_global: true + description: description + time_created: time_created + id: id + application_id: application_id + application_name: application_name + inherited: true + auth_unit_id: auth_unit_id + id: id + identity_type: identity_type + id: id + identity_type: identity_type + properties: + id: + type: string + identity_id: + title: 实体id + type: string + identity_name: + title: 实体名称 + type: string + identity_type: + description: user 用户 ,programmer 编程者,node 组织/自定义关系 + title: 实体类型 + type: string + rules: + items: + $ref: '#/components/schemas/Au' + type: array + time_created: + type: string + time_modified: + type: string + required: + - id + - identity_id + - identity_name + - identity_type + - rules + - time_created + - time_modified + title: 授权单元 + type: object + x-apifox-refs: + "01GM5KEFTGBVMW86QJ45QB5BFK": + $ref: '#/components/schemas/IdentityObj' + x-apifox-overrides: {} + x-apifox-orders: + - id + - 01GM5KEFTGBVMW86QJ45QB5BFK + - rules + - time_created + - time_modified + x-apifox-ignore-properties: + - identity_id + - identity_name + - identity_type + x-apifox-folder: 权限 + AppProtocal: + example: {} + properties: {} + title: 应用协议 + type: object + x-apifox-ignore-properties: [] + x-apifox-orders: [] + x-apifox-folder: 应用 + AppDetail: + example: + tenant_id: tenant_id + type: type + domain_sn: domain_sn + descr: descr + logout_url: logout_url + time_modified: time_modified + login_url: login_url + domain: domain + prop: "{}" + name: name + logo: logo + time_created: time_created + id: id + category: category + protocols: + - {} + - {} + app_id: app_id + app_secret: app_secret + sub_account_policy: 0 + config: "{}" + developer_id: developer_id + redirect_url: redirect_url + status: status + properties: + id: + description: 唯一标识 + type: string + developer_id: + description: 开发者ID + type: string + tenant_id: + description: 租户ID + type: string + name: + description: 应用名称 + type: string + type: + description: 应用类型,1自建应用,2市场应用 + type: string + app_id: + description: APPID + type: string + category: + description: 应用分类,1 标准web应用,2单页web应用,3客户端应用,4后端服务 + type: string + app_secret: + description: APPSEC,开发者用户调用返回 + type: string + descr: + description: 应用描述 + type: string + logo: + description: logo路径 + type: string + login_url: + description: 登录路径 + type: string + domain: + description: 应用绑定的唯一域名 + type: string + domain_sn: + description: 应用域名 SN + type: string + redirect_url: + description: 重定向url + type: string + logout_url: + description: 登出url + type: string + sub_account_policy: + description: 子账号策略 + type: integer + prop: + description: 扩展属性 + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + time_created: + description: 创建时间 + type: string + time_modified: + description: 更新时间 + type: string + status: + description: 状态,1启用,0禁用 + type: string + config: + properties: {} + type: object + x-apifox-overrides: {} + protocols: + items: + $ref: '#/components/schemas/AppProtocal' + type: array + required: + - config + - developer_id + - tenant_id + title: 应用(单体查询) + type: object + x-apifox-overrides: {} + x-apifox-refs: {} + x-apifox-orders: + - id + - developer_id + - tenant_id + - name + - type + - app_id + - category + - app_secret + - descr + - logo + - login_url + - domain + - domain_sn + - redirect_url + - logout_url + - sub_account_policy + - prop + - time_created + - time_modified + - status + - config + - protocols + x-apifox-ignore-properties: [] + x-apifox-folder: 应用 + AppConfig: + properties: + id: + title: 唯一标识 + type: string + app_id: + title: 应用ID + type: string + allowed_login_method: + description: "格式为:[\"password\", \"vercode\"]" + title: 允许的登录方式 + type: string + default_login_method: + description: 格式为:password + title: 默认登录方式 + type: string + allowed_reg_method: + description: "格式为:[\"mobile\", \"email\"]" + title: 允许注册方式 + type: string + default_reg_method: + description: 格式为:mobile + title: 默认注册方式 + type: string + access_policy: + description: "permitted,all" + title: 应用级访问控制权限 + type: string + reg_policy: + title: 新用户注册策略 + type: string + allowed_id_provider: + $ref: '#/components/schemas/AppConfig_allowed_id_provider' + sso_enabled: + title: 是否允许SSO + type: boolean + mfa_enabled: + title: 是否开启MFA + type: boolean + mfa_config: + $ref: '#/components/schemas/___MFA__' + access_control_enabled: + title: 是否开启访问控制 + type: boolean + time_created: + title: 创建时间 + type: string + time_modified: + title: 修改时间 + type: string + status: + description: 1启用,0禁用 + title: 状态 + type: string + required: + - access_control_enabled + - app_id + - id + - mfa_enabled + - sso_enabled + - status + - time_created + - time_modified + title: 应用配置 + type: object + x-apifox-orders: + - id + - app_id + - allowed_login_method + - default_login_method + - allowed_reg_method + - default_reg_method + - access_policy + - reg_policy + - allowed_id_provider + - sso_enabled + - mfa_enabled + - mfa_config + - access_control_enabled + - time_created + - time_modified + - status + x-apifox-ignore-properties: [] + x-apifox-folder: 应用 + App: + properties: + id: + description: 唯一标识 + type: string + developer_id: + description: 开发者ID + type: string + tenant_id: + description: 租户ID + type: string + name: + description: 应用名称 + type: string + type: + description: 应用类型,1自建应用,2市场应用 + type: string + app_id: + description: APPID + type: string + category: + description: 应用分类,1 标准web应用,2单页web应用,3客户端应用,4后端服务 + type: string + app_secret: + description: APPSEC,开发者用户调用返回 + type: string + descr: + description: 应用描述 + type: string + logo: + description: logo路径 + type: string + login_url: + description: 登录路径 + type: string + domain: + description: 应用绑定的唯一域名 + type: string + redirect_url: + description: 重定向url + type: string + logout_url: + description: 登出url + type: string + sub_account_policy: + description: 子账号策略 + type: integer + prop: + description: 扩展属性 + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + time_created: + description: 创建时间 + type: string + time_modified: + description: 更新时间 + type: string + status: + description: 状态,1启用,0禁用 + type: string + required: + - developer_id + - tenant_id + title: 应用 + type: object + x-apifox-orders: + - id + - developer_id + - tenant_id + - name + - type + - app_id + - category + - app_secret + - descr + - logo + - login_url + - domain + - redirect_url + - logout_url + - sub_account_policy + - prop + - time_created + - time_modified + - status + x-apifox-ignore-properties: [] + x-apifox-folder: 应用 + get_200_response: + example: + tenant_id: 5.962133916683182 + firstname: firstname + cert_type: cert_type + gender: gender + last_login_time: last_login_time + password: password + user_type: user_type + id_provider_connection: 6.027456183070403 + nickname: nickname + time_created: time_created + id: 0.8008281904610115 + arn: arn + email: email + developer_id: 1.4658129805029452 + ext_prop: "{}" + mobile: mobile + work_title: work_title + display_name: display_name + lastname: lastname + realname: realname + cert_number: cert_number + time_modified: 5.637376656633329 + pinyin: pinyin + last_login_ipaddr: last_login_ipaddr + work_time: work_time + region: region + username: username + status: status + properties: + id: + description: 用户id标识 + type: number + username: + description: 用户名,唯一 + type: string + password: + description: 密码 + type: string + display_name: + description: 显示名称 + type: string + firstname: + description: 名 + type: string + lastname: + description: 姓 + type: string + realname: + description: 真实姓名 + type: string + pinyin: + description: 拼音 + type: string + nickname: + description: 昵称 + type: string + user_type: + description: 用户类型 + type: string + mobile: + description: 手机 + type: string + email: + description: 邮箱 + type: string + gender: + description: 性别 + type: string + cert_type: + description: 证件类型 + type: string + cert_number: + description: 证件号 + type: string + region: + description: 区域 + type: string + work_time: + description: 加入时间 + type: string + work_title: + description: 职位 + type: string + ext_prop: + description: "扩展信息,json对象{\"age\": 18, \"love\": \"足球\"}" + properties: {} + type: object + arn: + description: arn + type: string + id_provider_connection: + description: 身份源ID + type: number + developer_id: + description: 开发者id + type: number + tenant_id: + description: 租户id + type: number + last_login_ipaddr: + description: 上次登录IP + type: string + last_login_time: + description: 上次登录时间 + type: string + time_created: + description: 创建时间 + type: string + time_modified: + description: 修改时间 + type: number + status: + description: 状态:1正常,0禁用 + type: string + type: object + x-apifox-orders: + - id + - username + - password + - display_name + - firstname + - lastname + - realname + - pinyin + - nickname + - user_type + - mobile + - email + - gender + - cert_type + - cert_number + - region + - work_time + - work_title + - ext_prop + - arn + - id_provider_connection + - developer_id + - tenant_id + - last_login_ipaddr + - last_login_time + - time_created + - time_modified + - status + x-apifox-ignore-properties: [] + get_400_response: + properties: + code: + type: integer + errno: + type: integer + message: + type: string + required: + - code + - errno + - message + type: object + x-apifox-orders: + - code + - errno + - message + delete_200_response: + example: + errno: 6.027456183070403 + code: 0.8008281904610115 + data: 1.4658129805029452 + message: message + properties: + code: + description: http状态码,成功不显示 + type: number + errno: + description: 返回错误码 + type: number + message: + description: 返回描述 + type: string + data: + description: 用户id + type: number + required: + - data + - errno + - message + type: object + x-apifox-orders: + - code + - errno + - message + - data + x-apifox-ignore-properties: [] + modify_request: + properties: + username: + description: 用户名,验证唯一 + type: string + display_name: + description: 显示名称 + type: string + firstname: + description: 名 + type: string + lastname: + description: 姓 + type: string + realname: + description: 真实姓名 + type: string + pinyin: + description: 拼音 + type: string + nickname: + description: 昵称 + type: string + mobile: + description: 手机 + type: string + email: + description: 邮箱 + type: string + gender: + description: 性别:1男,0女 + type: string + cert_type: + description: 证件类型 + type: string + cert_number: + description: 证件号 + type: string + region: + description: 区域 + type: string + work_time: + description: 加入时间 + type: string + work_title: + description: 职位 + type: string + last_login_ipaddr: + description: 上次登录IP + type: string + last_login_time: + description: 上次登录时间 + type: string + sys_ext_props: + description: "系统扩展信息,json对象{\"age\": 18, \"love\": \"足球\"}" + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + free_ext_props: + description: 自由扩展属性,json对象 + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + type: object + x-apifox-orders: + - username + - display_name + - firstname + - lastname + - realname + - pinyin + - nickname + - mobile + - email + - gender + - cert_type + - cert_number + - region + - work_time + - work_title + - last_login_ipaddr + - last_login_time + - sys_ext_props + - free_ext_props + x-apifox-ignore-properties: [] + modify_200_response: + example: + errno: 6.027456183070403 + code: 0.8008281904610115 + data: "{}" + message: message + properties: + code: + description: http状态码,成功不显示 + type: number + errno: + description: 返回错误码 + type: number + message: + description: 返回描述 + type: string + data: + description: 返回用户id + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + required: + - data + - errno + - message + type: object + x-apifox-orders: + - code + - errno + - message + - data + x-apifox-ignore-properties: [] + list_200_response_data_inner: + example: + tenant_id: 5.962133916683182 + firstname: firstname + cert_type: cert_type + gender: gender + last_login_time: last_login_time + password: password + user_type: user_type + id_provider_connection: 6.027456183070403 + nickname: nickname + time_created: time_created + id: 0.8008281904610115 + arn: arn + email: email + developer_id: 1.4658129805029452 + ext_prop: "{}" + mobile: mobile + work_title: work_title + display_name: display_name + lastname: lastname + realname: realname + cert_number: cert_number + time_modified: time_modified + pinyin: pinyin + last_login_ipaddr: last_login_ipaddr + work_time: work_time + region: region + username: username + status: status + properties: + id: + description: 用户id标识 + type: number + username: + description: 用户名,唯一 + type: string + password: + description: 密码 + type: string + display_name: + description: 显示名称 + type: string + firstname: + description: 名 + type: string + lastname: + description: 姓 + type: string + realname: + description: 真实姓名 + type: string + pinyin: + description: 拼音 + type: string + nickname: + description: 昵称 + type: string + user_type: + description: 用户类型 + type: string + mobile: + description: 手机 + type: string + email: + description: 邮箱 + type: string + gender: + description: 性别 + type: string + cert_type: + description: 证件类型 + type: string + cert_number: + description: 证件号 + type: string + region: + description: 区域 + type: string + work_time: + description: 加入时间 + type: string + work_title: + description: 职位 + type: string + ext_prop: + description: "扩展信息,json对象{\"age\": 18, \"love\": \"足球\"}" + properties: {} + type: object + arn: + description: arn + type: string + id_provider_connection: + description: 身份源ID + type: number + developer_id: + description: 开发者id + type: number + tenant_id: + description: 租户id + type: number + last_login_ipaddr: + description: 上次登录IP + type: string + last_login_time: + description: 上次登录时间 + type: string + time_created: + description: 创建时间 + type: string + time_modified: + description: 修改时间 + type: string + status: + description: 状态:1正常,0禁用 + type: string + required: + - id_provider_connection + - password + - status + - user_type + - username + type: object + x-apifox-orders: + - id + - username + - password + - display_name + - firstname + - lastname + - realname + - pinyin + - nickname + - user_type + - mobile + - email + - gender + - cert_type + - cert_number + - region + - work_time + - work_title + - ext_prop + - arn + - id_provider_connection + - developer_id + - tenant_id + - last_login_ipaddr + - last_login_time + - time_created + - time_modified + - status + x-apifox-ignore-properties: [] + list_200_response: + example: + data: + - tenant_id: 5.962133916683182 + firstname: firstname + cert_type: cert_type + gender: gender + last_login_time: last_login_time + password: password + user_type: user_type + id_provider_connection: 6.027456183070403 + nickname: nickname + time_created: time_created + id: 0.8008281904610115 + arn: arn + email: email + developer_id: 1.4658129805029452 + ext_prop: "{}" + mobile: mobile + work_title: work_title + display_name: display_name + lastname: lastname + realname: realname + cert_number: cert_number + time_modified: time_modified + pinyin: pinyin + last_login_ipaddr: last_login_ipaddr + work_time: work_time + region: region + username: username + status: status + - tenant_id: 5.962133916683182 + firstname: firstname + cert_type: cert_type + gender: gender + last_login_time: last_login_time + password: password + user_type: user_type + id_provider_connection: 6.027456183070403 + nickname: nickname + time_created: time_created + id: 0.8008281904610115 + arn: arn + email: email + developer_id: 1.4658129805029452 + ext_prop: "{}" + mobile: mobile + work_title: work_title + display_name: display_name + lastname: lastname + realname: realname + cert_number: cert_number + time_modified: time_modified + pinyin: pinyin + last_login_ipaddr: last_login_ipaddr + work_time: work_time + region: region + username: username + status: status + total_num: 5.637376656633329 + page_num: 2.3021358869347655 + properties: + data: + description: 返回用户列表 + items: + $ref: '#/components/schemas/list_200_response_data_inner' + type: array + total_num: + description: 总数 + type: number + page_num: + description: 当前页 + type: number + type: object + x-apifox-orders: + - data + - total_num + - page_num + x-apifox-ignore-properties: [] + create_request: + properties: + username: + description: 用户名,唯一,不传后台自动生成 + type: string + password: + description: 密码,不传后台生成默认密码 + type: string + password_status: + description: 密码状态(valid/invalid) + type: string + display_name: + description: 显示名称 + type: string + firstname: + description: 名 + type: string + lastname: + description: 姓 + type: string + realname: + description: 真实姓名 + type: string + pinyin: + description: 拼音 + type: string + nickname: + description: 昵称 + type: string + user_type: + description: 用户类型,不传后台设置系统默认类型 + type: string + mobile: + description: 手机 + type: string + email: + description: 邮箱 + type: string + gender: + description: 性别 + type: string + cert_type: + description: 证件类型 + type: string + cert_number: + description: 证件号 + type: string + region: + description: 区域 + type: string + work_time: + description: 加入时间 + type: string + work_title: + description: 职位 + type: string + idp_config_id: + description: 身份源ID,作为创建时记录,不做更新 + type: number + sys_ext_props: + description: "系统扩展属性,json对象{\"age\": 18, \"love\": \"足球\"}" + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + free_ext_props: + description: 自由扩展属性,json对象 + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + is_notify: + description: 是否通知:默认不传false不通知,true通知 + type: boolean + required: + - idp_config_id + type: object + x-apifox-orders: + - username + - password + - password_status + - display_name + - firstname + - lastname + - realname + - pinyin + - nickname + - user_type + - mobile + - email + - gender + - cert_type + - cert_number + - region + - work_time + - work_title + - idp_config_id + - sys_ext_props + - free_ext_props + - is_notify + x-apifox-ignore-properties: [] + _____null_inner: + example: + tenant_id: 5 + firstname: firstname + cert_type: cert_type + gender: gender + last_login_time: last_login_time + sys_ext_props: "{}" + idp_config_id: 6 + password: password + user_type: user_type + nickname: nickname + time_created: time_created + id: 0 + free_ext_props: "{}" + arn: arn + email: email + developer_id: 1 + mobile: mobile + work_title: work_title + avatar: "{}" + display_name: display_name + lastname: lastname + realname: realname + cert_number: cert_number + time_modified: 5 + pinyin: pinyin + last_login_ipaddr: last_login_ipaddr + work_time: work_time + region: region + username: username + status: status + properties: + id: + title: 用户id + type: integer + username: + title: 用户名 + type: string + password: + title: 密码 + type: string + display_name: + title: 显示名 + type: string + firstname: + title: 名 + type: string + lastname: + title: 姓 + type: string + realname: + title: 真实姓名 + type: string + pinyin: + title: 拼音 + type: string + nickname: + title: 昵称 + type: string + avatar: + description: json对象 + properties: {} + title: 头像 + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + user_type: + title: 用户类型 + type: string + mobile: + title: 手机 + type: string + email: + title: 邮箱 + type: string + gender: + title: 性别 + type: string + cert_type: + title: 证件类型 + type: string + cert_number: + title: 证件号 + type: string + region: + title: 区域 + type: string + work_time: + title: 加入时间 + type: string + work_title: + title: 职位 + type: string + arn: + title: ARN + type: string + idp_config_id: + title: 身份源 + type: integer + developer_id: + title: 开发者 + type: integer + tenant_id: + title: 租户 + type: integer + last_login_ipaddr: + title: 上次登录IP + type: string + last_login_time: + title: 上次登录时间 + type: string + time_created: + title: 创建时间 + type: string + time_modified: + title: 更新时间 + type: integer + status: + title: 状态 + type: string + sys_ext_props: + description: json对象 + properties: {} + required: + - 01HF94J4MK0QYT0D1X8YKBXB5B + title: 系统扩展属性 + type: object + x-apifox-orders: + - 01HF94J4MK0QYT0D1X8YKBXB5B + x-apifox-ignore-properties: [] + free_ext_props: + description: json对象 + properties: {} + title: 自由扩展属性 + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + type: object + x-apifox-orders: + - id + - username + - password + - display_name + - firstname + - lastname + - realname + - pinyin + - nickname + - avatar + - user_type + - mobile + - email + - gender + - cert_type + - cert_number + - region + - work_time + - work_title + - arn + - idp_config_id + - developer_id + - tenant_id + - last_login_ipaddr + - last_login_time + - time_created + - time_modified + - status + - sys_ext_props + - free_ext_props + x-apifox-ignore-properties: [] + getStoredCredentials_200_response: + example: + data: + - tenant_id: 5 + firstname: firstname + cert_type: cert_type + gender: gender + last_login_time: last_login_time + sys_ext_props: "{}" + idp_config_id: 6 + password: password + user_type: user_type + nickname: nickname + time_created: time_created + id: 0 + free_ext_props: "{}" + arn: arn + email: email + developer_id: 1 + mobile: mobile + work_title: work_title + avatar: "{}" + display_name: display_name + lastname: lastname + realname: realname + cert_number: cert_number + time_modified: 5 + pinyin: pinyin + last_login_ipaddr: last_login_ipaddr + work_time: work_time + region: region + username: username + status: status + - tenant_id: 5 + firstname: firstname + cert_type: cert_type + gender: gender + last_login_time: last_login_time + sys_ext_props: "{}" + idp_config_id: 6 + password: password + user_type: user_type + nickname: nickname + time_created: time_created + id: 0 + free_ext_props: "{}" + arn: arn + email: email + developer_id: 1 + mobile: mobile + work_title: work_title + avatar: "{}" + display_name: display_name + lastname: lastname + realname: realname + cert_number: cert_number + time_modified: 5 + pinyin: pinyin + last_login_ipaddr: last_login_ipaddr + work_time: work_time + region: region + username: username + status: status + total_num: 2 + page_num: 7 + properties: + data: + items: + $ref: '#/components/schemas/_____null_inner' + title: 无数据返回null + type: array + total_num: + title: 无数据返回0 + type: integer + page_num: + title: 无数据返回0 + type: integer + required: + - data + - page_num + - total_num + type: object + x-apifox-orders: + - data + - total_num + - page_num + x-apifox-ignore-properties: [] + createStoreCredential_request: + properties: + provider_code: + description: 社会化身份源code + type: string + idp_config_id: + description: 社会化登录配置的ID + type: number + id1: + description: 社会化身份标识1,如openid + type: string + id2: + description: 社会化身份标识2,如unionid + type: string + metadata: + description: 更多社会化身份标识 + type: string + status: + description: 状态 + type: string + nickname: + description: 昵称 + type: string + avatar: + description: 头像 + type: string + realname: + description: 真实姓名 + type: string + mobile: + description: 手机 + type: string + email: + description: 邮箱 + type: string + gender: + description: 性别 + type: string + id_provider_connection: + type: string + required: + - id1 + - idp_config_id + - provider_code + type: object + x-apifox-orders: + - provider_code + - idp_config_id + - id1 + - id2 + - metadata + - status + - nickname + - avatar + - realname + - mobile + - email + - gender + - id_provider_connection + x-apifox-ignore-properties: [] + createStoreCredential_200_response: + example: + errno: 6.027456183070403 + code: 0.8008281904610115 + data: data + message: message + properties: + code: + description: http状态码,成功不显示 + type: number + errno: + description: 返回错误码 + type: number + message: + description: 返回描述 + type: string + data: + description: 返回id标识 + type: string + required: + - errno + - message + type: object + x-apifox-orders: + - code + - errno + - message + - data + x-apifox-ignore-properties: [] + delete_200_response_1: + example: + data: "{}" + message: message + properties: + message: + type: string + data: + description: 结果标识true/false + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + type: object + x-apifox-orders: + - message + - data + x-apifox-ignore-properties: [] + modify_request_1: + properties: + name: + title: 应用名称 + type: string + domain_sn: + title: 应用 Domain SN + type: string + type: + description: 1自建应用,2市场应用 + title: 应用类型 + type: string + app_id: + title: 应用key + type: string + app_secret: + title: 应用secret + type: string + category: + title: 应用分类 + type: string + descr: + title: 应用描述 + type: string + logo: + title: logo路径 + type: string + login_url: + title: 登录路径 + type: string + redirect_url: + title: 重定向路径 + type: string + logout_url: + title: 登出路径 + type: string + sub_account_policy: + title: 子账号策略 + type: string + sys_ext_props: + properties: {} + title: 系统扩展属性 + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + free_ext_props: + properties: {} + title: 自定义扩展属性 + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + status: + description: 状态,0禁用,1启用 + type: string + type: object + x-apifox-orders: + - name + - domain_sn + - type + - app_id + - app_secret + - category + - descr + - logo + - login_url + - redirect_url + - logout_url + - sub_account_policy + - sys_ext_props + - free_ext_props + - status + x-apifox-ignore-properties: [] + modify_200_response_1: + example: + data: 0.8008281904610115 + message: message + properties: + message: + type: string + data: + type: number + type: object + x-apifox-orders: + - message + - data + x-apifox-ignore-properties: [] + list_200_response_1_data_inner_allowed_provider_id_inner: + example: + provider_type: provider_type + config_id: config_id + name: name + properties: + config_id: + title: 配置id + type: string + name: + title: 配置名 + type: string + provider_type: + title: 提供者类型 + type: string + required: + - config_id + - name + - provider_type + type: object + x-apifox-orders: + - config_id + - name + - provider_type + x-apifox-ignore-properties: [] + list_200_response_1_data_inner: + example: + tenant_id: tenant_id + type: type + descr: descr + logout_url: logout_url + time_modified: time_modified + login_url: login_url + domain: domain + prop: "{}" + name: name + logo: logo + time_created: time_created + id: id + category: category + app_id: app_id + app_secret: app_secret + sub_account_policy: 0 + developer_id: developer_id + redirect_url: redirect_url + status: status + allowed_provider_id: + - provider_type: provider_type + config_id: config_id + name: name + - provider_type: provider_type + config_id: config_id + name: name + properties: + id: + description: 唯一标识 + type: string + developer_id: + description: 开发者ID + type: string + tenant_id: + description: 租户ID + type: string + name: + description: 应用名称 + type: string + type: + description: 应用类型,1自建应用,2市场应用 + type: string + app_id: + description: APPID + type: string + category: + description: 应用分类,1 标准web应用,2单页web应用,3客户端应用,4后端服务 + type: string + app_secret: + description: APPSEC,开发者用户调用返回 + type: string + descr: + description: 应用描述 + type: string + logo: + description: logo路径 + type: string + login_url: + description: 登录路径 + type: string + domain: + description: 应用绑定的唯一域名 + type: string + redirect_url: + description: 重定向url + type: string + logout_url: + description: 登出url + type: string + sub_account_policy: + description: 子账号策略 + type: integer + prop: + description: 扩展属性 + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + time_created: + description: 创建时间 + type: string + time_modified: + description: 更新时间 + type: string + status: + description: 状态,1启用,0禁用 + type: string + allowed_provider_id: + items: + $ref: '#/components/schemas/list_200_response_1_data_inner_allowed_provider_id_inner' + type: array + required: + - developer_id + - tenant_id + type: object + x-apifox-overrides: {} + x-apifox-refs: + "01GH8CB5VBK04ME1BCMZ8M487H": + $ref: '#/components/schemas/App' + x-apifox-overrides: {} + x-apifox-orders: + - 01GH8CB5VBK04ME1BCMZ8M487H + - allowed_provider_id + x-apifox-ignore-properties: + - id + - developer_id + - tenant_id + - name + - type + - app_id + - category + - app_secret + - descr + - logo + - login_url + - domain + - redirect_url + - logout_url + - sub_account_policy + - prop + - time_created + - time_modified + - status + list_200_response_1: + example: + data: + - tenant_id: tenant_id + type: type + descr: descr + logout_url: logout_url + time_modified: time_modified + login_url: login_url + domain: domain + prop: "{}" + name: name + logo: logo + time_created: time_created + id: id + category: category + app_id: app_id + app_secret: app_secret + sub_account_policy: 0 + developer_id: developer_id + redirect_url: redirect_url + status: status + allowed_provider_id: + - provider_type: provider_type + config_id: config_id + name: name + - provider_type: provider_type + config_id: config_id + name: name + - tenant_id: tenant_id + type: type + descr: descr + logout_url: logout_url + time_modified: time_modified + login_url: login_url + domain: domain + prop: "{}" + name: name + logo: logo + time_created: time_created + id: id + category: category + app_id: app_id + app_secret: app_secret + sub_account_policy: 0 + developer_id: developer_id + redirect_url: redirect_url + status: status + allowed_provider_id: + - provider_type: provider_type + config_id: config_id + name: name + - provider_type: provider_type + config_id: config_id + name: name + total_num: 6.027456183070403 + current_page: 1.4658129805029452 + properties: + data: + items: + $ref: '#/components/schemas/list_200_response_1_data_inner' + type: array + total_num: + type: number + current_page: + type: number + type: object + x-apifox-orders: + - data + - total_num + - current_page + x-apifox-ignore-properties: [] + create_request_1_protocol_prop_response_attr_inner: + example: + nameFormat: nameFormat + attribute: attribute + value: value + properties: + value: + type: string + attribute: + type: string + nameFormat: + type: string + required: + - attribute + - nameFormat + - value + type: object + x-apifox-orders: + - value + - attribute + - nameFormat + x-apifox-ignore-properties: [] + create_request_1_protocol_prop: + description: 默认 oidc 相关配置 + properties: + acs_url: + type: string + sp_entity: + type: string + response_attr: + items: + $ref: '#/components/schemas/create_request_1_protocol_prop_response_attr_inner' + type: array + digest_algorithm: + type: string + lifetime_in_seconds: + type: number + signature_algorithm: + type: string + name_identifier_format: + type: string + authn_context_class_ref: + type: string + saml_response_signing_key: + type: string + saml_response_signing_cert: + type: string + saml_response_signing_cert_fingerprint: + type: string + title: 认证协议配置 + type: object + x-apifox-orders: + - acs_url + - sp_entity + - response_attr + - digest_algorithm + - lifetime_in_seconds + - signature_algorithm + - name_identifier_format + - authn_context_class_ref + - saml_response_signing_key + - saml_response_signing_cert + - saml_response_signing_cert_fingerprint + x-apifox-ignore-properties: [] + create_request_1_config_prop_access_policy: + example: + forget_password: + - forget_password + - forget_password + properties: + forget_password: + items: + type: string + type: array + type: object + x-apifox-orders: + - forget_password + x-apifox-ignore-properties: [] + create_request_1_config_prop_allowed_login_method: + example: + name: name + properties: + name: + type: string + type: object + x-apifox-orders: + - name + x-apifox-ignore-properties: [] + create_request_1_config_prop_allowed_social_login_provider: + example: + wechat_scan_qr: 5.962133916683182 + dingding_scan_qr: 5.637376656633329 + properties: + wechat_scan_qr: + type: number + dingding_scan_qr: + type: number + type: object + x-apifox-orders: + - wechat_scan_qr + - dingding_scan_qr + x-apifox-ignore-properties: [] + create_request_1_config_prop: + properties: + status: + type: string + tenant_id: + type: string + mfa_config: + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + reg_policy: + items: + type: string + type: array + mfa_enabled: + type: string + sso_enabled: + type: string + developer_id: + type: string + access_policy: + $ref: '#/components/schemas/create_request_1_config_prop_access_policy' + allowed_reg_method: + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + default_reg_method: + type: string + allowed_login_method: + $ref: '#/components/schemas/create_request_1_config_prop_allowed_login_method' + default_login_method: + type: string + allowed_social_login_provider: + $ref: '#/components/schemas/create_request_1_config_prop_allowed_social_login_provider' + title: 应用配置 + type: object + x-apifox-orders: + - status + - tenant_id + - mfa_config + - reg_policy + - mfa_enabled + - sso_enabled + - developer_id + - access_policy + - allowed_reg_method + - default_reg_method + - allowed_login_method + - default_login_method + - allowed_social_login_provider + x-apifox-ignore-properties: [] + create_request_1: + properties: + name: + title: 应用名称 + type: string + type: + description: 1,自建应用,2模板应用(市场应用) + title: 应用类型 + type: string + domain_sn: + description: 域名 + type: string + template_id: + description: 不填写则代表自建应用 + title: 模板id + type: string + category: + description: 1 标准web应用,2单页web应用,3客户端应用,4后端服务 + title: 应用分类 + type: string + descr: + title: 应用描述 + type: string + logo: + description: 格式为:http://ip:port/logo.png + title: logo路径 + type: string + login_url: + title: 登录路径 + type: string + redirect_url: + title: 重定向路径 + type: string + logout_url: + title: 登出路径 + type: string + sub_account_policy: + description: 1启用,0不启用,启用后单点登录返回 + title: 子账号策略 + type: string + sys_ext_props: + description: kv字典数据 + properties: {} + title: 系统扩展字段 + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + free_ext_props: + description: kv字典数据 + properties: {} + title: 自定义扩展属性 + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + protocol_type: + description: 默认 oidc + title: 认证协议 + type: string + protocol_prop: + $ref: '#/components/schemas/create_request_1_protocol_prop' + config_prop: + $ref: '#/components/schemas/create_request_1_config_prop' + required: + - category + - domain_sn + - free_ext_props + - name + - type + type: object + x-apifox-orders: + - name + - type + - domain_sn + - template_id + - category + - descr + - logo + - login_url + - redirect_url + - logout_url + - sub_account_policy + - sys_ext_props + - free_ext_props + - protocol_type + - protocol_prop + - config_prop + x-apifox-ignore-properties: [] + create_200_response: + example: + id: id + properties: + id: + description: 唯一标识 + type: string + type: object + x-apifox-orders: + - id + x-apifox-ignore-properties: [] + getTemplate_200_response_data_inner_protocol_prop: + description: 单点登录协议属性 + example: + digest_algorithm: digest_algorithm + authn_context_class_ref: authn_context_class_ref + lifetime_in_seconds: 6.027456183070403 + response_attr: + - nameFormat: nameFormat + attribute: attribute + value: value + - nameFormat: nameFormat + attribute: attribute + value: value + saml_response_signing_key: saml_response_signing_key + signature_algorithm: signature_algorithm + sp_entity: sp_entity + name_identifier_format: name_identifier_format + saml_response_signing_cert_fingerprint: saml_response_signing_cert_fingerprint + saml_response_signing_cert: saml_response_signing_cert + acs_url: acs_url + properties: + acs_url: + type: string + sp_entity: + type: string + response_attr: + items: + $ref: '#/components/schemas/create_request_1_protocol_prop_response_attr_inner' + type: array + digest_algorithm: + type: string + lifetime_in_seconds: + type: number + signature_algorithm: + type: string + name_identifier_format: + type: string + authn_context_class_ref: + type: string + saml_response_signing_key: + type: string + saml_response_signing_cert: + type: string + saml_response_signing_cert_fingerprint: + type: string + type: object + x-apifox-orders: + - acs_url + - sp_entity + - response_attr + - digest_algorithm + - lifetime_in_seconds + - signature_algorithm + - name_identifier_format + - authn_context_class_ref + - saml_response_signing_key + - saml_response_signing_cert + - saml_response_signing_cert_fingerprint + x-apifox-ignore-properties: [] + getTemplate_200_response_data_inner_config_prop: + description: 应用配置属性 + example: + tenant_id: tenant_id + default_login_method: default_login_method + access_policy: + forget_password: + - forget_password + - forget_password + default_reg_method: default_reg_method + allowed_reg_method: "{}" + mfa_config: "{}" + sso_enabled: sso_enabled + reg_policy: 1.4658129805029452 + allowed_login_method: + name: name + mfa_enabled: mfa_enabled + allowed_id_provider: + wechat_scan_qr: 5.962133916683182 + dingding_scan_qr: 5.637376656633329 + developer_id: developer_id + status: status + properties: + status: + type: string + tenant_id: + type: string + mfa_config: + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + reg_policy: + type: number + mfa_enabled: + type: string + sso_enabled: + type: string + developer_id: + type: string + access_policy: + $ref: '#/components/schemas/create_request_1_config_prop_access_policy' + allowed_reg_method: + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + default_reg_method: + type: string + allowed_login_method: + $ref: '#/components/schemas/create_request_1_config_prop_allowed_login_method' + default_login_method: + type: string + allowed_id_provider: + $ref: '#/components/schemas/create_request_1_config_prop_allowed_social_login_provider' + type: object + x-apifox-orders: + - status + - tenant_id + - mfa_config + - reg_policy + - mfa_enabled + - sso_enabled + - developer_id + - access_policy + - allowed_reg_method + - default_reg_method + - allowed_login_method + - default_login_method + - allowed_id_provider + x-apifox-ignore-properties: [] + getTemplate_200_response_data_inner: + example: + protocol_prop: + digest_algorithm: digest_algorithm + authn_context_class_ref: authn_context_class_ref + lifetime_in_seconds: 6.027456183070403 + response_attr: + - nameFormat: nameFormat + attribute: attribute + value: value + - nameFormat: nameFormat + attribute: attribute + value: value + saml_response_signing_key: saml_response_signing_key + signature_algorithm: signature_algorithm + sp_entity: sp_entity + name_identifier_format: name_identifier_format + saml_response_signing_cert_fingerprint: saml_response_signing_cert_fingerprint + saml_response_signing_cert: saml_response_signing_cert + acs_url: acs_url + config_prop: + tenant_id: tenant_id + default_login_method: default_login_method + access_policy: + forget_password: + - forget_password + - forget_password + default_reg_method: default_reg_method + allowed_reg_method: "{}" + mfa_config: "{}" + sso_enabled: sso_enabled + reg_policy: 1.4658129805029452 + allowed_login_method: + name: name + mfa_enabled: mfa_enabled + allowed_id_provider: + wechat_scan_qr: 5.962133916683182 + dingding_scan_qr: 5.637376656633329 + developer_id: developer_id + status: status + type: type + descr: descr + logout_url: logout_url + time_modified: time_modified + login_url: login_url + prop: "{}" + name: name + logo: logo + time_created: time_created + id: id + category: category + sub_account_policy: sub_account_policy + redirect_url: redirect_url + status: status + properties: + id: + description: 唯一标识 + type: string + name: + description: 应用名称 + type: string + type: + description: 应用类型,1自建应用,2市场应用 + type: string + category: + description: 应用分类 + type: string + descr: + description: 应用描述 + type: string + logo: + description: logo路径 + type: string + login_url: + description: 登录路径 + type: string + redirect_url: + description: 重定向路径 + type: string + logout_url: + description: 登出路径 + type: string + sub_account_policy: + description: 子账号策略,1启用,2不启用 + type: string + prop: + description: 扩展属性 + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + protocol_prop: + $ref: '#/components/schemas/getTemplate_200_response_data_inner_protocol_prop' + config_prop: + $ref: '#/components/schemas/getTemplate_200_response_data_inner_config_prop' + time_created: + description: 创建事件 + type: string + time_modified: + type: string + status: + type: string + type: object + x-apifox-orders: + - id + - name + - type + - category + - descr + - logo + - login_url + - redirect_url + - logout_url + - sub_account_policy + - prop + - protocol_prop + - config_prop + - time_created + - time_modified + - status + x-apifox-ignore-properties: [] + getTemplate_200_response: + example: + data: + - protocol_prop: + digest_algorithm: digest_algorithm + authn_context_class_ref: authn_context_class_ref + lifetime_in_seconds: 6.027456183070403 + response_attr: + - nameFormat: nameFormat + attribute: attribute + value: value + - nameFormat: nameFormat + attribute: attribute + value: value + saml_response_signing_key: saml_response_signing_key + signature_algorithm: signature_algorithm + sp_entity: sp_entity + name_identifier_format: name_identifier_format + saml_response_signing_cert_fingerprint: saml_response_signing_cert_fingerprint + saml_response_signing_cert: saml_response_signing_cert + acs_url: acs_url + config_prop: + tenant_id: tenant_id + default_login_method: default_login_method + access_policy: + forget_password: + - forget_password + - forget_password + default_reg_method: default_reg_method + allowed_reg_method: "{}" + mfa_config: "{}" + sso_enabled: sso_enabled + reg_policy: 1.4658129805029452 + allowed_login_method: + name: name + mfa_enabled: mfa_enabled + allowed_id_provider: + wechat_scan_qr: 5.962133916683182 + dingding_scan_qr: 5.637376656633329 + developer_id: developer_id + status: status + type: type + descr: descr + logout_url: logout_url + time_modified: time_modified + login_url: login_url + prop: "{}" + name: name + logo: logo + time_created: time_created + id: id + category: category + sub_account_policy: sub_account_policy + redirect_url: redirect_url + status: status + - protocol_prop: + digest_algorithm: digest_algorithm + authn_context_class_ref: authn_context_class_ref + lifetime_in_seconds: 6.027456183070403 + response_attr: + - nameFormat: nameFormat + attribute: attribute + value: value + - nameFormat: nameFormat + attribute: attribute + value: value + saml_response_signing_key: saml_response_signing_key + signature_algorithm: signature_algorithm + sp_entity: sp_entity + name_identifier_format: name_identifier_format + saml_response_signing_cert_fingerprint: saml_response_signing_cert_fingerprint + saml_response_signing_cert: saml_response_signing_cert + acs_url: acs_url + config_prop: + tenant_id: tenant_id + default_login_method: default_login_method + access_policy: + forget_password: + - forget_password + - forget_password + default_reg_method: default_reg_method + allowed_reg_method: "{}" + mfa_config: "{}" + sso_enabled: sso_enabled + reg_policy: 1.4658129805029452 + allowed_login_method: + name: name + mfa_enabled: mfa_enabled + allowed_id_provider: + wechat_scan_qr: 5.962133916683182 + dingding_scan_qr: 5.637376656633329 + developer_id: developer_id + status: status + type: type + descr: descr + logout_url: logout_url + time_modified: time_modified + login_url: login_url + prop: "{}" + name: name + logo: logo + time_created: time_created + id: id + category: category + sub_account_policy: sub_account_policy + redirect_url: redirect_url + status: status + total_num: 2.3021358869347655 + current_page: 0.8008281904610115 + properties: + current_page: + type: number + data: + items: + $ref: '#/components/schemas/getTemplate_200_response_data_inner' + type: array + total_num: + type: number + type: object + x-apifox-orders: + - current_page + - data + - total_num + x-apifox-ignore-properties: [] + enable_200_response: + example: + data: 0.8008281904610115 + message: message + properties: + message: + type: string + data: + description: 操作ID + type: number + required: + - data + - message + type: object + x-apifox-orders: + - message + - data + x-apifox-ignore-properties: [] + disable_200_response: + example: + data: 0.8008281904610115 + message: message + properties: + message: + type: string + data: + description: 操作ID + type: number + type: object + x-apifox-orders: + - message + - data + x-apifox-ignore-properties: [] + createSecrets_200_response_data: + example: + appSecret: appSecret + id: id + properties: + appSecret: + description: 安全码 + type: string + id: + description: 唯一标识 + type: string + type: object + x-apifox-orders: + - appSecret + - id + x-apifox-ignore-properties: [] + createSecrets_200_response: + example: + data: + appSecret: appSecret + id: id + message: message + properties: + message: + description: 操作结果 + type: string + data: + $ref: '#/components/schemas/createSecrets_200_response_data' + type: object + x-apifox-orders: + - message + - data + x-apifox-ignore-properties: [] + getConfig_200_response_mfa_config: + description: 开启的MFA配置 + example: + provider_type: provider_type + config_id: config_id + name: name + properties: + name: + title: MFA配置名 + type: string + provider_type: + title: 提供者类型 + type: string + config_id: + title: 配置id + type: string + required: + - config_id + - name + - provider_type + type: object + x-apifox-orders: + - name + - provider_type + - config_id + x-apifox-ignore-properties: [] + getConfig_200_response: + example: + default_login_method: default_login_method + access_policy: access_policy + default_reg_method: default_reg_method + allowed_reg_method: allowed_reg_method + time_modified: time_modified + mfa_config: + provider_type: provider_type + config_id: config_id + name: name + sso_enabled: true + reg_policy: reg_policy + allowed_login_method: allowed_login_method + time_created: time_created + mfa_enabled: true + id: id + app_id: app_id + allowed_id_provider: allowed_id_provider + status: status + properties: + id: + description: 唯一标识 + type: string + app_id: + description: 应用ID + type: string + allowed_login_method: + description: "允许的登录方式,格式为:[\"password\", \"vercode\"]" + type: string + default_login_method: + description: 默认登录方式,格式为:password + type: string + allowed_reg_method: + description: "允许注册方式,格式为:[\"mobile\", \"email\"]" + type: string + default_reg_method: + description: 默认注册方式,格式为:mobile + type: string + access_policy: + description: "应用级访问控制权限,格式为:{\"password_recovery\": [\"email\"]}" + type: string + reg_policy: + description: "新用户注册策略(是否允许自动注册,注册验证方式等),1是,2否," + type: string + allowed_id_provider: + description: "允许的登录身份提供商,格式为:{\"wechat_scan_qr\": 1, \"dingding_scan_qr\"\ + :2}" + type: string + sso_enabled: + description: 是否允许SSO + type: boolean + mfa_enabled: + description: 是否开启MFA + type: boolean + mfa_config: + $ref: '#/components/schemas/getConfig_200_response_mfa_config' + time_created: + description: 创建时间 + type: string + time_modified: + description: 修改时间 + type: string + status: + description: 状态,1启用,0禁用 + type: string + required: + - app_id + - default_login_method + - default_reg_method + - id + - sso_enabled + type: object + x-apifox-orders: + - id + - app_id + - allowed_login_method + - default_login_method + - allowed_reg_method + - default_reg_method + - access_policy + - reg_policy + - allowed_id_provider + - sso_enabled + - mfa_enabled + - mfa_config + - time_created + - time_modified + - status + x-apifox-ignore-properties: [] + modifyConfig_request: + properties: + allowed_login_method: + description: "允许的登录方式,格式为:[\"password\", \"vercode\"]" + type: string + default_login_method: + description: 默认登录方式,格式为:password + type: string + allowed_reg_method: + description: "允许注册方式,格式为:[\"mobile\", \"email\"]" + type: string + default_reg_method: + description: 默认注册方式,格式为:mobile + title: "" + type: string + default_protocol: + description: 默认登录协议 + title: "" + type: string + access_policy: + description: "应用级访问控制权限,all: 所有人可访问 permitted: 拒绝未授权访问" + title: "" + type: string + reg_policy: + description: "新用户注册策略(是否允许自动注册,注册验证方式等),1是,2否," + items: + type: string + type: array + title: 协议内容 + type: object + x-apifox-orders: + - allowed_login_method + - default_login_method + - allowed_reg_method + - default_reg_method + - default_protocol + - access_policy + - reg_policy + x-apifox-ignore-properties: [] + empty_object: + properties: + config_id: + description: 已配置的idp conn id + type: string + required: + - config_id + title: empty object + type: object + x-apifox-orders: + - config_id + x-apifox-ignore-properties: [] + empty_object_1: + properties: + config_content: + description: 配置参数 + properties: {} + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + title: empty object + type: object + x-apifox-orders: + - config_content + x-apifox-ignore-properties: [] + createAccount_request: + properties: + user_id: + title: 用户唯一标识 + type: string + username: + title: 用户名称 + type: string + app_id: + title: 应用唯一标识 + type: string + acc_name: + title: 帐号名 + type: string + acc_name_displayed: + title: 显示名 + type: string + acc_source: + title: 帐号来源 + type: string + acc_password: + title: 帐号密码 + type: string + acc_status: + description: 1启用,0禁用 + title: 帐号状态 + type: string + sys_ext_props: + properties: {} + title: 系统扩展属性 + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + free_ext_props: + properties: {} + title: 自定义扩展属性 + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + required: + - acc_name + - acc_password + - acc_status + - app_id + - user_id + - username + type: object + x-apifox-orders: + - user_id + - username + - app_id + - acc_name + - acc_name_displayed + - acc_source + - acc_password + - acc_status + - sys_ext_props + - free_ext_props + x-apifox-ignore-properties: [] + modifyAccount_request: + properties: + user_id: + title: 用户唯一标识 + type: string + app_id: + title: 应用唯一标识 + type: string + acc_name: + title: 帐号名 + type: string + acc_name_displayed: + title: 显示名 + type: string + acc_source: + title: 帐号来源 + type: string + acc_password: + title: 密码 + type: string + acc_status: + description: 1启用,0禁用 + title: 状态 + type: string + sys_ext_props: + properties: {} + title: 系统扩展属性 + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + free_ext_props: + properties: {} + title: 自定义扩展属性 + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + type: object + x-apifox-orders: + - user_id + - app_id + - acc_name + - acc_name_displayed + - acc_source + - acc_password + - acc_status + - sys_ext_props + - free_ext_props + x-apifox-ignore-properties: [] + getAuthUnits_200_response: + example: + data: + - time_modified: time_modified + identity_id: identity_id + identity_name: identity_name + time_created: time_created + rules: + - code: code + resource: "{}" + identity_id: identity_id + affect: affect + resource_type: resource_type + identity_name: identity_name + description: description + resource_set: + time_modified: time_modified + application_name: application_name + code: code + members: + - tenant_id: tenant_id + resource_code: resource_code + resource_type: resource_type + is_global: true + match_all_resource_actions: true + application_id: application_id + time_modified: time_modified + application_name: application_name + resource_id: resource_id + resource_actions: + code: code + description: description + time_created: time_created + set_id: set_id + id: id + resource_scope: resource_scope + developer_id: developer_id + selected_resource_actions: + - selected_resource_actions + - selected_resource_actions + - tenant_id: tenant_id + resource_code: resource_code + resource_type: resource_type + is_global: true + match_all_resource_actions: true + application_id: application_id + time_modified: time_modified + application_name: application_name + resource_id: resource_id + resource_actions: + code: code + description: description + time_created: time_created + set_id: set_id + id: id + resource_scope: resource_scope + developer_id: developer_id + selected_resource_actions: + - selected_resource_actions + - selected_resource_actions + match_all_resources: true + is_global: true + description: description + time_created: time_created + id: id + application_id: application_id + application_name: application_name + inherited: true + auth_unit_id: auth_unit_id + id: id + identity_type: identity_type + - code: code + resource: "{}" + identity_id: identity_id + affect: affect + resource_type: resource_type + identity_name: identity_name + description: description + resource_set: + time_modified: time_modified + application_name: application_name + code: code + members: + - tenant_id: tenant_id + resource_code: resource_code + resource_type: resource_type + is_global: true + match_all_resource_actions: true + application_id: application_id + time_modified: time_modified + application_name: application_name + resource_id: resource_id + resource_actions: + code: code + description: description + time_created: time_created + set_id: set_id + id: id + resource_scope: resource_scope + developer_id: developer_id + selected_resource_actions: + - selected_resource_actions + - selected_resource_actions + - tenant_id: tenant_id + resource_code: resource_code + resource_type: resource_type + is_global: true + match_all_resource_actions: true + application_id: application_id + time_modified: time_modified + application_name: application_name + resource_id: resource_id + resource_actions: + code: code + description: description + time_created: time_created + set_id: set_id + id: id + resource_scope: resource_scope + developer_id: developer_id + selected_resource_actions: + - selected_resource_actions + - selected_resource_actions + match_all_resources: true + is_global: true + description: description + time_created: time_created + id: id + application_id: application_id + application_name: application_name + inherited: true + auth_unit_id: auth_unit_id + id: id + identity_type: identity_type + id: id + identity_type: identity_type + - time_modified: time_modified + identity_id: identity_id + identity_name: identity_name + time_created: time_created + rules: + - code: code + resource: "{}" + identity_id: identity_id + affect: affect + resource_type: resource_type + identity_name: identity_name + description: description + resource_set: + time_modified: time_modified + application_name: application_name + code: code + members: + - tenant_id: tenant_id + resource_code: resource_code + resource_type: resource_type + is_global: true + match_all_resource_actions: true + application_id: application_id + time_modified: time_modified + application_name: application_name + resource_id: resource_id + resource_actions: + code: code + description: description + time_created: time_created + set_id: set_id + id: id + resource_scope: resource_scope + developer_id: developer_id + selected_resource_actions: + - selected_resource_actions + - selected_resource_actions + - tenant_id: tenant_id + resource_code: resource_code + resource_type: resource_type + is_global: true + match_all_resource_actions: true + application_id: application_id + time_modified: time_modified + application_name: application_name + resource_id: resource_id + resource_actions: + code: code + description: description + time_created: time_created + set_id: set_id + id: id + resource_scope: resource_scope + developer_id: developer_id + selected_resource_actions: + - selected_resource_actions + - selected_resource_actions + match_all_resources: true + is_global: true + description: description + time_created: time_created + id: id + application_id: application_id + application_name: application_name + inherited: true + auth_unit_id: auth_unit_id + id: id + identity_type: identity_type + - code: code + resource: "{}" + identity_id: identity_id + affect: affect + resource_type: resource_type + identity_name: identity_name + description: description + resource_set: + time_modified: time_modified + application_name: application_name + code: code + members: + - tenant_id: tenant_id + resource_code: resource_code + resource_type: resource_type + is_global: true + match_all_resource_actions: true + application_id: application_id + time_modified: time_modified + application_name: application_name + resource_id: resource_id + resource_actions: + code: code + description: description + time_created: time_created + set_id: set_id + id: id + resource_scope: resource_scope + developer_id: developer_id + selected_resource_actions: + - selected_resource_actions + - selected_resource_actions + - tenant_id: tenant_id + resource_code: resource_code + resource_type: resource_type + is_global: true + match_all_resource_actions: true + application_id: application_id + time_modified: time_modified + application_name: application_name + resource_id: resource_id + resource_actions: + code: code + description: description + time_created: time_created + set_id: set_id + id: id + resource_scope: resource_scope + developer_id: developer_id + selected_resource_actions: + - selected_resource_actions + - selected_resource_actions + match_all_resources: true + is_global: true + description: description + time_created: time_created + id: id + application_id: application_id + application_name: application_name + inherited: true + auth_unit_id: auth_unit_id + id: id + identity_type: identity_type + id: id + identity_type: identity_type + total_num: 0.8008281904610115 + properties: + total_num: + description: 总数量 + type: number + data: + items: + $ref: '#/components/schemas/AuthUnit' + type: array + type: object + x-apifox-orders: + - total_num + - data + x-apifox-ignore-properties: [] + getPrivileges_200_response: + example: + data: + - time_modified: time_modified + affect_scope: affect_scope + identity_id: identity_id + object_type: object_type + affect: affect + auth_unit_rule_id: auth_unit_rule_id + time_created: time_created + object_code: object_code + id: 1.4658129805029452 + identity_type: identity_type + application_id: application_id + - time_modified: time_modified + affect_scope: affect_scope + identity_id: identity_id + object_type: object_type + affect: affect + auth_unit_rule_id: auth_unit_rule_id + time_created: time_created + object_code: object_code + id: 1.4658129805029452 + identity_type: identity_type + application_id: application_id + total_num: 0.8008281904610115 + current_page: 6.027456183070403 + properties: + total_num: + description: 数据总数 + type: number + current_page: + description: 当前页数(废弃) + type: number + data: + description: 数据列表 + items: + $ref: '#/components/schemas/Privilege' + type: array + type: object + x-apifox-orders: + - total_num + - current_page + - data + x-apifox-ignore-properties: [] + empty_object_2: + properties: + identities: + items: + $ref: '#/components/schemas/IdentityObj' + title: 授权实体列表 + type: array + rules: + items: + $ref: '#/components/schemas/AuthRuleArg' + title: 授权规则列表 + type: array + required: + - identities + - rules + title: empty object + type: object + x-apifox-orders: + - identities + - rules + x-apifox-ignore-properties: [] + deleteAuthUnitRules_request: + properties: + ids: + items: + type: string + title: id列表 + type: array + required: + - ids + type: object + x-apifox-orders: + - ids + x-apifox-ignore-properties: [] + getResource_200_response: + example: + tenant_id: tenant_id + time_modified: time_modified + code: code + description: description + time_created: time_created + id: id + type: type + application_id: application_id + developer_id: developer_id + properties: + id: + description: 资源id + type: string + developer_id: + description: 开发者id + type: string + tenant_id: + description: 租户id + type: string + application_id: + description: 应用id + type: string + description: + description: 描述 + type: string + type: + description: 类型 + type: string + code: + description: 代码 + type: string + time_modified: + description: 修改时间 rfc3339 + type: string + time_created: + description: 创建时间 rfc3339 + type: string + type: object + x-apifox-orders: + - id + - developer_id + - tenant_id + - application_id + - description + - type + - code + - time_modified + - time_created + x-apifox-ignore-properties: [] + empty_object_3_actions_inner: + properties: + id: + description: 如果不携带id,会认为是新创建的code + title: 资源id + type: string + code: + title: 资源代码 + type: string + description: + title: 资源描述 + type: string + required: + - code + type: object + x-apifox-orders: + - id + - code + - description + x-apifox-ignore-properties: [] + empty_object_3: + properties: + description: + description: 描述 + type: string + uri: + description: "资源URI, 当type=api/ui 时有效" + type: string + actions: + items: + $ref: '#/components/schemas/empty_object_3_actions_inner' + type: array + title: empty object + type: object + x-apifox-orders: + - description + - uri + - actions + x-apifox-ignore-properties: [] + empty_object_4_resource: + nullable: true + properties: + id: + title: 资源id + type: string + scope: + title: 资源范围 + type: string + actions: + items: + type: string + nullable: true + title: 选中的action code + type: array + match_all_actions: + nullable: true + title: 匹配所有资源操作 + type: boolean + match_all_resources: + nullable: true + title: 匹配所有资源 + type: boolean + application_id: + description: 当match_all_resources=true时必填 + nullable: true + title: 应用id + type: string + application_name: + description: 当match_all_resources=true时必填 + nullable: true + title: 应用名称 + type: string + required: + - id + - scope + title: 资源 + type: object + x-apifox-orders: + - id + - scope + - actions + - match_all_actions + - match_all_resources + - application_id + - application_name + x-apifox-ignore-properties: [] + empty_object_4_resource_set: + nullable: true + properties: + id: + title: 资源集合id + type: string + required: + - id + title: 资源集合 + type: object + x-apifox-orders: + - id + x-apifox-ignore-properties: [] + empty_object_4_application: + nullable: true + properties: + id: + title: 应用id + type: string + required: + - id + title: 应用 + type: object + x-apifox-orders: + - id + x-apifox-ignore-properties: [] + empty_object_4: + properties: + resource: + $ref: '#/components/schemas/empty_object_4_resource' + resource_set: + $ref: '#/components/schemas/empty_object_4_resource_set' + application: + $ref: '#/components/schemas/empty_object_4_application' + affect: + description: allow/deny + title: 生效 + type: string + required: + - affect + title: empty object + type: object + x-apifox-refs: + "01H6TT7YQ7MSQVTYNTFCZF053V": + $ref: '#/components/schemas/AuthRuleArg' + x-apifox-orders: + - 01H6TT7YQ7MSQVTYNTFCZF053V + x-apifox-ignore-properties: + - resource + - resource_set + - application + - affect + getResources_200_response: + example: + data: + - tenant_id: tenant_id + time_modified: time_modified + code: code + description: description + time_created: time_created + id: id + type: type + application_id: application_id + developer_id: developer_id + - tenant_id: tenant_id + time_modified: time_modified + code: code + description: description + time_created: time_created + id: id + type: type + application_id: application_id + developer_id: developer_id + total_num: 0.8008281904610115 + properties: + total_num: + description: 数据总数 + type: number + data: + items: + $ref: '#/components/schemas/getResource_200_response' + type: array + type: object + x-apifox-orders: + - total_num + - data + x-apifox-ignore-properties: [] + empty_object_5_actions_inner: + properties: + code: + title: 资源代码 + type: string + description: + title: 资源描述 + type: string + required: + - code + type: object + x-apifox-orders: + - code + - description + x-apifox-ignore-properties: [] + empty_object_5: + properties: + description: + description: 描述 + type: string + code: + description: 资源代码 + type: string + application_id: + description: 应用id + type: number + type: + description: 资源类型,data/api/ui + type: string + uri: + description: "资源URI, 当type=api/ui 时有效" + type: string + actions: + items: + $ref: '#/components/schemas/empty_object_5_actions_inner' + type: array + required: + - application_id + - code + - type + title: empty object + type: object + x-apifox-orders: + - description + - code + - application_id + - type + - uri + - actions + x-apifox-ignore-properties: [] + empty_object_6: + example: + resource_id: resource_id + properties: + resource_id: + description: 资源id + type: string + required: + - resource_id + title: empty object + type: object + x-apifox-orders: + - resource_id + x-apifox-ignore-properties: [] + deleteResources_request: + properties: + ids: + items: + type: string + title: 资源id列表 + type: array + required: + - ids + type: object + x-apifox-orders: + - ids + x-apifox-ignore-properties: [] + empty_object_7: + properties: + code: + description: 集合代码 + type: string + description: + description: 描述 + type: string + required: + - code + - description + title: empty object + type: object + x-apifox-orders: + - code + - description + x-apifox-ignore-properties: [] + getResourceSets_200_response: + example: + data: + - time_modified: time_modified + application_name: application_name + code: code + is_global: true + description: description + time_created: time_created + id: id + application_id: application_id + - time_modified: time_modified + application_name: application_name + code: code + is_global: true + description: description + time_created: time_created + id: id + application_id: application_id + total_num: 0.8008281904610115 + properties: + total_num: + description: 数据总数 + type: number + data: + items: + $ref: '#/components/schemas/ResourceSet' + type: array + type: object + x-apifox-orders: + - total_num + - data + x-apifox-ignore-properties: [] + empty_object_8: + properties: + application_id: + description: 应用id + type: string + code: + description: 集合代码 + type: string + description: + description: 描述 + type: string + required: + - application_id + - code + title: empty object + type: object + x-apifox-orders: + - application_id + - code + - description + x-apifox-ignore-properties: [] + empty_object_9: + example: + id: 0.8008281904610115 + properties: + id: + type: number + required: + - id + title: empty object + type: object + x-apifox-orders: + - id + x-apifox-ignore-properties: [] + empty_object_10: + properties: + resource_id: + title: 资源id + type: number + resource_scope: + title: 作用范围 + type: string + resource_actions: + items: + type: string + title: 选中的操作 + type: array + match_all_actions: + title: 是否匹配所有操作 + type: boolean + required: + - match_all_actions + - resource_id + - resource_scope + title: empty object + type: object + x-apifox-orders: + - resource_id + - resource_scope + - resource_actions + - match_all_actions + x-apifox-ignore-properties: [] + empty_object_11: + example: + member_id: member_id + properties: + member_id: + description: 成员id + type: string + required: + - member_id + title: empty object + type: object + x-apifox-orders: + - member_id + x-apifox-ignore-properties: [] + empty_object_12_ResourceActions_inner: + properties: + id: + description: 操作id + type: number + code: + description: 操作代码 + type: string + required: + - code + - id + type: object + x-apifox-orders: + - id + - code + x-apifox-ignore-properties: [] + empty_object_12: + properties: + resource_id: + title: 资源id + type: number + resource_scope: + title: 作用范围 + type: string + ResourceActions: + items: + $ref: '#/components/schemas/empty_object_12_ResourceActions_inner' + title: 操作列表 + type: array + match_all_actions: + title: 匹配所有操作 + type: boolean + required: + - match_all_actions + - resource_id + - resource_scope + title: empty object + type: object + x-apifox-orders: + - resource_id + - resource_scope + - ResourceActions + - match_all_actions + x-apifox-ignore-properties: [] + getResourceMembers_200_response: + example: + data: + - tenant_id: tenant_id + resource_code: resource_code + resource_type: resource_type + is_global: true + match_all_resource_actions: true + application_id: application_id + time_modified: time_modified + application_name: application_name + resource_id: resource_id + resource_actions: + code: code + description: description + time_created: time_created + set_id: set_id + id: id + resource_scope: resource_scope + developer_id: developer_id + selected_resource_actions: + - selected_resource_actions + - selected_resource_actions + - tenant_id: tenant_id + resource_code: resource_code + resource_type: resource_type + is_global: true + match_all_resource_actions: true + application_id: application_id + time_modified: time_modified + application_name: application_name + resource_id: resource_id + resource_actions: + code: code + description: description + time_created: time_created + set_id: set_id + id: id + resource_scope: resource_scope + developer_id: developer_id + selected_resource_actions: + - selected_resource_actions + - selected_resource_actions + total_num: 0.8008281904610115 + properties: + total_num: + description: 数据总数 + type: number + data: + items: + $ref: '#/components/schemas/ResourceSetMember' + type: array + type: object + x-apifox-orders: + - total_num + - data + x-apifox-ignore-properties: [] + deleteNode_200_response: + example: + id: id + properties: + id: + title: 删除id + type: string + required: + - id + title: "" + type: object + x-apifox-orders: + - id + x-apifox-ignore-properties: [] + updateNode_request: + properties: + developer_id: + description: 开发者ID + title: 开发者ID + type: string + tenant_id: + description: 租户ID + title: 租户ID + type: string + arn: + type: string + time_created: + description: 创建时间 + title: 创建时间 + type: string + tag: + description: 用于定义节点类型,目前支持:org(组织),role(角色),position(岗位),group(组) + title: 标签 + type: string + status: + description: 状态 + title: 状态 + type: string + is_pointer: + description: 是否指针类型 + title: 是否指针类型 + type: string + code: + description: 节点code + title: 节点code + type: string + name: + description: 节点名字 + title: 节点名字 + type: string + perm_namespace_arn: + description: 抽象权限容器的ARN + title: 抽象权限容器的ARN + type: string + condition: + type: string + is_dynamic: + description: 是否动态节点(0普通结点,1动态结点) + title: 是否动态节点(0普通结点,1动态结点) + type: string + sys_code: + description: 系统code + title: 系统code + type: string + operator_id: + description: 操作者id + title: 操作者id + type: string + pointer_id: + description: 指针指向的实体节点 + title: 指针指向的实体节点 + type: string + seq: + description: 序号 + title: 序号 + type: integer + description: + description: 描述 + title: 描述 + type: string + time_modified: + description: 最后修改时间 + title: 最后修改时间 + type: string + object_code: + description: OBJ_ID,组织,角色,岗位,职级等 + title: 节点类型 + type: string + parent_id: + description: 父节点id + title: 父节点id + type: string + sys_ext_props: + description: 额外属性,需要先定义schema + properties: {} + title: 额外属性 + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + free_ext_props: + description: 可以自由扩展 + properties: {} + title: 额外属性 + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + required: + - code + - name + - object_code + - sys_code + type: object + x-apifox-refs: + "01H9QF5NX9500WJFKCS9HVVFT6": + $ref: '#/components/schemas/TreeNode' + x-apifox-overrides: {} + x-apifox-orders: + - 01H9QF5NX9500WJFKCS9HVVFT6 + x-apifox-ignore-properties: + - developer_id + - tenant_id + - arn + - time_created + - tag + - status + - is_pointer + - code + - name + - perm_namespace_arn + - condition + - is_dynamic + - sys_code + - operator_id + - pointer_id + - seq + - description + - time_modified + - object_code + - parent_id + - sys_ext_props + - free_ext_props + updateNode_200_response: + example: + sys_code: sys_code + code: code + is_pointer: is_pointer + operator_id: 0.8008281904610115 + description: description + perm_namespace_arn: perm_namespace_arn + pointer_id: 6.027456183070403 + condition: condition + source_parent_id: 1.4658129805029452 + name: name + is_dynamic: is_dynamic + dest_parent_id: 5.962133916683182 + object_code: object_code + arn: arn + seq: 5.637376656633329 + status: status + properties: + sys_code: + description: 系统分配的用于处理树型关系的编码 + type: string + code: + description: 节点代码 + type: string + is_pointer: + description: 是否指针节点(0普通结点,1指针结点) + type: string + operator_id: + description: 操作人ID + type: number + description: + description: 备注 + type: string + perm_namespace_arn: + description: 抽象权限容器的ARN + type: string + pointer_id: + description: 指针指向的实体节点 + type: number + condition: + description: 动态节点的条件(如满足某后缀表达式) + type: string + source_parent_id: + description: 源上级节点ID(根为0) + type: number + dest_parent_id: + description: 目标上级节点ID(根为0) + type: number + name: + description: 节点名称 + type: string + is_dynamic: + description: 是否动态节点(0普通结点,1动态结点) + type: string + object_code: + description: 节点类型(OBJ_ID,组织,角色,岗位,职级等) + type: string + arn: + description: ARN + type: string + seq: + description: 显示顺序 + type: number + status: + description: 状态 + type: string + type: object + x-apifox-orders: + - sys_code + - code + - is_pointer + - operator_id + - description + - perm_namespace_arn + - pointer_id + - condition + - source_parent_id + - dest_parent_id + - name + - is_dynamic + - object_code + - arn + - seq + - status + x-apifox-ignore-properties: [] + getOrganizations_200_response_inner: + example: + object_display_name: object_display_name + time_modified: time_modified + object_type: object_type + time_created: time_created + object_code: object_code + id: id + is_default: is_default + object_props: "{}" + status: status + properties: + id: + title: id + type: string + object_display_name: + title: 组织名称 + type: string + object_type: + description: ' 固定值:tree' + title: '组织类型 ' + type: string + object_code: + description: 唯一,不可改,外键关联引用 + title: 组织编码 + type: string + object_props: + title: 组织额外属性 + type: object + is_default: + description: 是否默认组织关系,1是,0否 + title: 是否默认组织关系 + type: string + status: + title: 状态 + type: string + time_created: + title: 创建时间 + type: string + time_modified: + title: 最后修改时间 + type: string + required: + - id + - object_code + - object_display_name + - object_type + type: object + x-apifox-refs: + "01HDZZCJAZYSDQT71RKAE0F5FR": + $ref: '#/components/schemas/CoreObject' + x-apifox-overrides: {} + x-apifox-orders: + - 01HDZZCJAZYSDQT71RKAE0F5FR + x-apifox-ignore-properties: + - id + - object_display_name + - object_type + - object_code + - object_props + - is_default + - status + - time_created + - time_modified + createOrganization_request: + properties: + object_display_name: + title: 组织名称 + type: string + object_type: + description: ' 固定值:tree' + title: '组织类型 ' + type: string + object_code: + description: 唯一,不可改,外键关联引用 + title: 组织编码 + type: string + object_props: + title: 组织额外属性 + type: string + is_default: + description: 是否默认组织关系,1是,0否 + title: 是否默认组织关系 + type: string + status: + title: 状态 + type: string + required: + - object_code + - object_display_name + - object_type + type: object + x-apifox-refs: + "01HDZZ8S0WZERVWG4M5ER3FX8Q": + $ref: '#/components/schemas/CoreObject' + x-apifox-overrides: {} + x-apifox-orders: + - 01HDZZ8S0WZERVWG4M5ER3FX8Q + x-apifox-ignore-properties: + - object_display_name + - object_type + - object_code + - object_props + - is_default + - status + createOrganization_200_response: + example: + id: id + properties: + id: + description: 创建ID + type: string + type: object + x-apifox-orders: + - id + x-apifox-ignore-properties: [] + getOrganization_200_response_inner: + example: + object_display_name: object_display_name + time_modified: time_modified + object_type: object_type + time_created: time_created + object_code: object_code + id: id + is_default: is_default + object_props: "{}" + status: status + properties: + id: + title: id + type: string + object_display_name: + title: 组织名称 + type: string + object_type: + description: ' 固定值:tree' + title: '组织类型 ' + type: string + object_code: + description: 唯一,不可改,外键关联引用 + title: 组织编码 + type: string + object_props: + title: 组织额外属性 + type: object + is_default: + description: 是否默认组织关系,1是,0否 + title: 是否默认组织关系 + type: string + status: + title: 状态 + type: string + time_created: + title: 创建时间 + type: string + time_modified: + title: 最后修改时间 + type: string + required: + - id + - object_code + - object_display_name + - object_type + type: object + x-apifox-refs: + "01HDZZHZEGXMT8C9NSA69GTAR8": + $ref: '#/components/schemas/CoreObject' + x-apifox-overrides: {} + x-apifox-orders: + - 01HDZZHZEGXMT8C9NSA69GTAR8 + x-apifox-ignore-properties: + - id + - object_display_name + - object_type + - object_code + - object_props + - is_default + - status + - time_created + - time_modified + deleteOrganization_200_response: + example: + id: id + properties: + id: + type: string + type: object + x-apifox-orders: + - id + x-apifox-ignore-properties: [] + updateOrganization_request: + properties: + object_display_name: + title: 组织名称 + type: string + object_type: + description: ' 固定值:tree' + title: '组织类型 ' + type: string + object_props: + title: 组织额外属性 + type: string + is_default: + description: 是否默认组织关系,1是,0否 + title: 是否默认组织关系 + type: string + status: + title: 状态 + type: string + type: object + x-apifox-refs: + "01HDZZDW51C1N4EM81SST0J6EK": + $ref: '#/components/schemas/CoreObject' + x-apifox-overrides: {} + x-apifox-orders: + - 01HDZZDW51C1N4EM81SST0J6EK + x-apifox-ignore-properties: + - object_display_name + - object_type + - object_props + - is_default + - status + getMembers_200_response_inner: + example: + relation_data: relation_data + tree_node: + tenant_id: tenant_id + sys_code: sys_code + code: code + is_pointer: is_pointer + operator_id: operator_id + description: description + perm_namespace_arn: perm_namespace_arn + sys_ext_props: "{}" + pointer_id: pointer_id + time_modified: time_modified + condition: condition + parent_id: parent_id + name: name + is_dynamic: is_dynamic + time_created: time_created + object_code: object_code + id: id + tag: tag + free_ext_props: "{}" + arn: arn + developer_id: developer_id + seq: 0 + status: status + relation_type: relation_type + display_name: display_name + is_default: is_default + path: path + time_modified: 2000-01-23T04:56:07.000+00:00 + user_id: user_id + time_created: 2000-01-23T04:56:07.000+00:00 + id: id + node_id: node_id + username: username + status: status + properties: + id: + description: 全局唯一ID + maxLength: 20 + minimum: 1 + type: string + node_id: + description: 节点ID + maxLength: 20 + type: string + user_id: + description: 用户ID + maxLength: 20 + type: string + path: + description: 所属组织关系路径 + type: string + display_name: + description: 显示名 + maxLength: 50 + type: string + username: + description: 用户名 + maxLength: 30 + type: string + relation_type: + description: 关联类型(用于区分多重关联) + maxLength: 5 + type: string + relation_data: + description: 关联扩展信息 + type: string + is_default: + description: 是否默认关系 + maxLength: 5 + type: string + time_created: + description: 创建时间 + format: date-time + type: string + time_modified: + description: 修改时间 + format: date-time + type: string + status: + description: 状态 + maxLength: 10 + type: string + tree_node: + $ref: '#/components/schemas/TreeNode' + required: + - display_name + - id + - node_id + - path + - status + - time_created + - time_modified + - tree_node + - user_id + - username + type: object + x-apifox-refs: + "01HCEATVDAR92GJYBW675DWNJQ": + $ref: '#/components/schemas/tree_user' + x-apifox-overrides: {} + x-apifox-orders: + - 01HCEATVDAR92GJYBW675DWNJQ + - tree_node + x-apifox-ignore-properties: + - id + - node_id + - user_id + - path + - display_name + - username + - relation_type + - relation_data + - is_default + - time_created + - time_modified + - status + deleteMembers_request: + properties: + node_id: + description: 节点ID + title: 节点ID + type: string + user_id: + description: 用户原始ID + title: 用户ID + type: string + required: + - node_id + - user_id + type: object + x-apifox-orders: + - node_id + - user_id + x-apifox-ignore-properties: [] + createNode_request: + properties: + id: + description: 节点ID + title: 节点ID + type: string + arn: + type: string + time_created: + description: 创建时间 + title: 创建时间 + type: string + tag: + description: 用于定义节点类型,目前支持:org(组织),role(角色),position(岗位),group(组) + title: 标签 + type: string + status: + description: 状态 + title: 状态 + type: string + is_pointer: + description: 是否指针类型 + title: 是否指针类型 + type: string + code: + description: 节点code + title: 节点code + type: string + name: + description: 节点名字 + title: 节点名字 + type: string + perm_namespace_arn: + description: 抽象权限容器的ARN + title: 抽象权限容器的ARN + type: string + condition: + type: string + is_dynamic: + description: 是否动态节点(0普通结点,1动态结点) + title: 是否动态节点(0普通结点,1动态结点) + type: string + sys_code: + description: 系统code + title: 系统code + type: string + operator_id: + description: 操作者id + title: 操作者id + type: string + pointer_id: + description: 指针指向的实体节点 + title: 指针指向的实体节点 + type: string + seq: + description: 序号 + title: 序号 + type: integer + description: + description: 描述 + title: 描述 + type: string + time_modified: + description: 最后修改时间 + title: 最后修改时间 + type: string + object_code: + description: OBJ_ID,组织,角色,岗位,职级等 + title: 节点类型 + type: string + parent_id: + description: 父节点id + title: 父节点id + type: string + sys_ext_props: + description: 额外属性,需要先定义schema + properties: {} + title: 额外属性 + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + free_ext_props: + description: 可以自由扩展 + properties: {} + title: 额外属性 + type: object + x-apifox-orders: [] + x-apifox-ignore-properties: [] + required: + - code + - name + - object_code + - sys_code + type: object + x-apifox-refs: + "01HE085ZPTX1XY9HEXGK3F2DCY": + $ref: '#/components/schemas/TreeNode' + x-apifox-overrides: {} + x-apifox-orders: + - 01HE085ZPTX1XY9HEXGK3F2DCY + x-apifox-ignore-properties: + - id + - arn + - time_created + - tag + - status + - is_pointer + - code + - name + - perm_namespace_arn + - condition + - is_dynamic + - sys_code + - operator_id + - pointer_id + - seq + - description + - time_modified + - object_code + - parent_id + - sys_ext_props + - free_ext_props + getNodeMembers_200_response_data_inner_node_info_inner: + example: + path: path + time_modified: 2000-01-23T04:56:07.000+00:00 + relation_data: relation_data + user_id: user_id + time_created: 2000-01-23T04:56:07.000+00:00 + id: id + relation_type: relation_type + display_name: display_name + is_default: is_default + node_id: node_id + username: username + status: status + properties: + id: + description: 全局唯一ID + maxLength: 20 + minimum: 1 + type: string + node_id: + description: 节点ID + maxLength: 20 + type: string + user_id: + description: 用户ID + maxLength: 20 + type: string + path: + description: 所属组织关系路径 + type: string + display_name: + description: 显示名 + maxLength: 50 + type: string + username: + description: 用户名 + maxLength: 30 + type: string + relation_type: + description: 关联类型(用于区分多重关联) + maxLength: 5 + type: string + relation_data: + description: 关联扩展信息 + type: string + is_default: + description: 是否默认关系 + maxLength: 5 + type: string + time_created: + description: 创建时间 + format: date-time + type: string + time_modified: + description: 修改时间 + format: date-time + type: string + status: + description: 状态 + maxLength: 10 + type: string + required: + - display_name + - id + - node_id + - path + - status + - time_created + - time_modified + - user_id + - username + type: object + x-apifox-refs: + "01HCEAEVV90J9VKFTY9ZCHJH32": + $ref: '#/components/schemas/tree_user' + x-apifox-overrides: {} + x-apifox-orders: + - 01HCEAEVV90J9VKFTY9ZCHJH32 + x-apifox-ignore-properties: + - id + - node_id + - user_id + - path + - display_name + - username + - relation_type + - relation_data + - is_default + - time_created + - time_modified + - status + getNodeMembers_200_response_data_inner: + example: + user_id: user_id + node_info: + - path: path + time_modified: 2000-01-23T04:56:07.000+00:00 + relation_data: relation_data + user_id: user_id + time_created: 2000-01-23T04:56:07.000+00:00 + id: id + relation_type: relation_type + display_name: display_name + is_default: is_default + node_id: node_id + username: username + status: status + - path: path + time_modified: 2000-01-23T04:56:07.000+00:00 + relation_data: relation_data + user_id: user_id + time_created: 2000-01-23T04:56:07.000+00:00 + id: id + relation_type: relation_type + display_name: display_name + is_default: is_default + node_id: node_id + username: username + status: status + display_name: display_name + username: username + properties: + user_id: + description: 用户ID + type: string + username: + description: 用户名 + type: string + display_name: + description: 用户显示名 + type: string + node_info: + description: 用户节点信息 + items: + $ref: '#/components/schemas/getNodeMembers_200_response_data_inner_node_info_inner' + type: array + required: + - display_name + - node_info + - user_id + - username + type: object + x-apifox-orders: + - user_id + - username + - display_name + - node_info + x-apifox-ignore-properties: [] + getNodeMembers_200_response: + example: + data: + - user_id: user_id + node_info: + - path: path + time_modified: 2000-01-23T04:56:07.000+00:00 + relation_data: relation_data + user_id: user_id + time_created: 2000-01-23T04:56:07.000+00:00 + id: id + relation_type: relation_type + display_name: display_name + is_default: is_default + node_id: node_id + username: username + status: status + - path: path + time_modified: 2000-01-23T04:56:07.000+00:00 + relation_data: relation_data + user_id: user_id + time_created: 2000-01-23T04:56:07.000+00:00 + id: id + relation_type: relation_type + display_name: display_name + is_default: is_default + node_id: node_id + username: username + status: status + display_name: display_name + username: username + - user_id: user_id + node_info: + - path: path + time_modified: 2000-01-23T04:56:07.000+00:00 + relation_data: relation_data + user_id: user_id + time_created: 2000-01-23T04:56:07.000+00:00 + id: id + relation_type: relation_type + display_name: display_name + is_default: is_default + node_id: node_id + username: username + status: status + - path: path + time_modified: 2000-01-23T04:56:07.000+00:00 + relation_data: relation_data + user_id: user_id + time_created: 2000-01-23T04:56:07.000+00:00 + id: id + relation_type: relation_type + display_name: display_name + is_default: is_default + node_id: node_id + username: username + status: status + display_name: display_name + username: username + total_num: 0 + current_page: 6 + properties: + total_num: + description: 总数 + type: integer + current_page: + description: 当前页码 + type: integer + data: + description: 数据 + items: + $ref: '#/components/schemas/getNodeMembers_200_response_data_inner' + type: array + required: + - current_page + - data + - total_num + type: object + x-apifox-orders: + - total_num + - current_page + - data + x-apifox-ignore-properties: [] + updateMember_request: + properties: + action: + description: "移动节点move, 设置为默认关系as-default" + title: 操作 + type: string + is_default: + description: 1是,0否 + title: 是否默认关系 + type: string + source_node_id: + description: 移动前节点ID + title: 原节点ID + type: string + dest_node_id: + description: 移动后节点ID + title: 目标节点ID + type: string + required: + - action + type: object + x-apifox-orders: + - action + - is_default + - source_node_id + - dest_node_id + x-apifox-ignore-properties: [] + empty_object_13: + example: + id: id + properties: + id: + type: string + required: + - id + title: empty object + type: object + x-apifox-orders: + - id + x-apifox-ignore-properties: [] + authorizeApplications_request: + properties: + identities: + items: + $ref: '#/components/schemas/IdentityObj' + title: 授权实体列表 + type: array + application_id: + title: 应用id + type: string + affect: + description: "allow, deny" + title: 作用 + type: string + required: + - affect + - application_id + - identities + type: object + x-apifox-orders: + - identities + - application_id + - affect + x-apifox-ignore-properties: [] + saveObject_request: + properties: + key: + title: 键 + type: string + value: + title: 值 + type: string + required: + - key + - value + type: object + x-apifox-orders: + - key + - value + x-apifox-ignore-properties: [] + getAccountsByApp_200_response: + example: + total: 0.8008281904610115 + records: + - tenant_id: tenant_id + acc_source: acc_source + acc_status: acc_status + acc_password: acc_password + app_name: app_name + acc_name: acc_name + time_modified: time_modified + acc_name_displayed: acc_name_displayed + acc_sync_status: acc_sync_status + user_id: user_id + time_created: time_created + id: id + acc_prop: "{}" + app_id: app_id + developer_id: developer_id + username: username + - tenant_id: tenant_id + acc_source: acc_source + acc_status: acc_status + acc_password: acc_password + app_name: app_name + acc_name: acc_name + time_modified: time_modified + acc_name_displayed: acc_name_displayed + acc_sync_status: acc_sync_status + user_id: user_id + time_created: time_created + id: id + acc_prop: "{}" + app_id: app_id + developer_id: developer_id + username: username + properties: + records: + items: + $ref: '#/components/schemas/AppSubAccount' + type: array + total: + type: number + type: object + x-apifox-orders: + - records + - total + x-apifox-ignore-properties: [] + ResourceSetMember_resource_actions: + example: + code: code + description: description + properties: + code: + title: 操作代码 + type: string + description: + title: 操作描述 + type: string + required: + - code + title: 操作代码 + type: object + x-apifox-orders: + - code + - description + x-apifox-ignore-properties: [] + Au_resource_set: + example: + time_modified: time_modified + application_name: application_name + code: code + members: + - tenant_id: tenant_id + resource_code: resource_code + resource_type: resource_type + is_global: true + match_all_resource_actions: true + application_id: application_id + time_modified: time_modified + application_name: application_name + resource_id: resource_id + resource_actions: + code: code + description: description + time_created: time_created + set_id: set_id + id: id + resource_scope: resource_scope + developer_id: developer_id + selected_resource_actions: + - selected_resource_actions + - selected_resource_actions + - tenant_id: tenant_id + resource_code: resource_code + resource_type: resource_type + is_global: true + match_all_resource_actions: true + application_id: application_id + time_modified: time_modified + application_name: application_name + resource_id: resource_id + resource_actions: + code: code + description: description + time_created: time_created + set_id: set_id + id: id + resource_scope: resource_scope + developer_id: developer_id + selected_resource_actions: + - selected_resource_actions + - selected_resource_actions + match_all_resources: true + is_global: true + description: description + time_created: time_created + id: id + application_id: application_id + properties: + id: + title: 集合id + type: string + application_id: + title: 应用id + type: string + application_name: + title: 应用名 + type: string + is_global: + title: 是否为全局 + type: boolean + code: + title: 集合代码 + type: string + description: + title: 集合描述 + type: string + time_modified: + title: 更新时间 rfc3339 + type: string + time_created: + title: 创建时间 rfc3339 + type: string + members: + items: + $ref: '#/components/schemas/ResourceSetMember' + title: 资源集合成员 + type: array + match_all_resources: + title: 匹配所有资源 + type: boolean + title: 授权的资源集合 + type: object + x-apifox-refs: + "01GM5K7WQCCSJW6Y5CD88CQJXH": + x-apifox-overrides: {} + type: object + properties: {} + x-apifox-orders: + - 01GM5K7WQCCSJW6Y5CD88CQJXH + x-apifox-ignore-properties: + - id + - application_id + - application_name + - is_global + - code + - description + - time_modified + - time_created + - members + - match_all_resources + AppConfig_allowed_id_provider: + description: "格式为:{\"wechat_scan_qr\": 1, \"dingding_scan_qr\": 2}" + properties: + id: + title: "" + type: string + idp_code: + type: string + idp_config_id: + type: string + auth_method_code: + type: string + auth_method_display_name: + type: string + required: + - auth_method_code + - auth_method_display_name + - id + - idp_code + - idp_config_id + title: 允许的登录身份提供商 + type: object + x-apifox-orders: + - id + - idp_code + - idp_config_id + - auth_method_code + - auth_method_display_name + x-apifox-ignore-properties: [] + ___MFA__: + properties: + name: + title: MFA配置名 + type: string + provider_type: + title: 提供者类型 + type: string + config_id: + title: 配置id + type: string + scenarios: + items: + type: string + title: 场景 + type: array + required: + - config_id + - name + - provider_type + - scenarios + title: 开启的MFA配置 + type: object + x-apifox-orders: + - name + - provider_type + - config_id + - scenarios + x-apifox-ignore-properties: [] + diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..33ac061 --- /dev/null +++ b/build.gradle @@ -0,0 +1,168 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' +apply plugin: 'java' +apply plugin: 'com.diffplug.spotless' + +group = 'com.idmesh' +version = '1.0.0' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0' + } +} + +repositories { + mavenCentral() +} +sourceSets { + main.java.srcDirs = ['src/main/java'] +} + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 25 + buildToolsVersion '25.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 25 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task) + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven-publish' + + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + publishing { + publications { + maven(MavenPublication) { + artifactId = 'idmesh-api-sdk-java' + from components.java + } + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +ext { + jakarta_annotation_version = "1.3.5" +} + +dependencies { + implementation 'io.swagger:swagger-annotations:1.6.8' + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation 'com.squareup.okhttp3:okhttp:4.10.0' + implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0' + implementation 'com.google.code.gson:gson:2.9.1' + implementation 'io.gsonfire:gson-fire:1.9.0' + implementation 'javax.ws.rs:jsr311-api:1.1.1' + implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1' + implementation 'org.openapitools:jackson-databind-nullable:0.2.6' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1' + testImplementation 'org.mockito:mockito-core:3.12.4' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.1' +} + +javadoc { + options.tags = [ "http.response.details:a:Http Response Details" ] +} + +// Use spotless plugin to automatically format code, remove unused import, etc +// To apply changes directly to the file, run `gradlew spotlessApply` +// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle +spotless { + // comment out below to run spotless as part of the `check` task + enforceCheck false + + format 'misc', { + // define the files (e.g. '*.gradle', '*.md') to apply `misc` to + target '.gitignore' + + // define the steps to apply to those files + trimTrailingWhitespace() + indentWithSpaces() // Takes an integer argument if you don't like 4 + endWithNewline() + } + java { + // don't need to set target, it is inferred from java + + // apply a specific flavor of google-java-format + googleJavaFormat('1.8').aosp().reflowLongStrings() + + removeUnusedImports() + importOrder() + } +} + +test { + // Enable JUnit 5 (Gradle 4.6+). + useJUnitPlatform() + + // Always run tests, even when nothing changed. + dependsOn 'cleanTest' + + // Show test results. + testLogging { + events "passed", "skipped", "failed" + } + +} diff --git a/build.sbt b/build.sbt new file mode 100644 index 0000000..abefdf7 --- /dev/null +++ b/build.sbt @@ -0,0 +1,28 @@ +lazy val root = (project in file(".")). + settings( + organization := "com.idmesh", + name := "idmesh-api-sdk-java", + version := "1.0.0", + scalaVersion := "2.11.4", + scalacOptions ++= Seq("-feature"), + javacOptions in compile ++= Seq("-Xlint:deprecation"), + publishArtifact in (Compile, packageDoc) := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "io.swagger" % "swagger-annotations" % "1.6.5", + "com.squareup.okhttp3" % "okhttp" % "4.10.0", + "com.squareup.okhttp3" % "logging-interceptor" % "4.10.0", + "com.google.code.gson" % "gson" % "2.9.1", + "org.apache.commons" % "commons-lang3" % "3.12.0", + "javax.ws.rs" % "jsr311-api" % "1.1.1", + "javax.ws.rs" % "javax.ws.rs-api" % "2.1.1", + "org.openapitools" % "jackson-databind-nullable" % "0.2.6", + "io.gsonfire" % "gson-fire" % "1.9.0" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + "org.junit.jupiter" % "junit-jupiter-api" % "5.9.1" % "test", + "com.novocode" % "junit-interface" % "0.10" % "test", + "org.mockito" % "mockito-core" % "3.12.4" % "test" + ) + ) diff --git a/docs/App.md b/docs/App.md new file mode 100644 index 0000000..27a6211 --- /dev/null +++ b/docs/App.md @@ -0,0 +1,31 @@ + + +# App + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | 唯一标识 | [optional] | +|**developerId** | **String** | 开发者ID | | +|**tenantId** | **String** | 租户ID | | +|**name** | **String** | 应用名称 | [optional] | +|**type** | **String** | 应用类型,1自建应用,2市场应用 | [optional] | +|**appId** | **String** | APPID | [optional] | +|**category** | **String** | 应用分类,1 标准web应用,2单页web应用,3客户端应用,4后端服务 | [optional] | +|**appSecret** | **String** | APPSEC,开发者用户调用返回 | [optional] | +|**descr** | **String** | 应用描述 | [optional] | +|**logo** | **String** | logo路径 | [optional] | +|**loginUrl** | **String** | 登录路径 | [optional] | +|**domain** | **String** | 应用绑定的唯一域名 | [optional] | +|**redirectUrl** | **String** | 重定向url | [optional] | +|**logoutUrl** | **String** | 登出url | [optional] | +|**subAccountPolicy** | **Integer** | 子账号策略 | [optional] | +|**prop** | **Object** | 扩展属性 | [optional] | +|**timeCreated** | **String** | 创建时间 | [optional] | +|**timeModified** | **String** | 更新时间 | [optional] | +|**status** | **String** | 状态,1启用,0禁用 | [optional] | + + + diff --git a/docs/AppApi.md b/docs/AppApi.md new file mode 100644 index 0000000..f377d3d --- /dev/null +++ b/docs/AppApi.md @@ -0,0 +1,2130 @@ +# AppApi + +All URIs are relative to *http://localhost* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**callList**](AppApi.md#callList) | **GET** /v1/applications | 查询应用列表 | +| [**create**](AppApi.md#create) | **POST** /v1/applications | 创建应用 | +| [**createAccount**](AppApi.md#createAccount) | **POST** /v1/applications/{id}/accounts | 创建应用子账号 | +| [**createIDP**](AppApi.md#createIDP) | **POST** /v1/applications/{id}/idp | 创建应用认证源 | +| [**createMFA**](AppApi.md#createMFA) | **POST** /v1/applications/{id}/mfa | 启用应用多因素认证配置 | +| [**createSecrets**](AppApi.md#createSecrets) | **POST** /v1/applications/{id}/secrets | 刷新应用安全码 | +| [**delete**](AppApi.md#delete) | **DELETE** /v1/applications/{id} | 删除应用 | +| [**deleteAccount**](AppApi.md#deleteAccount) | **DELETE** /v1/applications/{app_id}/accounts/{id} | 删除应用子账号 | +| [**deleteIDPConfig**](AppApi.md#deleteIDPConfig) | **DELETE** /v1/applications/{app_id}/idp/{config_id} | 删除应用认证源 | +| [**deleteMFA**](AppApi.md#deleteMFA) | **DELETE** /v1/applications/{app_id}/mfa/{config_id} | 禁用应用多因素认证配置 | +| [**disable**](AppApi.md#disable) | **POST** /v1/applications/{id}/disable | 禁用应用 | +| [**disableAccount**](AppApi.md#disableAccount) | **POST** /v1/applications/{app_id}/accounts/{id}/disable | 禁用应用子账号 | +| [**disableProtocol**](AppApi.md#disableProtocol) | **POST** /v1/applications/{app_id}/protocols/{protocol_type}/disable | 禁用应用认证协议 | +| [**disableSSO**](AppApi.md#disableSSO) | **POST** /v1/applications/{id}/sso/disable | 禁用应用单点登录 | +| [**enable**](AppApi.md#enable) | **POST** /v1/applications/{id}/enable | 启用应用 | +| [**enableAccount**](AppApi.md#enableAccount) | **POST** /v1/applications/{app_id}/accounts/{id}/enable | 启用应用子账号 | +| [**enableProtocol**](AppApi.md#enableProtocol) | **POST** /v1/applications/{app_id}/protocols/{protocol_type}/enable | 启用应用认证协议 | +| [**enableSSO**](AppApi.md#enableSSO) | **POST** /v1/applications/{id}/sso/enable | 启用应用单点登录 | +| [**get**](AppApi.md#get) | **GET** /v1/applications/{id} | 按 ID 查询应用 | +| [**getAccount**](AppApi.md#getAccount) | **GET** /v1/applications/{app_id}/accounts/{id} | 按 ID 查询应用子账号 | +| [**getAccounts**](AppApi.md#getAccounts) | **GET** /v1/application-accounts | 查询应用子账号列表 | +| [**getAccountsByApp**](AppApi.md#getAccountsByApp) | **GET** /v1/applications/{app_id}/accounts | 按 APP ID 查询应用子账号列表 | +| [**getByDomain**](AppApi.md#getByDomain) | **GET** /v1/application | 按条件查询应用 | +| [**getConfig**](AppApi.md#getConfig) | **GET** /v1/applications/{id}/configs | 查询应用配置信息 | +| [**getProtocol**](AppApi.md#getProtocol) | **GET** /v1/applications/{app_id}/protocols/{protocol_type} | 查询应用认证协议 | +| [**getProtocols**](AppApi.md#getProtocols) | **GET** /v1/applications/{id}/protocols | 查询应用认证协议列表 | +| [**getTemplate**](AppApi.md#getTemplate) | **GET** /v1/application-templates | 查询应用模板列表 | +| [**modify**](AppApi.md#modify) | **PATCH** /v1/applications/{id} | 更新应用基本信息 | +| [**modifyAccount**](AppApi.md#modifyAccount) | **PUT** /v1/applications/{app_id}/accounts/{id} | 更新应用子账号 | +| [**modifyConfig**](AppApi.md#modifyConfig) | **PATCH** /v1/applications/{id}/configs | 更新应用配置 | +| [**modifyProtocol**](AppApi.md#modifyProtocol) | **PUT** /v1/applications/{app_id}/protocols/{protocol_type} | 更新应用认证协议 | + + + +# **callList** +> List200Response1 callList().name(name).type(type).pageSort(pageSort).types(types).execute(); + +查询应用列表 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String name = "name_example"; // String | 应用名称 + String type = ""; // String | 应用类型 + String pageSort = "time_created[desc]"; // String | 排序,格式:字段名[顺序] + String types = "1,2"; // String | 应用类型列表,逗号分隔 + try { + List200Response1 result = apiInstance.callList() + .name(name) + .type(type) + .pageSort(pageSort) + .types(types) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#callList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **name** | **String**| 应用名称 | [optional] | +| **type** | **String**| 应用类型 | [optional] | +| **pageSort** | **String**| 排序,格式:字段名[顺序] | [optional] | +| **types** | **String**| 应用类型列表,逗号分隔 | [optional] | + +### Return type + +[**List200Response1**](List200Response1.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **create** +> Create200Response create(contentType).createRequest1(createRequest1).execute(); + +创建应用 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String contentType = "application/json"; // String | + CreateRequest1 createRequest1 = new CreateRequest1(); // CreateRequest1 | + try { + Create200Response result = apiInstance.create(contentType) + .createRequest1(createRequest1) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#create"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **contentType** | **String**| | | +| **createRequest1** | [**CreateRequest1**](CreateRequest1.md)| | [optional] | + +### Return type + +[**Create200Response**](Create200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **createAccount** +> Modify200Response1 createAccount(id, contentType).createAccountRequest(createAccountRequest).execute(); + +创建应用子账号 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String id = ""; // String | 应用id + String contentType = "application/json"; // String | + CreateAccountRequest createAccountRequest = new CreateAccountRequest(); // CreateAccountRequest | + try { + Modify200Response1 result = apiInstance.createAccount(id, contentType) + .createAccountRequest(createAccountRequest) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#createAccount"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| 应用id | | +| **contentType** | **String**| | | +| **createAccountRequest** | [**CreateAccountRequest**](CreateAccountRequest.md)| | [optional] | + +### Return type + +[**Modify200Response1**](Modify200Response1.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **createIDP** +> Object createIDP(id, contentType).emptyObject(emptyObject).execute(); + +创建应用认证源 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String id = "id_example"; // String | 应用id + String contentType = "application/json"; // String | + EmptyObject emptyObject = new EmptyObject(); // EmptyObject | + try { + Object result = apiInstance.createIDP(id, contentType) + .emptyObject(emptyObject) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#createIDP"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| 应用id | | +| **contentType** | **String**| | | +| **emptyObject** | [**EmptyObject**](EmptyObject.md)| | [optional] | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **createMFA** +> Object createMFA(id, contentType).emptyObject(emptyObject).execute(); + +启用应用多因素认证配置 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String id = "id_example"; // String | 应用id + String contentType = "application/json"; // String | + EmptyObject emptyObject = new EmptyObject(); // EmptyObject | + try { + Object result = apiInstance.createMFA(id, contentType) + .emptyObject(emptyObject) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#createMFA"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| 应用id | | +| **contentType** | **String**| | | +| **emptyObject** | [**EmptyObject**](EmptyObject.md)| | [optional] | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **createSecrets** +> CreateSecrets200Response createSecrets(id, contentType).execute(); + +刷新应用安全码 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String id = "id_example"; // String | + String contentType = "application/x-www-form-urlencoded"; // String | + try { + CreateSecrets200Response result = apiInstance.createSecrets(id, contentType) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#createSecrets"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **contentType** | **String**| | | + +### Return type + +[**CreateSecrets200Response**](CreateSecrets200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **delete** +> Delete200Response1 delete(id, contentType).execute(); + +删除应用 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String id = "id_example"; // String | + String contentType = "application/x-www-form-urlencoded"; // String | + try { + Delete200Response1 result = apiInstance.delete(id, contentType) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#delete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **contentType** | **String**| | | + +### Return type + +[**Delete200Response1**](Delete200Response1.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **deleteAccount** +> Object deleteAccount(appId, id, contentType).execute(); + +删除应用子账号 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String appId = "appId_example"; // String | 应用id + String id = "id_example"; // String | 子账号id + String contentType = "application/x-www-form-urlencoded"; // String | + try { + Object result = apiInstance.deleteAccount(appId, id, contentType) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#deleteAccount"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| 应用id | | +| **id** | **String**| 子账号id | | +| **contentType** | **String**| | | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **deleteIDPConfig** +> Object deleteIDPConfig(appId, configId, contentType).execute(); + +删除应用认证源 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String appId = "appId_example"; // String | 应用id + String configId = "configId_example"; // String | + String contentType = "application/x-www-form-urlencoded"; // String | + try { + Object result = apiInstance.deleteIDPConfig(appId, configId, contentType) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#deleteIDPConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| 应用id | | +| **configId** | **String**| | | +| **contentType** | **String**| | | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **deleteMFA** +> Object deleteMFA(appId, configId, contentType).execute(); + +禁用应用多因素认证配置 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String appId = "appId_example"; // String | 应用id + String configId = "configId_example"; // String | + String contentType = "application/x-www-form-urlencoded"; // String | + try { + Object result = apiInstance.deleteMFA(appId, configId, contentType) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#deleteMFA"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| 应用id | | +| **configId** | **String**| | | +| **contentType** | **String**| | | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **disable** +> Disable200Response disable(id, contentType).execute(); + +禁用应用 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String id = "id_example"; // String | 应用标识 + String contentType = "application/x-www-form-urlencoded"; // String | + try { + Disable200Response result = apiInstance.disable(id, contentType) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#disable"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| 应用标识 | | +| **contentType** | **String**| | | + +### Return type + +[**Disable200Response**](Disable200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **disableAccount** +> Object disableAccount(appId, id, contentType).execute(); + +禁用应用子账号 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String appId = "appId_example"; // String | 应用id + String id = "id_example"; // String | 子账号id + String contentType = "application/x-www-form-urlencoded"; // String | + try { + Object result = apiInstance.disableAccount(appId, id, contentType) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#disableAccount"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| 应用id | | +| **id** | **String**| 子账号id | | +| **contentType** | **String**| | | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **disableProtocol** +> Object disableProtocol(appId, protocolType, contentType).execute(); + +禁用应用认证协议 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String appId = "appId_example"; // String | 应用 id + String protocolType = "protocolType_example"; // String | 协议名称,如 oidc + String contentType = "application/x-www-form-urlencoded"; // String | + try { + Object result = apiInstance.disableProtocol(appId, protocolType, contentType) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#disableProtocol"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| 应用 id | | +| **protocolType** | **String**| 协议名称,如 oidc | | +| **contentType** | **String**| | | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **disableSSO** +> Object disableSSO(id).execute(); + +禁用应用单点登录 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String id = "id_example"; // String | 应用标识 + try { + Object result = apiInstance.disableSSO(id) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#disableSSO"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| 应用标识 | | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **enable** +> Enable200Response enable(id, contentType).execute(); + +启用应用 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String id = "id_example"; // String | 应用标识 + String contentType = "application/x-www-form-urlencoded"; // String | + try { + Enable200Response result = apiInstance.enable(id, contentType) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#enable"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| 应用标识 | | +| **contentType** | **String**| | | + +### Return type + +[**Enable200Response**](Enable200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **enableAccount** +> Object enableAccount(appId, id, id2, contentType).execute(); + +启用应用子账号 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String appId = "appId_example"; // String | 应用id + String id = "id_example"; // String | 子账号id + String id2 = "id_example"; // String | + String contentType = "application/x-www-form-urlencoded"; // String | + try { + Object result = apiInstance.enableAccount(appId, id, id2, contentType) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#enableAccount"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| 应用id | | +| **id** | **String**| 子账号id | | +| **id2** | **String**| | | +| **contentType** | **String**| | | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **enableProtocol** +> Modify200Response1 enableProtocol(appId, protocolType, contentType).execute(); + +启用应用认证协议 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String appId = "appId_example"; // String | 应用 id + String protocolType = "oidc"; // String | 协议名称,如 oidc + String contentType = "application/x-www-form-urlencoded"; // String | + try { + Modify200Response1 result = apiInstance.enableProtocol(appId, protocolType, contentType) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#enableProtocol"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| 应用 id | | +| **protocolType** | **String**| 协议名称,如 oidc | | +| **contentType** | **String**| | | + +### Return type + +[**Modify200Response1**](Modify200Response1.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **enableSSO** +> Object enableSSO(id).execute(); + +启用应用单点登录 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String id = "id_example"; // String | 应用标识 + try { + Object result = apiInstance.enableSSO(id) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#enableSSO"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| 应用标识 | | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **get** +> AppDetail get(id).execute(); + +按 ID 查询应用 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String id = "11123321123321123321123"; // String | 唯一标识 + try { + AppDetail result = apiInstance.get(id) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#get"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| 唯一标识 | | + +### Return type + +[**AppDetail**](AppDetail.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getAccount** +> AppSubAccount getAccount(appId, id).execute(); + +按 ID 查询应用子账号 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String appId = ""; // String | 应用id + String id = "id_example"; // String | 子账号id + try { + AppSubAccount result = apiInstance.getAccount(appId, id) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#getAccount"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| 应用id | | +| **id** | **String**| 子账号id | | + +### Return type + +[**AppSubAccount**](AppSubAccount.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getAccounts** +> GetAccountsByApp200Response getAccounts().appId(appId).userId(userId).accStatus(accStatus).accName(accName).pageNum(pageNum).pageSize(pageSize).pageSort(pageSort).execute(); + +查询应用子账号列表 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String appId = "appId_example"; // String | 应用id + String userId = "userId_example"; // String | 用户id + String accStatus = "accStatus_example"; // String | 账号状态 1-活跃 0-冻结 + String accName = ""; // String | 账号名称 + Integer pageNum = 56; // Integer | 页数 + Integer pageSize = 56; // Integer | 页大小 + String pageSort = "time_created[asc]"; // String | 排序字段 + try { + GetAccountsByApp200Response result = apiInstance.getAccounts() + .appId(appId) + .userId(userId) + .accStatus(accStatus) + .accName(accName) + .pageNum(pageNum) + .pageSize(pageSize) + .pageSort(pageSort) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#getAccounts"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| 应用id | [optional] | +| **userId** | **String**| 用户id | [optional] | +| **accStatus** | **String**| 账号状态 1-活跃 0-冻结 | [optional] | +| **accName** | **String**| 账号名称 | [optional] | +| **pageNum** | **Integer**| 页数 | [optional] | +| **pageSize** | **Integer**| 页大小 | [optional] | +| **pageSort** | **String**| 排序字段 | [optional] | + +### Return type + +[**GetAccountsByApp200Response**](GetAccountsByApp200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getAccountsByApp** +> GetAccountsByApp200Response getAccountsByApp(appId).userId(userId).accStatus(accStatus).accName(accName).pageNum(pageNum).pageSize(pageSize).pageSort(pageSort).execute(); + +按 APP ID 查询应用子账号列表 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String appId = "appId_example"; // String | 应用id + String userId = "userId_example"; // String | 用户id + String accStatus = "accStatus_example"; // String | 账号状态 1-活跃 0-冻结 + String accName = ""; // String | 账号名称 + Integer pageNum = 56; // Integer | 页数 + Integer pageSize = 56; // Integer | 页大小 + String pageSort = "time_created[asc]"; // String | 排序字段 + try { + GetAccountsByApp200Response result = apiInstance.getAccountsByApp(appId) + .userId(userId) + .accStatus(accStatus) + .accName(accName) + .pageNum(pageNum) + .pageSize(pageSize) + .pageSort(pageSort) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#getAccountsByApp"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| 应用id | | +| **userId** | **String**| 用户id | [optional] | +| **accStatus** | **String**| 账号状态 1-活跃 0-冻结 | [optional] | +| **accName** | **String**| 账号名称 | [optional] | +| **pageNum** | **Integer**| 页数 | [optional] | +| **pageSize** | **Integer**| 页大小 | [optional] | +| **pageSort** | **String**| 排序字段 | [optional] | + +### Return type + +[**GetAccountsByApp200Response**](GetAccountsByApp200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getByDomain** +> AppDetail getByDomain().domain(domain).domainSn(domainSn).execute(); + +按条件查询应用 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String domain = "sense"; // String | 域名 + String domainSn = "domainSn_example"; // String | 域名简写 + try { + AppDetail result = apiInstance.getByDomain() + .domain(domain) + .domainSn(domainSn) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#getByDomain"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **domain** | **String**| 域名 | [optional] | +| **domainSn** | **String**| 域名简写 | [optional] | + +### Return type + +[**AppDetail**](AppDetail.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getConfig** +> GetConfig200Response getConfig(id).execute(); + +查询应用配置信息 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String id = "id_example"; // String | 应用ID + try { + GetConfig200Response result = apiInstance.getConfig(id) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#getConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| 应用ID | | + +### Return type + +[**GetConfig200Response**](GetConfig200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getProtocol** +> Object getProtocol(appId, protocolType).execute(); + +查询应用认证协议 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String appId = "appId_example"; // String | 应用id + String protocolType = "protocolType_example"; // String | 单点类型,cas、oauth2、saml、oidc、sxp + try { + Object result = apiInstance.getProtocol(appId, protocolType) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#getProtocol"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| 应用id | | +| **protocolType** | **String**| 单点类型,cas、oauth2、saml、oidc、sxp | | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getProtocols** +> List<Object> getProtocols(id).status(status).execute(); + +查询应用认证协议列表 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String id = "id_example"; // String | 应用唯一标识ID + String status = "1"; // String | 启用状态 1, 0 + try { + List result = apiInstance.getProtocols(id) + .status(status) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#getProtocols"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| 应用唯一标识ID | | +| **status** | **String**| 启用状态 1, 0 | [optional] | + +### Return type + +**List<Object>** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getTemplate** +> GetTemplate200Response getTemplate(name).execute(); + +查询应用模板列表 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String name = "name_example"; // String | 应用名称 + try { + GetTemplate200Response result = apiInstance.getTemplate(name) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#getTemplate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **name** | **String**| 应用名称 | | + +### Return type + +[**GetTemplate200Response**](GetTemplate200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **modify** +> Modify200Response1 modify(id, contentType).modifyRequest1(modifyRequest1).execute(); + +更新应用基本信息 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String id = "id_example"; // String | + String contentType = "application/json"; // String | + ModifyRequest1 modifyRequest1 = new ModifyRequest1(); // ModifyRequest1 | + try { + Modify200Response1 result = apiInstance.modify(id, contentType) + .modifyRequest1(modifyRequest1) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#modify"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **contentType** | **String**| | | +| **modifyRequest1** | [**ModifyRequest1**](ModifyRequest1.md)| | [optional] | + +### Return type + +[**Modify200Response1**](Modify200Response1.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **modifyAccount** +> Modify200Response1 modifyAccount(appId, id, contentType).modifyAccountRequest(modifyAccountRequest).execute(); + +更新应用子账号 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String appId = "appId_example"; // String | 应用id + String id = "id_example"; // String | 子账号id + String contentType = "application/json"; // String | + ModifyAccountRequest modifyAccountRequest = new ModifyAccountRequest(); // ModifyAccountRequest | + try { + Modify200Response1 result = apiInstance.modifyAccount(appId, id, contentType) + .modifyAccountRequest(modifyAccountRequest) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#modifyAccount"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| 应用id | | +| **id** | **String**| 子账号id | | +| **contentType** | **String**| | | +| **modifyAccountRequest** | [**ModifyAccountRequest**](ModifyAccountRequest.md)| | [optional] | + +### Return type + +[**Modify200Response1**](Modify200Response1.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **modifyConfig** +> Modify200Response1 modifyConfig(id, contentType).modifyConfigRequest(modifyConfigRequest).execute(); + +更新应用配置 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String id = "id_example"; // String | + String contentType = "application/json"; // String | + ModifyConfigRequest modifyConfigRequest = new ModifyConfigRequest(); // ModifyConfigRequest | + try { + Modify200Response1 result = apiInstance.modifyConfig(id, contentType) + .modifyConfigRequest(modifyConfigRequest) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#modifyConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **contentType** | **String**| | | +| **modifyConfigRequest** | [**ModifyConfigRequest**](ModifyConfigRequest.md)| | [optional] | + +### Return type + +[**Modify200Response1**](Modify200Response1.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **modifyProtocol** +> Object modifyProtocol(appId, protocolType, contentType).emptyObject1(emptyObject1).execute(); + +更新应用认证协议 + + 具体入参参考:[https://thoughts.teambition.com/workspaces/607401bc94422600473bb8a7/docs/62207129fb49bf000106a046](https://thoughts.teambition.com/workspaces/607401bc94422600473bb8a7/docs/62207129fb49bf000106a046) + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.AppApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + AppApi apiInstance = new AppApi(defaultClient); + String appId = "appId_example"; // String | 应用id + String protocolType = "protocolType_example"; // String | 单点类型,cas、oauth2、saml、oidc、sxp + String contentType = "application/json"; // String | + EmptyObject1 emptyObject1 = new EmptyObject1(); // EmptyObject1 | + try { + Object result = apiInstance.modifyProtocol(appId, protocolType, contentType) + .emptyObject1(emptyObject1) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppApi#modifyProtocol"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| 应用id | | +| **protocolType** | **String**| 单点类型,cas、oauth2、saml、oidc、sxp | | +| **contentType** | **String**| | | +| **emptyObject1** | [**EmptyObject1**](EmptyObject1.md)| | [optional] | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + diff --git a/docs/AppConfig.md b/docs/AppConfig.md new file mode 100644 index 0000000..9f321de --- /dev/null +++ b/docs/AppConfig.md @@ -0,0 +1,28 @@ + + +# AppConfig + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**appId** | **String** | | | +|**allowedLoginMethod** | **String** | 格式为:[\"password\", \"vercode\"] | [optional] | +|**defaultLoginMethod** | **String** | 格式为:password | [optional] | +|**allowedRegMethod** | **String** | 格式为:[\"mobile\", \"email\"] | [optional] | +|**defaultRegMethod** | **String** | 格式为:mobile | [optional] | +|**accessPolicy** | **String** | permitted,all | [optional] | +|**regPolicy** | **String** | | [optional] | +|**allowedIdProvider** | [**AppConfigAllowedIdProvider**](AppConfigAllowedIdProvider.md) | | [optional] | +|**ssoEnabled** | **Boolean** | | | +|**mfaEnabled** | **Boolean** | | | +|**mfaConfig** | [**MFA**](MFA.md) | | [optional] | +|**accessControlEnabled** | **Boolean** | | | +|**timeCreated** | **String** | | | +|**timeModified** | **String** | | | +|**status** | **String** | 1启用,0禁用 | | + + + diff --git a/docs/AppConfigAllowedIdProvider.md b/docs/AppConfigAllowedIdProvider.md new file mode 100644 index 0000000..65a5971 --- /dev/null +++ b/docs/AppConfigAllowedIdProvider.md @@ -0,0 +1,18 @@ + + +# AppConfigAllowedIdProvider + +格式为:{\"wechat_scan_qr\": 1, \"dingding_scan_qr\": 2} + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**idpCode** | **String** | | | +|**idpConfigId** | **String** | | | +|**authMethodCode** | **String** | | | +|**authMethodDisplayName** | **String** | | | + + + diff --git a/docs/AppDetail.md b/docs/AppDetail.md new file mode 100644 index 0000000..99d6640 --- /dev/null +++ b/docs/AppDetail.md @@ -0,0 +1,34 @@ + + +# AppDetail + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | 唯一标识 | [optional] | +|**developerId** | **String** | 开发者ID | | +|**tenantId** | **String** | 租户ID | | +|**name** | **String** | 应用名称 | [optional] | +|**type** | **String** | 应用类型,1自建应用,2市场应用 | [optional] | +|**appId** | **String** | APPID | [optional] | +|**category** | **String** | 应用分类,1 标准web应用,2单页web应用,3客户端应用,4后端服务 | [optional] | +|**appSecret** | **String** | APPSEC,开发者用户调用返回 | [optional] | +|**descr** | **String** | 应用描述 | [optional] | +|**logo** | **String** | logo路径 | [optional] | +|**loginUrl** | **String** | 登录路径 | [optional] | +|**domain** | **String** | 应用绑定的唯一域名 | [optional] | +|**domainSn** | **String** | 应用域名 SN | [optional] | +|**redirectUrl** | **String** | 重定向url | [optional] | +|**logoutUrl** | **String** | 登出url | [optional] | +|**subAccountPolicy** | **Integer** | 子账号策略 | [optional] | +|**prop** | **Object** | 扩展属性 | [optional] | +|**timeCreated** | **String** | 创建时间 | [optional] | +|**timeModified** | **String** | 更新时间 | [optional] | +|**status** | **String** | 状态,1启用,0禁用 | [optional] | +|**config** | **Object** | | | +|**protocols** | **List<Object>** | | [optional] | + + + diff --git a/docs/AppSubAccount.md b/docs/AppSubAccount.md new file mode 100644 index 0000000..bdfb358 --- /dev/null +++ b/docs/AppSubAccount.md @@ -0,0 +1,28 @@ + + +# AppSubAccount + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**userId** | **String** | | | +|**username** | **String** | | | +|**appId** | **String** | | | +|**appName** | **String** | | | +|**accName** | **String** | | | +|**accNameDisplayed** | **String** | | | +|**accSource** | **String** | | | +|**developerId** | **String** | | | +|**tenantId** | **String** | | | +|**accPassword** | **String** | | | +|**accStatus** | **String** | | | +|**accSyncStatus** | **String** | | | +|**accProp** | **Object** | | | +|**timeCreated** | **String** | | | +|**timeModified** | **String** | | | + + + diff --git a/docs/Au.md b/docs/Au.md new file mode 100644 index 0000000..b69a3e7 --- /dev/null +++ b/docs/Au.md @@ -0,0 +1,25 @@ + + +# Au + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**authUnitId** | **String** | | | +|**resource** | **Object** | | [optional] | +|**resourceSet** | [**AuResourceSet**](AuResourceSet.md) | | [optional] | +|**affect** | **String** | allow/deny | | +|**resourceType** | **String** | 当resource存在时 | [optional] | +|**code** | **String** | 当 resource 存在时表示 resource_code 当 resource_set存在时表示 resource_set_code | | +|**description** | **String** | | [optional] | +|**applicationName** | **String** | | | +|**identityId** | **String** | | | +|**identityType** | **String** | | | +|**identityName** | **String** | | | +|**inherited** | **Boolean** | | | + + + diff --git a/docs/AuResourceSet.md b/docs/AuResourceSet.md new file mode 100644 index 0000000..5297f96 --- /dev/null +++ b/docs/AuResourceSet.md @@ -0,0 +1,22 @@ + + +# AuResourceSet + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | +|**applicationId** | **String** | | [optional] | +|**applicationName** | **String** | | [optional] | +|**isGlobal** | **Boolean** | | [optional] | +|**code** | **String** | | [optional] | +|**description** | **String** | | [optional] | +|**timeModified** | **String** | | [optional] | +|**timeCreated** | **String** | | [optional] | +|**members** | [**List<ResourceSetMember>**](ResourceSetMember.md) | | [optional] | +|**matchAllResources** | **Boolean** | | [optional] | + + + diff --git a/docs/AuthRuleArg.md b/docs/AuthRuleArg.md new file mode 100644 index 0000000..82cc0b7 --- /dev/null +++ b/docs/AuthRuleArg.md @@ -0,0 +1,17 @@ + + +# AuthRuleArg + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**resource** | [**EmptyObject4Resource**](EmptyObject4Resource.md) | | [optional] | +|**resourceSet** | [**EmptyObject4ResourceSet**](EmptyObject4ResourceSet.md) | | [optional] | +|**application** | [**EmptyObject4Application**](EmptyObject4Application.md) | | [optional] | +|**affect** | **String** | allow/deny | | +|**ownerAppId** | **String** | 用于标识应用(尤其是在使用全局资源的场景下) | | + + + diff --git a/docs/AuthUnit.md b/docs/AuthUnit.md new file mode 100644 index 0000000..fd036cf --- /dev/null +++ b/docs/AuthUnit.md @@ -0,0 +1,19 @@ + + +# AuthUnit + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**identityId** | **String** | | | +|**identityName** | **String** | | | +|**identityType** | **String** | user 用户 ,programmer 编程者,node 组织/自定义关系 | | +|**rules** | [**List<Au>**](Au.md) | | | +|**timeCreated** | **String** | | | +|**timeModified** | **String** | | | + + + diff --git a/docs/AuthUnitResouce.md b/docs/AuthUnitResouce.md new file mode 100644 index 0000000..4fd2b7e --- /dev/null +++ b/docs/AuthUnitResouce.md @@ -0,0 +1,28 @@ + + +# AuthUnitResouce + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**developerId** | **String** | | | +|**tenantId** | **String** | | | +|**applicationId** | **String** | | | +|**applicatioinName** | **String** | | | +|**isGlobal** | **Boolean** | | | +|**description** | **String** | | | +|**type** | **String** | | | +|**code** | **String** | | | +|**uri** | **String** | | [optional] | +|**timeModified** | **String** | | | +|**timeCreated** | **String** | | | +|**scope** | **String** | | | +|**selectedActions** | **List<String>** | | [optional] | +|**matchAllActions** | **Boolean** | | [optional] | +|**matchAllResources** | **Boolean** | | [optional] | + + + diff --git a/docs/AuthUnitResourceSet.md b/docs/AuthUnitResourceSet.md new file mode 100644 index 0000000..ca35ff8 --- /dev/null +++ b/docs/AuthUnitResourceSet.md @@ -0,0 +1,22 @@ + + +# AuthUnitResourceSet + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | +|**applicationId** | **String** | | [optional] | +|**applicationName** | **String** | | [optional] | +|**isGlobal** | **Boolean** | | [optional] | +|**code** | **String** | | [optional] | +|**description** | **String** | | [optional] | +|**timeModified** | **String** | | [optional] | +|**timeCreated** | **String** | | [optional] | +|**members** | [**List<ResourceSetMember>**](ResourceSetMember.md) | | [optional] | +|**matchAllResources** | **Boolean** | | [optional] | + + + diff --git a/docs/AuthorizeApplicationsRequest.md b/docs/AuthorizeApplicationsRequest.md new file mode 100644 index 0000000..23c833e --- /dev/null +++ b/docs/AuthorizeApplicationsRequest.md @@ -0,0 +1,15 @@ + + +# AuthorizeApplicationsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identities** | [**List<IdentityObj>**](IdentityObj.md) | | | +|**applicationId** | **String** | | | +|**affect** | **String** | allow, deny | | + + + diff --git a/docs/AuthzApp.md b/docs/AuthzApp.md new file mode 100644 index 0000000..d1097ef --- /dev/null +++ b/docs/AuthzApp.md @@ -0,0 +1,24 @@ + + +# AuthzApp + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**developerId** | **String** | | | +|**tenantId** | **String** | | | +|**name** | **String** | | | +|**type** | **String** | - 0 默认应用 - 1 自建应用 - 2 模板应用 - 3 组件应用 | | +|**accessPolicy** | **String** | | | +|**decr** | **String** | | [optional] | +|**logo** | **String** | base64编码 | | +|**accessUrl** | **String** | | | +|**enabledProtocols** | **List<String>** | oidc/saml/sxp 等 | [optional] | +|**timeModified** | **String** | rfc3339 | | +|**timeCreated** | **String** | rfc3339 | | + + + diff --git a/docs/Bucket.md b/docs/Bucket.md new file mode 100644 index 0000000..ae9f492 --- /dev/null +++ b/docs/Bucket.md @@ -0,0 +1,15 @@ + + +# Bucket + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bucket** | **String** | | | +|**dataSize** | **Integer** | 单位:byte | | +|**objectCount** | **Integer** | | | + + + diff --git a/docs/CoreObject.md b/docs/CoreObject.md new file mode 100644 index 0000000..c94a143 --- /dev/null +++ b/docs/CoreObject.md @@ -0,0 +1,23 @@ + + +# CoreObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**objectDisplayName** | **String** | | | +|**objectType** | **String** | 固定值:tree | | +|**objectCode** | **String** | 唯一,不可改,外键关联引用 | | +|**objectProps** | **String** | | [optional] | +|**isDefault** | **String** | 是否默认组织关系,1是,0否 | [optional] | +|**status** | **String** | | [optional] | +|**developerId** | **String** | | [optional] | +|**tenantId** | **String** | | [optional] | +|**timeCreated** | **String** | | [optional] | +|**timeModified** | **String** | | [optional] | + + + diff --git a/docs/Create200Response.md b/docs/Create200Response.md new file mode 100644 index 0000000..52caf4e --- /dev/null +++ b/docs/Create200Response.md @@ -0,0 +1,13 @@ + + +# Create200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | 唯一标识 | [optional] | + + + diff --git a/docs/CreateAccountRequest.md b/docs/CreateAccountRequest.md new file mode 100644 index 0000000..177d43d --- /dev/null +++ b/docs/CreateAccountRequest.md @@ -0,0 +1,22 @@ + + +# CreateAccountRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**userId** | **String** | | | +|**username** | **String** | | | +|**appId** | **String** | | | +|**accName** | **String** | | | +|**accNameDisplayed** | **String** | | [optional] | +|**accSource** | **String** | | [optional] | +|**accPassword** | **String** | | | +|**accStatus** | **String** | 1启用,0禁用 | | +|**sysExtProps** | **Object** | | [optional] | +|**freeExtProps** | **Object** | | [optional] | + + + diff --git a/docs/CreateNodeRequest.md b/docs/CreateNodeRequest.md new file mode 100644 index 0000000..32038b4 --- /dev/null +++ b/docs/CreateNodeRequest.md @@ -0,0 +1,33 @@ + + +# CreateNodeRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | 节点ID | [optional] | +|**arn** | **String** | | [optional] | +|**timeCreated** | **String** | 创建时间 | [optional] | +|**tag** | **String** | 用于定义节点类型,目前支持:org(组织),role(角色),position(岗位),group(组) | [optional] | +|**status** | **String** | 状态 | [optional] | +|**isPointer** | **String** | 是否指针类型 | [optional] | +|**code** | **String** | 节点code | | +|**name** | **String** | 节点名字 | | +|**permNamespaceArn** | **String** | 抽象权限容器的ARN | [optional] | +|**condition** | **String** | | [optional] | +|**isDynamic** | **String** | 是否动态节点(0普通结点,1动态结点) | [optional] | +|**sysCode** | **String** | 系统code | | +|**operatorId** | **String** | 操作者id | [optional] | +|**pointerId** | **String** | 指针指向的实体节点 | [optional] | +|**seq** | **Integer** | 序号 | [optional] | +|**description** | **String** | 描述 | [optional] | +|**timeModified** | **String** | 最后修改时间 | [optional] | +|**objectCode** | **String** | OBJ_ID,组织,角色,岗位,职级等 | | +|**parentId** | **String** | 父节点id | [optional] | +|**sysExtProps** | **Object** | 额外属性,需要先定义schema | [optional] | +|**freeExtProps** | **Object** | 可以自由扩展 | [optional] | + + + diff --git a/docs/CreateOrganization200Response.md b/docs/CreateOrganization200Response.md new file mode 100644 index 0000000..7f21b13 --- /dev/null +++ b/docs/CreateOrganization200Response.md @@ -0,0 +1,13 @@ + + +# CreateOrganization200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | 创建ID | [optional] | + + + diff --git a/docs/CreateOrganizationRequest.md b/docs/CreateOrganizationRequest.md new file mode 100644 index 0000000..cfbcca0 --- /dev/null +++ b/docs/CreateOrganizationRequest.md @@ -0,0 +1,18 @@ + + +# CreateOrganizationRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**objectDisplayName** | **String** | | | +|**objectType** | **String** | 固定值:tree | | +|**objectCode** | **String** | 唯一,不可改,外键关联引用 | | +|**objectProps** | **String** | | [optional] | +|**isDefault** | **String** | 是否默认组织关系,1是,0否 | [optional] | +|**status** | **String** | | [optional] | + + + diff --git a/docs/CreateRequest.md b/docs/CreateRequest.md new file mode 100644 index 0000000..e3056c9 --- /dev/null +++ b/docs/CreateRequest.md @@ -0,0 +1,34 @@ + + +# CreateRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**username** | **String** | 用户名,唯一,不传后台自动生成 | [optional] | +|**password** | **String** | 密码,不传后台生成默认密码 | [optional] | +|**passwordStatus** | **String** | 密码状态(valid/invalid) | [optional] | +|**displayName** | **String** | 显示名称 | [optional] | +|**firstname** | **String** | 名 | [optional] | +|**lastname** | **String** | 姓 | [optional] | +|**realname** | **String** | 真实姓名 | [optional] | +|**pinyin** | **String** | 拼音 | [optional] | +|**nickname** | **String** | 昵称 | [optional] | +|**userType** | **String** | 用户类型,不传后台设置系统默认类型 | [optional] | +|**mobile** | **String** | 手机 | [optional] | +|**email** | **String** | 邮箱 | [optional] | +|**gender** | **String** | 性别 | [optional] | +|**certType** | **String** | 证件类型 | [optional] | +|**certNumber** | **String** | 证件号 | [optional] | +|**region** | **String** | 区域 | [optional] | +|**workTime** | **String** | 加入时间 | [optional] | +|**workTitle** | **String** | 职位 | [optional] | +|**idpConfigId** | **BigDecimal** | 身份源ID,作为创建时记录,不做更新 | | +|**sysExtProps** | **Object** | 系统扩展属性,json对象{\"age\": 18, \"love\": \"足球\"} | [optional] | +|**freeExtProps** | **Object** | 自由扩展属性,json对象 | [optional] | +|**isNotify** | **Boolean** | 是否通知:默认不传false不通知,true通知 | [optional] | + + + diff --git a/docs/CreateRequest1.md b/docs/CreateRequest1.md new file mode 100644 index 0000000..2c6580e --- /dev/null +++ b/docs/CreateRequest1.md @@ -0,0 +1,28 @@ + + +# CreateRequest1 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | | +|**type** | **String** | 1,自建应用,2模板应用(市场应用) | | +|**domainSn** | **String** | 域名 | | +|**templateId** | **String** | 不填写则代表自建应用 | [optional] | +|**category** | **String** | 1 标准web应用,2单页web应用,3客户端应用,4后端服务 | | +|**descr** | **String** | | [optional] | +|**logo** | **String** | 格式为:http://ip:port/logo.png | [optional] | +|**loginUrl** | **String** | | [optional] | +|**redirectUrl** | **String** | | [optional] | +|**logoutUrl** | **String** | | [optional] | +|**subAccountPolicy** | **String** | 1启用,0不启用,启用后单点登录返回 | [optional] | +|**sysExtProps** | **Object** | kv字典数据 | [optional] | +|**freeExtProps** | **Object** | kv字典数据 | | +|**protocolType** | **String** | 默认 oidc | [optional] | +|**protocolProp** | [**CreateRequest1ProtocolProp**](CreateRequest1ProtocolProp.md) | | [optional] | +|**configProp** | [**CreateRequest1ConfigProp**](CreateRequest1ConfigProp.md) | | [optional] | + + + diff --git a/docs/CreateRequest1ConfigProp.md b/docs/CreateRequest1ConfigProp.md new file mode 100644 index 0000000..58154c0 --- /dev/null +++ b/docs/CreateRequest1ConfigProp.md @@ -0,0 +1,25 @@ + + +# CreateRequest1ConfigProp + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **String** | | [optional] | +|**tenantId** | **String** | | [optional] | +|**mfaConfig** | **Object** | | [optional] | +|**regPolicy** | **List<String>** | | [optional] | +|**mfaEnabled** | **String** | | [optional] | +|**ssoEnabled** | **String** | | [optional] | +|**developerId** | **String** | | [optional] | +|**accessPolicy** | [**CreateRequest1ConfigPropAccessPolicy**](CreateRequest1ConfigPropAccessPolicy.md) | | [optional] | +|**allowedRegMethod** | **Object** | | [optional] | +|**defaultRegMethod** | **String** | | [optional] | +|**allowedLoginMethod** | [**CreateRequest1ConfigPropAllowedLoginMethod**](CreateRequest1ConfigPropAllowedLoginMethod.md) | | [optional] | +|**defaultLoginMethod** | **String** | | [optional] | +|**allowedSocialLoginProvider** | [**CreateRequest1ConfigPropAllowedSocialLoginProvider**](CreateRequest1ConfigPropAllowedSocialLoginProvider.md) | | [optional] | + + + diff --git a/docs/CreateRequest1ConfigPropAccessPolicy.md b/docs/CreateRequest1ConfigPropAccessPolicy.md new file mode 100644 index 0000000..f485d7d --- /dev/null +++ b/docs/CreateRequest1ConfigPropAccessPolicy.md @@ -0,0 +1,13 @@ + + +# CreateRequest1ConfigPropAccessPolicy + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**forgetPassword** | **List<String>** | | [optional] | + + + diff --git a/docs/CreateRequest1ConfigPropAllowedLoginMethod.md b/docs/CreateRequest1ConfigPropAllowedLoginMethod.md new file mode 100644 index 0000000..9bd97d4 --- /dev/null +++ b/docs/CreateRequest1ConfigPropAllowedLoginMethod.md @@ -0,0 +1,13 @@ + + +# CreateRequest1ConfigPropAllowedLoginMethod + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | + + + diff --git a/docs/CreateRequest1ConfigPropAllowedSocialLoginProvider.md b/docs/CreateRequest1ConfigPropAllowedSocialLoginProvider.md new file mode 100644 index 0000000..41e3f04 --- /dev/null +++ b/docs/CreateRequest1ConfigPropAllowedSocialLoginProvider.md @@ -0,0 +1,14 @@ + + +# CreateRequest1ConfigPropAllowedSocialLoginProvider + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**wechatScanQr** | **BigDecimal** | | [optional] | +|**dingdingScanQr** | **BigDecimal** | | [optional] | + + + diff --git a/docs/CreateRequest1ProtocolProp.md b/docs/CreateRequest1ProtocolProp.md new file mode 100644 index 0000000..184cafe --- /dev/null +++ b/docs/CreateRequest1ProtocolProp.md @@ -0,0 +1,24 @@ + + +# CreateRequest1ProtocolProp + +默认 oidc 相关配置 + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**acsUrl** | **String** | | [optional] | +|**spEntity** | **String** | | [optional] | +|**responseAttr** | [**List<CreateRequest1ProtocolPropResponseAttrInner>**](CreateRequest1ProtocolPropResponseAttrInner.md) | | [optional] | +|**digestAlgorithm** | **String** | | [optional] | +|**lifetimeInSeconds** | **BigDecimal** | | [optional] | +|**signatureAlgorithm** | **String** | | [optional] | +|**nameIdentifierFormat** | **String** | | [optional] | +|**authnContextClassRef** | **String** | | [optional] | +|**samlResponseSigningKey** | **String** | | [optional] | +|**samlResponseSigningCert** | **String** | | [optional] | +|**samlResponseSigningCertFingerprint** | **String** | | [optional] | + + + diff --git a/docs/CreateRequest1ProtocolPropResponseAttrInner.md b/docs/CreateRequest1ProtocolPropResponseAttrInner.md new file mode 100644 index 0000000..cc8d361 --- /dev/null +++ b/docs/CreateRequest1ProtocolPropResponseAttrInner.md @@ -0,0 +1,15 @@ + + +# CreateRequest1ProtocolPropResponseAttrInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | **String** | | | +|**attribute** | **String** | | | +|**nameFormat** | **String** | | | + + + diff --git a/docs/CreateSecrets200Response.md b/docs/CreateSecrets200Response.md new file mode 100644 index 0000000..3cf821c --- /dev/null +++ b/docs/CreateSecrets200Response.md @@ -0,0 +1,14 @@ + + +# CreateSecrets200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | 操作结果 | [optional] | +|**data** | [**CreateSecrets200ResponseData**](CreateSecrets200ResponseData.md) | | [optional] | + + + diff --git a/docs/CreateSecrets200ResponseData.md b/docs/CreateSecrets200ResponseData.md new file mode 100644 index 0000000..58465f3 --- /dev/null +++ b/docs/CreateSecrets200ResponseData.md @@ -0,0 +1,14 @@ + + +# CreateSecrets200ResponseData + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**appSecret** | **String** | 安全码 | [optional] | +|**id** | **String** | 唯一标识 | [optional] | + + + diff --git a/docs/CreateStoreCredential200Response.md b/docs/CreateStoreCredential200Response.md new file mode 100644 index 0000000..8187604 --- /dev/null +++ b/docs/CreateStoreCredential200Response.md @@ -0,0 +1,16 @@ + + +# CreateStoreCredential200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **BigDecimal** | http状态码,成功不显示 | [optional] | +|**errno** | **BigDecimal** | 返回错误码 | | +|**message** | **String** | 返回描述 | | +|**data** | **String** | 返回id标识 | [optional] | + + + diff --git a/docs/CreateStoreCredentialRequest.md b/docs/CreateStoreCredentialRequest.md new file mode 100644 index 0000000..a87b54d --- /dev/null +++ b/docs/CreateStoreCredentialRequest.md @@ -0,0 +1,25 @@ + + +# CreateStoreCredentialRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**providerCode** | **String** | 社会化身份源code | | +|**idpConfigId** | **BigDecimal** | 社会化登录配置的ID | | +|**id1** | **String** | 社会化身份标识1,如openid | | +|**id2** | **String** | 社会化身份标识2,如unionid | [optional] | +|**metadata** | **String** | 更多社会化身份标识 | [optional] | +|**status** | **String** | 状态 | [optional] | +|**nickname** | **String** | 昵称 | [optional] | +|**avatar** | **String** | 头像 | [optional] | +|**realname** | **String** | 真实姓名 | [optional] | +|**mobile** | **String** | 手机 | [optional] | +|**email** | **String** | 邮箱 | [optional] | +|**gender** | **String** | 性别 | [optional] | +|**idProviderConnection** | **String** | | [optional] | + + + diff --git a/docs/CronJob.md b/docs/CronJob.md new file mode 100644 index 0000000..90fa7fa --- /dev/null +++ b/docs/CronJob.md @@ -0,0 +1,44 @@ + + +# CronJob + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**developerId** | **String** | | | +|**tenantId** | **String** | | | +|**namespace** | **String** | 定时任务所属的命名空间,也可以当做分组 | | +|**name** | **String** | | | +|**descr** | **String** | | [optional] | +|**tags** | **List<String>** | | | +|**config** | **Object** | json raw | | +|**kind** | **String** | | | +|**from** | **String** | | | +|**execFrequency** | [**ExecFrequencyEnum**](#ExecFrequencyEnum) | | [optional] | +|**execCmd** | **String** | | [optional] | +|**injections** | [**List<Injection>**](Injection.md) | | [optional] | +|**status** | **String** | - running 运行中 - suspended 挂起 | | +|**timeCreated** | **String** | rfc3339 | | +|**timeModified** | **String** | rfc3339 | | + + + +## Enum: ExecFrequencyEnum + +| Name | Value | +|---- | -----| +| MONTHLY | "monthly" | +| WEEKLY | "weekly" | +| DAILY | "daily" | +| HOURLY | "hourly" | +| EVERY_12_HOUR | "every_12_hour" | +| EVERY_6_HOUR | "every_6_hour" | +| EVERY_3_HOUR | "every_3_hour" | +| EVERY_2_HOUR | "every_2_hour" | +| EVERY_30_MINUTE | "every_30_minute" | + + + diff --git a/docs/Delete200Response.md b/docs/Delete200Response.md new file mode 100644 index 0000000..2add3d7 --- /dev/null +++ b/docs/Delete200Response.md @@ -0,0 +1,16 @@ + + +# Delete200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **BigDecimal** | http状态码,成功不显示 | [optional] | +|**errno** | **BigDecimal** | 返回错误码 | | +|**message** | **String** | 返回描述 | | +|**data** | **BigDecimal** | 用户id | | + + + diff --git a/docs/Delete200Response1.md b/docs/Delete200Response1.md new file mode 100644 index 0000000..e7f2796 --- /dev/null +++ b/docs/Delete200Response1.md @@ -0,0 +1,14 @@ + + +# Delete200Response1 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | | [optional] | +|**data** | **Object** | 结果标识true/false | [optional] | + + + diff --git a/docs/DeleteAuthUnitRulesRequest.md b/docs/DeleteAuthUnitRulesRequest.md new file mode 100644 index 0000000..3d29c74 --- /dev/null +++ b/docs/DeleteAuthUnitRulesRequest.md @@ -0,0 +1,13 @@ + + +# DeleteAuthUnitRulesRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ids** | **List<String>** | | | + + + diff --git a/docs/DeleteMembersRequest.md b/docs/DeleteMembersRequest.md new file mode 100644 index 0000000..1be5a5a --- /dev/null +++ b/docs/DeleteMembersRequest.md @@ -0,0 +1,14 @@ + + +# DeleteMembersRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nodeId** | **String** | 节点ID | | +|**userId** | **String** | 用户原始ID | | + + + diff --git a/docs/DeleteNode200Response.md b/docs/DeleteNode200Response.md new file mode 100644 index 0000000..e73d311 --- /dev/null +++ b/docs/DeleteNode200Response.md @@ -0,0 +1,13 @@ + + +# DeleteNode200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | + + + diff --git a/docs/DeleteOrganization200Response.md b/docs/DeleteOrganization200Response.md new file mode 100644 index 0000000..48b54f9 --- /dev/null +++ b/docs/DeleteOrganization200Response.md @@ -0,0 +1,13 @@ + + +# DeleteOrganization200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | + + + diff --git a/docs/DeleteResourcesRequest.md b/docs/DeleteResourcesRequest.md new file mode 100644 index 0000000..407c34e --- /dev/null +++ b/docs/DeleteResourcesRequest.md @@ -0,0 +1,13 @@ + + +# DeleteResourcesRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ids** | **List<String>** | | | + + + diff --git a/docs/Disable200Response.md b/docs/Disable200Response.md new file mode 100644 index 0000000..e3792c9 --- /dev/null +++ b/docs/Disable200Response.md @@ -0,0 +1,14 @@ + + +# Disable200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | | [optional] | +|**data** | **BigDecimal** | 操作ID | [optional] | + + + diff --git a/docs/EmptyObject.md b/docs/EmptyObject.md new file mode 100644 index 0000000..4b660de --- /dev/null +++ b/docs/EmptyObject.md @@ -0,0 +1,13 @@ + + +# EmptyObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**configId** | **String** | 已配置的idp conn id | | + + + diff --git a/docs/EmptyObject1.md b/docs/EmptyObject1.md new file mode 100644 index 0000000..6f7ee9e --- /dev/null +++ b/docs/EmptyObject1.md @@ -0,0 +1,13 @@ + + +# EmptyObject1 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**configContent** | **Object** | 配置参数 | [optional] | + + + diff --git a/docs/EmptyObject10.md b/docs/EmptyObject10.md new file mode 100644 index 0000000..fcc7964 --- /dev/null +++ b/docs/EmptyObject10.md @@ -0,0 +1,16 @@ + + +# EmptyObject10 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**resourceId** | **BigDecimal** | | | +|**resourceScope** | **String** | | | +|**resourceActions** | **List<String>** | | [optional] | +|**matchAllActions** | **Boolean** | | | + + + diff --git a/docs/EmptyObject11.md b/docs/EmptyObject11.md new file mode 100644 index 0000000..f4f1929 --- /dev/null +++ b/docs/EmptyObject11.md @@ -0,0 +1,13 @@ + + +# EmptyObject11 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**memberId** | **String** | 成员id | | + + + diff --git a/docs/EmptyObject12.md b/docs/EmptyObject12.md new file mode 100644 index 0000000..717eba1 --- /dev/null +++ b/docs/EmptyObject12.md @@ -0,0 +1,16 @@ + + +# EmptyObject12 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**resourceId** | **BigDecimal** | | | +|**resourceScope** | **String** | | | +|**resourceActions** | [**List<EmptyObject12ResourceActionsInner>**](EmptyObject12ResourceActionsInner.md) | | [optional] | +|**matchAllActions** | **Boolean** | | | + + + diff --git a/docs/EmptyObject12ResourceActionsInner.md b/docs/EmptyObject12ResourceActionsInner.md new file mode 100644 index 0000000..e17fcf4 --- /dev/null +++ b/docs/EmptyObject12ResourceActionsInner.md @@ -0,0 +1,14 @@ + + +# EmptyObject12ResourceActionsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **BigDecimal** | 操作id | | +|**code** | **String** | 操作代码 | | + + + diff --git a/docs/EmptyObject13.md b/docs/EmptyObject13.md new file mode 100644 index 0000000..8c5362f --- /dev/null +++ b/docs/EmptyObject13.md @@ -0,0 +1,13 @@ + + +# EmptyObject13 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | + + + diff --git a/docs/EmptyObject2.md b/docs/EmptyObject2.md new file mode 100644 index 0000000..b39465e --- /dev/null +++ b/docs/EmptyObject2.md @@ -0,0 +1,14 @@ + + +# EmptyObject2 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identities** | [**List<IdentityObj>**](IdentityObj.md) | | | +|**rules** | [**List<AuthRuleArg>**](AuthRuleArg.md) | | | + + + diff --git a/docs/EmptyObject3.md b/docs/EmptyObject3.md new file mode 100644 index 0000000..5f1a64d --- /dev/null +++ b/docs/EmptyObject3.md @@ -0,0 +1,15 @@ + + +# EmptyObject3 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**description** | **String** | 描述 | [optional] | +|**uri** | **String** | 资源URI, 当type=api/ui 时有效 | [optional] | +|**actions** | [**List<EmptyObject3ActionsInner>**](EmptyObject3ActionsInner.md) | | [optional] | + + + diff --git a/docs/EmptyObject3ActionsInner.md b/docs/EmptyObject3ActionsInner.md new file mode 100644 index 0000000..2dee5ca --- /dev/null +++ b/docs/EmptyObject3ActionsInner.md @@ -0,0 +1,15 @@ + + +# EmptyObject3ActionsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | 如果不携带id,会认为是新创建的code | [optional] | +|**code** | **String** | | | +|**description** | **String** | | [optional] | + + + diff --git a/docs/EmptyObject4.md b/docs/EmptyObject4.md new file mode 100644 index 0000000..bd711e7 --- /dev/null +++ b/docs/EmptyObject4.md @@ -0,0 +1,16 @@ + + +# EmptyObject4 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**resource** | [**EmptyObject4Resource**](EmptyObject4Resource.md) | | [optional] | +|**resourceSet** | [**EmptyObject4ResourceSet**](EmptyObject4ResourceSet.md) | | [optional] | +|**application** | [**EmptyObject4Application**](EmptyObject4Application.md) | | [optional] | +|**affect** | **String** | allow/deny | | + + + diff --git a/docs/EmptyObject4Application.md b/docs/EmptyObject4Application.md new file mode 100644 index 0000000..f9b6abf --- /dev/null +++ b/docs/EmptyObject4Application.md @@ -0,0 +1,13 @@ + + +# EmptyObject4Application + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | + + + diff --git a/docs/EmptyObject4Resource.md b/docs/EmptyObject4Resource.md new file mode 100644 index 0000000..30dd4c7 --- /dev/null +++ b/docs/EmptyObject4Resource.md @@ -0,0 +1,19 @@ + + +# EmptyObject4Resource + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**scope** | **String** | | | +|**actions** | **List<String>** | | [optional] | +|**matchAllActions** | **Boolean** | | [optional] | +|**matchAllResources** | **Boolean** | | [optional] | +|**applicationId** | **String** | 当match_all_resources=true时必填 | [optional] | +|**applicationName** | **String** | 当match_all_resources=true时必填 | [optional] | + + + diff --git a/docs/EmptyObject4ResourceSet.md b/docs/EmptyObject4ResourceSet.md new file mode 100644 index 0000000..c9803e6 --- /dev/null +++ b/docs/EmptyObject4ResourceSet.md @@ -0,0 +1,13 @@ + + +# EmptyObject4ResourceSet + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | + + + diff --git a/docs/EmptyObject5.md b/docs/EmptyObject5.md new file mode 100644 index 0000000..8c87054 --- /dev/null +++ b/docs/EmptyObject5.md @@ -0,0 +1,18 @@ + + +# EmptyObject5 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**description** | **String** | 描述 | [optional] | +|**code** | **String** | 资源代码 | | +|**applicationId** | **BigDecimal** | 应用id | | +|**type** | **String** | 资源类型,data/api/ui | | +|**uri** | **String** | 资源URI, 当type=api/ui 时有效 | [optional] | +|**actions** | [**List<EmptyObject5ActionsInner>**](EmptyObject5ActionsInner.md) | | [optional] | + + + diff --git a/docs/EmptyObject5ActionsInner.md b/docs/EmptyObject5ActionsInner.md new file mode 100644 index 0000000..5ff3cd4 --- /dev/null +++ b/docs/EmptyObject5ActionsInner.md @@ -0,0 +1,14 @@ + + +# EmptyObject5ActionsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **String** | | | +|**description** | **String** | | [optional] | + + + diff --git a/docs/EmptyObject6.md b/docs/EmptyObject6.md new file mode 100644 index 0000000..9d9c9b2 --- /dev/null +++ b/docs/EmptyObject6.md @@ -0,0 +1,13 @@ + + +# EmptyObject6 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**resourceId** | **String** | 资源id | | + + + diff --git a/docs/EmptyObject7.md b/docs/EmptyObject7.md new file mode 100644 index 0000000..b611087 --- /dev/null +++ b/docs/EmptyObject7.md @@ -0,0 +1,14 @@ + + +# EmptyObject7 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **String** | 集合代码 | | +|**description** | **String** | 描述 | | + + + diff --git a/docs/EmptyObject8.md b/docs/EmptyObject8.md new file mode 100644 index 0000000..1b59b43 --- /dev/null +++ b/docs/EmptyObject8.md @@ -0,0 +1,15 @@ + + +# EmptyObject8 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**applicationId** | **String** | 应用id | | +|**code** | **String** | 集合代码 | | +|**description** | **String** | 描述 | [optional] | + + + diff --git a/docs/EmptyObject9.md b/docs/EmptyObject9.md new file mode 100644 index 0000000..cf4c042 --- /dev/null +++ b/docs/EmptyObject9.md @@ -0,0 +1,13 @@ + + +# EmptyObject9 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **BigDecimal** | | | + + + diff --git a/docs/Enable200Response.md b/docs/Enable200Response.md new file mode 100644 index 0000000..8cab811 --- /dev/null +++ b/docs/Enable200Response.md @@ -0,0 +1,14 @@ + + +# Enable200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | | | +|**data** | **BigDecimal** | 操作ID | | + + + diff --git a/docs/Get200Response.md b/docs/Get200Response.md new file mode 100644 index 0000000..9bc6bb2 --- /dev/null +++ b/docs/Get200Response.md @@ -0,0 +1,40 @@ + + +# Get200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **BigDecimal** | 用户id标识 | [optional] | +|**username** | **String** | 用户名,唯一 | [optional] | +|**password** | **String** | 密码 | [optional] | +|**displayName** | **String** | 显示名称 | [optional] | +|**firstname** | **String** | 名 | [optional] | +|**lastname** | **String** | 姓 | [optional] | +|**realname** | **String** | 真实姓名 | [optional] | +|**pinyin** | **String** | 拼音 | [optional] | +|**nickname** | **String** | 昵称 | [optional] | +|**userType** | **String** | 用户类型 | [optional] | +|**mobile** | **String** | 手机 | [optional] | +|**email** | **String** | 邮箱 | [optional] | +|**gender** | **String** | 性别 | [optional] | +|**certType** | **String** | 证件类型 | [optional] | +|**certNumber** | **String** | 证件号 | [optional] | +|**region** | **String** | 区域 | [optional] | +|**workTime** | **String** | 加入时间 | [optional] | +|**workTitle** | **String** | 职位 | [optional] | +|**extProp** | **Object** | 扩展信息,json对象{\"age\": 18, \"love\": \"足球\"} | [optional] | +|**arn** | **String** | arn | [optional] | +|**idProviderConnection** | **BigDecimal** | 身份源ID | [optional] | +|**developerId** | **BigDecimal** | 开发者id | [optional] | +|**tenantId** | **BigDecimal** | 租户id | [optional] | +|**lastLoginIpaddr** | **String** | 上次登录IP | [optional] | +|**lastLoginTime** | **String** | 上次登录时间 | [optional] | +|**timeCreated** | **String** | 创建时间 | [optional] | +|**timeModified** | **BigDecimal** | 修改时间 | [optional] | +|**status** | **String** | 状态:1正常,0禁用 | [optional] | + + + diff --git a/docs/Get400Response.md b/docs/Get400Response.md new file mode 100644 index 0000000..8feffe0 --- /dev/null +++ b/docs/Get400Response.md @@ -0,0 +1,15 @@ + + +# Get400Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | | | +|**errno** | **Integer** | | | +|**message** | **String** | | | + + + diff --git a/docs/GetAccountsByApp200Response.md b/docs/GetAccountsByApp200Response.md new file mode 100644 index 0000000..e13bba8 --- /dev/null +++ b/docs/GetAccountsByApp200Response.md @@ -0,0 +1,14 @@ + + +# GetAccountsByApp200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**records** | [**List<AppSubAccount>**](AppSubAccount.md) | | [optional] | +|**total** | **BigDecimal** | | [optional] | + + + diff --git a/docs/GetAuthUnits200Response.md b/docs/GetAuthUnits200Response.md new file mode 100644 index 0000000..a9a0807 --- /dev/null +++ b/docs/GetAuthUnits200Response.md @@ -0,0 +1,14 @@ + + +# GetAuthUnits200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**totalNum** | **BigDecimal** | 总数量 | [optional] | +|**data** | [**List<AuthUnit>**](AuthUnit.md) | | [optional] | + + + diff --git a/docs/GetConfig200Response.md b/docs/GetConfig200Response.md new file mode 100644 index 0000000..5431ecc --- /dev/null +++ b/docs/GetConfig200Response.md @@ -0,0 +1,27 @@ + + +# GetConfig200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | 唯一标识 | | +|**appId** | **String** | 应用ID | | +|**allowedLoginMethod** | **String** | 允许的登录方式,格式为:[\"password\", \"vercode\"] | [optional] | +|**defaultLoginMethod** | **String** | 默认登录方式,格式为:password | | +|**allowedRegMethod** | **String** | 允许注册方式,格式为:[\"mobile\", \"email\"] | [optional] | +|**defaultRegMethod** | **String** | 默认注册方式,格式为:mobile | | +|**accessPolicy** | **String** | 应用级访问控制权限,格式为:{\"password_recovery\": [\"email\"]} | [optional] | +|**regPolicy** | **String** | 新用户注册策略(是否允许自动注册,注册验证方式等),1是,2否, | [optional] | +|**allowedIdProvider** | **String** | 允许的登录身份提供商,格式为:{\"wechat_scan_qr\": 1, \"dingding_scan_qr\":2} | [optional] | +|**ssoEnabled** | **Boolean** | 是否允许SSO | | +|**mfaEnabled** | **Boolean** | 是否开启MFA | [optional] | +|**mfaConfig** | [**GetConfig200ResponseMfaConfig**](GetConfig200ResponseMfaConfig.md) | | [optional] | +|**timeCreated** | **String** | 创建时间 | [optional] | +|**timeModified** | **String** | 修改时间 | [optional] | +|**status** | **String** | 状态,1启用,0禁用 | [optional] | + + + diff --git a/docs/GetConfig200ResponseMfaConfig.md b/docs/GetConfig200ResponseMfaConfig.md new file mode 100644 index 0000000..52ecd39 --- /dev/null +++ b/docs/GetConfig200ResponseMfaConfig.md @@ -0,0 +1,16 @@ + + +# GetConfig200ResponseMfaConfig + +开启的MFA配置 + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | | +|**providerType** | **String** | | | +|**configId** | **String** | | | + + + diff --git a/docs/GetMembers200ResponseInner.md b/docs/GetMembers200ResponseInner.md new file mode 100644 index 0000000..a08bcd2 --- /dev/null +++ b/docs/GetMembers200ResponseInner.md @@ -0,0 +1,25 @@ + + +# GetMembers200ResponseInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | 全局唯一ID | | +|**nodeId** | **String** | 节点ID | | +|**userId** | **String** | 用户ID | | +|**path** | **String** | 所属组织关系路径 | | +|**displayName** | **String** | 显示名 | | +|**username** | **String** | 用户名 | | +|**relationType** | **String** | 关联类型(用于区分多重关联) | [optional] | +|**relationData** | **String** | 关联扩展信息 | [optional] | +|**isDefault** | **String** | 是否默认关系 | [optional] | +|**timeCreated** | **OffsetDateTime** | 创建时间 | | +|**timeModified** | **OffsetDateTime** | 修改时间 | | +|**status** | **String** | 状态 | | +|**treeNode** | [**TreeNode**](TreeNode.md) | | | + + + diff --git a/docs/GetNodeMembers200Response.md b/docs/GetNodeMembers200Response.md new file mode 100644 index 0000000..b2cdd57 --- /dev/null +++ b/docs/GetNodeMembers200Response.md @@ -0,0 +1,15 @@ + + +# GetNodeMembers200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**totalNum** | **Integer** | 总数 | | +|**currentPage** | **Integer** | 当前页码 | | +|**data** | [**List<GetNodeMembers200ResponseDataInner>**](GetNodeMembers200ResponseDataInner.md) | 数据 | | + + + diff --git a/docs/GetNodeMembers200ResponseDataInner.md b/docs/GetNodeMembers200ResponseDataInner.md new file mode 100644 index 0000000..f062fbf --- /dev/null +++ b/docs/GetNodeMembers200ResponseDataInner.md @@ -0,0 +1,16 @@ + + +# GetNodeMembers200ResponseDataInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**userId** | **String** | 用户ID | | +|**username** | **String** | 用户名 | | +|**displayName** | **String** | 用户显示名 | | +|**nodeInfo** | [**List<GetNodeMembers200ResponseDataInnerNodeInfoInner>**](GetNodeMembers200ResponseDataInnerNodeInfoInner.md) | 用户节点信息 | | + + + diff --git a/docs/GetNodeMembers200ResponseDataInnerNodeInfoInner.md b/docs/GetNodeMembers200ResponseDataInnerNodeInfoInner.md new file mode 100644 index 0000000..275bf83 --- /dev/null +++ b/docs/GetNodeMembers200ResponseDataInnerNodeInfoInner.md @@ -0,0 +1,24 @@ + + +# GetNodeMembers200ResponseDataInnerNodeInfoInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | 全局唯一ID | | +|**nodeId** | **String** | 节点ID | | +|**userId** | **String** | 用户ID | | +|**path** | **String** | 所属组织关系路径 | | +|**displayName** | **String** | 显示名 | | +|**username** | **String** | 用户名 | | +|**relationType** | **String** | 关联类型(用于区分多重关联) | [optional] | +|**relationData** | **String** | 关联扩展信息 | [optional] | +|**isDefault** | **String** | 是否默认关系 | [optional] | +|**timeCreated** | **OffsetDateTime** | 创建时间 | | +|**timeModified** | **OffsetDateTime** | 修改时间 | | +|**status** | **String** | 状态 | | + + + diff --git a/docs/GetOrganization200ResponseInner.md b/docs/GetOrganization200ResponseInner.md new file mode 100644 index 0000000..4fd5505 --- /dev/null +++ b/docs/GetOrganization200ResponseInner.md @@ -0,0 +1,21 @@ + + +# GetOrganization200ResponseInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**objectDisplayName** | **String** | | | +|**objectType** | **String** | 固定值:tree | | +|**objectCode** | **String** | 唯一,不可改,外键关联引用 | | +|**objectProps** | **Object** | | [optional] | +|**isDefault** | **String** | 是否默认组织关系,1是,0否 | [optional] | +|**status** | **String** | | [optional] | +|**timeCreated** | **String** | | [optional] | +|**timeModified** | **String** | | [optional] | + + + diff --git a/docs/GetOrganizations200ResponseInner.md b/docs/GetOrganizations200ResponseInner.md new file mode 100644 index 0000000..842803c --- /dev/null +++ b/docs/GetOrganizations200ResponseInner.md @@ -0,0 +1,21 @@ + + +# GetOrganizations200ResponseInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**objectDisplayName** | **String** | | | +|**objectType** | **String** | 固定值:tree | | +|**objectCode** | **String** | 唯一,不可改,外键关联引用 | | +|**objectProps** | **Object** | | [optional] | +|**isDefault** | **String** | 是否默认组织关系,1是,0否 | [optional] | +|**status** | **String** | | [optional] | +|**timeCreated** | **String** | | [optional] | +|**timeModified** | **String** | | [optional] | + + + diff --git a/docs/GetPrivileges200Response.md b/docs/GetPrivileges200Response.md new file mode 100644 index 0000000..2c1b648 --- /dev/null +++ b/docs/GetPrivileges200Response.md @@ -0,0 +1,15 @@ + + +# GetPrivileges200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**totalNum** | **BigDecimal** | 数据总数 | [optional] | +|**currentPage** | **BigDecimal** | 当前页数(废弃) | [optional] | +|**data** | [**List<Privilege>**](Privilege.md) | 数据列表 | [optional] | + + + diff --git a/docs/GetResource200Response.md b/docs/GetResource200Response.md new file mode 100644 index 0000000..982af01 --- /dev/null +++ b/docs/GetResource200Response.md @@ -0,0 +1,21 @@ + + +# GetResource200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | 资源id | [optional] | +|**developerId** | **String** | 开发者id | [optional] | +|**tenantId** | **String** | 租户id | [optional] | +|**applicationId** | **String** | 应用id | [optional] | +|**description** | **String** | 描述 | [optional] | +|**type** | **String** | 类型 | [optional] | +|**code** | **String** | 代码 | [optional] | +|**timeModified** | **String** | 修改时间 rfc3339 | [optional] | +|**timeCreated** | **String** | 创建时间 rfc3339 | [optional] | + + + diff --git a/docs/GetResourceMembers200Response.md b/docs/GetResourceMembers200Response.md new file mode 100644 index 0000000..b1f8fbb --- /dev/null +++ b/docs/GetResourceMembers200Response.md @@ -0,0 +1,14 @@ + + +# GetResourceMembers200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**totalNum** | **BigDecimal** | 数据总数 | [optional] | +|**data** | [**List<ResourceSetMember>**](ResourceSetMember.md) | | [optional] | + + + diff --git a/docs/GetResourceSets200Response.md b/docs/GetResourceSets200Response.md new file mode 100644 index 0000000..850fbf3 --- /dev/null +++ b/docs/GetResourceSets200Response.md @@ -0,0 +1,14 @@ + + +# GetResourceSets200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**totalNum** | **BigDecimal** | 数据总数 | [optional] | +|**data** | [**List<ResourceSet>**](ResourceSet.md) | | [optional] | + + + diff --git a/docs/GetResources200Response.md b/docs/GetResources200Response.md new file mode 100644 index 0000000..8e8bc96 --- /dev/null +++ b/docs/GetResources200Response.md @@ -0,0 +1,14 @@ + + +# GetResources200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**totalNum** | **BigDecimal** | 数据总数 | [optional] | +|**data** | [**List<GetResource200Response>**](GetResource200Response.md) | | [optional] | + + + diff --git a/docs/GetStoredCredentials200Response.md b/docs/GetStoredCredentials200Response.md new file mode 100644 index 0000000..706643d --- /dev/null +++ b/docs/GetStoredCredentials200Response.md @@ -0,0 +1,15 @@ + + +# GetStoredCredentials200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<NullInner>**](NullInner.md) | | | +|**totalNum** | **Integer** | | | +|**pageNum** | **Integer** | | | + + + diff --git a/docs/GetTemplate200Response.md b/docs/GetTemplate200Response.md new file mode 100644 index 0000000..7b9d923 --- /dev/null +++ b/docs/GetTemplate200Response.md @@ -0,0 +1,15 @@ + + +# GetTemplate200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**currentPage** | **BigDecimal** | | [optional] | +|**data** | [**List<GetTemplate200ResponseDataInner>**](GetTemplate200ResponseDataInner.md) | | [optional] | +|**totalNum** | **BigDecimal** | | [optional] | + + + diff --git a/docs/GetTemplate200ResponseDataInner.md b/docs/GetTemplate200ResponseDataInner.md new file mode 100644 index 0000000..a69c8e2 --- /dev/null +++ b/docs/GetTemplate200ResponseDataInner.md @@ -0,0 +1,28 @@ + + +# GetTemplate200ResponseDataInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | 唯一标识 | [optional] | +|**name** | **String** | 应用名称 | [optional] | +|**type** | **String** | 应用类型,1自建应用,2市场应用 | [optional] | +|**category** | **String** | 应用分类 | [optional] | +|**descr** | **String** | 应用描述 | [optional] | +|**logo** | **String** | logo路径 | [optional] | +|**loginUrl** | **String** | 登录路径 | [optional] | +|**redirectUrl** | **String** | 重定向路径 | [optional] | +|**logoutUrl** | **String** | 登出路径 | [optional] | +|**subAccountPolicy** | **String** | 子账号策略,1启用,2不启用 | [optional] | +|**prop** | **Object** | 扩展属性 | [optional] | +|**protocolProp** | [**GetTemplate200ResponseDataInnerProtocolProp**](GetTemplate200ResponseDataInnerProtocolProp.md) | | [optional] | +|**configProp** | [**GetTemplate200ResponseDataInnerConfigProp**](GetTemplate200ResponseDataInnerConfigProp.md) | | [optional] | +|**timeCreated** | **String** | 创建事件 | [optional] | +|**timeModified** | **String** | | [optional] | +|**status** | **String** | | [optional] | + + + diff --git a/docs/GetTemplate200ResponseDataInnerConfigProp.md b/docs/GetTemplate200ResponseDataInnerConfigProp.md new file mode 100644 index 0000000..bfb94f7 --- /dev/null +++ b/docs/GetTemplate200ResponseDataInnerConfigProp.md @@ -0,0 +1,26 @@ + + +# GetTemplate200ResponseDataInnerConfigProp + +应用配置属性 + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **String** | | [optional] | +|**tenantId** | **String** | | [optional] | +|**mfaConfig** | **Object** | | [optional] | +|**regPolicy** | **BigDecimal** | | [optional] | +|**mfaEnabled** | **String** | | [optional] | +|**ssoEnabled** | **String** | | [optional] | +|**developerId** | **String** | | [optional] | +|**accessPolicy** | [**CreateRequest1ConfigPropAccessPolicy**](CreateRequest1ConfigPropAccessPolicy.md) | | [optional] | +|**allowedRegMethod** | **Object** | | [optional] | +|**defaultRegMethod** | **String** | | [optional] | +|**allowedLoginMethod** | [**CreateRequest1ConfigPropAllowedLoginMethod**](CreateRequest1ConfigPropAllowedLoginMethod.md) | | [optional] | +|**defaultLoginMethod** | **String** | | [optional] | +|**allowedIdProvider** | [**CreateRequest1ConfigPropAllowedSocialLoginProvider**](CreateRequest1ConfigPropAllowedSocialLoginProvider.md) | | [optional] | + + + diff --git a/docs/GetTemplate200ResponseDataInnerProtocolProp.md b/docs/GetTemplate200ResponseDataInnerProtocolProp.md new file mode 100644 index 0000000..21f2ba6 --- /dev/null +++ b/docs/GetTemplate200ResponseDataInnerProtocolProp.md @@ -0,0 +1,24 @@ + + +# GetTemplate200ResponseDataInnerProtocolProp + +单点登录协议属性 + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**acsUrl** | **String** | | [optional] | +|**spEntity** | **String** | | [optional] | +|**responseAttr** | [**List<CreateRequest1ProtocolPropResponseAttrInner>**](CreateRequest1ProtocolPropResponseAttrInner.md) | | [optional] | +|**digestAlgorithm** | **String** | | [optional] | +|**lifetimeInSeconds** | **BigDecimal** | | [optional] | +|**signatureAlgorithm** | **String** | | [optional] | +|**nameIdentifierFormat** | **String** | | [optional] | +|**authnContextClassRef** | **String** | | [optional] | +|**samlResponseSigningKey** | **String** | | [optional] | +|**samlResponseSigningCert** | **String** | | [optional] | +|**samlResponseSigningCertFingerprint** | **String** | | [optional] | + + + diff --git a/docs/IdentityObj.md b/docs/IdentityObj.md new file mode 100644 index 0000000..2e0b524 --- /dev/null +++ b/docs/IdentityObj.md @@ -0,0 +1,15 @@ + + +# IdentityObj + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identityId** | **String** | | | +|**identityName** | **String** | | | +|**identityType** | **String** | user 用户 ,programmer 编程者,node 组织/自定义关系 | | + + + diff --git a/docs/Injection.md b/docs/Injection.md new file mode 100644 index 0000000..a9b2c1e --- /dev/null +++ b/docs/Injection.md @@ -0,0 +1,15 @@ + + +# Injection + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**key** | **String** | | | +|**alias** | **String** | 注入时的别名,为空则为 key | [optional] | +|**value** | **String** | | | + + + diff --git a/docs/Job.md b/docs/Job.md new file mode 100644 index 0000000..b253fbb --- /dev/null +++ b/docs/Job.md @@ -0,0 +1,25 @@ + + +# Job + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | | | +|**cronJobId** | **String** | | | +|**cronJobKind** | **String** | | | +|**cronJobName** | **String** | | | +|**namespace** | **String** | | | +|**name** | **String** | | | +|**startTime** | **String** | 任务开始执行时间,rfc3339格式 | | +|**completionTime** | **String** | 任务结束执行时间,rfc3339格式 | [optional] | +|**status** | **String** | - running 执行中 - failed 执行失败 - success 执行成功 | | +|**timeStarted** | **String** | rfc3339 | [optional] | +|**timeCompleted** | **String** | rfc3339 | [optional] | +|**timeCreated** | **String** | rfc3339 | | +|**timeModified** | **String** | rfc3339 | | + + + diff --git a/docs/List200Response.md b/docs/List200Response.md new file mode 100644 index 0000000..f41c258 --- /dev/null +++ b/docs/List200Response.md @@ -0,0 +1,15 @@ + + +# List200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<List200ResponseDataInner>**](List200ResponseDataInner.md) | 返回用户列表 | [optional] | +|**totalNum** | **BigDecimal** | 总数 | [optional] | +|**pageNum** | **BigDecimal** | 当前页 | [optional] | + + + diff --git a/docs/List200Response1.md b/docs/List200Response1.md new file mode 100644 index 0000000..8fc99f6 --- /dev/null +++ b/docs/List200Response1.md @@ -0,0 +1,15 @@ + + +# List200Response1 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<List200Response1DataInner>**](List200Response1DataInner.md) | | [optional] | +|**totalNum** | **BigDecimal** | | [optional] | +|**currentPage** | **BigDecimal** | | [optional] | + + + diff --git a/docs/List200Response1DataInner.md b/docs/List200Response1DataInner.md new file mode 100644 index 0000000..34bf029 --- /dev/null +++ b/docs/List200Response1DataInner.md @@ -0,0 +1,32 @@ + + +# List200Response1DataInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | 唯一标识 | [optional] | +|**developerId** | **String** | 开发者ID | | +|**tenantId** | **String** | 租户ID | | +|**name** | **String** | 应用名称 | [optional] | +|**type** | **String** | 应用类型,1自建应用,2市场应用 | [optional] | +|**appId** | **String** | APPID | [optional] | +|**category** | **String** | 应用分类,1 标准web应用,2单页web应用,3客户端应用,4后端服务 | [optional] | +|**appSecret** | **String** | APPSEC,开发者用户调用返回 | [optional] | +|**descr** | **String** | 应用描述 | [optional] | +|**logo** | **String** | logo路径 | [optional] | +|**loginUrl** | **String** | 登录路径 | [optional] | +|**domain** | **String** | 应用绑定的唯一域名 | [optional] | +|**redirectUrl** | **String** | 重定向url | [optional] | +|**logoutUrl** | **String** | 登出url | [optional] | +|**subAccountPolicy** | **Integer** | 子账号策略 | [optional] | +|**prop** | **Object** | 扩展属性 | [optional] | +|**timeCreated** | **String** | 创建时间 | [optional] | +|**timeModified** | **String** | 更新时间 | [optional] | +|**status** | **String** | 状态,1启用,0禁用 | [optional] | +|**allowedProviderId** | [**List<List200Response1DataInnerAllowedProviderIdInner>**](List200Response1DataInnerAllowedProviderIdInner.md) | | [optional] | + + + diff --git a/docs/List200Response1DataInnerAllowedProviderIdInner.md b/docs/List200Response1DataInnerAllowedProviderIdInner.md new file mode 100644 index 0000000..b682f2d --- /dev/null +++ b/docs/List200Response1DataInnerAllowedProviderIdInner.md @@ -0,0 +1,15 @@ + + +# List200Response1DataInnerAllowedProviderIdInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**configId** | **String** | | | +|**name** | **String** | | | +|**providerType** | **String** | | | + + + diff --git a/docs/List200ResponseDataInner.md b/docs/List200ResponseDataInner.md new file mode 100644 index 0000000..4140f2f --- /dev/null +++ b/docs/List200ResponseDataInner.md @@ -0,0 +1,40 @@ + + +# List200ResponseDataInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **BigDecimal** | 用户id标识 | [optional] | +|**username** | **String** | 用户名,唯一 | | +|**password** | **String** | 密码 | | +|**displayName** | **String** | 显示名称 | [optional] | +|**firstname** | **String** | 名 | [optional] | +|**lastname** | **String** | 姓 | [optional] | +|**realname** | **String** | 真实姓名 | [optional] | +|**pinyin** | **String** | 拼音 | [optional] | +|**nickname** | **String** | 昵称 | [optional] | +|**userType** | **String** | 用户类型 | | +|**mobile** | **String** | 手机 | [optional] | +|**email** | **String** | 邮箱 | [optional] | +|**gender** | **String** | 性别 | [optional] | +|**certType** | **String** | 证件类型 | [optional] | +|**certNumber** | **String** | 证件号 | [optional] | +|**region** | **String** | 区域 | [optional] | +|**workTime** | **String** | 加入时间 | [optional] | +|**workTitle** | **String** | 职位 | [optional] | +|**extProp** | **Object** | 扩展信息,json对象{\"age\": 18, \"love\": \"足球\"} | [optional] | +|**arn** | **String** | arn | [optional] | +|**idProviderConnection** | **BigDecimal** | 身份源ID | | +|**developerId** | **BigDecimal** | 开发者id | [optional] | +|**tenantId** | **BigDecimal** | 租户id | [optional] | +|**lastLoginIpaddr** | **String** | 上次登录IP | [optional] | +|**lastLoginTime** | **String** | 上次登录时间 | [optional] | +|**timeCreated** | **String** | 创建时间 | [optional] | +|**timeModified** | **String** | 修改时间 | [optional] | +|**status** | **String** | 状态:1正常,0禁用 | | + + + diff --git a/docs/MFA.md b/docs/MFA.md new file mode 100644 index 0000000..93c4f34 --- /dev/null +++ b/docs/MFA.md @@ -0,0 +1,16 @@ + + +# MFA + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | | +|**providerType** | **String** | | | +|**configId** | **String** | | | +|**scenarios** | **List<String>** | | | + + + diff --git a/docs/ModelObject.md b/docs/ModelObject.md new file mode 100644 index 0000000..24c9397 --- /dev/null +++ b/docs/ModelObject.md @@ -0,0 +1,17 @@ + + +# ModelObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bucket** | **String** | | | +|**key** | **String** | | | +|**value** | **String** | | | +|**updatedAt** | **String** | rfc3339 | | +|**createdAt** | **String** | rfc3339 | | + + + diff --git a/docs/Modify200Response.md b/docs/Modify200Response.md new file mode 100644 index 0000000..9756257 --- /dev/null +++ b/docs/Modify200Response.md @@ -0,0 +1,16 @@ + + +# Modify200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **BigDecimal** | http状态码,成功不显示 | [optional] | +|**errno** | **BigDecimal** | 返回错误码 | | +|**message** | **String** | 返回描述 | | +|**data** | **Object** | 返回用户id | | + + + diff --git a/docs/Modify200Response1.md b/docs/Modify200Response1.md new file mode 100644 index 0000000..be32b7c --- /dev/null +++ b/docs/Modify200Response1.md @@ -0,0 +1,14 @@ + + +# Modify200Response1 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | | [optional] | +|**data** | **BigDecimal** | | [optional] | + + + diff --git a/docs/ModifyAccountRequest.md b/docs/ModifyAccountRequest.md new file mode 100644 index 0000000..1916a48 --- /dev/null +++ b/docs/ModifyAccountRequest.md @@ -0,0 +1,21 @@ + + +# ModifyAccountRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**userId** | **String** | | [optional] | +|**appId** | **String** | | [optional] | +|**accName** | **String** | | [optional] | +|**accNameDisplayed** | **String** | | [optional] | +|**accSource** | **String** | | [optional] | +|**accPassword** | **String** | | [optional] | +|**accStatus** | **String** | 1启用,0禁用 | [optional] | +|**sysExtProps** | **Object** | | [optional] | +|**freeExtProps** | **Object** | | [optional] | + + + diff --git a/docs/ModifyConfigRequest.md b/docs/ModifyConfigRequest.md new file mode 100644 index 0000000..7f9dd21 --- /dev/null +++ b/docs/ModifyConfigRequest.md @@ -0,0 +1,19 @@ + + +# ModifyConfigRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**allowedLoginMethod** | **String** | 允许的登录方式,格式为:[\"password\", \"vercode\"] | [optional] | +|**defaultLoginMethod** | **String** | 默认登录方式,格式为:password | [optional] | +|**allowedRegMethod** | **String** | 允许注册方式,格式为:[\"mobile\", \"email\"] | [optional] | +|**defaultRegMethod** | **String** | 默认注册方式,格式为:mobile | [optional] | +|**defaultProtocol** | **String** | 默认登录协议 | [optional] | +|**accessPolicy** | **String** | 应用级访问控制权限,all: 所有人可访问 permitted: 拒绝未授权访问 | [optional] | +|**regPolicy** | **List<String>** | 新用户注册策略(是否允许自动注册,注册验证方式等),1是,2否, | [optional] | + + + diff --git a/docs/ModifyRequest.md b/docs/ModifyRequest.md new file mode 100644 index 0000000..a6fd3a2 --- /dev/null +++ b/docs/ModifyRequest.md @@ -0,0 +1,31 @@ + + +# ModifyRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**username** | **String** | 用户名,验证唯一 | [optional] | +|**displayName** | **String** | 显示名称 | [optional] | +|**firstname** | **String** | 名 | [optional] | +|**lastname** | **String** | 姓 | [optional] | +|**realname** | **String** | 真实姓名 | [optional] | +|**pinyin** | **String** | 拼音 | [optional] | +|**nickname** | **String** | 昵称 | [optional] | +|**mobile** | **String** | 手机 | [optional] | +|**email** | **String** | 邮箱 | [optional] | +|**gender** | **String** | 性别:1男,0女 | [optional] | +|**certType** | **String** | 证件类型 | [optional] | +|**certNumber** | **String** | 证件号 | [optional] | +|**region** | **String** | 区域 | [optional] | +|**workTime** | **String** | 加入时间 | [optional] | +|**workTitle** | **String** | 职位 | [optional] | +|**lastLoginIpaddr** | **String** | 上次登录IP | [optional] | +|**lastLoginTime** | **String** | 上次登录时间 | [optional] | +|**sysExtProps** | **Object** | 系统扩展信息,json对象{\"age\": 18, \"love\": \"足球\"} | [optional] | +|**freeExtProps** | **Object** | 自由扩展属性,json对象 | [optional] | + + + diff --git a/docs/ModifyRequest1.md b/docs/ModifyRequest1.md new file mode 100644 index 0000000..5e8c60f --- /dev/null +++ b/docs/ModifyRequest1.md @@ -0,0 +1,27 @@ + + +# ModifyRequest1 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | +|**domainSn** | **String** | | [optional] | +|**type** | **String** | 1自建应用,2市场应用 | [optional] | +|**appId** | **String** | | [optional] | +|**appSecret** | **String** | | [optional] | +|**category** | **String** | | [optional] | +|**descr** | **String** | | [optional] | +|**logo** | **String** | | [optional] | +|**loginUrl** | **String** | | [optional] | +|**redirectUrl** | **String** | | [optional] | +|**logoutUrl** | **String** | | [optional] | +|**subAccountPolicy** | **String** | | [optional] | +|**sysExtProps** | **Object** | | [optional] | +|**freeExtProps** | **Object** | | [optional] | +|**status** | **String** | 状态,0禁用,1启用 | [optional] | + + + diff --git a/docs/NullInner.md b/docs/NullInner.md new file mode 100644 index 0000000..4f374bf --- /dev/null +++ b/docs/NullInner.md @@ -0,0 +1,42 @@ + + +# NullInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | | [optional] | +|**username** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**displayName** | **String** | | [optional] | +|**firstname** | **String** | | [optional] | +|**lastname** | **String** | | [optional] | +|**realname** | **String** | | [optional] | +|**pinyin** | **String** | | [optional] | +|**nickname** | **String** | | [optional] | +|**avatar** | **Object** | json对象 | [optional] | +|**userType** | **String** | | [optional] | +|**mobile** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**gender** | **String** | | [optional] | +|**certType** | **String** | | [optional] | +|**certNumber** | **String** | | [optional] | +|**region** | **String** | | [optional] | +|**workTime** | **String** | | [optional] | +|**workTitle** | **String** | | [optional] | +|**arn** | **String** | | [optional] | +|**idpConfigId** | **Integer** | | [optional] | +|**developerId** | **Integer** | | [optional] | +|**tenantId** | **Integer** | | [optional] | +|**lastLoginIpaddr** | **String** | | [optional] | +|**lastLoginTime** | **String** | | [optional] | +|**timeCreated** | **String** | | [optional] | +|**timeModified** | **Integer** | | [optional] | +|**status** | **String** | | [optional] | +|**sysExtProps** | **Object** | json对象 | [optional] | +|**freeExtProps** | **Object** | json对象 | [optional] | + + + diff --git a/docs/OrganizationApi.md b/docs/OrganizationApi.md new file mode 100644 index 0000000..ce6e4f6 --- /dev/null +++ b/docs/OrganizationApi.md @@ -0,0 +1,1103 @@ +# OrganizationApi + +All URIs are relative to *http://localhost* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createNode**](OrganizationApi.md#createNode) | **POST** /v1/tree-nodes | 创建节点 | +| [**createOrganization**](OrganizationApi.md#createOrganization) | **POST** /v1/core-objects | 创建组织关系 | +| [**deleteMembers**](OrganizationApi.md#deleteMembers) | **DELETE** /v1/tree-users | 从节点移除用户 | +| [**deleteNode**](OrganizationApi.md#deleteNode) | **DELETE** /v1/tree-nodes/{id} | 删除节点 | +| [**deleteOrganization**](OrganizationApi.md#deleteOrganization) | **DELETE** /v1/core-objects/{id} | 删除组织关系 | +| [**getChildrenNodes**](OrganizationApi.md#getChildrenNodes) | **GET** /v1/tree-nodes/{id}/children | 获取子节点列表 | +| [**getMembers**](OrganizationApi.md#getMembers) | **GET** /v1/tree-users | 获取与用户关联的组织关系列表 | +| [**getNode**](OrganizationApi.md#getNode) | **GET** /v1/tree-nodes/{id} | 查询节点信息 | +| [**getNodeMembers**](OrganizationApi.md#getNodeMembers) | **GET** /v1/tree-nodes/{id}/tree-users | 获取成员信息列表 | +| [**getNodeParent**](OrganizationApi.md#getNodeParent) | **GET** /v1/tree-nodes/{id}/parent | 查询父节点 | +| [**getNodes**](OrganizationApi.md#getNodes) | **GET** /v1/tree-nodes | 查询节点信息列表 | +| [**getOrganization**](OrganizationApi.md#getOrganization) | **GET** /v1/core-objects/{id} | 获取组织关系基本信息 | +| [**getOrganizations**](OrganizationApi.md#getOrganizations) | **GET** /v1/core-objects | 获取组织关系列表 | +| [**updateMember**](OrganizationApi.md#updateMember) | **PATCH** /v1/tree-users/{id} | 更新用户节点 | +| [**updateNode**](OrganizationApi.md#updateNode) | **PATCH** /v1/tree-nodes/{id} | 编辑节点 | +| [**updateOrganization**](OrganizationApi.md#updateOrganization) | **PATCH** /v1/core-objects/{id} | 修改组织关系基本信息 | + + + +# **createNode** +> DeleteOrganization200Response createNode(contentType).createNodeRequest(createNodeRequest).execute(); + +创建节点 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.OrganizationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String contentType = "application/json"; // String | + CreateNodeRequest createNodeRequest = new CreateNodeRequest(); // CreateNodeRequest | + try { + DeleteOrganization200Response result = apiInstance.createNode(contentType) + .createNodeRequest(createNodeRequest) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#createNode"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **contentType** | **String**| | | +| **createNodeRequest** | [**CreateNodeRequest**](CreateNodeRequest.md)| | [optional] | + +### Return type + +[**DeleteOrganization200Response**](DeleteOrganization200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **createOrganization** +> CreateOrganization200Response createOrganization(contentType).createOrganizationRequest(createOrganizationRequest).execute(); + +创建组织关系 + +创建组织关系的元数据,同时创建根节点 + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.OrganizationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String contentType = "application/json"; // String | + CreateOrganizationRequest createOrganizationRequest = new CreateOrganizationRequest(); // CreateOrganizationRequest | + try { + CreateOrganization200Response result = apiInstance.createOrganization(contentType) + .createOrganizationRequest(createOrganizationRequest) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#createOrganization"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **contentType** | **String**| | | +| **createOrganizationRequest** | [**CreateOrganizationRequest**](CreateOrganizationRequest.md)| | [optional] | + +### Return type + +[**CreateOrganization200Response**](CreateOrganization200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **deleteMembers** +> DeleteOrganization200Response deleteMembers(contentType).deleteMembersRequest(deleteMembersRequest).execute(); + +从节点移除用户 + +移除用户,uri参数中的ID和json中的参数,至少有其一 + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.OrganizationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String contentType = "application/x-www-form-urlencoded"; // String | + DeleteMembersRequest deleteMembersRequest = new DeleteMembersRequest(); // DeleteMembersRequest | + try { + DeleteOrganization200Response result = apiInstance.deleteMembers(contentType) + .deleteMembersRequest(deleteMembersRequest) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#deleteMembers"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **contentType** | **String**| | | +| **deleteMembersRequest** | [**DeleteMembersRequest**](DeleteMembersRequest.md)| | [optional] | + +### Return type + +[**DeleteOrganization200Response**](DeleteOrganization200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **deleteNode** +> DeleteNode200Response deleteNode(id, objectCode, contentType).execute(); + +删除节点 + +如果该节点有子节点则不可删除,需要先删除所有子节点。 + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.OrganizationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String id = "id_example"; // String | + String objectCode = "org_tree"; // String | 树对象code + String contentType = "application/x-www-form-urlencoded"; // String | + try { + DeleteNode200Response result = apiInstance.deleteNode(id, objectCode, contentType) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#deleteNode"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **objectCode** | **String**| 树对象code | | +| **contentType** | **String**| | | + +### Return type + +[**DeleteNode200Response**](DeleteNode200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **deleteOrganization** +> DeleteOrganization200Response deleteOrganization(id, contentType).execute(); + +删除组织关系 + +如果该组织关系有子节点则不可删 + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.OrganizationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String id = "id_example"; // String | + String contentType = "application/x-www-form-urlencoded"; // String | + try { + DeleteOrganization200Response result = apiInstance.deleteOrganization(id, contentType) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#deleteOrganization"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **contentType** | **String**| | | + +### Return type + +[**DeleteOrganization200Response**](DeleteOrganization200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getChildrenNodes** +> List<TreeNode> getChildrenNodes(id, mode, objectCode).execute(); + +获取子节点列表 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.OrganizationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String id = "id_example"; // String | + String mode = "001"; // String | // mode - 低->高 bit // 第1位:是否获得指针节点所对应的真实结点,1-是,0-否 // 第2位:是否展开WeakNode,即节点中类型不同的节点,1-展开,0-不展开 // 第3位:是否递归地展开节点(不建议) + String objectCode = "objectCode_example"; // String | 当id = 0时必填,创建树时的object_code + try { + List result = apiInstance.getChildrenNodes(id, mode, objectCode) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#getChildrenNodes"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **mode** | **String**| // mode - 低->高 bit // 第1位:是否获得指针节点所对应的真实结点,1-是,0-否 // 第2位:是否展开WeakNode,即节点中类型不同的节点,1-展开,0-不展开 // 第3位:是否递归地展开节点(不建议) | | +| **objectCode** | **String**| 当id = 0时必填,创建树时的object_code | | + +### Return type + +[**List<TreeNode>**](TreeNode.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getMembers** +> List<GetMembers200ResponseInner> getMembers(userId).execute(); + +获取与用户关联的组织关系列表 + +根据用户id获取与用户关联的组织关系列表 + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.OrganizationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String userId = "userId_example"; // String | 用户ID + try { + List result = apiInstance.getMembers(userId) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#getMembers"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| 用户ID | | + +### Return type + +[**List<GetMembers200ResponseInner>**](GetMembers200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getNode** +> TreeNode getNode(id).execute(); + +查询节点信息 + +根据ID查询节点信息 + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.OrganizationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String id = "id_example"; // String | + try { + TreeNode result = apiInstance.getNode(id) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#getNode"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +[**TreeNode**](TreeNode.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getNodeMembers** +> GetNodeMembers200Response getNodeMembers(id).relationType(relationType).isDefault(isDefault).displayName(displayName).username(username).mode(mode).pageNum(pageNum).pageSize(pageSize).pageSort(pageSort).execute(); + +获取成员信息列表 + +根据组织节点ID获取成员信息列表 + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.OrganizationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String id = ""; // String | node id + String relationType = "relationType_example"; // String | 关联类型,用于区分多重关联 + String isDefault = "isDefault_example"; // String | 是否默认关系 1是,0否 + String displayName = "displayName_example"; // String | 用户显示名 + String username = ""; // String | 用户名,支持模糊搜索(仅前缀) + String mode = "000"; // String | // mode - 低->高 bit // 第1位:是否获得指针节点所对应的真实结点,1-是,0-否 // 第2位:是否展开WeakNode,即节点中类型不同的节点,1-展开,0-不展开 // 第3位:是否递归地展开节点(不建议) + Integer pageNum = ; // Integer | 起始页,默认1 + Integer pageSize = ; // Integer | 页大小,默认10 + String pageSort = ""; // String | 排序方式,格式:字段[排序方式] + try { + GetNodeMembers200Response result = apiInstance.getNodeMembers(id) + .relationType(relationType) + .isDefault(isDefault) + .displayName(displayName) + .username(username) + .mode(mode) + .pageNum(pageNum) + .pageSize(pageSize) + .pageSort(pageSort) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#getNodeMembers"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| node id | | +| **relationType** | **String**| 关联类型,用于区分多重关联 | [optional] | +| **isDefault** | **String**| 是否默认关系 1是,0否 | [optional] | +| **displayName** | **String**| 用户显示名 | [optional] | +| **username** | **String**| 用户名,支持模糊搜索(仅前缀) | [optional] | +| **mode** | **String**| // mode - 低->高 bit // 第1位:是否获得指针节点所对应的真实结点,1-是,0-否 // 第2位:是否展开WeakNode,即节点中类型不同的节点,1-展开,0-不展开 // 第3位:是否递归地展开节点(不建议) | [optional] | +| **pageNum** | **Integer**| 起始页,默认1 | [optional] | +| **pageSize** | **Integer**| 页大小,默认10 | [optional] | +| **pageSort** | **String**| 排序方式,格式:字段[排序方式] | [optional] | + +### Return type + +[**GetNodeMembers200Response**](GetNodeMembers200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getNodeParent** +> List<TreeNode> getNodeParent(id).execute(); + +查询父节点 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.OrganizationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String id = "id_example"; // String | + try { + List result = apiInstance.getNodeParent(id) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#getNodeParent"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +[**List<TreeNode>**](TreeNode.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getNodes** +> List<TreeNode> getNodes(objectCode).name(name).code(code).tag(tag).timeModifiedFrom(timeModifiedFrom).timeModifiedTo(timeModifiedTo).execute(); + +查询节点信息列表 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.OrganizationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String objectCode = ""; // String | 组织编码 + String name = "name_example"; // String | 名字,支持前缀搜索 + String code = ""; // String | 编号 + String tag = "tag_example"; // String | 标签 + String timeModifiedFrom = ""; // String | 更新时间起点 + String timeModifiedTo = ""; // String | 更新时间终点,默认至今 + try { + List result = apiInstance.getNodes(objectCode) + .name(name) + .code(code) + .tag(tag) + .timeModifiedFrom(timeModifiedFrom) + .timeModifiedTo(timeModifiedTo) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#getNodes"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **objectCode** | **String**| 组织编码 | | +| **name** | **String**| 名字,支持前缀搜索 | [optional] | +| **code** | **String**| 编号 | [optional] | +| **tag** | **String**| 标签 | [optional] | +| **timeModifiedFrom** | **String**| 更新时间起点 | [optional] | +| **timeModifiedTo** | **String**| 更新时间终点,默认至今 | [optional] | + +### Return type + +[**List<TreeNode>**](TreeNode.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getOrganization** +> List<GetOrganization200ResponseInner> getOrganization(id, code).execute(); + +获取组织关系基本信息 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.OrganizationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String id = "id_example"; // String | + String code = "code_example"; // String | + try { + List result = apiInstance.getOrganization(id, code) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#getOrganization"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **code** | **String**| | | + +### Return type + +[**List<GetOrganization200ResponseInner>**](GetOrganization200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getOrganizations** +> List<GetOrganizations200ResponseInner> getOrganizations().execute(); + +获取组织关系列表 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.OrganizationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + try { + List result = apiInstance.getOrganizations() + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#getOrganizations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List<GetOrganizations200ResponseInner>**](GetOrganizations200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **updateMember** +> EmptyObject13 updateMember(id, contentType).updateMemberRequest(updateMemberRequest).execute(); + +更新用户节点 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.OrganizationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String id = "用户ID"; // String | + String contentType = "application/json"; // String | + UpdateMemberRequest updateMemberRequest = new UpdateMemberRequest(); // UpdateMemberRequest | + try { + EmptyObject13 result = apiInstance.updateMember(id, contentType) + .updateMemberRequest(updateMemberRequest) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#updateMember"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **contentType** | **String**| | | +| **updateMemberRequest** | [**UpdateMemberRequest**](UpdateMemberRequest.md)| | [optional] | + +### Return type + +[**EmptyObject13**](EmptyObject13.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **updateNode** +> UpdateNode200Response updateNode(id, contentType).updateNodeRequest(updateNodeRequest).execute(); + +编辑节点 + + 移动节点修改parent_id + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.OrganizationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String id = "id_example"; // String | 更新树节点 + String contentType = "application/json"; // String | + UpdateNodeRequest updateNodeRequest = new UpdateNodeRequest(); // UpdateNodeRequest | + try { + UpdateNode200Response result = apiInstance.updateNode(id, contentType) + .updateNodeRequest(updateNodeRequest) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#updateNode"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| 更新树节点 | | +| **contentType** | **String**| | | +| **updateNodeRequest** | [**UpdateNodeRequest**](UpdateNodeRequest.md)| | [optional] | + +### Return type + +[**UpdateNode200Response**](UpdateNode200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **updateOrganization** +> DeleteOrganization200Response updateOrganization(id, contentType).updateOrganizationRequest(updateOrganizationRequest).execute(); + +修改组织关系基本信息 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.OrganizationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + String id = "id_example"; // String | + String contentType = "application/json"; // String | + UpdateOrganizationRequest updateOrganizationRequest = new UpdateOrganizationRequest(); // UpdateOrganizationRequest | + try { + DeleteOrganization200Response result = apiInstance.updateOrganization(id, contentType) + .updateOrganizationRequest(updateOrganizationRequest) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#updateOrganization"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **contentType** | **String**| | | +| **updateOrganizationRequest** | [**UpdateOrganizationRequest**](UpdateOrganizationRequest.md)| | [optional] | + +### Return type + +[**DeleteOrganization200Response**](DeleteOrganization200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + diff --git a/docs/PermissionApi.md b/docs/PermissionApi.md new file mode 100644 index 0000000..d9d5a9d --- /dev/null +++ b/docs/PermissionApi.md @@ -0,0 +1,1686 @@ +# PermissionApi + +All URIs are relative to *http://localhost* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**authorizeApplications**](PermissionApi.md#authorizeApplications) | **POST** /v1/batch/authz-apps | 授权应用 | +| [**createAuthUnitRules**](PermissionApi.md#createAuthUnitRules) | **POST** /v1/batch/auth-unit-rules | 批量创建授权规则 | +| [**createResource**](PermissionApi.md#createResource) | **POST** /v1/resources | 创建资源 | +| [**createResourceSet**](PermissionApi.md#createResourceSet) | **POST** /v1/resource-sets | 创建资源集合 | +| [**createResourceSetMember**](PermissionApi.md#createResourceSetMember) | **POST** /v1/resource-sets/{id}/members | 创建资源集合成员 | +| [**deleteAuthUnitRules**](PermissionApi.md#deleteAuthUnitRules) | **DELETE** /v1/batch/auth-unit-rules | 批量删除授权规则 | +| [**deleteResources**](PermissionApi.md#deleteResources) | **DELETE** /v1/batch/resources | 删除资源 | +| [**getAuthUnit**](PermissionApi.md#getAuthUnit) | **GET** /v1/auth-units/{id} | 按 ID 查询授权单元 | +| [**getAuthUnits**](PermissionApi.md#getAuthUnits) | **GET** /v1/auth-units | 获取授权单元列表 | +| [**getAuthUnitsRules**](PermissionApi.md#getAuthUnitsRules) | **GET** /v1/auth-units/{rid}/rules | 查询授权单元下的授权规则列表 | +| [**getPrivileges**](PermissionApi.md#getPrivileges) | **GET** /v1/privileges | 获取权限列表 | +| [**getResource**](PermissionApi.md#getResource) | **GET** /v1/resources/{id} | 按 ID 查询资源 | +| [**getResourceMember**](PermissionApi.md#getResourceMember) | **GET** /v1/resource-sets/{sid}/members/{mid} | 按 ID 查询资源集合成员 | +| [**getResourceMembers**](PermissionApi.md#getResourceMembers) | **GET** /v1/resource-sets/{sid}/members | 查询资源集合成员列表 | +| [**getResourceSet**](PermissionApi.md#getResourceSet) | **GET** /v1/resource-sets/{id} | 按 ID 查询资源集合 | +| [**getResourceSets**](PermissionApi.md#getResourceSets) | **GET** /v1/resource-sets | 查询资源集合列表 | +| [**getResources**](PermissionApi.md#getResources) | **GET** /v1/resources | 查询资源列表 | +| [**listAuthorizedApplications**](PermissionApi.md#listAuthorizedApplications) | **GET** /v1/authz-apps | 查询已授权应用列表 | +| [**modifyAuthUnit**](PermissionApi.md#modifyAuthUnit) | **PUT** /v1/auth-units/{rid}/rules/{tid} | 更新授权规则 | +| [**modifyResource**](PermissionApi.md#modifyResource) | **PUT** /v1/resources/{id} | 更新资源 | +| [**modifyResourceSet**](PermissionApi.md#modifyResourceSet) | **PUT** /v1/resource-sets/{id} | 更新资源集合 | +| [**modifyResourceSetMember**](PermissionApi.md#modifyResourceSetMember) | **PUT** /v1/resource-sets/{sid}/members/{mid} | 更新资源集合成员 | +| [**queryAuthUnitsRules**](PermissionApi.md#queryAuthUnitsRules) | **GET** /v1/auth-unit-rules | 查询授权规则列表 | + + + +# **authorizeApplications** +> Object authorizeApplications(xTenantId).authorizeApplicationsRequest(authorizeApplicationsRequest).execute(); + +授权应用 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String xTenantId = ""; // String | 租户id + AuthorizeApplicationsRequest authorizeApplicationsRequest = new AuthorizeApplicationsRequest(); // AuthorizeApplicationsRequest | + try { + Object result = apiInstance.authorizeApplications(xTenantId) + .authorizeApplicationsRequest(authorizeApplicationsRequest) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#authorizeApplications"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **xTenantId** | **String**| 租户id | | +| **authorizeApplicationsRequest** | [**AuthorizeApplicationsRequest**](AuthorizeApplicationsRequest.md)| | [optional] | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **createAuthUnitRules** +> Object createAuthUnitRules(contentType).emptyObject2(emptyObject2).execute(); + +批量创建授权规则 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String contentType = "application/json"; // String | + EmptyObject2 emptyObject2 = new EmptyObject2(); // EmptyObject2 | + try { + Object result = apiInstance.createAuthUnitRules(contentType) + .emptyObject2(emptyObject2) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#createAuthUnitRules"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **contentType** | **String**| | | +| **emptyObject2** | [**EmptyObject2**](EmptyObject2.md)| | [optional] | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **createResource** +> EmptyObject6 createResource(contentType).emptyObject5(emptyObject5).execute(); + +创建资源 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String contentType = "application/json"; // String | + EmptyObject5 emptyObject5 = new EmptyObject5(); // EmptyObject5 | + try { + EmptyObject6 result = apiInstance.createResource(contentType) + .emptyObject5(emptyObject5) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#createResource"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **contentType** | **String**| | | +| **emptyObject5** | [**EmptyObject5**](EmptyObject5.md)| | [optional] | + +### Return type + +[**EmptyObject6**](EmptyObject6.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **createResourceSet** +> EmptyObject9 createResourceSet(contentType, xTenantId).emptyObject8(emptyObject8).execute(); + +创建资源集合 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String contentType = "application/json"; // String | + String xTenantId = "123"; // String | 租户id + EmptyObject8 emptyObject8 = new EmptyObject8(); // EmptyObject8 | + try { + EmptyObject9 result = apiInstance.createResourceSet(contentType, xTenantId) + .emptyObject8(emptyObject8) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#createResourceSet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **contentType** | **String**| | | +| **xTenantId** | **String**| 租户id | | +| **emptyObject8** | [**EmptyObject8**](EmptyObject8.md)| | [optional] | + +### Return type + +[**EmptyObject9**](EmptyObject9.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **createResourceSetMember** +> EmptyObject11 createResourceSetMember(id, contentType).emptyObject10(emptyObject10).execute(); + +创建资源集合成员 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String id = "id_example"; // String | 集合id + String contentType = "application/json"; // String | + EmptyObject10 emptyObject10 = new EmptyObject10(); // EmptyObject10 | + try { + EmptyObject11 result = apiInstance.createResourceSetMember(id, contentType) + .emptyObject10(emptyObject10) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#createResourceSetMember"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| 集合id | | +| **contentType** | **String**| | | +| **emptyObject10** | [**EmptyObject10**](EmptyObject10.md)| | [optional] | + +### Return type + +[**EmptyObject11**](EmptyObject11.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **deleteAuthUnitRules** +> Object deleteAuthUnitRules(contentType).deleteAuthUnitRulesRequest(deleteAuthUnitRulesRequest).execute(); + +批量删除授权规则 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String contentType = "application/x-www-form-urlencoded"; // String | + DeleteAuthUnitRulesRequest deleteAuthUnitRulesRequest = new DeleteAuthUnitRulesRequest(); // DeleteAuthUnitRulesRequest | + try { + Object result = apiInstance.deleteAuthUnitRules(contentType) + .deleteAuthUnitRulesRequest(deleteAuthUnitRulesRequest) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#deleteAuthUnitRules"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **contentType** | **String**| | | +| **deleteAuthUnitRulesRequest** | [**DeleteAuthUnitRulesRequest**](DeleteAuthUnitRulesRequest.md)| | [optional] | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **deleteResources** +> Object deleteResources(contentType).deleteResourcesRequest(deleteResourcesRequest).execute(); + +删除资源 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String contentType = "application/x-www-form-urlencoded"; // String | + DeleteResourcesRequest deleteResourcesRequest = new DeleteResourcesRequest(); // DeleteResourcesRequest | + try { + Object result = apiInstance.deleteResources(contentType) + .deleteResourcesRequest(deleteResourcesRequest) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#deleteResources"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **contentType** | **String**| | | +| **deleteResourcesRequest** | [**DeleteResourcesRequest**](DeleteResourcesRequest.md)| | [optional] | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getAuthUnit** +> AuthUnit getAuthUnit(id).execute(); + +按 ID 查询授权单元 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String id = "id_example"; // String | au id + try { + AuthUnit result = apiInstance.getAuthUnit(id) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#getAuthUnit"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| au id | | + +### Return type + +[**AuthUnit**](AuthUnit.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getAuthUnits** +> GetAuthUnits200Response getAuthUnits().identityId(identityId).identityType(identityType).identityName(identityName).pageNum(pageNum).pageSize(pageSize).pageSort(pageSort).execute(); + +获取授权单元列表 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String identityId = "identityId_example"; // String | 主体id + String identityType = ""; // String | 主体类型 + String identityName = ""; // String | 主体名称 + String pageNum = ""; // String | 起始页,默认1 + String pageSize = ""; // String | 页大小,默认20 + String pageSort = ""; // String | 排序方式,格式:字段[排序方式] + try { + GetAuthUnits200Response result = apiInstance.getAuthUnits() + .identityId(identityId) + .identityType(identityType) + .identityName(identityName) + .pageNum(pageNum) + .pageSize(pageSize) + .pageSort(pageSort) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#getAuthUnits"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **identityId** | **String**| 主体id | [optional] | +| **identityType** | **String**| 主体类型 | [optional] | +| **identityName** | **String**| 主体名称 | [optional] | +| **pageNum** | **String**| 起始页,默认1 | [optional] | +| **pageSize** | **String**| 页大小,默认20 | [optional] | +| **pageSort** | **String**| 排序方式,格式:字段[排序方式] | [optional] | + +### Return type + +[**GetAuthUnits200Response**](GetAuthUnits200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getAuthUnitsRules** +> List<Au> getAuthUnitsRules(rid).applicationId(applicationId).type(type).code(code).selfOnly(selfOnly).resourceId(resourceId).resourceMatchAllResources(resourceMatchAllResources).resourceMatchAllActions(resourceMatchAllActions).resourceSetId(resourceSetId).execute(); + +查询授权单元下的授权规则列表 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String rid = "rid_example"; // String | AU id + String applicationId = "applicationId_example"; // String | 应用id + String type = "res,res_set,data,ui,app"; // String | 规则类型 + String code = ""; // String | 资源或资源集合code + String selfOnly = "true"; // String | 只查询指定主体下的授权 + String resourceId = ""; // String | 资源id,当type=api,ui,data时有效 + String resourceMatchAllResources = "false"; // String | 匹配所有资源,当type=res时有效 + String resourceMatchAllActions = "false"; // String | 匹配所有资源操作,当type=res时有效 + String resourceSetId = ""; // String | 资源集合id,当type=res_set + try { + List result = apiInstance.getAuthUnitsRules(rid) + .applicationId(applicationId) + .type(type) + .code(code) + .selfOnly(selfOnly) + .resourceId(resourceId) + .resourceMatchAllResources(resourceMatchAllResources) + .resourceMatchAllActions(resourceMatchAllActions) + .resourceSetId(resourceSetId) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#getAuthUnitsRules"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **rid** | **String**| AU id | | +| **applicationId** | **String**| 应用id | [optional] | +| **type** | **String**| 规则类型 | [optional] | +| **code** | **String**| 资源或资源集合code | [optional] | +| **selfOnly** | **String**| 只查询指定主体下的授权 | [optional] | +| **resourceId** | **String**| 资源id,当type=api,ui,data时有效 | [optional] | +| **resourceMatchAllResources** | **String**| 匹配所有资源,当type=res时有效 | [optional] | +| **resourceMatchAllActions** | **String**| 匹配所有资源操作,当type=res时有效 | [optional] | +| **resourceSetId** | **String**| 资源集合id,当type=res_set | [optional] | + +### Return type + +[**List<Au>**](Au.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getPrivileges** +> GetPrivileges200Response getPrivileges(applicationId).identityId(identityId).identityType(identityType).identityName(identityName).objectType(objectType).objectCode(objectCode).affect(affect).pageNum(pageNum).pageSize(pageSize).pageSort(pageSort).execute(); + +获取权限列表 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String applicationId = ""; // String | 应用id + String identityId = ""; // String | 主体id + String identityType = ""; // String | 主体类型 + String identityName = ""; // String | 主体名称 + String objectType = ""; // String | 对象类型(可选值: data, api, ui, res_set, app) + String objectCode = ""; // String | 对象代码 + String affect = "affect_example"; // String | 作用方式(affect,deny) + String pageNum = ""; // String | 起始页,默认1 + String pageSize = ""; // String | 页大小,默认20 + String pageSort = ""; // String | 排序方式,格式:字段[排序方式] + try { + GetPrivileges200Response result = apiInstance.getPrivileges(applicationId) + .identityId(identityId) + .identityType(identityType) + .identityName(identityName) + .objectType(objectType) + .objectCode(objectCode) + .affect(affect) + .pageNum(pageNum) + .pageSize(pageSize) + .pageSort(pageSort) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#getPrivileges"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **applicationId** | **String**| 应用id | | +| **identityId** | **String**| 主体id | [optional] | +| **identityType** | **String**| 主体类型 | [optional] | +| **identityName** | **String**| 主体名称 | [optional] | +| **objectType** | **String**| 对象类型(可选值: data, api, ui, res_set, app) | [optional] | +| **objectCode** | **String**| 对象代码 | [optional] | +| **affect** | **String**| 作用方式(affect,deny) | [optional] | +| **pageNum** | **String**| 起始页,默认1 | [optional] | +| **pageSize** | **String**| 页大小,默认20 | [optional] | +| **pageSort** | **String**| 排序方式,格式:字段[排序方式] | [optional] | + +### Return type + +[**GetPrivileges200Response**](GetPrivileges200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getResource** +> GetResource200Response getResource(id, applicationId).execute(); + +按 ID 查询资源 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String id = "id_example"; // String | 资源id + String applicationId = ""; // String | 应用id + try { + GetResource200Response result = apiInstance.getResource(id, applicationId) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#getResource"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| 资源id | | +| **applicationId** | **String**| 应用id | | + +### Return type + +[**GetResource200Response**](GetResource200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getResourceMember** +> ResourceSetMember getResourceMember(sid, mid).execute(); + +按 ID 查询资源集合成员 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String sid = "sid_example"; // String | 资源集合id + String mid = "mid_example"; // String | 成员id + try { + ResourceSetMember result = apiInstance.getResourceMember(sid, mid) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#getResourceMember"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **sid** | **String**| 资源集合id | | +| **mid** | **String**| 成员id | | + +### Return type + +[**ResourceSetMember**](ResourceSetMember.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getResourceMembers** +> GetResourceMembers200Response getResourceMembers(sid).resourceCode(resourceCode).resourceType(resourceType).pageNum(pageNum).pageSize(pageSize).pageSort(pageSort).execute(); + +查询资源集合成员列表 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String sid = "sid_example"; // String | 资源集合id + String resourceCode = ""; // String | 资源代码 + String resourceType = ""; // String | 资源类型 + String pageNum = ""; // String | 起始页,默认1 + String pageSize = ""; // String | 页大小,默认20 + String pageSort = ""; // String | 排序方式,格式:字段[排序方式] + try { + GetResourceMembers200Response result = apiInstance.getResourceMembers(sid) + .resourceCode(resourceCode) + .resourceType(resourceType) + .pageNum(pageNum) + .pageSize(pageSize) + .pageSort(pageSort) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#getResourceMembers"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **sid** | **String**| 资源集合id | | +| **resourceCode** | **String**| 资源代码 | [optional] | +| **resourceType** | **String**| 资源类型 | [optional] | +| **pageNum** | **String**| 起始页,默认1 | [optional] | +| **pageSize** | **String**| 页大小,默认20 | [optional] | +| **pageSort** | **String**| 排序方式,格式:字段[排序方式] | [optional] | + +### Return type + +[**GetResourceMembers200Response**](GetResourceMembers200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getResourceSet** +> ResourceSet getResourceSet(id).execute(); + +按 ID 查询资源集合 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String id = "id_example"; // String | 资源集合id + try { + ResourceSet result = apiInstance.getResourceSet(id) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#getResourceSet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| 资源集合id | | + +### Return type + +[**ResourceSet**](ResourceSet.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getResourceSets** +> GetResourceSets200Response getResourceSets(applicationId).code(code).includeGlobal(includeGlobal).pageNum(pageNum).pageSize(pageSize).pageSort(pageSort).execute(); + +查询资源集合列表 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String applicationId = ""; // String | 应用id + String code = "code_example"; // String | 集合代码 + String includeGlobal = "true"; // String | 查询是否包含全局资源集合 + String pageNum = ""; // String | 起始页,默认1 + String pageSize = ""; // String | 页大小,默认20 + String pageSort = ""; // String | 排序方式,格式:字段[排序方式] + try { + GetResourceSets200Response result = apiInstance.getResourceSets(applicationId) + .code(code) + .includeGlobal(includeGlobal) + .pageNum(pageNum) + .pageSize(pageSize) + .pageSort(pageSort) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#getResourceSets"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **applicationId** | **String**| 应用id | | +| **code** | **String**| 集合代码 | [optional] | +| **includeGlobal** | **String**| 查询是否包含全局资源集合 | [optional] | +| **pageNum** | **String**| 起始页,默认1 | [optional] | +| **pageSize** | **String**| 页大小,默认20 | [optional] | +| **pageSort** | **String**| 排序方式,格式:字段[排序方式] | [optional] | + +### Return type + +[**GetResourceSets200Response**](GetResourceSets200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getResources** +> GetResources200Response getResources(applicationId).type(type).code(code).includeGlobal(includeGlobal).pageNum(pageNum).pageSize(pageSize).pageSort(pageSort).execute(); + +查询资源列表 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String applicationId = ""; // String | 应用id + String type = ""; // String | 资源类型 + String code = ""; // String | 资源代码 + String includeGlobal = "true"; // String | 是否查询包含全局资源 + String pageNum = ""; // String | 起始页,默认1 + String pageSize = ""; // String | 页大小,默认20 + String pageSort = ""; // String | 排序方式,格式:字段[排序方式] + try { + GetResources200Response result = apiInstance.getResources(applicationId) + .type(type) + .code(code) + .includeGlobal(includeGlobal) + .pageNum(pageNum) + .pageSize(pageSize) + .pageSort(pageSort) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#getResources"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **applicationId** | **String**| 应用id | | +| **type** | **String**| 资源类型 | [optional] | +| **code** | **String**| 资源代码 | [optional] | +| **includeGlobal** | **String**| 是否查询包含全局资源 | [optional] | +| **pageNum** | **String**| 起始页,默认1 | [optional] | +| **pageSize** | **String**| 页大小,默认20 | [optional] | +| **pageSort** | **String**| 排序方式,格式:字段[排序方式] | [optional] | + +### Return type + +[**GetResources200Response**](GetResources200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **listAuthorizedApplications** +> List<AuthzApp> listAuthorizedApplications(identityId, identityType, xTenantId).type(type).execute(); + +查询已授权应用列表 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String identityId = ""; // String | 授权主体 id + String identityType = "user"; // String | 授权主体类型 + String xTenantId = ""; // String | 租户id + String type = "1,3"; // String | 应用类型: 0-默认应用 1-自建应用 2-模板应用 3-组件应用 + try { + List result = apiInstance.listAuthorizedApplications(identityId, identityType, xTenantId) + .type(type) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#listAuthorizedApplications"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **identityId** | **String**| 授权主体 id | | +| **identityType** | **String**| 授权主体类型 | | +| **xTenantId** | **String**| 租户id | | +| **type** | **String**| 应用类型: 0-默认应用 1-自建应用 2-模板应用 3-组件应用 | [optional] | + +### Return type + +[**List<AuthzApp>**](AuthzApp.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **modifyAuthUnit** +> Object modifyAuthUnit(rid, tid, contentType).emptyObject4(emptyObject4).execute(); + +更新授权规则 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String rid = "rid_example"; // String | AU id + String tid = "tid_example"; // String | 规则id + String contentType = "application/json"; // String | + EmptyObject4 emptyObject4 = new EmptyObject4(); // EmptyObject4 | + try { + Object result = apiInstance.modifyAuthUnit(rid, tid, contentType) + .emptyObject4(emptyObject4) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#modifyAuthUnit"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **rid** | **String**| AU id | | +| **tid** | **String**| 规则id | | +| **contentType** | **String**| | | +| **emptyObject4** | [**EmptyObject4**](EmptyObject4.md)| | [optional] | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **modifyResource** +> Object modifyResource(id, contentType).emptyObject3(emptyObject3).execute(); + +更新资源 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String id = "id_example"; // String | 资源id + String contentType = "application/json"; // String | + EmptyObject3 emptyObject3 = new EmptyObject3(); // EmptyObject3 | + try { + Object result = apiInstance.modifyResource(id, contentType) + .emptyObject3(emptyObject3) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#modifyResource"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| 资源id | | +| **contentType** | **String**| | | +| **emptyObject3** | [**EmptyObject3**](EmptyObject3.md)| | [optional] | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **modifyResourceSet** +> Object modifyResourceSet(id, contentType, xTenantId).emptyObject7(emptyObject7).execute(); + +更新资源集合 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String id = "id_example"; // String | 集合id + String contentType = "application/json"; // String | + String xTenantId = "xTenantId_example"; // String | 租户id + EmptyObject7 emptyObject7 = new EmptyObject7(); // EmptyObject7 | + try { + Object result = apiInstance.modifyResourceSet(id, contentType, xTenantId) + .emptyObject7(emptyObject7) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#modifyResourceSet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| 集合id | | +| **contentType** | **String**| | | +| **xTenantId** | **String**| 租户id | | +| **emptyObject7** | [**EmptyObject7**](EmptyObject7.md)| | [optional] | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **modifyResourceSetMember** +> Object modifyResourceSetMember(sid, mid, contentType).emptyObject12(emptyObject12).execute(); + +更新资源集合成员 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String sid = "sid_example"; // String | 资源集合id + String mid = "mid_example"; // String | 资源集合成员id + String contentType = "application/json"; // String | + EmptyObject12 emptyObject12 = new EmptyObject12(); // EmptyObject12 | + try { + Object result = apiInstance.modifyResourceSetMember(sid, mid, contentType) + .emptyObject12(emptyObject12) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#modifyResourceSetMember"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **sid** | **String**| 资源集合id | | +| **mid** | **String**| 资源集合成员id | | +| **contentType** | **String**| | | +| **emptyObject12** | [**EmptyObject12**](EmptyObject12.md)| | [optional] | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **queryAuthUnitsRules** +> List<Au> queryAuthUnitsRules(identityId, identityType).applicationId(applicationId).type(type).code(code).identityName(identityName).selfOnly(selfOnly).resourceId(resourceId).resourceMatchAllResources(resourceMatchAllResources).resourceMatchAllActions(resourceMatchAllActions).resourceSetId(resourceSetId).execute(); + +查询授权规则列表 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.PermissionApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + PermissionApi apiInstance = new PermissionApi(defaultClient); + String identityId = "identityId_example"; // String | 主体id + String identityType = "user, node"; // String | 主体类型 + String applicationId = "applicationId_example"; // String | 应用id + String type = "api, ui, data, res_set, app"; // String | 规则类型 + String code = "code_example"; // String | 资源或资源集合code + String identityName = "identityName_example"; // String | 主体名称 + String selfOnly = "true"; // String | 只查询指定主体下的授权 + String resourceId = "resourceId_example"; // String | 资源id,当type=api,ui,data时有效 + String resourceMatchAllResources = "resourceMatchAllResources_example"; // String | 匹配所有资源,当type=res时有效 + String resourceMatchAllActions = "resourceMatchAllActions_example"; // String | 匹配所有资源操作,当type=res时有效 + String resourceSetId = "resourceSetId_example"; // String | 资源集合id,当type=res_set + try { + List result = apiInstance.queryAuthUnitsRules(identityId, identityType) + .applicationId(applicationId) + .type(type) + .code(code) + .identityName(identityName) + .selfOnly(selfOnly) + .resourceId(resourceId) + .resourceMatchAllResources(resourceMatchAllResources) + .resourceMatchAllActions(resourceMatchAllActions) + .resourceSetId(resourceSetId) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PermissionApi#queryAuthUnitsRules"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **identityId** | **String**| 主体id | | +| **identityType** | **String**| 主体类型 | | +| **applicationId** | **String**| 应用id | [optional] | +| **type** | **String**| 规则类型 | [optional] | +| **code** | **String**| 资源或资源集合code | [optional] | +| **identityName** | **String**| 主体名称 | [optional] | +| **selfOnly** | **String**| 只查询指定主体下的授权 | [optional] | +| **resourceId** | **String**| 资源id,当type=api,ui,data时有效 | [optional] | +| **resourceMatchAllResources** | **String**| 匹配所有资源,当type=res时有效 | [optional] | +| **resourceMatchAllActions** | **String**| 匹配所有资源操作,当type=res时有效 | [optional] | +| **resourceSetId** | **String**| 资源集合id,当type=res_set | [optional] | + +### Return type + +[**List<Au>**](Au.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + diff --git a/docs/Privilege.md b/docs/Privilege.md new file mode 100644 index 0000000..6912c1e --- /dev/null +++ b/docs/Privilege.md @@ -0,0 +1,23 @@ + + +# Privilege + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **BigDecimal** | | | +|**identityType** | **String** | | | +|**identityId** | **String** | | | +|**authUnitRuleId** | **String** | | | +|**applicationId** | **String** | | | +|**objectType** | **String** | | | +|**objectCode** | **String** | | | +|**affectScope** | **String** | | | +|**affect** | **String** | | | +|**timeCreated** | **String** | | | +|**timeModified** | **String** | | | + + + diff --git a/docs/Resource.md b/docs/Resource.md new file mode 100644 index 0000000..87484d8 --- /dev/null +++ b/docs/Resource.md @@ -0,0 +1,24 @@ + + +# Resource + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**developerId** | **String** | | | +|**tenantId** | **String** | | | +|**applicationId** | **String** | | | +|**applicatioinName** | **String** | | | +|**isGlobal** | **Boolean** | | | +|**description** | **String** | | | +|**type** | **String** | | | +|**code** | **String** | | | +|**uri** | **String** | | [optional] | +|**timeModified** | **String** | | | +|**timeCreated** | **String** | | | + + + diff --git a/docs/ResourceSet.md b/docs/ResourceSet.md new file mode 100644 index 0000000..a465c07 --- /dev/null +++ b/docs/ResourceSet.md @@ -0,0 +1,20 @@ + + +# ResourceSet + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | +|**applicationId** | **String** | | [optional] | +|**applicationName** | **String** | | [optional] | +|**isGlobal** | **Boolean** | | [optional] | +|**code** | **String** | | [optional] | +|**description** | **String** | | [optional] | +|**timeModified** | **String** | | [optional] | +|**timeCreated** | **String** | | [optional] | + + + diff --git a/docs/ResourceSetMember.md b/docs/ResourceSetMember.md new file mode 100644 index 0000000..64b4c78 --- /dev/null +++ b/docs/ResourceSetMember.md @@ -0,0 +1,28 @@ + + +# ResourceSetMember + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | +|**setId** | **String** | | [optional] | +|**developerId** | **String** | | [optional] | +|**tenantId** | **String** | | [optional] | +|**resourceId** | **String** | | [optional] | +|**applicationId** | **String** | | [optional] | +|**applicationName** | **String** | | [optional] | +|**isGlobal** | **Boolean** | | [optional] | +|**resourceType** | **String** | | [optional] | +|**resourceCode** | **String** | | [optional] | +|**resourceScope** | **String** | | [optional] | +|**resourceActions** | [**ResourceSetMemberResourceActions**](ResourceSetMemberResourceActions.md) | | [optional] | +|**selectedResourceActions** | **List<String>** | | [optional] | +|**matchAllResourceActions** | **Boolean** | | | +|**timeModified** | **String** | | [optional] | +|**timeCreated** | **String** | | [optional] | + + + diff --git a/docs/ResourceSetMemberResourceActions.md b/docs/ResourceSetMemberResourceActions.md new file mode 100644 index 0000000..3501629 --- /dev/null +++ b/docs/ResourceSetMemberResourceActions.md @@ -0,0 +1,14 @@ + + +# ResourceSetMemberResourceActions + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **String** | | | +|**description** | **String** | | [optional] | + + + diff --git a/docs/SaveObjectRequest.md b/docs/SaveObjectRequest.md new file mode 100644 index 0000000..ef0b57c --- /dev/null +++ b/docs/SaveObjectRequest.md @@ -0,0 +1,14 @@ + + +# SaveObjectRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**key** | **String** | | | +|**value** | **String** | | | + + + diff --git a/docs/StorageApi.md b/docs/StorageApi.md new file mode 100644 index 0000000..c12b9a4 --- /dev/null +++ b/docs/StorageApi.md @@ -0,0 +1,476 @@ +# StorageApi + +All URIs are relative to *http://localhost* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**deleteBucket**](StorageApi.md#deleteBucket) | **DELETE** /v1/buckets/{bucket} | 删除 Bucket | +| [**deleteObject**](StorageApi.md#deleteObject) | **DELETE** /v1/buckets/{bucket}/objects/{key} | 删除 Object | +| [**getBucket**](StorageApi.md#getBucket) | **GET** /v1/buckets/{bucket} | 获取 Bucket 详情 | +| [**getBuckets**](StorageApi.md#getBuckets) | **GET** /v1/buckets | 获取 Bucket 列表 | +| [**getObject**](StorageApi.md#getObject) | **GET** /v1/buckets/{bucket}/objects/{key} | 获取 Object 详情 | +| [**getObjects**](StorageApi.md#getObjects) | **GET** /v1/buckets/{bucket}/objects | 获取 Object 列表 | +| [**saveObject**](StorageApi.md#saveObject) | **POST** /v1/buckets/{bucket}/objects | 创建 Object | + + + +# **deleteBucket** +> Object deleteBucket(bucket).execute(); + +删除 Bucket + +删除bucket会间接删掉bucket下所有object + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.StorageApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + StorageApi apiInstance = new StorageApi(defaultClient); + String bucket = "bucket_example"; // String | bucket 名称 + try { + Object result = apiInstance.deleteBucket(bucket) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StorageApi#deleteBucket"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bucket** | **String**| bucket 名称 | | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **deleteObject** +> ModelObject deleteObject(bucket, key).keyAsPrefix(keyAsPrefix).execute(); + +删除 Object + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.StorageApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + StorageApi apiInstance = new StorageApi(defaultClient); + String bucket = "bucket_example"; // String | bucket名称 + String key = "key_example"; // String | 键 + String keyAsPrefix = "false"; // String | 将键名称作为前缀执行删除 + try { + ModelObject result = apiInstance.deleteObject(bucket, key) + .keyAsPrefix(keyAsPrefix) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StorageApi#deleteObject"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bucket** | **String**| bucket名称 | | +| **key** | **String**| 键 | | +| **keyAsPrefix** | **String**| 将键名称作为前缀执行删除 | [optional] | + +### Return type + +[**ModelObject**](ModelObject.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getBucket** +> Bucket getBucket(bucket).execute(); + +获取 Bucket 详情 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.StorageApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + StorageApi apiInstance = new StorageApi(defaultClient); + String bucket = "bucket_example"; // String | bucket 名称 + try { + Bucket result = apiInstance.getBucket(bucket) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StorageApi#getBucket"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bucket** | **String**| bucket 名称 | | + +### Return type + +[**Bucket**](Bucket.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getBuckets** +> List<Bucket> getBuckets().last(last).limit(limit).execute(); + +获取 Bucket 列表 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.StorageApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + StorageApi apiInstance = new StorageApi(defaultClient); + String last = ""; // String | 最后一个bucket的名字 + Integer limit = ; // Integer | 页大小 + try { + List result = apiInstance.getBuckets() + .last(last) + .limit(limit) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StorageApi#getBuckets"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **last** | **String**| 最后一个bucket的名字 | [optional] | +| **limit** | **Integer**| 页大小 | [optional] | + +### Return type + +[**List<Bucket>**](Bucket.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getObject** +> ModelObject getObject(bucket, key).execute(); + +获取 Object 详情 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.StorageApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + StorageApi apiInstance = new StorageApi(defaultClient); + String bucket = "bucket_example"; // String | bucket名称 + String key = "key_example"; // String | 键 + try { + ModelObject result = apiInstance.getObject(bucket, key) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StorageApi#getObject"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bucket** | **String**| bucket名称 | | +| **key** | **String**| 键 | | + +### Return type + +[**ModelObject**](ModelObject.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getObjects** +> List<ModelObject> getObjects(bucket).last(last).limit(limit).execute(); + +获取 Object 列表 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.StorageApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + StorageApi apiInstance = new StorageApi(defaultClient); + String bucket = "bucket_example"; // String | bucket名称 + String last = ""; // String | 最后一个object的名字 + Integer limit = ; // Integer | 页大小 + try { + List result = apiInstance.getObjects(bucket) + .last(last) + .limit(limit) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StorageApi#getObjects"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bucket** | **String**| bucket名称 | | +| **last** | **String**| 最后一个object的名字 | [optional] | +| **limit** | **Integer**| 页大小 | [optional] | + +### Return type + +[**List<ModelObject>**](ModelObject.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **saveObject** +> Object saveObject(bucket).saveObjectRequest(saveObjectRequest).execute(); + +创建 Object + +- 如果path中的bucket没有创建,会默认创建 - 如果key已经存在,会更新原有的值 + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.StorageApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + StorageApi apiInstance = new StorageApi(defaultClient); + String bucket = "bucket_example"; // String | bucket名称 + SaveObjectRequest saveObjectRequest = new SaveObjectRequest(); // SaveObjectRequest | + try { + Object result = apiInstance.saveObject(bucket) + .saveObjectRequest(saveObjectRequest) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StorageApi#saveObject"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bucket** | **String**| bucket名称 | | +| **saveObjectRequest** | [**SaveObjectRequest**](SaveObjectRequest.md)| | [optional] | + +### Return type + +**Object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + diff --git a/docs/TreeNode.md b/docs/TreeNode.md new file mode 100644 index 0000000..83bd53b --- /dev/null +++ b/docs/TreeNode.md @@ -0,0 +1,35 @@ + + +# TreeNode + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | 节点ID | [optional] | +|**developerId** | **String** | 开发者ID | [optional] | +|**tenantId** | **String** | 租户ID | [optional] | +|**arn** | **String** | | [optional] | +|**timeCreated** | **String** | 创建时间 | [optional] | +|**tag** | **String** | 用于定义节点类型,目前支持:org(组织),role(角色),position(岗位),group(组) | [optional] | +|**status** | **String** | 状态 | [optional] | +|**isPointer** | **String** | 是否指针类型 | [optional] | +|**code** | **String** | 节点code | | +|**name** | **String** | 节点名字 | | +|**permNamespaceArn** | **String** | 抽象权限容器的ARN | [optional] | +|**condition** | **String** | | [optional] | +|**isDynamic** | **String** | 是否动态节点(0普通结点,1动态结点) | [optional] | +|**sysCode** | **String** | 系统code | | +|**operatorId** | **String** | 操作者id | [optional] | +|**pointerId** | **String** | 指针指向的实体节点 | [optional] | +|**seq** | **Integer** | 序号 | [optional] | +|**description** | **String** | 描述 | [optional] | +|**timeModified** | **String** | 最后修改时间 | [optional] | +|**objectCode** | **String** | OBJ_ID,组织,角色,岗位,职级等 | | +|**parentId** | **String** | 父节点id | [optional] | +|**sysExtProps** | **Object** | 额外属性,需要先定义schema | [optional] | +|**freeExtProps** | **Object** | 可以自由扩展 | [optional] | + + + diff --git a/docs/TreeUser.md b/docs/TreeUser.md new file mode 100644 index 0000000..707935f --- /dev/null +++ b/docs/TreeUser.md @@ -0,0 +1,27 @@ + + +# TreeUser + +核心-树型对象(组织、角色等)用户关系表 + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | 全局唯一ID | | +|**developerId** | **String** | 开发者ID | | +|**tenantId** | **String** | 租户ID | | +|**nodeId** | **String** | 节点ID | | +|**userId** | **String** | 用户ID | | +|**path** | **String** | 所属组织关系路径 | | +|**displayName** | **String** | 显示名 | | +|**username** | **String** | 用户名 | | +|**relationType** | **String** | 关联类型(用于区分多重关联) | [optional] | +|**relationData** | **String** | 关联扩展信息 | [optional] | +|**isDefault** | **String** | 是否默认关系 | [optional] | +|**timeCreated** | **OffsetDateTime** | 创建时间 | | +|**timeModified** | **OffsetDateTime** | 修改时间 | | +|**status** | **String** | 状态 | | + + + diff --git a/docs/UpdateMemberRequest.md b/docs/UpdateMemberRequest.md new file mode 100644 index 0000000..2d4817d --- /dev/null +++ b/docs/UpdateMemberRequest.md @@ -0,0 +1,16 @@ + + +# UpdateMemberRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**action** | **String** | 移动节点move, 设置为默认关系as-default | | +|**isDefault** | **String** | 1是,0否 | [optional] | +|**sourceNodeId** | **String** | 移动前节点ID | [optional] | +|**destNodeId** | **String** | 移动后节点ID | [optional] | + + + diff --git a/docs/UpdateNode200Response.md b/docs/UpdateNode200Response.md new file mode 100644 index 0000000..f19619d --- /dev/null +++ b/docs/UpdateNode200Response.md @@ -0,0 +1,28 @@ + + +# UpdateNode200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sysCode** | **String** | 系统分配的用于处理树型关系的编码 | [optional] | +|**code** | **String** | 节点代码 | [optional] | +|**isPointer** | **String** | 是否指针节点(0普通结点,1指针结点) | [optional] | +|**operatorId** | **BigDecimal** | 操作人ID | [optional] | +|**description** | **String** | 备注 | [optional] | +|**permNamespaceArn** | **String** | 抽象权限容器的ARN | [optional] | +|**pointerId** | **BigDecimal** | 指针指向的实体节点 | [optional] | +|**condition** | **String** | 动态节点的条件(如满足某后缀表达式) | [optional] | +|**sourceParentId** | **BigDecimal** | 源上级节点ID(根为0) | [optional] | +|**destParentId** | **BigDecimal** | 目标上级节点ID(根为0) | [optional] | +|**name** | **String** | 节点名称 | [optional] | +|**isDynamic** | **String** | 是否动态节点(0普通结点,1动态结点) | [optional] | +|**objectCode** | **String** | 节点类型(OBJ_ID,组织,角色,岗位,职级等) | [optional] | +|**arn** | **String** | ARN | [optional] | +|**seq** | **BigDecimal** | 显示顺序 | [optional] | +|**status** | **String** | 状态 | [optional] | + + + diff --git a/docs/UpdateNodeRequest.md b/docs/UpdateNodeRequest.md new file mode 100644 index 0000000..888a435 --- /dev/null +++ b/docs/UpdateNodeRequest.md @@ -0,0 +1,34 @@ + + +# UpdateNodeRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**developerId** | **String** | 开发者ID | [optional] | +|**tenantId** | **String** | 租户ID | [optional] | +|**arn** | **String** | | [optional] | +|**timeCreated** | **String** | 创建时间 | [optional] | +|**tag** | **String** | 用于定义节点类型,目前支持:org(组织),role(角色),position(岗位),group(组) | [optional] | +|**status** | **String** | 状态 | [optional] | +|**isPointer** | **String** | 是否指针类型 | [optional] | +|**code** | **String** | 节点code | | +|**name** | **String** | 节点名字 | | +|**permNamespaceArn** | **String** | 抽象权限容器的ARN | [optional] | +|**condition** | **String** | | [optional] | +|**isDynamic** | **String** | 是否动态节点(0普通结点,1动态结点) | [optional] | +|**sysCode** | **String** | 系统code | | +|**operatorId** | **String** | 操作者id | [optional] | +|**pointerId** | **String** | 指针指向的实体节点 | [optional] | +|**seq** | **Integer** | 序号 | [optional] | +|**description** | **String** | 描述 | [optional] | +|**timeModified** | **String** | 最后修改时间 | [optional] | +|**objectCode** | **String** | OBJ_ID,组织,角色,岗位,职级等 | | +|**parentId** | **String** | 父节点id | [optional] | +|**sysExtProps** | **Object** | 额外属性,需要先定义schema | [optional] | +|**freeExtProps** | **Object** | 可以自由扩展 | [optional] | + + + diff --git a/docs/UpdateOrganizationRequest.md b/docs/UpdateOrganizationRequest.md new file mode 100644 index 0000000..1109ffc --- /dev/null +++ b/docs/UpdateOrganizationRequest.md @@ -0,0 +1,17 @@ + + +# UpdateOrganizationRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**objectDisplayName** | **String** | | [optional] | +|**objectType** | **String** | 固定值:tree | [optional] | +|**objectProps** | **String** | | [optional] | +|**isDefault** | **String** | 是否默认组织关系,1是,0否 | [optional] | +|**status** | **String** | | [optional] | + + + diff --git a/docs/UserApi.md b/docs/UserApi.md new file mode 100644 index 0000000..e5edc99 --- /dev/null +++ b/docs/UserApi.md @@ -0,0 +1,518 @@ +# UserApi + +All URIs are relative to *http://localhost* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**callList**](UserApi.md#callList) | **GET** /v1/users | 查询用户列表 | +| [**create**](UserApi.md#create) | **POST** /v1/users | 创建用户 | +| [**createStoreCredential**](UserApi.md#createStoreCredential) | **POST** /v1/user-stored-credentials | 创建用户存储凭证 | +| [**delete**](UserApi.md#delete) | **DELETE** /v1/users/{id} | 删除用户 | +| [**get**](UserApi.md#get) | **GET** /v1/users/{id} | 查询用户详情 | +| [**getStoredCredentials**](UserApi.md#getStoredCredentials) | **GET** /v1/user-stored-credentials | 查询用户存储凭证列表 | +| [**modify**](UserApi.md#modify) | **PATCH** /v1/users/{id} | 编辑用户 | + + + +# **callList** +> List200Response callList().pageSize(pageSize).pageNum(pageNum).searchType(searchType).keyword(keyword).timeModifiedFrom(timeModifiedFrom).timeModifiedTo(timeModifiedTo).execute(); + +查询用户列表 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + UserApi apiInstance = new UserApi(defaultClient); + Integer pageSize = 10; // Integer | + Integer pageNum = 1; // Integer | + String searchType = ""; // String | 默认按用户基础字段搜索;当值为:generic时,全文检索 + String keyword = ""; // String | 检索值 + String timeModifiedFrom = "timeModifiedFrom_example"; // String | 开始时间 + String timeModifiedTo = "timeModifiedTo_example"; // String | 结束时间 + try { + List200Response result = apiInstance.callList() + .pageSize(pageSize) + .pageNum(pageNum) + .searchType(searchType) + .keyword(keyword) + .timeModifiedFrom(timeModifiedFrom) + .timeModifiedTo(timeModifiedTo) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#callList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pageSize** | **Integer**| | [optional] | +| **pageNum** | **Integer**| | [optional] | +| **searchType** | **String**| 默认按用户基础字段搜索;当值为:generic时,全文检索 | [optional] | +| **keyword** | **String**| 检索值 | [optional] | +| **timeModifiedFrom** | **String**| 开始时间 | [optional] | +| **timeModifiedTo** | **String**| 结束时间 | [optional] | + +### Return type + +[**List200Response**](List200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **create** +> Modify200Response create(contentType).createRequest(createRequest).execute(); + +创建用户 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + UserApi apiInstance = new UserApi(defaultClient); + String contentType = "application/json"; // String | + CreateRequest createRequest = new CreateRequest(); // CreateRequest | + try { + Modify200Response result = apiInstance.create(contentType) + .createRequest(createRequest) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#create"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **contentType** | **String**| | | +| **createRequest** | [**CreateRequest**](CreateRequest.md)| | [optional] | + +### Return type + +[**Modify200Response**](Modify200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **createStoreCredential** +> CreateStoreCredential200Response createStoreCredential(contentType).createStoreCredentialRequest(createStoreCredentialRequest).execute(); + +创建用户存储凭证 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + UserApi apiInstance = new UserApi(defaultClient); + String contentType = "application/json"; // String | + CreateStoreCredentialRequest createStoreCredentialRequest = new CreateStoreCredentialRequest(); // CreateStoreCredentialRequest | + try { + CreateStoreCredential200Response result = apiInstance.createStoreCredential(contentType) + .createStoreCredentialRequest(createStoreCredentialRequest) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#createStoreCredential"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **contentType** | **String**| | | +| **createStoreCredentialRequest** | [**CreateStoreCredentialRequest**](CreateStoreCredentialRequest.md)| | [optional] | + +### Return type + +[**CreateStoreCredential200Response**](CreateStoreCredential200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **delete** +> Delete200Response delete(id, contentType).execute(); + +删除用户 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + UserApi apiInstance = new UserApi(defaultClient); + String id = "id_example"; // String | + String contentType = "application/x-www-form-urlencoded"; // String | + try { + Delete200Response result = apiInstance.delete(id, contentType) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#delete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **contentType** | **String**| | | + +### Return type + +[**Delete200Response**](Delete200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **get** +> Get200Response get(id).execute(); + +查询用户详情 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + UserApi apiInstance = new UserApi(defaultClient); + String id = "id_example"; // String | + try { + Get200Response result = apiInstance.get(id) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#get"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | + +### Return type + +[**Get200Response**](Get200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **getStoredCredentials** +> GetStoredCredentials200Response getStoredCredentials(contentType).userId(userId).providerCode(providerCode).idpConfigId(idpConfigId).id1(id1).id2(id2).metadata(metadata).status(status).username(username).displayName(displayName).pageSize(pageSize).pageNum(pageNum).execute(); + +查询用户存储凭证列表 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + UserApi apiInstance = new UserApi(defaultClient); + String contentType = "application/x-www-form-urlencoded"; // String | + BigDecimal userId = new BigDecimal(""); // BigDecimal | 用户id标识 + String providerCode = ""; // String | 社会化登录提供者的code + BigDecimal idpConfigId = new BigDecimal(""); // BigDecimal | 社会化登录配置的ID + String id1 = ""; // String | 社会化身份标识1,约定此字段保存用户唯一标识,如openid + String id2 = ""; // String | 社会化身份标识2,如unionid + String metadata = ""; // String | 更多社会化身份标识 + String status = ""; // String | 状态 + String username = "username_example"; // String | 用户名 + String displayName = "displayName_example"; // String | 显示名 + Integer pageSize = ; // Integer | + Integer pageNum = ; // Integer | + try { + GetStoredCredentials200Response result = apiInstance.getStoredCredentials(contentType) + .userId(userId) + .providerCode(providerCode) + .idpConfigId(idpConfigId) + .id1(id1) + .id2(id2) + .metadata(metadata) + .status(status) + .username(username) + .displayName(displayName) + .pageSize(pageSize) + .pageNum(pageNum) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#getStoredCredentials"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **contentType** | **String**| | | +| **userId** | **BigDecimal**| 用户id标识 | [optional] | +| **providerCode** | **String**| 社会化登录提供者的code | [optional] | +| **idpConfigId** | **BigDecimal**| 社会化登录配置的ID | [optional] | +| **id1** | **String**| 社会化身份标识1,约定此字段保存用户唯一标识,如openid | [optional] | +| **id2** | **String**| 社会化身份标识2,如unionid | [optional] | +| **metadata** | **String**| 更多社会化身份标识 | [optional] | +| **status** | **String**| 状态 | [optional] | +| **username** | **String**| 用户名 | [optional] | +| **displayName** | **String**| 显示名 | [optional] | +| **pageSize** | **Integer**| | [optional] | +| **pageNum** | **Integer**| | [optional] | + +### Return type + +[**GetStoredCredentials200Response**](GetStoredCredentials200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + + +# **modify** +> Modify200Response modify(id, contentType).modifyRequest(modifyRequest).execute(); + +编辑用户 + + + +### Example +```java +// Import classes: +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.Configuration; +import com.idmesh.models.*; +import com.idmesh.api.UserApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = new ApiClient("basePath", "ak", "sk"); + + UserApi apiInstance = new UserApi(defaultClient); + String id = "id_example"; // String | + String contentType = "application/json"; // String | + ModifyRequest modifyRequest = new ModifyRequest(); // ModifyRequest | + try { + Modify200Response result = apiInstance.modify(id, contentType) + .modifyRequest(modifyRequest) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UserApi#modify"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| | | +| **contentType** | **String**| | | +| **modifyRequest** | [**ModifyRequest**](ModifyRequest.md)| | [optional] | + +### Return type + +[**Modify200Response**](Modify200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功 | - | +| **400** | 参数错误 | - | + diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 0000000..f53a75d --- /dev/null +++ b/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..a340857 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,6 @@ +# This file is automatically generated by OpenAPI Generator (https://github.com/openAPITools/openapi-generator). +# To include other gradle properties as part of the code generation process, please use the `gradleProperties` option. +# +# Gradle properties reference: https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties +# For example, uncomment below to build for Android +#target = android diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..7454180 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..ffed3a2 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100644 index 0000000..005bcde --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..6a68175 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..291cf62 --- /dev/null +++ b/pom.xml @@ -0,0 +1,349 @@ + + 4.0.0 + com.idmesh + idmesh-api-sdk-java + jar + idmesh-api-sdk-java + 1.0.0 + https://github.com/openapitools/openapi-generator + sdk for idmesh api + + scm:git:git@github.com:openapitools/openapi-generator.git + scm:git:git@github.com:openapitools/openapi-generator.git + https://github.com/openapitools/openapi-generator + + + + + Unlicense + http://unlicense.org + repo + + + + + + OpenAPI-Generator Contributors + team@openapitools.org + OpenAPITools.org + http://openapitools.org + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + true + 128m + 512m + + -Xlint:all + -J-Xss4m + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.1.0 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.2 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + 10 + + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-version} + + + + + maven-dependency-plugin + 3.3.0 + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.3.0 + + + + test-jar + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.3.0 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.4.1 + + + attach-javadocs + + jar + + + + + none + + + http.response.details + a + Http Response Details: + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.1 + + + attach-sources + + jar-no-fork + + + + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + + + + .gitignore + + + + + + true + 4 + + + + + + + + + + 1.8 + + true + + + + + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.0.1 + + + sign-artifacts + verify + + sign + + + + + + + + + + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.squareup.okhttp3 + okhttp + ${okhttp-version} + + + com.squareup.okhttp3 + logging-interceptor + ${okhttp-version} + + + com.google.code.gson + gson + ${gson-version} + + + io.gsonfire + gson-fire + ${gson-fire-version} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + + javax.ws.rs + jsr311-api + ${jsr311-api-version} + + + javax.ws.rs + javax.ws.rs-api + ${javax.ws.rs-api-version} + + + org.bouncycastle + bcprov-jdk18on + 1.77 + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-version} + test + + + org.junit.platform + junit-platform-runner + ${junit-platform-runner.version} + test + + + + 1.8 + ${java.version} + ${java.version} + 1.9.0 + 4.12.0 + 2.10.1 + 3.13.0 + 0.2.6 + 1.3.5 + 5.10.0 + 1.10.0 + 2.1.1 + 1.1.1 + UTF-8 + 2.27.2 + + diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..d5b2f31 --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "idmesh-api-sdk-java" \ No newline at end of file diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml new file mode 100644 index 0000000..f61bac3 --- /dev/null +++ b/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/src/main/java/com/idmesh/ApiCallback.java b/src/main/java/com/idmesh/ApiCallback.java new file mode 100644 index 0000000..138f5d0 --- /dev/null +++ b/src/main/java/com/idmesh/ApiCallback.java @@ -0,0 +1,62 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh; + +import java.io.IOException; + +import java.util.Map; +import java.util.List; + +/** + * Callback for asynchronous API call. + * + * @param The return type + */ +public interface ApiCallback { + /** + * This is called when the API call fails. + * + * @param e The exception causing the failure + * @param statusCode Status code of the response if available, otherwise it would be 0 + * @param responseHeaders Headers of the response if available, otherwise it would be null + */ + void onFailure(ApiException e, int statusCode, Map> responseHeaders); + + /** + * This is called when the API call succeeded. + * + * @param result The result deserialized from response + * @param statusCode Status code of the response + * @param responseHeaders Headers of the response + */ + void onSuccess(T result, int statusCode, Map> responseHeaders); + + /** + * This is called when the API upload processing. + * + * @param bytesWritten bytes Written + * @param contentLength content length of request body + * @param done write end + */ + void onUploadProgress(long bytesWritten, long contentLength, boolean done); + + /** + * This is called when the API download processing. + * + * @param bytesRead bytes Read + * @param contentLength content length of the response + * @param done Read end + */ + void onDownloadProgress(long bytesRead, long contentLength, boolean done); +} diff --git a/src/main/java/com/idmesh/ApiClient.java b/src/main/java/com/idmesh/ApiClient.java new file mode 100644 index 0000000..323f9cd --- /dev/null +++ b/src/main/java/com/idmesh/ApiClient.java @@ -0,0 +1,1582 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh; + +import com.idmesh.auth.*; +import okhttp3.*; +import okhttp3.internal.http.HttpMethod; +import okhttp3.internal.tls.OkHostnameVerifier; +import okhttp3.logging.HttpLoggingInterceptor; +import okhttp3.logging.HttpLoggingInterceptor.Level; +import okio.Buffer; +import okio.BufferedSink; +import okio.Okio; + +import javax.net.ssl.*; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.Type; +import java.net.URI; +import java.net.URLConnection; +import java.net.URLEncoder; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.security.GeneralSecurityException; +import java.security.KeyStore; +import java.security.SecureRandom; +import java.security.cert.Certificate; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; +import java.text.DateFormat; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.*; +import java.util.Map.Entry; +import java.util.concurrent.TimeUnit; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import com.idmesh.auth.Authentication; +import com.idmesh.auth.HttpBasicAuth; +import com.idmesh.auth.HttpBearerAuth; +import com.idmesh.auth.ApiKeyAuth; + +/** + *

ApiClient class.

+ */ +public class ApiClient { + + private String basePath; + + protected List servers = new ArrayList(Arrays.asList( + new ServerConfiguration( + "", + "No description provided", + new HashMap() + ) + )); + protected Integer serverIndex = 0; + protected Map serverVariables = null; + private boolean debugging = false; + private Map defaultHeaderMap = new HashMap(); + private Map defaultCookieMap = new HashMap(); + private String tempFolderPath = null; + + private Map authentications; + + private DateFormat dateFormat; + private DateFormat datetimeFormat; + private boolean lenientDatetimeFormat; + private int dateLength; + + private InputStream sslCaCert; + private boolean verifyingSsl; + private KeyManager[] keyManagers; + + private OkHttpClient httpClient; + private JSON json; + + private HttpLoggingInterceptor loggingInterceptor; + + /** + * Basic constructor for ApiClient + */ + public ApiClient() { + init(); + initHttpClient(); + + // Setup authentications (key: authentication name, value: authentication). + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + /** + * Basic constructor with custom OkHttpClient + * + * @param client a {@link okhttp3.OkHttpClient} object + */ + public ApiClient(OkHttpClient client) { + init(); + + httpClient = client; + + // Setup authentications (key: authentication name, value: authentication). + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + /** + * aksk constructor for ApiClient + */ + public ApiClient(String basePath, String ak, String sk) { + init(); + initHttpClient(); + this.basePath = basePath; + + // Setup authentications (key: authentication name, value: authentication). + authentications.put("aksk", new AccessKeyAuth(ak, sk)); + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + /** + * aksk constructor with custom OkHttpClient + * + * @param client a {@link okhttp3.OkHttpClient} object + */ + public ApiClient(String basePath, String ak, String sk, OkHttpClient client) { + init(); + httpClient = client; + this.basePath = basePath; + + // Setup authentications (key: authentication name, value: authentication). + authentications.put("aksk", new AccessKeyAuth(ak, sk)); + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + private void initHttpClient() { + initHttpClient(Collections.emptyList()); + } + + private void initHttpClient(List interceptors) { + OkHttpClient.Builder builder = new OkHttpClient.Builder(); + builder.addNetworkInterceptor(getProgressInterceptor()); + for (Interceptor interceptor: interceptors) { + builder.addInterceptor(interceptor); + } + + httpClient = builder.build(); + } + + private void init() { + verifyingSsl = true; + + json = new JSON(); + + // Set default User-Agent. + setUserAgent("OpenAPI-Generator/1.0.0/java"); + + authentications = new HashMap(); + } + + /** + * Get base path + * + * @return Base path + */ + public String getBasePath() { + return basePath; + } + + /** + * Set base path + * + * @param basePath Base path of the URL (e.g http://localhost + * @return An instance of OkHttpClient + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + this.serverIndex = null; + return this; + } + + public List getServers() { + return servers; + } + + public ApiClient setServers(List servers) { + this.servers = servers; + return this; + } + + public Integer getServerIndex() { + return serverIndex; + } + + public ApiClient setServerIndex(Integer serverIndex) { + this.serverIndex = serverIndex; + return this; + } + + public Map getServerVariables() { + return serverVariables; + } + + public ApiClient setServerVariables(Map serverVariables) { + this.serverVariables = serverVariables; + return this; + } + + /** + * Get HTTP client + * + * @return An instance of OkHttpClient + */ + public OkHttpClient getHttpClient() { + return httpClient; + } + + /** + * Set HTTP client, which must never be null. + * + * @param newHttpClient An instance of OkHttpClient + * @return Api Client + * @throws java.lang.NullPointerException when newHttpClient is null + */ + public ApiClient setHttpClient(OkHttpClient newHttpClient) { + this.httpClient = Objects.requireNonNull(newHttpClient, "HttpClient must not be null!"); + return this; + } + + /** + * Get JSON + * + * @return JSON object + */ + public JSON getJSON() { + return json; + } + + /** + * Set JSON + * + * @param json JSON object + * @return Api client + */ + public ApiClient setJSON(JSON json) { + this.json = json; + return this; + } + + /** + * True if isVerifyingSsl flag is on + * + * @return True if isVerifySsl flag is on + */ + public boolean isVerifyingSsl() { + return verifyingSsl; + } + + /** + * Configure whether to verify certificate and hostname when making https requests. + * Default to true. + * NOTE: Do NOT set to false in production code, otherwise you would face multiple types of cryptographic attacks. + * + * @param verifyingSsl True to verify TLS/SSL connection + * @return ApiClient + */ + public ApiClient setVerifyingSsl(boolean verifyingSsl) { + this.verifyingSsl = verifyingSsl; + applySslSettings(); + return this; + } + + /** + * Get SSL CA cert. + * + * @return Input stream to the SSL CA cert + */ + public InputStream getSslCaCert() { + return sslCaCert; + } + + /** + * Configure the CA certificate to be trusted when making https requests. + * Use null to reset to default. + * + * @param sslCaCert input stream for SSL CA cert + * @return ApiClient + */ + public ApiClient setSslCaCert(InputStream sslCaCert) { + this.sslCaCert = sslCaCert; + applySslSettings(); + return this; + } + + /** + *

Getter for the field keyManagers.

+ * + * @return an array of {@link javax.net.ssl.KeyManager} objects + */ + public KeyManager[] getKeyManagers() { + return keyManagers; + } + + /** + * Configure client keys to use for authorization in an SSL session. + * Use null to reset to default. + * + * @param managers The KeyManagers to use + * @return ApiClient + */ + public ApiClient setKeyManagers(KeyManager[] managers) { + this.keyManagers = managers; + applySslSettings(); + return this; + } + + /** + *

Getter for the field dateFormat.

+ * + * @return a {@link java.text.DateFormat} object + */ + public DateFormat getDateFormat() { + return dateFormat; + } + + /** + *

Setter for the field dateFormat.

+ * + * @param dateFormat a {@link java.text.DateFormat} object + * @return a {@link com.idmesh.ApiClient} object + */ + public ApiClient setDateFormat(DateFormat dateFormat) { + JSON.setDateFormat(dateFormat); + return this; + } + + /** + *

Set SqlDateFormat.

+ * + * @param dateFormat a {@link java.text.DateFormat} object + * @return a {@link com.idmesh.ApiClient} object + */ + public ApiClient setSqlDateFormat(DateFormat dateFormat) { + JSON.setSqlDateFormat(dateFormat); + return this; + } + + /** + *

Set OffsetDateTimeFormat.

+ * + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object + * @return a {@link com.idmesh.ApiClient} object + */ + public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + JSON.setOffsetDateTimeFormat(dateFormat); + return this; + } + + /** + *

Set LocalDateFormat.

+ * + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object + * @return a {@link com.idmesh.ApiClient} object + */ + public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { + JSON.setLocalDateFormat(dateFormat); + return this; + } + + /** + *

Set LenientOnJson.

+ * + * @param lenientOnJson a boolean + * @return a {@link com.idmesh.ApiClient} object + */ + public ApiClient setLenientOnJson(boolean lenientOnJson) { + JSON.setLenientOnJson(lenientOnJson); + return this; + } + + /** + * Get authentications (key: authentication name, value: authentication). + * + * @return Map of authentication objects + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + + /** + * Helper method to set username for the first HTTP basic authentication. + * + * @param username Username + */ + public void setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * + * @param password Password + */ + public void setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set API key value for the first API key authentication. + * + * @param apiKey API key + */ + public void setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set API key prefix for the first API key authentication. + * + * @param apiKeyPrefix API key prefix + */ + public void setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set access token for the first OAuth2 authentication. + * + * @param accessToken Access token + */ + public void setAccessToken(String accessToken) { + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + + /** + * Set the User-Agent header's value (by adding to the default header map). + * + * @param userAgent HTTP request's user agent + * @return ApiClient + */ + public ApiClient setUserAgent(String userAgent) { + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Add a default header. + * + * @param key The header's key + * @param value The header's value + * @return ApiClient + */ + public ApiClient addDefaultHeader(String key, String value) { + defaultHeaderMap.put(key, value); + return this; + } + + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return ApiClient + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + + /** + * Check that whether debugging is enabled for this API client. + * + * @return True if debugging is enabled, false otherwise. + */ + public boolean isDebugging() { + return debugging; + } + + /** + * Enable/disable debugging for this API client. + * + * @param debugging To enable (true) or disable (false) debugging + * @return ApiClient + */ + public ApiClient setDebugging(boolean debugging) { + if (debugging != this.debugging) { + if (debugging) { + loggingInterceptor = new HttpLoggingInterceptor(); + loggingInterceptor.setLevel(Level.BODY); + httpClient = httpClient.newBuilder().addInterceptor(loggingInterceptor).build(); + } else { + final OkHttpClient.Builder builder = httpClient.newBuilder(); + builder.interceptors().remove(loggingInterceptor); + httpClient = builder.build(); + loggingInterceptor = null; + } + } + this.debugging = debugging; + return this; + } + + /** + * The path of temporary folder used to store downloaded files from endpoints + * with file response. The default value is null, i.e. using + * the system's default temporary folder. + * + * @see createTempFile + * @return Temporary folder path + */ + public String getTempFolderPath() { + return tempFolderPath; + } + + /** + * Set the temporary folder path (for downloading files) + * + * @param tempFolderPath Temporary folder path + * @return ApiClient + */ + public ApiClient setTempFolderPath(String tempFolderPath) { + this.tempFolderPath = tempFolderPath; + return this; + } + + /** + * Get connection timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getConnectTimeout() { + return httpClient.connectTimeoutMillis(); + } + + /** + * Sets the connect timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link java.lang.Integer#MAX_VALUE}. + * + * @param connectionTimeout connection timeout in milliseconds + * @return Api client + */ + public ApiClient setConnectTimeout(int connectionTimeout) { + httpClient = httpClient.newBuilder().connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS).build(); + return this; + } + + /** + * Get read timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getReadTimeout() { + return httpClient.readTimeoutMillis(); + } + + /** + * Sets the read timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link java.lang.Integer#MAX_VALUE}. + * + * @param readTimeout read timeout in milliseconds + * @return Api client + */ + public ApiClient setReadTimeout(int readTimeout) { + httpClient = httpClient.newBuilder().readTimeout(readTimeout, TimeUnit.MILLISECONDS).build(); + return this; + } + + /** + * Get write timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getWriteTimeout() { + return httpClient.writeTimeoutMillis(); + } + + /** + * Sets the write timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link java.lang.Integer#MAX_VALUE}. + * + * @param writeTimeout connection timeout in milliseconds + * @return Api client + */ + public ApiClient setWriteTimeout(int writeTimeout) { + httpClient = httpClient.newBuilder().writeTimeout(writeTimeout, TimeUnit.MILLISECONDS).build(); + return this; + } + + + /** + * Format the given parameter object into string. + * + * @param param Parameter + * @return String representation of the parameter + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate) { + //Serialize to json string and remove the " enclosing characters + String jsonStr = JSON.serialize(param); + return jsonStr.substring(1, jsonStr.length() - 1); + } else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for (Object o : (Collection) param) { + if (b.length() > 0) { + b.append(","); + } + b.append(o); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /** + * Formats the specified query parameter to a list containing a single {@code Pair} object. + * + * Note that {@code value} must not be a collection. + * + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list containing a single {@code Pair} object. + */ + public List parameterToPair(String name, Object value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value instanceof Collection) { + return params; + } + + params.add(new Pair(name, parameterToString(value))); + return params; + } + + /** + * Formats the specified collection query parameters to a list of {@code Pair} objects. + * + * Note that the values of each of the returned Pair objects are percent-encoded. + * + * @param collectionFormat The collection format of the parameter. + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list of {@code Pair} objects. + */ + public List parameterToPairs(String collectionFormat, String name, Collection value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value.isEmpty()) { + return params; + } + + // create the params based on the collection format + if ("multi".equals(collectionFormat)) { + for (Object item : value) { + params.add(new Pair(name, escapeString(parameterToString(item)))); + } + return params; + } + + // collectionFormat is assumed to be "csv" by default + String delimiter = ","; + + // escape all delimiters except commas, which are URI reserved + // characters + if ("ssv".equals(collectionFormat)) { + delimiter = escapeString(" "); + } else if ("tsv".equals(collectionFormat)) { + delimiter = escapeString("\t"); + } else if ("pipes".equals(collectionFormat)) { + delimiter = escapeString("|"); + } + + StringBuilder sb = new StringBuilder(); + for (Object item : value) { + sb.append(delimiter); + sb.append(escapeString(parameterToString(item))); + } + + params.add(new Pair(name, sb.substring(delimiter.length()))); + + return params; + } + + /** + * Formats the specified collection path parameter to a string value. + * + * @param collectionFormat The collection format of the parameter. + * @param value The value of the parameter. + * @return String representation of the parameter + */ + public String collectionPathParameterToString(String collectionFormat, Collection value) { + // create the value based on the collection format + if ("multi".equals(collectionFormat)) { + // not valid for path params + return parameterToString(value); + } + + // collectionFormat is assumed to be "csv" by default + String delimiter = ","; + + if ("ssv".equals(collectionFormat)) { + delimiter = " "; + } else if ("tsv".equals(collectionFormat)) { + delimiter = "\t"; + } else if ("pipes".equals(collectionFormat)) { + delimiter = "|"; + } + + StringBuilder sb = new StringBuilder() ; + for (Object item : value) { + sb.append(delimiter); + sb.append(parameterToString(item)); + } + + return sb.substring(delimiter.length()); + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param filename The filename to be sanitized + * @return The sanitized filename + */ + public String sanitizeFilename(String filename) { + return filename.replaceAll(".*[/\\\\]", ""); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * "* / *" is also default to JSON + * @param mime MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public boolean isJsonMime(String mime) { + String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; + return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). + */ + public String selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) { + return null; + } + for (String accept : accepts) { + if (isJsonMime(accept)) { + return accept; + } + } + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, + * returns null. If it matches "any", JSON will be used. + */ + public String selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0) { + return null; + } + + if (contentTypes[0].equals("*/*")) { + return "application/json"; + } + + for (String contentType : contentTypes) { + if (isJsonMime(contentType)) { + return contentType; + } + } + + return contentTypes[0]; + } + + /** + * Escape the given string to be used as URL query value. + * + * @param str String to be escaped + * @return Escaped string + */ + public String escapeString(String str) { + try { + return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + return str; + } + } + + /** + * Deserialize response body to Java object, according to the return type and + * the Content-Type response header. + * + * @param Type + * @param response HTTP response + * @param returnType The type of the Java object + * @return The deserialized Java object + * @throws com.idmesh.ApiException If fail to deserialize response body, i.e. cannot read response body + * or the Content-Type of the response is not supported. + */ + @SuppressWarnings("unchecked") + public T deserialize(Response response, Type returnType) throws ApiException { + if (response == null || returnType == null) { + return null; + } + + if ("byte[]".equals(returnType.toString())) { + // Handle binary response (byte array). + try { + return (T) response.body().bytes(); + } catch (IOException e) { + throw new ApiException(e); + } + } else if (returnType.equals(File.class)) { + // Handle file downloading. + return (T) downloadFileFromResponse(response); + } + + String respBody; + try { + if (response.body() != null) + respBody = response.body().string(); + else + respBody = null; + } catch (IOException e) { + throw new ApiException(e); + } + + if (respBody == null || "".equals(respBody)) { + return null; + } + + String contentType = response.headers().get("Content-Type"); + if (contentType == null) { + // ensuring a default content type + contentType = "application/json"; + } + if (isJsonMime(contentType)) { + return JSON.deserialize(respBody, returnType); + } else if (returnType.equals(String.class)) { + // Expecting string, return the raw response body. + return (T) respBody; + } else { + throw new ApiException( + "Content type \"" + contentType + "\" is not supported for type: " + returnType, + response.code(), + response.headers().toMultimap(), + respBody); + } + } + + /** + * Serialize the given Java object into request body according to the object's + * class and the request Content-Type. + * + * @param obj The Java object + * @param contentType The request Content-Type + * @return The serialized request body + * @throws com.idmesh.ApiException If fail to serialize the given object + */ + public RequestBody serialize(Object obj, String contentType) throws ApiException { + if (obj instanceof byte[]) { + // Binary (byte array) body parameter support. + return RequestBody.create((byte[]) obj, MediaType.parse(contentType)); + } else if (obj instanceof File) { + // File body parameter support. + return RequestBody.create((File) obj, MediaType.parse(contentType)); + } else if ("text/plain".equals(contentType) && obj instanceof String) { + return RequestBody.create((String) obj, MediaType.parse(contentType)); + } else if (isJsonMime(contentType)) { + String content; + if (obj != null) { + content = JSON.serialize(obj); + } else { + content = null; + } + return RequestBody.create(content, MediaType.parse(contentType)); + } else if (obj instanceof String) { + return RequestBody.create((String) obj, MediaType.parse(contentType)); + } else { + throw new ApiException("Content type \"" + contentType + "\" is not supported"); + } + } + + /** + * Download file from the given response. + * + * @param response An instance of the Response object + * @throws com.idmesh.ApiException If fail to read file content from response and write to disk + * @return Downloaded file + */ + public File downloadFileFromResponse(Response response) throws ApiException { + try { + File file = prepareDownloadFile(response); + BufferedSink sink = Okio.buffer(Okio.sink(file)); + sink.writeAll(response.body().source()); + sink.close(); + return file; + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + * Prepare file for download + * + * @param response An instance of the Response object + * @return Prepared file for the download + * @throws java.io.IOException If fail to prepare file for download + */ + public File prepareDownloadFile(Response response) throws IOException { + String filename = null; + String contentDisposition = response.header("Content-Disposition"); + if (contentDisposition != null && !"".equals(contentDisposition)) { + // Get filename from the Content-Disposition header. + Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); + Matcher matcher = pattern.matcher(contentDisposition); + if (matcher.find()) { + filename = sanitizeFilename(matcher.group(1)); + } + } + + String prefix = null; + String suffix = null; + if (filename == null) { + prefix = "download-"; + suffix = ""; + } else { + int pos = filename.lastIndexOf("."); + if (pos == -1) { + prefix = filename + "-"; + } else { + prefix = filename.substring(0, pos) + "-"; + suffix = filename.substring(pos); + } + // Files.createTempFile requires the prefix to be at least three characters long + if (prefix.length() < 3) + prefix = "download-"; + } + + if (tempFolderPath == null) + return Files.createTempFile(prefix, suffix).toFile(); + else + return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); + } + + /** + * {@link #execute(Call, Type)} + * + * @param Type + * @param call An instance of the Call object + * @return ApiResponse<T> + * @throws com.idmesh.ApiException If fail to execute the call + */ + public ApiResponse execute(Call call) throws ApiException { + return execute(call, null); + } + + /** + * Execute HTTP call and deserialize the HTTP response body into the given return type. + * + * @param returnType The return type used to deserialize HTTP response body + * @param The return type corresponding to (same with) returnType + * @param call Call + * @return ApiResponse object containing response status, headers and + * data, which is a Java object deserialized from response body and would be null + * when returnType is null. + * @throws com.idmesh.ApiException If fail to execute the call + */ + public ApiResponse execute(Call call, Type returnType) throws ApiException { + try { + Response response = call.execute(); + T data = handleResponse(response, returnType); + return new ApiResponse(response.code(), response.headers().toMultimap(), data); + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + * {@link #executeAsync(Call, Type, ApiCallback)} + * + * @param Type + * @param call An instance of the Call object + * @param callback ApiCallback<T> + */ + public void executeAsync(Call call, ApiCallback callback) { + executeAsync(call, null, callback); + } + + /** + * Execute HTTP call asynchronously. + * + * @param Type + * @param call The callback to be executed when the API call finishes + * @param returnType Return type + * @param callback ApiCallback + * @see #execute(Call, Type) + */ + @SuppressWarnings("unchecked") + public void executeAsync(Call call, final Type returnType, final ApiCallback callback) { + call.enqueue(new Callback() { + @Override + public void onFailure(Call call, IOException e) { + callback.onFailure(new ApiException(e), 0, null); + } + + @Override + public void onResponse(Call call, Response response) throws IOException { + T result; + try { + result = (T) handleResponse(response, returnType); + } catch (ApiException e) { + callback.onFailure(e, response.code(), response.headers().toMultimap()); + return; + } catch (Exception e) { + callback.onFailure(new ApiException(e), response.code(), response.headers().toMultimap()); + return; + } + callback.onSuccess(result, response.code(), response.headers().toMultimap()); + } + }); + } + + /** + * Handle the given response, return the deserialized object when the response is successful. + * + * @param Type + * @param response Response + * @param returnType Return type + * @return Type + * @throws com.idmesh.ApiException If the response has an unsuccessful status code or + * fail to deserialize the response body + */ + public T handleResponse(Response response, Type returnType) throws ApiException { + if (response.isSuccessful()) { + if (returnType == null || response.code() == 204) { + // returning null if the returnType is not defined, + // or the status code is 204 (No Content) + if (response.body() != null) { + try { + response.body().close(); + } catch (Exception e) { + throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); + } + } + return null; + } else { + return deserialize(response, returnType); + } + } else { + String respBody = null; + if (response.body() != null) { + try { + respBody = response.body().string(); + } catch (IOException e) { + throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); + } + } + throw new ApiException(response.message(), response.code(), response.headers().toMultimap(), respBody); + } + } + + /** + * Build HTTP call with the given options. + * + * @param baseUrl The base URL + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param authNames The authentications to apply + * @param callback Callback for upload/download progress + * @return The HTTP call + * @throws com.idmesh.ApiException If fail to serialize the request body object + */ + public Call buildCall(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + Request request = buildRequest(baseUrl, path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); + + return httpClient.newCall(request); + } + + /** + * Build an HTTP request with the given options. + * + * @param baseUrl The base URL + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param authNames The authentications to apply + * @param callback Callback for upload/download progress + * @return The HTTP request + * @throws com.idmesh.ApiException If fail to serialize the request body object + */ + public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + // aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams + List allQueryParams = new ArrayList(queryParams); + allQueryParams.addAll(collectionQueryParams); + + final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams); + + // prepare HTTP request body + RequestBody reqBody; + String contentType = headerParams.get("Content-Type"); + String contentTypePure = contentType; + if (contentTypePure != null && contentTypePure.contains(";")) { + contentTypePure = contentType.substring(0, contentType.indexOf(";")); + } + if (!HttpMethod.permitsRequestBody(method)) { + reqBody = null; + } else if ("application/x-www-form-urlencoded".equals(contentTypePure)) { + reqBody = buildRequestBodyFormEncoding(formParams); + } else if ("multipart/form-data".equals(contentTypePure)) { + reqBody = buildRequestBodyMultipart(formParams); + } else if (body == null) { + if ("DELETE".equals(method)) { + // allow calling DELETE without sending a request body + reqBody = null; + } else { + // use an empty request body (for POST, PUT and PATCH) + reqBody = RequestBody.create("", contentType == null ? null : MediaType.parse(contentType)); + } + } else { + reqBody = serialize(body, contentType); + } + + // update parameters with authentication settings + updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url)); + + final Request.Builder reqBuilder = new Request.Builder().url(url); + processHeaderParams(headerParams, reqBuilder); + processCookieParams(cookieParams, reqBuilder); + + // Associate callback with request (if not null) so interceptor can + // access it when creating ProgressResponseBody + reqBuilder.tag(callback); + + Request request = null; + + if (callback != null && reqBody != null) { + ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, callback); + request = reqBuilder.method(method, progressRequestBody).build(); + } else { + request = reqBuilder.method(method, reqBody).build(); + } + + return request; + } + + /** + * Build full URL by concatenating base path, the given sub path and query parameters. + * + * @param baseUrl The base URL + * @param path The sub path + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @return The full URL + */ + public String buildUrl(String baseUrl, String path, List queryParams, List collectionQueryParams) { + final StringBuilder url = new StringBuilder(); + if (baseUrl != null) { + url.append(baseUrl).append(path); + } else { + String baseURL; + if (serverIndex != null) { + if (serverIndex < 0 || serverIndex >= servers.size()) { + throw new ArrayIndexOutOfBoundsException(String.format( + "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() + )); + } + baseURL = servers.get(serverIndex).URL(serverVariables); + } else { + baseURL = basePath; + } + url.append(baseURL).append(path); + } + + if (queryParams != null && !queryParams.isEmpty()) { + // support (constant) query string in `path`, e.g. "/posts?draft=1" + String prefix = path.contains("?") ? "&" : "?"; + for (Pair param : queryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + url.append(escapeString(param.getName())).append("=").append(escapeString(value)); + } + } + } + + if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) { + String prefix = url.toString().contains("?") ? "&" : "?"; + for (Pair param : collectionQueryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + // collection query parameter value already escaped as part of parameterToPairs + url.append(escapeString(param.getName())).append("=").append(value); + } + } + } + + return url.toString(); + } + + /** + * Set header parameters to the request builder, including default headers. + * + * @param headerParams Header parameters in the form of Map + * @param reqBuilder Request.Builder + */ + public void processHeaderParams(Map headerParams, Request.Builder reqBuilder) { + for (Entry param : headerParams.entrySet()) { + reqBuilder.header(param.getKey(), parameterToString(param.getValue())); + } + for (Entry header : defaultHeaderMap.entrySet()) { + if (!headerParams.containsKey(header.getKey())) { + reqBuilder.header(header.getKey(), parameterToString(header.getValue())); + } + } + } + + /** + * Set cookie parameters to the request builder, including default cookies. + * + * @param cookieParams Cookie parameters in the form of Map + * @param reqBuilder Request.Builder + */ + public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) { + for (Entry param : cookieParams.entrySet()) { + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + } + for (Entry param : defaultCookieMap.entrySet()) { + if (!cookieParams.containsKey(param.getKey())) { + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + } + } + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + * @param payload HTTP request body + * @param method HTTP method + * @param uri URI + * @throws com.idmesh.ApiException If fails to update the parameters + */ + public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, + Map cookieParams, String payload, String method, URI uri) throws ApiException { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) { + throw new RuntimeException("Authentication undefined: " + authName); + } + auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); + } + } + + /** + * Build a form-encoding request body with the given form parameters. + * + * @param formParams Form parameters in the form of Map + * @return RequestBody + */ + public RequestBody buildRequestBodyFormEncoding(Map formParams) { + okhttp3.FormBody.Builder formBuilder = new okhttp3.FormBody.Builder(); + for (Entry param : formParams.entrySet()) { + formBuilder.add(param.getKey(), parameterToString(param.getValue())); + } + return formBuilder.build(); + } + + /** + * Build a multipart (file uploading) request body with the given form parameters, + * which could contain text fields and file fields. + * + * @param formParams Form parameters in the form of Map + * @return RequestBody + */ + public RequestBody buildRequestBodyMultipart(Map formParams) { + MultipartBody.Builder mpBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); + for (Entry param : formParams.entrySet()) { + if (param.getValue() instanceof File) { + File file = (File) param.getValue(); + addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); + } else if (param.getValue() instanceof List) { + List list = (List) param.getValue(); + for (Object item: list) { + if (item instanceof File) { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); + } else { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); + } + } + } else { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); + } + } + return mpBuilder.build(); + } + + /** + * Guess Content-Type header from the given file (defaults to "application/octet-stream"). + * + * @param file The given file + * @return The guessed Content-Type + */ + public String guessContentTypeFromFile(File file) { + String contentType = URLConnection.guessContentTypeFromName(file.getName()); + if (contentType == null) { + return "application/octet-stream"; + } else { + return contentType; + } + } + + /** + * Add a Content-Disposition Header for the given key and file to the MultipartBody Builder. + * + * @param mpBuilder MultipartBody.Builder + * @param key The key of the Header element + * @param file The file to add to the Header + */ + private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\""); + MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); + mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); + } + + /** + * Add a Content-Disposition Header for the given key and complex object to the MultipartBody Builder. + * + * @param mpBuilder MultipartBody.Builder + * @param key The key of the Header element + * @param obj The complex object to add to the Header + */ + private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { + RequestBody requestBody; + if (obj instanceof String) { + requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain")); + } else { + String content; + if (obj != null) { + content = JSON.serialize(obj); + } else { + content = null; + } + requestBody = RequestBody.create(content, MediaType.parse("application/json")); + } + + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\""); + mpBuilder.addPart(partHeaders, requestBody); + } + + /** + * Get network interceptor to add it to the httpClient to track download progress for + * async requests. + */ + private Interceptor getProgressInterceptor() { + return new Interceptor() { + @Override + public Response intercept(Interceptor.Chain chain) throws IOException { + final Request request = chain.request(); + final Response originalResponse = chain.proceed(request); + if (request.tag() instanceof ApiCallback) { + final ApiCallback callback = (ApiCallback) request.tag(); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), callback)) + .build(); + } + return originalResponse; + } + }; + } + + /** + * Apply SSL related settings to httpClient according to the current values of + * verifyingSsl and sslCaCert. + */ + private void applySslSettings() { + try { + TrustManager[] trustManagers; + HostnameVerifier hostnameVerifier; + if (!verifyingSsl) { + trustManagers = new TrustManager[]{ + new X509TrustManager() { + @Override + public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { + } + + @Override + public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { + } + + @Override + public java.security.cert.X509Certificate[] getAcceptedIssuers() { + return new java.security.cert.X509Certificate[]{}; + } + } + }; + hostnameVerifier = new HostnameVerifier() { + @Override + public boolean verify(String hostname, SSLSession session) { + return true; + } + }; + } else { + TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + + if (sslCaCert == null) { + trustManagerFactory.init((KeyStore) null); + } else { + char[] password = null; // Any password will work. + CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); + Collection certificates = certificateFactory.generateCertificates(sslCaCert); + if (certificates.isEmpty()) { + throw new IllegalArgumentException("expected non-empty set of trusted certificates"); + } + KeyStore caKeyStore = newEmptyKeyStore(password); + int index = 0; + for (Certificate certificate : certificates) { + String certificateAlias = "ca" + (index++); + caKeyStore.setCertificateEntry(certificateAlias, certificate); + } + trustManagerFactory.init(caKeyStore); + } + trustManagers = trustManagerFactory.getTrustManagers(); + hostnameVerifier = OkHostnameVerifier.INSTANCE; + } + + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(keyManagers, trustManagers, new SecureRandom()); + httpClient = httpClient.newBuilder() + .sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]) + .hostnameVerifier(hostnameVerifier) + .build(); + } catch (GeneralSecurityException e) { + throw new RuntimeException(e); + } + } + + private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { + try { + KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); + keyStore.load(null, password); + return keyStore; + } catch (IOException e) { + throw new AssertionError(e); + } + } + + /** + * Convert the HTTP request body to a string. + * + * @param requestBody The HTTP request object + * @return The string representation of the HTTP request body + * @throws com.idmesh.ApiException If fail to serialize the request body object into a string + */ + private String requestBodyToString(RequestBody requestBody) throws ApiException { + if (requestBody != null) { + try { + final Buffer buffer = new Buffer(); + requestBody.writeTo(buffer); + return buffer.readUtf8(); + } catch (final IOException e) { + throw new ApiException(e); + } + } + + // empty http request body + return ""; + } +} diff --git a/src/main/java/com/idmesh/ApiException.java b/src/main/java/com/idmesh/ApiException.java new file mode 100644 index 0000000..6741975 --- /dev/null +++ b/src/main/java/com/idmesh/ApiException.java @@ -0,0 +1,165 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh; + +import java.util.Map; +import java.util.List; + + +/** + *

ApiException class.

+ */ +@SuppressWarnings("serial") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApiException extends Exception { + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + + /** + *

Constructor for ApiException.

+ */ + public ApiException() {} + + /** + *

Constructor for ApiException.

+ * + * @param throwable a {@link java.lang.Throwable} object + */ + public ApiException(Throwable throwable) { + super(throwable); + } + + /** + *

Constructor for ApiException.

+ * + * @param message the error message + */ + public ApiException(String message) { + super(message); + } + + /** + *

Constructor for ApiException.

+ * + * @param message the error message + * @param throwable a {@link java.lang.Throwable} object + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + *

Constructor for ApiException.

+ * + * @param message the error message + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + /** + *

Constructor for ApiException.

+ * + * @param message the error message + * @param throwable a {@link java.lang.Throwable} object + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + */ + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + /** + *

Constructor for ApiException.

+ * + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException(int code, Map> responseHeaders, String responseBody) { + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); + } + + /** + *

Constructor for ApiException.

+ * + * @param code HTTP status code + * @param message a {@link java.lang.String} object + */ + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + /** + *

Constructor for ApiException.

+ * + * @param code HTTP status code + * @param message the error message + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException(int code, String message, Map> responseHeaders, String responseBody) { + this(code, message); + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } + + /** + * Get the exception message including HTTP response data. + * + * @return The exception message + */ + public String getMessage() { + return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", + super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders()); + } +} diff --git a/src/main/java/com/idmesh/ApiResponse.java b/src/main/java/com/idmesh/ApiResponse.java new file mode 100644 index 0000000..92e7eb7 --- /dev/null +++ b/src/main/java/com/idmesh/ApiResponse.java @@ -0,0 +1,76 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh; + +import java.util.List; +import java.util.Map; + +/** + * API response returned by API call. + */ +public class ApiResponse { + final private int statusCode; + final private Map> headers; + final private T data; + + /** + *

Constructor for ApiResponse.

+ * + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + *

Constructor for ApiResponse.

+ * + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + this.headers = headers; + this.data = data; + } + + /** + *

Get the status code.

+ * + * @return the status code + */ + public int getStatusCode() { + return statusCode; + } + + /** + *

Get the headers.

+ * + * @return a {@link java.util.Map} of headers + */ + public Map> getHeaders() { + return headers; + } + + /** + *

Get the data.

+ * + * @return the data + */ + public T getData() { + return data; + } +} diff --git a/src/main/java/com/idmesh/Configuration.java b/src/main/java/com/idmesh/Configuration.java new file mode 100644 index 0000000..6babd7a --- /dev/null +++ b/src/main/java/com/idmesh/Configuration.java @@ -0,0 +1,41 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Configuration { + public static final String VERSION = "1.0.0"; + + private static ApiClient defaultApiClient = new ApiClient(); + + /** + * Get the default API client, which would be used when creating API + * instances without providing an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + return defaultApiClient; + } + + /** + * Set the default API client, which would be used when creating API + * instances without providing an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient = apiClient; + } +} diff --git a/src/main/java/com/idmesh/GzipRequestInterceptor.java b/src/main/java/com/idmesh/GzipRequestInterceptor.java new file mode 100644 index 0000000..8fee9e2 --- /dev/null +++ b/src/main/java/com/idmesh/GzipRequestInterceptor.java @@ -0,0 +1,85 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh; + +import okhttp3.*; +import okio.Buffer; +import okio.BufferedSink; +import okio.GzipSink; +import okio.Okio; + +import java.io.IOException; + +/** + * Encodes request bodies using gzip. + * + * Taken from https://github.com/square/okhttp/issues/350 + */ +class GzipRequestInterceptor implements Interceptor { + @Override + public Response intercept(Chain chain) throws IOException { + Request originalRequest = chain.request(); + if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { + return chain.proceed(originalRequest); + } + + Request compressedRequest = originalRequest.newBuilder() + .header("Content-Encoding", "gzip") + .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body()))) + .build(); + return chain.proceed(compressedRequest); + } + + private RequestBody forceContentLength(final RequestBody requestBody) throws IOException { + final Buffer buffer = new Buffer(); + requestBody.writeTo(buffer); + return new RequestBody() { + @Override + public MediaType contentType() { + return requestBody.contentType(); + } + + @Override + public long contentLength() { + return buffer.size(); + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + sink.write(buffer.snapshot()); + } + }; + } + + private RequestBody gzip(final RequestBody body) { + return new RequestBody() { + @Override + public MediaType contentType() { + return body.contentType(); + } + + @Override + public long contentLength() { + return -1; // We don't know the compressed length in advance! + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); + body.writeTo(gzipSink); + gzipSink.close(); + } + }; + } +} diff --git a/src/main/java/com/idmesh/JSON.java b/src/main/java/com/idmesh/JSON.java new file mode 100644 index 0000000..84c896d --- /dev/null +++ b/src/main/java/com/idmesh/JSON.java @@ -0,0 +1,513 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.internal.bind.util.ISO8601Utils; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonElement; +import io.gsonfire.GsonFireBuilder; +import io.gsonfire.TypeSelector; + +import okio.ByteString; + +import java.io.IOException; +import java.io.StringReader; +import java.lang.reflect.Type; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.ParsePosition; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Date; +import java.util.Locale; +import java.util.Map; +import java.util.HashMap; + +/* + * A JSON utility class + * + * NOTE: in the future, this class may be converted to static, which may break + * backward-compatibility + */ +public class JSON { + private static Gson gson; + private static boolean isLenientOnJson = false; + private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); + private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); + private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); + private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); + + @SuppressWarnings("unchecked") + public static GsonBuilder createGson() { + GsonFireBuilder fireBuilder = new GsonFireBuilder() + ; + GsonBuilder builder = fireBuilder.createGsonBuilder(); + return builder; + } + + private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { + JsonElement element = readElement.getAsJsonObject().get(discriminatorField); + if (null == element) { + throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); + } + return element.getAsString(); + } + + /** + * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. + * + * @param classByDiscriminatorValue The map of discriminator values to Java classes. + * @param discriminatorValue The value of the OpenAPI discriminator in the input data. + * @return The Java class that implements the OpenAPI schema + */ + private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { + Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); + if (null == clazz) { + throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); + } + return clazz; + } + + { + GsonBuilder gsonBuilder = createGson(); + gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); + gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); + gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); + gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); + gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.App.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.AppConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.AppConfigAllowedIdProvider.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.AppDetail.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.AppSubAccount.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.Au.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.AuResourceSet.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.AuthRuleArg.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.AuthUnit.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.AuthUnitResouce.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.AuthUnitResourceSet.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.AuthorizeApplicationsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.AuthzApp.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.Bucket.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.CoreObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.Create200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.CreateAccountRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.CreateNodeRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.CreateOrganization200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.CreateOrganizationRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.CreateRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.CreateRequest1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.CreateRequest1ConfigProp.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.CreateRequest1ConfigPropAccessPolicy.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.CreateRequest1ConfigPropAllowedLoginMethod.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.CreateRequest1ConfigPropAllowedSocialLoginProvider.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.CreateRequest1ProtocolProp.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.CreateRequest1ProtocolPropResponseAttrInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.CreateSecrets200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.CreateSecrets200ResponseData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.CreateStoreCredential200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.CreateStoreCredentialRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.CronJob.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.Delete200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.Delete200Response1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.DeleteAuthUnitRulesRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.DeleteMembersRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.DeleteNode200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.DeleteOrganization200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.DeleteResourcesRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.Disable200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.EmptyObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.EmptyObject1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.EmptyObject10.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.EmptyObject11.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.EmptyObject12.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.EmptyObject12ResourceActionsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.EmptyObject13.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.EmptyObject2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.EmptyObject3.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.EmptyObject3ActionsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.EmptyObject4.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.EmptyObject4Application.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.EmptyObject4Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.EmptyObject4ResourceSet.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.EmptyObject5.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.EmptyObject5ActionsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.EmptyObject6.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.EmptyObject7.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.EmptyObject8.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.EmptyObject9.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.Enable200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.Get200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.Get400Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.GetAccountsByApp200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.GetAuthUnits200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.GetConfig200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.GetConfig200ResponseMfaConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.GetMembers200ResponseInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.GetNodeMembers200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.GetNodeMembers200ResponseDataInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.GetNodeMembers200ResponseDataInnerNodeInfoInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.GetOrganization200ResponseInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.GetOrganizations200ResponseInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.GetPrivileges200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.GetResource200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.GetResourceMembers200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.GetResourceSets200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.GetResources200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.GetStoredCredentials200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.GetTemplate200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.GetTemplate200ResponseDataInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.GetTemplate200ResponseDataInnerConfigProp.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.GetTemplate200ResponseDataInnerProtocolProp.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.IdentityObj.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.Injection.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.Job.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.List200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.List200Response1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.List200Response1DataInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.List200Response1DataInnerAllowedProviderIdInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.List200ResponseDataInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.MFA.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.ModelObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.Modify200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.Modify200Response1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.ModifyAccountRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.ModifyConfigRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.ModifyRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.ModifyRequest1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.NullInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.Privilege.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.ResourceSet.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.ResourceSetMember.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.ResourceSetMemberResourceActions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.SaveObjectRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.TreeNode.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.TreeUser.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.UpdateMemberRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.UpdateNode200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.UpdateNodeRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.idmesh.model.UpdateOrganizationRequest.CustomTypeAdapterFactory()); + gson = gsonBuilder.create(); + } + + /** + * Get Gson. + * + * @return Gson + */ + public static Gson getGson() { + return gson; + } + + /** + * Set Gson. + * + * @param gson Gson + */ + public static void setGson(Gson gson) { + JSON.gson = gson; + } + + public static void setLenientOnJson(boolean lenientOnJson) { + isLenientOnJson = lenientOnJson; + } + + /** + * Serialize the given Java object into JSON string. + * + * @param obj Object + * @return String representation of the JSON + */ + public static String serialize(Object obj) { + return gson.toJson(obj); + } + + /** + * Deserialize the given JSON string to Java object. + * + * @param Type + * @param body The JSON string + * @param returnType The type to deserialize into + * @return The deserialized Java object + */ + @SuppressWarnings("unchecked") + public static T deserialize(String body, Type returnType) { + try { + if (isLenientOnJson) { + JsonReader jsonReader = new JsonReader(new StringReader(body)); + // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) + jsonReader.setLenient(true); + return gson.fromJson(jsonReader, returnType); + } else { + return gson.fromJson(body, returnType); + } + } catch (JsonParseException e) { + // Fallback processing when failed to parse JSON form response body: + // return the response body string directly for the String return type; + if (returnType.equals(String.class)) { + return (T) body; + } else { + throw (e); + } + } + } + + /** + * Gson TypeAdapter for Byte Array type + */ + public static class ByteArrayAdapter extends TypeAdapter { + + @Override + public void write(JsonWriter out, byte[] value) throws IOException { + if (value == null) { + out.nullValue(); + } else { + out.value(ByteString.of(value).base64()); + } + } + + @Override + public byte[] read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String bytesAsBase64 = in.nextString(); + ByteString byteString = ByteString.decodeBase64(bytesAsBase64); + return byteString.toByteArray(); + } + } + } + + /** + * Gson TypeAdapter for JSR310 OffsetDateTime type + */ + public static class OffsetDateTimeTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public OffsetDateTimeTypeAdapter() { + this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } + + public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, OffsetDateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public OffsetDateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + if (date.endsWith("+0000")) { + date = date.substring(0, date.length()-5) + "Z"; + } + return OffsetDateTime.parse(date, formatter); + } + } + } + + /** + * Gson TypeAdapter for JSR310 LocalDate type + */ + public static class LocalDateTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public LocalDateTypeAdapter() { + this(DateTimeFormatter.ISO_LOCAL_DATE); + } + + public LocalDateTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, LocalDate date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public LocalDate read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return LocalDate.parse(date, formatter); + } + } + } + + public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + offsetDateTimeTypeAdapter.setFormat(dateFormat); + } + + public static void setLocalDateFormat(DateTimeFormatter dateFormat) { + localDateTypeAdapter.setFormat(dateFormat); + } + + /** + * Gson TypeAdapter for java.sql.Date type + * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used + * (more efficient than SimpleDateFormat). + */ + public static class SqlDateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public SqlDateTypeAdapter() {} + + public SqlDateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, java.sql.Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = date.toString(); + } + out.value(value); + } + } + + @Override + public java.sql.Date read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return new java.sql.Date(dateFormat.parse(date).getTime()); + } + return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } + } + + /** + * Gson TypeAdapter for java.util.Date type + * If the dateFormat is null, ISO8601Utils will be used. + */ + public static class DateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public DateTypeAdapter() {} + + public DateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = ISO8601Utils.format(date, true); + } + out.value(value); + } + } + + @Override + public Date read(JsonReader in) throws IOException { + try { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return dateFormat.parse(date); + } + return ISO8601Utils.parse(date, new ParsePosition(0)); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } catch (IllegalArgumentException e) { + throw new JsonParseException(e); + } + } + } + + public static void setDateFormat(DateFormat dateFormat) { + dateTypeAdapter.setFormat(dateFormat); + } + + public static void setSqlDateFormat(DateFormat dateFormat) { + sqlDateTypeAdapter.setFormat(dateFormat); + } +} diff --git a/src/main/java/com/idmesh/Pair.java b/src/main/java/com/idmesh/Pair.java new file mode 100644 index 0000000..e9d6d43 --- /dev/null +++ b/src/main/java/com/idmesh/Pair.java @@ -0,0 +1,57 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Pair { + private String name = ""; + private String value = ""; + + public Pair (String name, String value) { + setName(name); + setValue(value); + } + + private void setName(String name) { + if (!isValidString(name)) { + return; + } + + this.name = name; + } + + private void setValue(String value) { + if (!isValidString(value)) { + return; + } + + this.value = value; + } + + public String getName() { + return this.name; + } + + public String getValue() { + return this.value; + } + + private boolean isValidString(String arg) { + if (arg == null) { + return false; + } + + return true; + } +} diff --git a/src/main/java/com/idmesh/ProgressRequestBody.java b/src/main/java/com/idmesh/ProgressRequestBody.java new file mode 100644 index 0000000..4a2d9f7 --- /dev/null +++ b/src/main/java/com/idmesh/ProgressRequestBody.java @@ -0,0 +1,73 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh; + +import okhttp3.MediaType; +import okhttp3.RequestBody; + +import java.io.IOException; + +import okio.Buffer; +import okio.BufferedSink; +import okio.ForwardingSink; +import okio.Okio; +import okio.Sink; + +public class ProgressRequestBody extends RequestBody { + + private final RequestBody requestBody; + + private final ApiCallback callback; + + public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) { + this.requestBody = requestBody; + this.callback = callback; + } + + @Override + public MediaType contentType() { + return requestBody.contentType(); + } + + @Override + public long contentLength() throws IOException { + return requestBody.contentLength(); + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + BufferedSink bufferedSink = Okio.buffer(sink(sink)); + requestBody.writeTo(bufferedSink); + bufferedSink.flush(); + } + + private Sink sink(Sink sink) { + return new ForwardingSink(sink) { + + long bytesWritten = 0L; + long contentLength = 0L; + + @Override + public void write(Buffer source, long byteCount) throws IOException { + super.write(source, byteCount); + if (contentLength == 0) { + contentLength = contentLength(); + } + + bytesWritten += byteCount; + callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength); + } + }; + } +} diff --git a/src/main/java/com/idmesh/ProgressResponseBody.java b/src/main/java/com/idmesh/ProgressResponseBody.java new file mode 100644 index 0000000..8a55f2f --- /dev/null +++ b/src/main/java/com/idmesh/ProgressResponseBody.java @@ -0,0 +1,70 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh; + +import okhttp3.MediaType; +import okhttp3.ResponseBody; + +import java.io.IOException; + +import okio.Buffer; +import okio.BufferedSource; +import okio.ForwardingSource; +import okio.Okio; +import okio.Source; + +public class ProgressResponseBody extends ResponseBody { + + private final ResponseBody responseBody; + private final ApiCallback callback; + private BufferedSource bufferedSource; + + public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) { + this.responseBody = responseBody; + this.callback = callback; + } + + @Override + public MediaType contentType() { + return responseBody.contentType(); + } + + @Override + public long contentLength() { + return responseBody.contentLength(); + } + + @Override + public BufferedSource source() { + if (bufferedSource == null) { + bufferedSource = Okio.buffer(source(responseBody.source())); + } + return bufferedSource; + } + + private Source source(Source source) { + return new ForwardingSource(source) { + long totalBytesRead = 0L; + + @Override + public long read(Buffer sink, long byteCount) throws IOException { + long bytesRead = super.read(sink, byteCount); + // read() returns the number of bytes read, or -1 if this source is exhausted. + totalBytesRead += bytesRead != -1 ? bytesRead : 0; + callback.onDownloadProgress(totalBytesRead, responseBody.contentLength(), bytesRead == -1); + return bytesRead; + } + }; + } +} diff --git a/src/main/java/com/idmesh/ServerConfiguration.java b/src/main/java/com/idmesh/ServerConfiguration.java new file mode 100644 index 0000000..48678b7 --- /dev/null +++ b/src/main/java/com/idmesh/ServerConfiguration.java @@ -0,0 +1,58 @@ +package com.idmesh; + +import java.util.Map; + +/** + * Representing a Server configuration. + */ +public class ServerConfiguration { + public String URL; + public String description; + public Map variables; + + /** + * @param URL A URL to the target host. + * @param description A description of the host designated by the URL. + * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. + */ + public ServerConfiguration(String URL, String description, Map variables) { + this.URL = URL; + this.description = description; + this.variables = variables; + } + + /** + * Format URL template using given variables. + * + * @param variables A map between a variable name and its value. + * @return Formatted URL. + */ + public String URL(Map variables) { + String url = this.URL; + + // go through variables and replace placeholders + for (Map.Entry variable: this.variables.entrySet()) { + String name = variable.getKey(); + ServerVariable serverVariable = variable.getValue(); + String value = serverVariable.defaultValue; + + if (variables != null && variables.containsKey(name)) { + value = variables.get(name); + if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); + } + } + url = url.replace("{" + name + "}", value); + } + return url; + } + + /** + * Format URL template using default server variables. + * + * @return Formatted URL. + */ + public String URL() { + return URL(null); + } +} diff --git a/src/main/java/com/idmesh/ServerVariable.java b/src/main/java/com/idmesh/ServerVariable.java new file mode 100644 index 0000000..517af2e --- /dev/null +++ b/src/main/java/com/idmesh/ServerVariable.java @@ -0,0 +1,23 @@ +package com.idmesh; + +import java.util.HashSet; + +/** + * Representing a Server Variable for server URL template substitution. + */ +public class ServerVariable { + public String description; + public String defaultValue; + public HashSet enumValues = null; + + /** + * @param description A description for the server variable. + * @param defaultValue The default value to use for substitution. + * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. + */ + public ServerVariable(String description, String defaultValue, HashSet enumValues) { + this.description = description; + this.defaultValue = defaultValue; + this.enumValues = enumValues; + } +} diff --git a/src/main/java/com/idmesh/StringUtil.java b/src/main/java/com/idmesh/StringUtil.java new file mode 100644 index 0000000..771def0 --- /dev/null +++ b/src/main/java/com/idmesh/StringUtil.java @@ -0,0 +1,83 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh; + +import java.util.Collection; +import java.util.Iterator; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class StringUtil { + /** + * Check if the given array contains the given value (with case-insensitive comparison). + * + * @param array The array + * @param value The value to search + * @return true if the array contains the value + */ + public static boolean containsIgnoreCase(String[] array, String value) { + for (String str : array) { + if (value == null && str == null) { + return true; + } + if (value != null && value.equalsIgnoreCase(str)) { + return true; + } + } + return false; + } + + /** + * Join an array of strings with the given separator. + *

+ * Note: This might be replaced by utility method from commons-lang or guava someday + * if one of those libraries is added as dependency. + *

+ * + * @param array The array of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(String[] array, String separator) { + int len = array.length; + if (len == 0) { + return ""; + } + + StringBuilder out = new StringBuilder(); + out.append(array[0]); + for (int i = 1; i < len; i++) { + out.append(separator).append(array[i]); + } + return out.toString(); + } + + /** + * Join a list of strings with the given separator. + * + * @param list The list of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(Collection list, String separator) { + Iterator iterator = list.iterator(); + StringBuilder out = new StringBuilder(); + if (iterator.hasNext()) { + out.append(iterator.next()); + } + while (iterator.hasNext()) { + out.append(separator).append(iterator.next()); + } + return out.toString(); + } +} diff --git a/src/main/java/com/idmesh/api/AppApi.java b/src/main/java/com/idmesh/api/AppApi.java new file mode 100644 index 0000000..94c4212 --- /dev/null +++ b/src/main/java/com/idmesh/api/AppApi.java @@ -0,0 +1,5726 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.api; + +import com.idmesh.ApiCallback; +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.ApiResponse; +import com.idmesh.Configuration; +import com.idmesh.Pair; +import com.idmesh.ProgressRequestBody; +import com.idmesh.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.idmesh.model.AppDetail; +import com.idmesh.model.AppSubAccount; +import com.idmesh.model.Create200Response; +import com.idmesh.model.CreateAccountRequest; +import com.idmesh.model.CreateRequest1; +import com.idmesh.model.CreateSecrets200Response; +import com.idmesh.model.Delete200Response1; +import com.idmesh.model.Disable200Response; +import com.idmesh.model.EmptyObject; +import com.idmesh.model.EmptyObject1; +import com.idmesh.model.Enable200Response; +import com.idmesh.model.Get400Response; +import com.idmesh.model.GetAccountsByApp200Response; +import com.idmesh.model.GetConfig200Response; +import com.idmesh.model.GetTemplate200Response; +import com.idmesh.model.List200Response1; +import com.idmesh.model.Modify200Response1; +import com.idmesh.model.ModifyAccountRequest; +import com.idmesh.model.ModifyConfigRequest; +import com.idmesh.model.ModifyRequest1; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class AppApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public AppApi() { + this(Configuration.getDefaultApiClient()); + } + + public AppApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + private okhttp3.Call callListCall(String name, String type, String pageSort, String types, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/applications"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (name != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("name", name)); + } + + if (type != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); + } + + if (pageSort != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_sort", pageSort)); + } + + if (types != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("types", types)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call callListValidateBeforeCall(String name, String type, String pageSort, String types, final ApiCallback _callback) throws ApiException { + return callListCall(name, type, pageSort, types, _callback); + + } + + + private ApiResponse callListWithHttpInfo(String name, String type, String pageSort, String types) throws ApiException { + okhttp3.Call localVarCall = callListValidateBeforeCall(name, type, pageSort, types, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call callListAsync(String name, String type, String pageSort, String types, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = callListValidateBeforeCall(name, type, pageSort, types, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIcallListRequest { + private String name; + private String type; + private String pageSort; + private String types; + + private APIcallListRequest() { + } + + /** + * Set name + * @param name 应用名称 (optional) + * @return APIcallListRequest + */ + public APIcallListRequest name(String name) { + this.name = name; + return this; + } + + /** + * Set type + * @param type 应用类型 (optional) + * @return APIcallListRequest + */ + public APIcallListRequest type(String type) { + this.type = type; + return this; + } + + /** + * Set pageSort + * @param pageSort 排序,格式:字段名[顺序] (optional) + * @return APIcallListRequest + */ + public APIcallListRequest pageSort(String pageSort) { + this.pageSort = pageSort; + return this; + } + + /** + * Set types + * @param types 应用类型列表,逗号分隔 (optional) + * @return APIcallListRequest + */ + public APIcallListRequest types(String types) { + this.types = types; + return this; + } + + /** + * Build call for callList + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return callListCall(name, type, pageSort, types, _callback); + } + + /** + * Execute callList request + * @return List200Response1 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public List200Response1 execute() throws ApiException { + ApiResponse localVarResp = callListWithHttpInfo(name, type, pageSort, types); + return localVarResp.getData(); + } + + /** + * Execute callList request with HTTP info returned + * @return ApiResponse<List200Response1> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return callListWithHttpInfo(name, type, pageSort, types); + } + + /** + * Execute callList request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return callListAsync(name, type, pageSort, types, _callback); + } + } + + /** + * 查询应用列表 + * + * @return APIcallListRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIcallListRequest callList() { + return new APIcallListRequest(); + } + private okhttp3.Call createCall(String contentType, CreateRequest1 createRequest1, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = createRequest1; + + // create path and map variables + String localVarPath = "/v1/applications"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createValidateBeforeCall(String contentType, CreateRequest1 createRequest1, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling create(Async)"); + } + + return createCall(contentType, createRequest1, _callback); + + } + + + private ApiResponse createWithHttpInfo(String contentType, CreateRequest1 createRequest1) throws ApiException { + okhttp3.Call localVarCall = createValidateBeforeCall(contentType, createRequest1, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call createAsync(String contentType, CreateRequest1 createRequest1, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createValidateBeforeCall(contentType, createRequest1, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIcreateRequest { + private final String contentType; + private CreateRequest1 createRequest1; + + private APIcreateRequest(String contentType) { + this.contentType = contentType; + } + + /** + * Set createRequest1 + * @param createRequest1 (optional) + * @return APIcreateRequest + */ + public APIcreateRequest createRequest1(CreateRequest1 createRequest1) { + this.createRequest1 = createRequest1; + return this; + } + + /** + * Build call for create + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return createCall(contentType, createRequest1, _callback); + } + + /** + * Execute create request + * @return Create200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Create200Response execute() throws ApiException { + ApiResponse localVarResp = createWithHttpInfo(contentType, createRequest1); + return localVarResp.getData(); + } + + /** + * Execute create request with HTTP info returned + * @return ApiResponse<Create200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return createWithHttpInfo(contentType, createRequest1); + } + + /** + * Execute create request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return createAsync(contentType, createRequest1, _callback); + } + } + + /** + * 创建应用 + * + * @param contentType (required) + * @return APIcreateRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIcreateRequest create(String contentType) { + return new APIcreateRequest(contentType); + } + private okhttp3.Call createAccountCall(String id, String contentType, CreateAccountRequest createAccountRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = createAccountRequest; + + // create path and map variables + String localVarPath = "/v1/applications/{id}/accounts" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createAccountValidateBeforeCall(String id, String contentType, CreateAccountRequest createAccountRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling createAccount(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling createAccount(Async)"); + } + + return createAccountCall(id, contentType, createAccountRequest, _callback); + + } + + + private ApiResponse createAccountWithHttpInfo(String id, String contentType, CreateAccountRequest createAccountRequest) throws ApiException { + okhttp3.Call localVarCall = createAccountValidateBeforeCall(id, contentType, createAccountRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call createAccountAsync(String id, String contentType, CreateAccountRequest createAccountRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createAccountValidateBeforeCall(id, contentType, createAccountRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIcreateAccountRequest { + private final String id; + private final String contentType; + private CreateAccountRequest createAccountRequest; + + private APIcreateAccountRequest(String id, String contentType) { + this.id = id; + this.contentType = contentType; + } + + /** + * Set createAccountRequest + * @param createAccountRequest (optional) + * @return APIcreateAccountRequest + */ + public APIcreateAccountRequest createAccountRequest(CreateAccountRequest createAccountRequest) { + this.createAccountRequest = createAccountRequest; + return this; + } + + /** + * Build call for createAccount + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return createAccountCall(id, contentType, createAccountRequest, _callback); + } + + /** + * Execute createAccount request + * @return Modify200Response1 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Modify200Response1 execute() throws ApiException { + ApiResponse localVarResp = createAccountWithHttpInfo(id, contentType, createAccountRequest); + return localVarResp.getData(); + } + + /** + * Execute createAccount request with HTTP info returned + * @return ApiResponse<Modify200Response1> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return createAccountWithHttpInfo(id, contentType, createAccountRequest); + } + + /** + * Execute createAccount request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return createAccountAsync(id, contentType, createAccountRequest, _callback); + } + } + + /** + * 创建应用子账号 + * + * @param id 应用id (required) + * @param contentType (required) + * @return APIcreateAccountRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIcreateAccountRequest createAccount(String id, String contentType) { + return new APIcreateAccountRequest(id, contentType); + } + private okhttp3.Call createIDPCall(String id, String contentType, EmptyObject emptyObject, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = emptyObject; + + // create path and map variables + String localVarPath = "/v1/applications/{id}/idp" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createIDPValidateBeforeCall(String id, String contentType, EmptyObject emptyObject, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling createIDP(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling createIDP(Async)"); + } + + return createIDPCall(id, contentType, emptyObject, _callback); + + } + + + private ApiResponse createIDPWithHttpInfo(String id, String contentType, EmptyObject emptyObject) throws ApiException { + okhttp3.Call localVarCall = createIDPValidateBeforeCall(id, contentType, emptyObject, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call createIDPAsync(String id, String contentType, EmptyObject emptyObject, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createIDPValidateBeforeCall(id, contentType, emptyObject, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIcreateIDPRequest { + private final String id; + private final String contentType; + private EmptyObject emptyObject; + + private APIcreateIDPRequest(String id, String contentType) { + this.id = id; + this.contentType = contentType; + } + + /** + * Set emptyObject + * @param emptyObject (optional) + * @return APIcreateIDPRequest + */ + public APIcreateIDPRequest emptyObject(EmptyObject emptyObject) { + this.emptyObject = emptyObject; + return this; + } + + /** + * Build call for createIDP + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return createIDPCall(id, contentType, emptyObject, _callback); + } + + /** + * Execute createIDP request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = createIDPWithHttpInfo(id, contentType, emptyObject); + return localVarResp.getData(); + } + + /** + * Execute createIDP request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return createIDPWithHttpInfo(id, contentType, emptyObject); + } + + /** + * Execute createIDP request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return createIDPAsync(id, contentType, emptyObject, _callback); + } + } + + /** + * 创建应用认证源 + * + * @param id 应用id (required) + * @param contentType (required) + * @return APIcreateIDPRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIcreateIDPRequest createIDP(String id, String contentType) { + return new APIcreateIDPRequest(id, contentType); + } + private okhttp3.Call createMFACall(String id, String contentType, EmptyObject emptyObject, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = emptyObject; + + // create path and map variables + String localVarPath = "/v1/applications/{id}/mfa" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createMFAValidateBeforeCall(String id, String contentType, EmptyObject emptyObject, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling createMFA(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling createMFA(Async)"); + } + + return createMFACall(id, contentType, emptyObject, _callback); + + } + + + private ApiResponse createMFAWithHttpInfo(String id, String contentType, EmptyObject emptyObject) throws ApiException { + okhttp3.Call localVarCall = createMFAValidateBeforeCall(id, contentType, emptyObject, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call createMFAAsync(String id, String contentType, EmptyObject emptyObject, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createMFAValidateBeforeCall(id, contentType, emptyObject, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIcreateMFARequest { + private final String id; + private final String contentType; + private EmptyObject emptyObject; + + private APIcreateMFARequest(String id, String contentType) { + this.id = id; + this.contentType = contentType; + } + + /** + * Set emptyObject + * @param emptyObject (optional) + * @return APIcreateMFARequest + */ + public APIcreateMFARequest emptyObject(EmptyObject emptyObject) { + this.emptyObject = emptyObject; + return this; + } + + /** + * Build call for createMFA + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return createMFACall(id, contentType, emptyObject, _callback); + } + + /** + * Execute createMFA request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = createMFAWithHttpInfo(id, contentType, emptyObject); + return localVarResp.getData(); + } + + /** + * Execute createMFA request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return createMFAWithHttpInfo(id, contentType, emptyObject); + } + + /** + * Execute createMFA request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return createMFAAsync(id, contentType, emptyObject, _callback); + } + } + + /** + * 启用应用多因素认证配置 + * + * @param id 应用id (required) + * @param contentType (required) + * @return APIcreateMFARequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIcreateMFARequest createMFA(String id, String contentType) { + return new APIcreateMFARequest(id, contentType); + } + private okhttp3.Call createSecretsCall(String id, String contentType, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/applications/{id}/secrets" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createSecretsValidateBeforeCall(String id, String contentType, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling createSecrets(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling createSecrets(Async)"); + } + + return createSecretsCall(id, contentType, _callback); + + } + + + private ApiResponse createSecretsWithHttpInfo(String id, String contentType) throws ApiException { + okhttp3.Call localVarCall = createSecretsValidateBeforeCall(id, contentType, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call createSecretsAsync(String id, String contentType, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createSecretsValidateBeforeCall(id, contentType, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIcreateSecretsRequest { + private final String id; + private final String contentType; + + private APIcreateSecretsRequest(String id, String contentType) { + this.id = id; + this.contentType = contentType; + } + + /** + * Build call for createSecrets + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return createSecretsCall(id, contentType, _callback); + } + + /** + * Execute createSecrets request + * @return CreateSecrets200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public CreateSecrets200Response execute() throws ApiException { + ApiResponse localVarResp = createSecretsWithHttpInfo(id, contentType); + return localVarResp.getData(); + } + + /** + * Execute createSecrets request with HTTP info returned + * @return ApiResponse<CreateSecrets200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return createSecretsWithHttpInfo(id, contentType); + } + + /** + * Execute createSecrets request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return createSecretsAsync(id, contentType, _callback); + } + } + + /** + * 刷新应用安全码 + * + * @param id (required) + * @param contentType (required) + * @return APIcreateSecretsRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIcreateSecretsRequest createSecrets(String id, String contentType) { + return new APIcreateSecretsRequest(id, contentType); + } + private okhttp3.Call deleteCall(String id, String contentType, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/applications/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteValidateBeforeCall(String id, String contentType, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling delete(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling delete(Async)"); + } + + return deleteCall(id, contentType, _callback); + + } + + + private ApiResponse deleteWithHttpInfo(String id, String contentType) throws ApiException { + okhttp3.Call localVarCall = deleteValidateBeforeCall(id, contentType, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call deleteAsync(String id, String contentType, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteValidateBeforeCall(id, contentType, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIdeleteRequest { + private final String id; + private final String contentType; + + private APIdeleteRequest(String id, String contentType) { + this.id = id; + this.contentType = contentType; + } + + /** + * Build call for delete + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return deleteCall(id, contentType, _callback); + } + + /** + * Execute delete request + * @return Delete200Response1 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Delete200Response1 execute() throws ApiException { + ApiResponse localVarResp = deleteWithHttpInfo(id, contentType); + return localVarResp.getData(); + } + + /** + * Execute delete request with HTTP info returned + * @return ApiResponse<Delete200Response1> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteWithHttpInfo(id, contentType); + } + + /** + * Execute delete request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteAsync(id, contentType, _callback); + } + } + + /** + * 删除应用 + * + * @param id (required) + * @param contentType (required) + * @return APIdeleteRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIdeleteRequest delete(String id, String contentType) { + return new APIdeleteRequest(id, contentType); + } + private okhttp3.Call deleteAccountCall(String appId, String id, String contentType, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/applications/{app_id}/accounts/{id}" + .replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteAccountValidateBeforeCall(String appId, String id, String contentType, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling deleteAccount(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling deleteAccount(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling deleteAccount(Async)"); + } + + return deleteAccountCall(appId, id, contentType, _callback); + + } + + + private ApiResponse deleteAccountWithHttpInfo(String appId, String id, String contentType) throws ApiException { + okhttp3.Call localVarCall = deleteAccountValidateBeforeCall(appId, id, contentType, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call deleteAccountAsync(String appId, String id, String contentType, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteAccountValidateBeforeCall(appId, id, contentType, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIdeleteAccountRequest { + private final String appId; + private final String id; + private final String contentType; + + private APIdeleteAccountRequest(String appId, String id, String contentType) { + this.appId = appId; + this.id = id; + this.contentType = contentType; + } + + /** + * Build call for deleteAccount + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return deleteAccountCall(appId, id, contentType, _callback); + } + + /** + * Execute deleteAccount request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = deleteAccountWithHttpInfo(appId, id, contentType); + return localVarResp.getData(); + } + + /** + * Execute deleteAccount request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteAccountWithHttpInfo(appId, id, contentType); + } + + /** + * Execute deleteAccount request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteAccountAsync(appId, id, contentType, _callback); + } + } + + /** + * 删除应用子账号 + * + * @param appId 应用id (required) + * @param id 子账号id (required) + * @param contentType (required) + * @return APIdeleteAccountRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIdeleteAccountRequest deleteAccount(String appId, String id, String contentType) { + return new APIdeleteAccountRequest(appId, id, contentType); + } + private okhttp3.Call deleteIDPConfigCall(String appId, String configId, String contentType, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/applications/{app_id}/idp/{config_id}" + .replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "config_id" + "}", localVarApiClient.escapeString(configId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteIDPConfigValidateBeforeCall(String appId, String configId, String contentType, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling deleteIDPConfig(Async)"); + } + + // verify the required parameter 'configId' is set + if (configId == null) { + throw new ApiException("Missing the required parameter 'configId' when calling deleteIDPConfig(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling deleteIDPConfig(Async)"); + } + + return deleteIDPConfigCall(appId, configId, contentType, _callback); + + } + + + private ApiResponse deleteIDPConfigWithHttpInfo(String appId, String configId, String contentType) throws ApiException { + okhttp3.Call localVarCall = deleteIDPConfigValidateBeforeCall(appId, configId, contentType, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call deleteIDPConfigAsync(String appId, String configId, String contentType, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteIDPConfigValidateBeforeCall(appId, configId, contentType, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIdeleteIDPConfigRequest { + private final String appId; + private final String configId; + private final String contentType; + + private APIdeleteIDPConfigRequest(String appId, String configId, String contentType) { + this.appId = appId; + this.configId = configId; + this.contentType = contentType; + } + + /** + * Build call for deleteIDPConfig + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return deleteIDPConfigCall(appId, configId, contentType, _callback); + } + + /** + * Execute deleteIDPConfig request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = deleteIDPConfigWithHttpInfo(appId, configId, contentType); + return localVarResp.getData(); + } + + /** + * Execute deleteIDPConfig request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteIDPConfigWithHttpInfo(appId, configId, contentType); + } + + /** + * Execute deleteIDPConfig request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteIDPConfigAsync(appId, configId, contentType, _callback); + } + } + + /** + * 删除应用认证源 + * + * @param appId 应用id (required) + * @param configId (required) + * @param contentType (required) + * @return APIdeleteIDPConfigRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIdeleteIDPConfigRequest deleteIDPConfig(String appId, String configId, String contentType) { + return new APIdeleteIDPConfigRequest(appId, configId, contentType); + } + private okhttp3.Call deleteMFACall(String appId, String configId, String contentType, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/applications/{app_id}/mfa/{config_id}" + .replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "config_id" + "}", localVarApiClient.escapeString(configId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteMFAValidateBeforeCall(String appId, String configId, String contentType, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling deleteMFA(Async)"); + } + + // verify the required parameter 'configId' is set + if (configId == null) { + throw new ApiException("Missing the required parameter 'configId' when calling deleteMFA(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling deleteMFA(Async)"); + } + + return deleteMFACall(appId, configId, contentType, _callback); + + } + + + private ApiResponse deleteMFAWithHttpInfo(String appId, String configId, String contentType) throws ApiException { + okhttp3.Call localVarCall = deleteMFAValidateBeforeCall(appId, configId, contentType, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call deleteMFAAsync(String appId, String configId, String contentType, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteMFAValidateBeforeCall(appId, configId, contentType, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIdeleteMFARequest { + private final String appId; + private final String configId; + private final String contentType; + + private APIdeleteMFARequest(String appId, String configId, String contentType) { + this.appId = appId; + this.configId = configId; + this.contentType = contentType; + } + + /** + * Build call for deleteMFA + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return deleteMFACall(appId, configId, contentType, _callback); + } + + /** + * Execute deleteMFA request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = deleteMFAWithHttpInfo(appId, configId, contentType); + return localVarResp.getData(); + } + + /** + * Execute deleteMFA request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteMFAWithHttpInfo(appId, configId, contentType); + } + + /** + * Execute deleteMFA request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteMFAAsync(appId, configId, contentType, _callback); + } + } + + /** + * 禁用应用多因素认证配置 + * + * @param appId 应用id (required) + * @param configId (required) + * @param contentType (required) + * @return APIdeleteMFARequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIdeleteMFARequest deleteMFA(String appId, String configId, String contentType) { + return new APIdeleteMFARequest(appId, configId, contentType); + } + private okhttp3.Call disableCall(String id, String contentType, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/applications/{id}/disable" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call disableValidateBeforeCall(String id, String contentType, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling disable(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling disable(Async)"); + } + + return disableCall(id, contentType, _callback); + + } + + + private ApiResponse disableWithHttpInfo(String id, String contentType) throws ApiException { + okhttp3.Call localVarCall = disableValidateBeforeCall(id, contentType, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call disableAsync(String id, String contentType, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = disableValidateBeforeCall(id, contentType, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIdisableRequest { + private final String id; + private final String contentType; + + private APIdisableRequest(String id, String contentType) { + this.id = id; + this.contentType = contentType; + } + + /** + * Build call for disable + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return disableCall(id, contentType, _callback); + } + + /** + * Execute disable request + * @return Disable200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Disable200Response execute() throws ApiException { + ApiResponse localVarResp = disableWithHttpInfo(id, contentType); + return localVarResp.getData(); + } + + /** + * Execute disable request with HTTP info returned + * @return ApiResponse<Disable200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return disableWithHttpInfo(id, contentType); + } + + /** + * Execute disable request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return disableAsync(id, contentType, _callback); + } + } + + /** + * 禁用应用 + * + * @param id 应用标识 (required) + * @param contentType (required) + * @return APIdisableRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIdisableRequest disable(String id, String contentType) { + return new APIdisableRequest(id, contentType); + } + private okhttp3.Call disableAccountCall(String appId, String id, String contentType, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/applications/{app_id}/accounts/{id}/disable" + .replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call disableAccountValidateBeforeCall(String appId, String id, String contentType, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling disableAccount(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling disableAccount(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling disableAccount(Async)"); + } + + return disableAccountCall(appId, id, contentType, _callback); + + } + + + private ApiResponse disableAccountWithHttpInfo(String appId, String id, String contentType) throws ApiException { + okhttp3.Call localVarCall = disableAccountValidateBeforeCall(appId, id, contentType, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call disableAccountAsync(String appId, String id, String contentType, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = disableAccountValidateBeforeCall(appId, id, contentType, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIdisableAccountRequest { + private final String appId; + private final String id; + private final String contentType; + + private APIdisableAccountRequest(String appId, String id, String contentType) { + this.appId = appId; + this.id = id; + this.contentType = contentType; + } + + /** + * Build call for disableAccount + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return disableAccountCall(appId, id, contentType, _callback); + } + + /** + * Execute disableAccount request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = disableAccountWithHttpInfo(appId, id, contentType); + return localVarResp.getData(); + } + + /** + * Execute disableAccount request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return disableAccountWithHttpInfo(appId, id, contentType); + } + + /** + * Execute disableAccount request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return disableAccountAsync(appId, id, contentType, _callback); + } + } + + /** + * 禁用应用子账号 + * + * @param appId 应用id (required) + * @param id 子账号id (required) + * @param contentType (required) + * @return APIdisableAccountRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIdisableAccountRequest disableAccount(String appId, String id, String contentType) { + return new APIdisableAccountRequest(appId, id, contentType); + } + private okhttp3.Call disableProtocolCall(String appId, String protocolType, String contentType, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/applications/{app_id}/protocols/{protocol_type}/disable" + .replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "protocol_type" + "}", localVarApiClient.escapeString(protocolType.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call disableProtocolValidateBeforeCall(String appId, String protocolType, String contentType, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling disableProtocol(Async)"); + } + + // verify the required parameter 'protocolType' is set + if (protocolType == null) { + throw new ApiException("Missing the required parameter 'protocolType' when calling disableProtocol(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling disableProtocol(Async)"); + } + + return disableProtocolCall(appId, protocolType, contentType, _callback); + + } + + + private ApiResponse disableProtocolWithHttpInfo(String appId, String protocolType, String contentType) throws ApiException { + okhttp3.Call localVarCall = disableProtocolValidateBeforeCall(appId, protocolType, contentType, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call disableProtocolAsync(String appId, String protocolType, String contentType, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = disableProtocolValidateBeforeCall(appId, protocolType, contentType, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIdisableProtocolRequest { + private final String appId; + private final String protocolType; + private final String contentType; + + private APIdisableProtocolRequest(String appId, String protocolType, String contentType) { + this.appId = appId; + this.protocolType = protocolType; + this.contentType = contentType; + } + + /** + * Build call for disableProtocol + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return disableProtocolCall(appId, protocolType, contentType, _callback); + } + + /** + * Execute disableProtocol request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = disableProtocolWithHttpInfo(appId, protocolType, contentType); + return localVarResp.getData(); + } + + /** + * Execute disableProtocol request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return disableProtocolWithHttpInfo(appId, protocolType, contentType); + } + + /** + * Execute disableProtocol request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return disableProtocolAsync(appId, protocolType, contentType, _callback); + } + } + + /** + * 禁用应用认证协议 + * + * @param appId 应用 id (required) + * @param protocolType 协议名称,如 oidc (required) + * @param contentType (required) + * @return APIdisableProtocolRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIdisableProtocolRequest disableProtocol(String appId, String protocolType, String contentType) { + return new APIdisableProtocolRequest(appId, protocolType, contentType); + } + private okhttp3.Call disableSSOCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/applications/{id}/sso/disable" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call disableSSOValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling disableSSO(Async)"); + } + + return disableSSOCall(id, _callback); + + } + + + private ApiResponse disableSSOWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = disableSSOValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call disableSSOAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = disableSSOValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIdisableSSORequest { + private final String id; + + private APIdisableSSORequest(String id) { + this.id = id; + } + + /** + * Build call for disableSSO + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return disableSSOCall(id, _callback); + } + + /** + * Execute disableSSO request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = disableSSOWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Execute disableSSO request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return disableSSOWithHttpInfo(id); + } + + /** + * Execute disableSSO request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return disableSSOAsync(id, _callback); + } + } + + /** + * 禁用应用单点登录 + * + * @param id 应用标识 (required) + * @return APIdisableSSORequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIdisableSSORequest disableSSO(String id) { + return new APIdisableSSORequest(id); + } + private okhttp3.Call enableCall(String id, String contentType, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/applications/{id}/enable" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call enableValidateBeforeCall(String id, String contentType, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling enable(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling enable(Async)"); + } + + return enableCall(id, contentType, _callback); + + } + + + private ApiResponse enableWithHttpInfo(String id, String contentType) throws ApiException { + okhttp3.Call localVarCall = enableValidateBeforeCall(id, contentType, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call enableAsync(String id, String contentType, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = enableValidateBeforeCall(id, contentType, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIenableRequest { + private final String id; + private final String contentType; + + private APIenableRequest(String id, String contentType) { + this.id = id; + this.contentType = contentType; + } + + /** + * Build call for enable + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return enableCall(id, contentType, _callback); + } + + /** + * Execute enable request + * @return Enable200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Enable200Response execute() throws ApiException { + ApiResponse localVarResp = enableWithHttpInfo(id, contentType); + return localVarResp.getData(); + } + + /** + * Execute enable request with HTTP info returned + * @return ApiResponse<Enable200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return enableWithHttpInfo(id, contentType); + } + + /** + * Execute enable request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return enableAsync(id, contentType, _callback); + } + } + + /** + * 启用应用 + * + * @param id 应用标识 (required) + * @param contentType (required) + * @return APIenableRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIenableRequest enable(String id, String contentType) { + return new APIenableRequest(id, contentType); + } + private okhttp3.Call enableAccountCall(String appId, String id, String id2, String contentType, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/applications/{app_id}/accounts/{id}/enable" + .replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (id2 != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id2)); + } + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call enableAccountValidateBeforeCall(String appId, String id, String id2, String contentType, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling enableAccount(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling enableAccount(Async)"); + } + + // verify the required parameter 'id2' is set + if (id2 == null) { + throw new ApiException("Missing the required parameter 'id2' when calling enableAccount(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling enableAccount(Async)"); + } + + return enableAccountCall(appId, id, id2, contentType, _callback); + + } + + + private ApiResponse enableAccountWithHttpInfo(String appId, String id, String id2, String contentType) throws ApiException { + okhttp3.Call localVarCall = enableAccountValidateBeforeCall(appId, id, id2, contentType, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call enableAccountAsync(String appId, String id, String id2, String contentType, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = enableAccountValidateBeforeCall(appId, id, id2, contentType, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIenableAccountRequest { + private final String appId; + private final String id; + private final String id2; + private final String contentType; + + private APIenableAccountRequest(String appId, String id, String id2, String contentType) { + this.appId = appId; + this.id = id; + this.id2 = id2; + this.contentType = contentType; + } + + /** + * Build call for enableAccount + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return enableAccountCall(appId, id, id2, contentType, _callback); + } + + /** + * Execute enableAccount request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = enableAccountWithHttpInfo(appId, id, id2, contentType); + return localVarResp.getData(); + } + + /** + * Execute enableAccount request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return enableAccountWithHttpInfo(appId, id, id2, contentType); + } + + /** + * Execute enableAccount request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return enableAccountAsync(appId, id, id2, contentType, _callback); + } + } + + /** + * 启用应用子账号 + * + * @param appId 应用id (required) + * @param id 子账号id (required) + * @param id2 (required) + * @param contentType (required) + * @return APIenableAccountRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIenableAccountRequest enableAccount(String appId, String id, String id2, String contentType) { + return new APIenableAccountRequest(appId, id, id2, contentType); + } + private okhttp3.Call enableProtocolCall(String appId, String protocolType, String contentType, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/applications/{app_id}/protocols/{protocol_type}/enable" + .replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "protocol_type" + "}", localVarApiClient.escapeString(protocolType.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call enableProtocolValidateBeforeCall(String appId, String protocolType, String contentType, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling enableProtocol(Async)"); + } + + // verify the required parameter 'protocolType' is set + if (protocolType == null) { + throw new ApiException("Missing the required parameter 'protocolType' when calling enableProtocol(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling enableProtocol(Async)"); + } + + return enableProtocolCall(appId, protocolType, contentType, _callback); + + } + + + private ApiResponse enableProtocolWithHttpInfo(String appId, String protocolType, String contentType) throws ApiException { + okhttp3.Call localVarCall = enableProtocolValidateBeforeCall(appId, protocolType, contentType, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call enableProtocolAsync(String appId, String protocolType, String contentType, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = enableProtocolValidateBeforeCall(appId, protocolType, contentType, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIenableProtocolRequest { + private final String appId; + private final String protocolType; + private final String contentType; + + private APIenableProtocolRequest(String appId, String protocolType, String contentType) { + this.appId = appId; + this.protocolType = protocolType; + this.contentType = contentType; + } + + /** + * Build call for enableProtocol + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return enableProtocolCall(appId, protocolType, contentType, _callback); + } + + /** + * Execute enableProtocol request + * @return Modify200Response1 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Modify200Response1 execute() throws ApiException { + ApiResponse localVarResp = enableProtocolWithHttpInfo(appId, protocolType, contentType); + return localVarResp.getData(); + } + + /** + * Execute enableProtocol request with HTTP info returned + * @return ApiResponse<Modify200Response1> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return enableProtocolWithHttpInfo(appId, protocolType, contentType); + } + + /** + * Execute enableProtocol request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return enableProtocolAsync(appId, protocolType, contentType, _callback); + } + } + + /** + * 启用应用认证协议 + * + * @param appId 应用 id (required) + * @param protocolType 协议名称,如 oidc (required) + * @param contentType (required) + * @return APIenableProtocolRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIenableProtocolRequest enableProtocol(String appId, String protocolType, String contentType) { + return new APIenableProtocolRequest(appId, protocolType, contentType); + } + private okhttp3.Call enableSSOCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/applications/{id}/sso/enable" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call enableSSOValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling enableSSO(Async)"); + } + + return enableSSOCall(id, _callback); + + } + + + private ApiResponse enableSSOWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = enableSSOValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call enableSSOAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = enableSSOValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIenableSSORequest { + private final String id; + + private APIenableSSORequest(String id) { + this.id = id; + } + + /** + * Build call for enableSSO + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return enableSSOCall(id, _callback); + } + + /** + * Execute enableSSO request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = enableSSOWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Execute enableSSO request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return enableSSOWithHttpInfo(id); + } + + /** + * Execute enableSSO request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return enableSSOAsync(id, _callback); + } + } + + /** + * 启用应用单点登录 + * + * @param id 应用标识 (required) + * @return APIenableSSORequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIenableSSORequest enableSSO(String id) { + return new APIenableSSORequest(id); + } + private okhttp3.Call getCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/applications/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling get(Async)"); + } + + return getCall(id, _callback); + + } + + + private ApiResponse getWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetRequest { + private final String id; + + private APIgetRequest(String id) { + this.id = id; + } + + /** + * Build call for get + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getCall(id, _callback); + } + + /** + * Execute get request + * @return AppDetail + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public AppDetail execute() throws ApiException { + ApiResponse localVarResp = getWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Execute get request with HTTP info returned + * @return ApiResponse<AppDetail> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getWithHttpInfo(id); + } + + /** + * Execute get request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getAsync(id, _callback); + } + } + + /** + * 按 ID 查询应用 + * + * @param id 唯一标识 (required) + * @return APIgetRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetRequest get(String id) { + return new APIgetRequest(id); + } + private okhttp3.Call getAccountCall(String appId, String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/applications/{app_id}/accounts/{id}" + .replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAccountValidateBeforeCall(String appId, String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling getAccount(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getAccount(Async)"); + } + + return getAccountCall(appId, id, _callback); + + } + + + private ApiResponse getAccountWithHttpInfo(String appId, String id) throws ApiException { + okhttp3.Call localVarCall = getAccountValidateBeforeCall(appId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getAccountAsync(String appId, String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAccountValidateBeforeCall(appId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetAccountRequest { + private final String appId; + private final String id; + + private APIgetAccountRequest(String appId, String id) { + this.appId = appId; + this.id = id; + } + + /** + * Build call for getAccount + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getAccountCall(appId, id, _callback); + } + + /** + * Execute getAccount request + * @return AppSubAccount + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public AppSubAccount execute() throws ApiException { + ApiResponse localVarResp = getAccountWithHttpInfo(appId, id); + return localVarResp.getData(); + } + + /** + * Execute getAccount request with HTTP info returned + * @return ApiResponse<AppSubAccount> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getAccountWithHttpInfo(appId, id); + } + + /** + * Execute getAccount request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getAccountAsync(appId, id, _callback); + } + } + + /** + * 按 ID 查询应用子账号 + * + * @param appId 应用id (required) + * @param id 子账号id (required) + * @return APIgetAccountRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetAccountRequest getAccount(String appId, String id) { + return new APIgetAccountRequest(appId, id); + } + private okhttp3.Call getAccountsCall(String appId, String userId, String accStatus, String accName, Integer pageNum, Integer pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/application-accounts"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (appId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("app_id", appId)); + } + + if (userId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("user_id", userId)); + } + + if (accStatus != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("acc_status", accStatus)); + } + + if (accName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("acc_name", accName)); + } + + if (pageNum != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_num", pageNum)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); + } + + if (pageSort != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_sort", pageSort)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAccountsValidateBeforeCall(String appId, String userId, String accStatus, String accName, Integer pageNum, Integer pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + return getAccountsCall(appId, userId, accStatus, accName, pageNum, pageSize, pageSort, _callback); + + } + + + private ApiResponse getAccountsWithHttpInfo(String appId, String userId, String accStatus, String accName, Integer pageNum, Integer pageSize, String pageSort) throws ApiException { + okhttp3.Call localVarCall = getAccountsValidateBeforeCall(appId, userId, accStatus, accName, pageNum, pageSize, pageSort, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getAccountsAsync(String appId, String userId, String accStatus, String accName, Integer pageNum, Integer pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAccountsValidateBeforeCall(appId, userId, accStatus, accName, pageNum, pageSize, pageSort, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetAccountsRequest { + private String appId; + private String userId; + private String accStatus; + private String accName; + private Integer pageNum; + private Integer pageSize; + private String pageSort; + + private APIgetAccountsRequest() { + } + + /** + * Set appId + * @param appId 应用id (optional) + * @return APIgetAccountsRequest + */ + public APIgetAccountsRequest appId(String appId) { + this.appId = appId; + return this; + } + + /** + * Set userId + * @param userId 用户id (optional) + * @return APIgetAccountsRequest + */ + public APIgetAccountsRequest userId(String userId) { + this.userId = userId; + return this; + } + + /** + * Set accStatus + * @param accStatus 账号状态 1-活跃 0-冻结 (optional) + * @return APIgetAccountsRequest + */ + public APIgetAccountsRequest accStatus(String accStatus) { + this.accStatus = accStatus; + return this; + } + + /** + * Set accName + * @param accName 账号名称 (optional) + * @return APIgetAccountsRequest + */ + public APIgetAccountsRequest accName(String accName) { + this.accName = accName; + return this; + } + + /** + * Set pageNum + * @param pageNum 页数 (optional) + * @return APIgetAccountsRequest + */ + public APIgetAccountsRequest pageNum(Integer pageNum) { + this.pageNum = pageNum; + return this; + } + + /** + * Set pageSize + * @param pageSize 页大小 (optional) + * @return APIgetAccountsRequest + */ + public APIgetAccountsRequest pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageSort + * @param pageSort 排序字段 (optional) + * @return APIgetAccountsRequest + */ + public APIgetAccountsRequest pageSort(String pageSort) { + this.pageSort = pageSort; + return this; + } + + /** + * Build call for getAccounts + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getAccountsCall(appId, userId, accStatus, accName, pageNum, pageSize, pageSort, _callback); + } + + /** + * Execute getAccounts request + * @return GetAccountsByApp200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public GetAccountsByApp200Response execute() throws ApiException { + ApiResponse localVarResp = getAccountsWithHttpInfo(appId, userId, accStatus, accName, pageNum, pageSize, pageSort); + return localVarResp.getData(); + } + + /** + * Execute getAccounts request with HTTP info returned + * @return ApiResponse<GetAccountsByApp200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getAccountsWithHttpInfo(appId, userId, accStatus, accName, pageNum, pageSize, pageSort); + } + + /** + * Execute getAccounts request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getAccountsAsync(appId, userId, accStatus, accName, pageNum, pageSize, pageSort, _callback); + } + } + + /** + * 查询应用子账号列表 + * + * @return APIgetAccountsRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetAccountsRequest getAccounts() { + return new APIgetAccountsRequest(); + } + private okhttp3.Call getAccountsByAppCall(String appId, String userId, String accStatus, String accName, Integer pageNum, Integer pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/applications/{app_id}/accounts" + .replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (userId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("user_id", userId)); + } + + if (accStatus != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("acc_status", accStatus)); + } + + if (accName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("acc_name", accName)); + } + + if (pageNum != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_num", pageNum)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); + } + + if (pageSort != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_sort", pageSort)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAccountsByAppValidateBeforeCall(String appId, String userId, String accStatus, String accName, Integer pageNum, Integer pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling getAccountsByApp(Async)"); + } + + return getAccountsByAppCall(appId, userId, accStatus, accName, pageNum, pageSize, pageSort, _callback); + + } + + + private ApiResponse getAccountsByAppWithHttpInfo(String appId, String userId, String accStatus, String accName, Integer pageNum, Integer pageSize, String pageSort) throws ApiException { + okhttp3.Call localVarCall = getAccountsByAppValidateBeforeCall(appId, userId, accStatus, accName, pageNum, pageSize, pageSort, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getAccountsByAppAsync(String appId, String userId, String accStatus, String accName, Integer pageNum, Integer pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAccountsByAppValidateBeforeCall(appId, userId, accStatus, accName, pageNum, pageSize, pageSort, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetAccountsByAppRequest { + private final String appId; + private String userId; + private String accStatus; + private String accName; + private Integer pageNum; + private Integer pageSize; + private String pageSort; + + private APIgetAccountsByAppRequest(String appId) { + this.appId = appId; + } + + /** + * Set userId + * @param userId 用户id (optional) + * @return APIgetAccountsByAppRequest + */ + public APIgetAccountsByAppRequest userId(String userId) { + this.userId = userId; + return this; + } + + /** + * Set accStatus + * @param accStatus 账号状态 1-活跃 0-冻结 (optional) + * @return APIgetAccountsByAppRequest + */ + public APIgetAccountsByAppRequest accStatus(String accStatus) { + this.accStatus = accStatus; + return this; + } + + /** + * Set accName + * @param accName 账号名称 (optional) + * @return APIgetAccountsByAppRequest + */ + public APIgetAccountsByAppRequest accName(String accName) { + this.accName = accName; + return this; + } + + /** + * Set pageNum + * @param pageNum 页数 (optional) + * @return APIgetAccountsByAppRequest + */ + public APIgetAccountsByAppRequest pageNum(Integer pageNum) { + this.pageNum = pageNum; + return this; + } + + /** + * Set pageSize + * @param pageSize 页大小 (optional) + * @return APIgetAccountsByAppRequest + */ + public APIgetAccountsByAppRequest pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageSort + * @param pageSort 排序字段 (optional) + * @return APIgetAccountsByAppRequest + */ + public APIgetAccountsByAppRequest pageSort(String pageSort) { + this.pageSort = pageSort; + return this; + } + + /** + * Build call for getAccountsByApp + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getAccountsByAppCall(appId, userId, accStatus, accName, pageNum, pageSize, pageSort, _callback); + } + + /** + * Execute getAccountsByApp request + * @return GetAccountsByApp200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public GetAccountsByApp200Response execute() throws ApiException { + ApiResponse localVarResp = getAccountsByAppWithHttpInfo(appId, userId, accStatus, accName, pageNum, pageSize, pageSort); + return localVarResp.getData(); + } + + /** + * Execute getAccountsByApp request with HTTP info returned + * @return ApiResponse<GetAccountsByApp200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getAccountsByAppWithHttpInfo(appId, userId, accStatus, accName, pageNum, pageSize, pageSort); + } + + /** + * Execute getAccountsByApp request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getAccountsByAppAsync(appId, userId, accStatus, accName, pageNum, pageSize, pageSort, _callback); + } + } + + /** + * 按 APP ID 查询应用子账号列表 + * + * @param appId 应用id (required) + * @return APIgetAccountsByAppRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetAccountsByAppRequest getAccountsByApp(String appId) { + return new APIgetAccountsByAppRequest(appId); + } + private okhttp3.Call getByDomainCall(String domain, String domainSn, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/application"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (domain != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("domain", domain)); + } + + if (domainSn != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("domain_sn", domainSn)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getByDomainValidateBeforeCall(String domain, String domainSn, final ApiCallback _callback) throws ApiException { + return getByDomainCall(domain, domainSn, _callback); + + } + + + private ApiResponse getByDomainWithHttpInfo(String domain, String domainSn) throws ApiException { + okhttp3.Call localVarCall = getByDomainValidateBeforeCall(domain, domainSn, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getByDomainAsync(String domain, String domainSn, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getByDomainValidateBeforeCall(domain, domainSn, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetByDomainRequest { + private String domain; + private String domainSn; + + private APIgetByDomainRequest() { + } + + /** + * Set domain + * @param domain 域名 (optional) + * @return APIgetByDomainRequest + */ + public APIgetByDomainRequest domain(String domain) { + this.domain = domain; + return this; + } + + /** + * Set domainSn + * @param domainSn 域名简写 (optional) + * @return APIgetByDomainRequest + */ + public APIgetByDomainRequest domainSn(String domainSn) { + this.domainSn = domainSn; + return this; + } + + /** + * Build call for getByDomain + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getByDomainCall(domain, domainSn, _callback); + } + + /** + * Execute getByDomain request + * @return AppDetail + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public AppDetail execute() throws ApiException { + ApiResponse localVarResp = getByDomainWithHttpInfo(domain, domainSn); + return localVarResp.getData(); + } + + /** + * Execute getByDomain request with HTTP info returned + * @return ApiResponse<AppDetail> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getByDomainWithHttpInfo(domain, domainSn); + } + + /** + * Execute getByDomain request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getByDomainAsync(domain, domainSn, _callback); + } + } + + /** + * 按条件查询应用 + * + * @return APIgetByDomainRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetByDomainRequest getByDomain() { + return new APIgetByDomainRequest(); + } + private okhttp3.Call getConfigCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/applications/{id}/configs" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getConfigValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getConfig(Async)"); + } + + return getConfigCall(id, _callback); + + } + + + private ApiResponse getConfigWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getConfigValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getConfigAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getConfigValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetConfigRequest { + private final String id; + + private APIgetConfigRequest(String id) { + this.id = id; + } + + /** + * Build call for getConfig + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getConfigCall(id, _callback); + } + + /** + * Execute getConfig request + * @return GetConfig200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public GetConfig200Response execute() throws ApiException { + ApiResponse localVarResp = getConfigWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Execute getConfig request with HTTP info returned + * @return ApiResponse<GetConfig200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getConfigWithHttpInfo(id); + } + + /** + * Execute getConfig request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getConfigAsync(id, _callback); + } + } + + /** + * 查询应用配置信息 + * + * @param id 应用ID (required) + * @return APIgetConfigRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetConfigRequest getConfig(String id) { + return new APIgetConfigRequest(id); + } + private okhttp3.Call getProtocolCall(String appId, String protocolType, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/applications/{app_id}/protocols/{protocol_type}" + .replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "protocol_type" + "}", localVarApiClient.escapeString(protocolType.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getProtocolValidateBeforeCall(String appId, String protocolType, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling getProtocol(Async)"); + } + + // verify the required parameter 'protocolType' is set + if (protocolType == null) { + throw new ApiException("Missing the required parameter 'protocolType' when calling getProtocol(Async)"); + } + + return getProtocolCall(appId, protocolType, _callback); + + } + + + private ApiResponse getProtocolWithHttpInfo(String appId, String protocolType) throws ApiException { + okhttp3.Call localVarCall = getProtocolValidateBeforeCall(appId, protocolType, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getProtocolAsync(String appId, String protocolType, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getProtocolValidateBeforeCall(appId, protocolType, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetProtocolRequest { + private final String appId; + private final String protocolType; + + private APIgetProtocolRequest(String appId, String protocolType) { + this.appId = appId; + this.protocolType = protocolType; + } + + /** + * Build call for getProtocol + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getProtocolCall(appId, protocolType, _callback); + } + + /** + * Execute getProtocol request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = getProtocolWithHttpInfo(appId, protocolType); + return localVarResp.getData(); + } + + /** + * Execute getProtocol request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getProtocolWithHttpInfo(appId, protocolType); + } + + /** + * Execute getProtocol request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getProtocolAsync(appId, protocolType, _callback); + } + } + + /** + * 查询应用认证协议 + * + * @param appId 应用id (required) + * @param protocolType 单点类型,cas、oauth2、saml、oidc、sxp (required) + * @return APIgetProtocolRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetProtocolRequest getProtocol(String appId, String protocolType) { + return new APIgetProtocolRequest(appId, protocolType); + } + private okhttp3.Call getProtocolsCall(String id, String status, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/applications/{id}/protocols" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (status != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("status", status)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getProtocolsValidateBeforeCall(String id, String status, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getProtocols(Async)"); + } + + return getProtocolsCall(id, status, _callback); + + } + + + private ApiResponse> getProtocolsWithHttpInfo(String id, String status) throws ApiException { + okhttp3.Call localVarCall = getProtocolsValidateBeforeCall(id, status, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getProtocolsAsync(String id, String status, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getProtocolsValidateBeforeCall(id, status, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetProtocolsRequest { + private final String id; + private String status; + + private APIgetProtocolsRequest(String id) { + this.id = id; + } + + /** + * Set status + * @param status 启用状态 1, 0 (optional) + * @return APIgetProtocolsRequest + */ + public APIgetProtocolsRequest status(String status) { + this.status = status; + return this; + } + + /** + * Build call for getProtocols + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getProtocolsCall(id, status, _callback); + } + + /** + * Execute getProtocols request + * @return List<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public List execute() throws ApiException { + ApiResponse> localVarResp = getProtocolsWithHttpInfo(id, status); + return localVarResp.getData(); + } + + /** + * Execute getProtocols request with HTTP info returned + * @return ApiResponse<List<Object>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse> executeWithHttpInfo() throws ApiException { + return getProtocolsWithHttpInfo(id, status); + } + + /** + * Execute getProtocols request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException { + return getProtocolsAsync(id, status, _callback); + } + } + + /** + * 查询应用认证协议列表 + * + * @param id 应用唯一标识ID (required) + * @return APIgetProtocolsRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetProtocolsRequest getProtocols(String id) { + return new APIgetProtocolsRequest(id); + } + private okhttp3.Call getTemplateCall(String name, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/application-templates"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (name != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("name", name)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getTemplateValidateBeforeCall(String name, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling getTemplate(Async)"); + } + + return getTemplateCall(name, _callback); + + } + + + private ApiResponse getTemplateWithHttpInfo(String name) throws ApiException { + okhttp3.Call localVarCall = getTemplateValidateBeforeCall(name, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getTemplateAsync(String name, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getTemplateValidateBeforeCall(name, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetTemplateRequest { + private final String name; + + private APIgetTemplateRequest(String name) { + this.name = name; + } + + /** + * Build call for getTemplate + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getTemplateCall(name, _callback); + } + + /** + * Execute getTemplate request + * @return GetTemplate200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public GetTemplate200Response execute() throws ApiException { + ApiResponse localVarResp = getTemplateWithHttpInfo(name); + return localVarResp.getData(); + } + + /** + * Execute getTemplate request with HTTP info returned + * @return ApiResponse<GetTemplate200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getTemplateWithHttpInfo(name); + } + + /** + * Execute getTemplate request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getTemplateAsync(name, _callback); + } + } + + /** + * 查询应用模板列表 + * + * @param name 应用名称 (required) + * @return APIgetTemplateRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetTemplateRequest getTemplate(String name) { + return new APIgetTemplateRequest(name); + } + private okhttp3.Call modifyCall(String id, String contentType, ModifyRequest1 modifyRequest1, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = modifyRequest1; + + // create path and map variables + String localVarPath = "/v1/applications/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call modifyValidateBeforeCall(String id, String contentType, ModifyRequest1 modifyRequest1, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling modify(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling modify(Async)"); + } + + return modifyCall(id, contentType, modifyRequest1, _callback); + + } + + + private ApiResponse modifyWithHttpInfo(String id, String contentType, ModifyRequest1 modifyRequest1) throws ApiException { + okhttp3.Call localVarCall = modifyValidateBeforeCall(id, contentType, modifyRequest1, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call modifyAsync(String id, String contentType, ModifyRequest1 modifyRequest1, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = modifyValidateBeforeCall(id, contentType, modifyRequest1, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APImodifyRequest { + private final String id; + private final String contentType; + private ModifyRequest1 modifyRequest1; + + private APImodifyRequest(String id, String contentType) { + this.id = id; + this.contentType = contentType; + } + + /** + * Set modifyRequest1 + * @param modifyRequest1 (optional) + * @return APImodifyRequest + */ + public APImodifyRequest modifyRequest1(ModifyRequest1 modifyRequest1) { + this.modifyRequest1 = modifyRequest1; + return this; + } + + /** + * Build call for modify + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return modifyCall(id, contentType, modifyRequest1, _callback); + } + + /** + * Execute modify request + * @return Modify200Response1 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Modify200Response1 execute() throws ApiException { + ApiResponse localVarResp = modifyWithHttpInfo(id, contentType, modifyRequest1); + return localVarResp.getData(); + } + + /** + * Execute modify request with HTTP info returned + * @return ApiResponse<Modify200Response1> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return modifyWithHttpInfo(id, contentType, modifyRequest1); + } + + /** + * Execute modify request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return modifyAsync(id, contentType, modifyRequest1, _callback); + } + } + + /** + * 更新应用基本信息 + * + * @param id (required) + * @param contentType (required) + * @return APImodifyRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APImodifyRequest modify(String id, String contentType) { + return new APImodifyRequest(id, contentType); + } + private okhttp3.Call modifyAccountCall(String appId, String id, String contentType, ModifyAccountRequest modifyAccountRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = modifyAccountRequest; + + // create path and map variables + String localVarPath = "/v1/applications/{app_id}/accounts/{id}" + .replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call modifyAccountValidateBeforeCall(String appId, String id, String contentType, ModifyAccountRequest modifyAccountRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling modifyAccount(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling modifyAccount(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling modifyAccount(Async)"); + } + + return modifyAccountCall(appId, id, contentType, modifyAccountRequest, _callback); + + } + + + private ApiResponse modifyAccountWithHttpInfo(String appId, String id, String contentType, ModifyAccountRequest modifyAccountRequest) throws ApiException { + okhttp3.Call localVarCall = modifyAccountValidateBeforeCall(appId, id, contentType, modifyAccountRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call modifyAccountAsync(String appId, String id, String contentType, ModifyAccountRequest modifyAccountRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = modifyAccountValidateBeforeCall(appId, id, contentType, modifyAccountRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APImodifyAccountRequest { + private final String appId; + private final String id; + private final String contentType; + private ModifyAccountRequest modifyAccountRequest; + + private APImodifyAccountRequest(String appId, String id, String contentType) { + this.appId = appId; + this.id = id; + this.contentType = contentType; + } + + /** + * Set modifyAccountRequest + * @param modifyAccountRequest (optional) + * @return APImodifyAccountRequest + */ + public APImodifyAccountRequest modifyAccountRequest(ModifyAccountRequest modifyAccountRequest) { + this.modifyAccountRequest = modifyAccountRequest; + return this; + } + + /** + * Build call for modifyAccount + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return modifyAccountCall(appId, id, contentType, modifyAccountRequest, _callback); + } + + /** + * Execute modifyAccount request + * @return Modify200Response1 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Modify200Response1 execute() throws ApiException { + ApiResponse localVarResp = modifyAccountWithHttpInfo(appId, id, contentType, modifyAccountRequest); + return localVarResp.getData(); + } + + /** + * Execute modifyAccount request with HTTP info returned + * @return ApiResponse<Modify200Response1> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return modifyAccountWithHttpInfo(appId, id, contentType, modifyAccountRequest); + } + + /** + * Execute modifyAccount request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return modifyAccountAsync(appId, id, contentType, modifyAccountRequest, _callback); + } + } + + /** + * 更新应用子账号 + * + * @param appId 应用id (required) + * @param id 子账号id (required) + * @param contentType (required) + * @return APImodifyAccountRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APImodifyAccountRequest modifyAccount(String appId, String id, String contentType) { + return new APImodifyAccountRequest(appId, id, contentType); + } + private okhttp3.Call modifyConfigCall(String id, String contentType, ModifyConfigRequest modifyConfigRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = modifyConfigRequest; + + // create path and map variables + String localVarPath = "/v1/applications/{id}/configs" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call modifyConfigValidateBeforeCall(String id, String contentType, ModifyConfigRequest modifyConfigRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling modifyConfig(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling modifyConfig(Async)"); + } + + return modifyConfigCall(id, contentType, modifyConfigRequest, _callback); + + } + + + private ApiResponse modifyConfigWithHttpInfo(String id, String contentType, ModifyConfigRequest modifyConfigRequest) throws ApiException { + okhttp3.Call localVarCall = modifyConfigValidateBeforeCall(id, contentType, modifyConfigRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call modifyConfigAsync(String id, String contentType, ModifyConfigRequest modifyConfigRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = modifyConfigValidateBeforeCall(id, contentType, modifyConfigRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APImodifyConfigRequest { + private final String id; + private final String contentType; + private ModifyConfigRequest modifyConfigRequest; + + private APImodifyConfigRequest(String id, String contentType) { + this.id = id; + this.contentType = contentType; + } + + /** + * Set modifyConfigRequest + * @param modifyConfigRequest (optional) + * @return APImodifyConfigRequest + */ + public APImodifyConfigRequest modifyConfigRequest(ModifyConfigRequest modifyConfigRequest) { + this.modifyConfigRequest = modifyConfigRequest; + return this; + } + + /** + * Build call for modifyConfig + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return modifyConfigCall(id, contentType, modifyConfigRequest, _callback); + } + + /** + * Execute modifyConfig request + * @return Modify200Response1 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Modify200Response1 execute() throws ApiException { + ApiResponse localVarResp = modifyConfigWithHttpInfo(id, contentType, modifyConfigRequest); + return localVarResp.getData(); + } + + /** + * Execute modifyConfig request with HTTP info returned + * @return ApiResponse<Modify200Response1> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return modifyConfigWithHttpInfo(id, contentType, modifyConfigRequest); + } + + /** + * Execute modifyConfig request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return modifyConfigAsync(id, contentType, modifyConfigRequest, _callback); + } + } + + /** + * 更新应用配置 + * + * @param id (required) + * @param contentType (required) + * @return APImodifyConfigRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APImodifyConfigRequest modifyConfig(String id, String contentType) { + return new APImodifyConfigRequest(id, contentType); + } + private okhttp3.Call modifyProtocolCall(String appId, String protocolType, String contentType, EmptyObject1 emptyObject1, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = emptyObject1; + + // create path and map variables + String localVarPath = "/v1/applications/{app_id}/protocols/{protocol_type}" + .replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "protocol_type" + "}", localVarApiClient.escapeString(protocolType.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call modifyProtocolValidateBeforeCall(String appId, String protocolType, String contentType, EmptyObject1 emptyObject1, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling modifyProtocol(Async)"); + } + + // verify the required parameter 'protocolType' is set + if (protocolType == null) { + throw new ApiException("Missing the required parameter 'protocolType' when calling modifyProtocol(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling modifyProtocol(Async)"); + } + + return modifyProtocolCall(appId, protocolType, contentType, emptyObject1, _callback); + + } + + + private ApiResponse modifyProtocolWithHttpInfo(String appId, String protocolType, String contentType, EmptyObject1 emptyObject1) throws ApiException { + okhttp3.Call localVarCall = modifyProtocolValidateBeforeCall(appId, protocolType, contentType, emptyObject1, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call modifyProtocolAsync(String appId, String protocolType, String contentType, EmptyObject1 emptyObject1, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = modifyProtocolValidateBeforeCall(appId, protocolType, contentType, emptyObject1, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APImodifyProtocolRequest { + private final String appId; + private final String protocolType; + private final String contentType; + private EmptyObject1 emptyObject1; + + private APImodifyProtocolRequest(String appId, String protocolType, String contentType) { + this.appId = appId; + this.protocolType = protocolType; + this.contentType = contentType; + } + + /** + * Set emptyObject1 + * @param emptyObject1 (optional) + * @return APImodifyProtocolRequest + */ + public APImodifyProtocolRequest emptyObject1(EmptyObject1 emptyObject1) { + this.emptyObject1 = emptyObject1; + return this; + } + + /** + * Build call for modifyProtocol + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return modifyProtocolCall(appId, protocolType, contentType, emptyObject1, _callback); + } + + /** + * Execute modifyProtocol request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = modifyProtocolWithHttpInfo(appId, protocolType, contentType, emptyObject1); + return localVarResp.getData(); + } + + /** + * Execute modifyProtocol request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return modifyProtocolWithHttpInfo(appId, protocolType, contentType, emptyObject1); + } + + /** + * Execute modifyProtocol request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return modifyProtocolAsync(appId, protocolType, contentType, emptyObject1, _callback); + } + } + + /** + * 更新应用认证协议 + * 具体入参参考:[https://thoughts.teambition.com/workspaces/607401bc94422600473bb8a7/docs/62207129fb49bf000106a046](https://thoughts.teambition.com/workspaces/607401bc94422600473bb8a7/docs/62207129fb49bf000106a046) + * @param appId 应用id (required) + * @param protocolType 单点类型,cas、oauth2、saml、oidc、sxp (required) + * @param contentType (required) + * @return APImodifyProtocolRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APImodifyProtocolRequest modifyProtocol(String appId, String protocolType, String contentType) { + return new APImodifyProtocolRequest(appId, protocolType, contentType); + } +} diff --git a/src/main/java/com/idmesh/api/OrganizationApi.java b/src/main/java/com/idmesh/api/OrganizationApi.java new file mode 100644 index 0000000..d62bf17 --- /dev/null +++ b/src/main/java/com/idmesh/api/OrganizationApi.java @@ -0,0 +1,3017 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.api; + +import com.idmesh.ApiCallback; +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.ApiResponse; +import com.idmesh.Configuration; +import com.idmesh.Pair; +import com.idmesh.ProgressRequestBody; +import com.idmesh.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.idmesh.model.CreateNodeRequest; +import com.idmesh.model.CreateOrganization200Response; +import com.idmesh.model.CreateOrganizationRequest; +import com.idmesh.model.DeleteMembersRequest; +import com.idmesh.model.DeleteNode200Response; +import com.idmesh.model.DeleteOrganization200Response; +import com.idmesh.model.EmptyObject13; +import com.idmesh.model.Get400Response; +import com.idmesh.model.GetMembers200ResponseInner; +import com.idmesh.model.GetNodeMembers200Response; +import com.idmesh.model.GetOrganization200ResponseInner; +import com.idmesh.model.GetOrganizations200ResponseInner; +import com.idmesh.model.TreeNode; +import com.idmesh.model.UpdateMemberRequest; +import com.idmesh.model.UpdateNode200Response; +import com.idmesh.model.UpdateNodeRequest; +import com.idmesh.model.UpdateOrganizationRequest; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class OrganizationApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public OrganizationApi() { + this(Configuration.getDefaultApiClient()); + } + + public OrganizationApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + private okhttp3.Call createNodeCall(String contentType, CreateNodeRequest createNodeRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = createNodeRequest; + + // create path and map variables + String localVarPath = "/v1/tree-nodes"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createNodeValidateBeforeCall(String contentType, CreateNodeRequest createNodeRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling createNode(Async)"); + } + + return createNodeCall(contentType, createNodeRequest, _callback); + + } + + + private ApiResponse createNodeWithHttpInfo(String contentType, CreateNodeRequest createNodeRequest) throws ApiException { + okhttp3.Call localVarCall = createNodeValidateBeforeCall(contentType, createNodeRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call createNodeAsync(String contentType, CreateNodeRequest createNodeRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createNodeValidateBeforeCall(contentType, createNodeRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIcreateNodeRequest { + private final String contentType; + private CreateNodeRequest createNodeRequest; + + private APIcreateNodeRequest(String contentType) { + this.contentType = contentType; + } + + /** + * Set createNodeRequest + * @param createNodeRequest (optional) + * @return APIcreateNodeRequest + */ + public APIcreateNodeRequest createNodeRequest(CreateNodeRequest createNodeRequest) { + this.createNodeRequest = createNodeRequest; + return this; + } + + /** + * Build call for createNode + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return createNodeCall(contentType, createNodeRequest, _callback); + } + + /** + * Execute createNode request + * @return DeleteOrganization200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public DeleteOrganization200Response execute() throws ApiException { + ApiResponse localVarResp = createNodeWithHttpInfo(contentType, createNodeRequest); + return localVarResp.getData(); + } + + /** + * Execute createNode request with HTTP info returned + * @return ApiResponse<DeleteOrganization200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return createNodeWithHttpInfo(contentType, createNodeRequest); + } + + /** + * Execute createNode request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return createNodeAsync(contentType, createNodeRequest, _callback); + } + } + + /** + * 创建节点 + * + * @param contentType (required) + * @return APIcreateNodeRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIcreateNodeRequest createNode(String contentType) { + return new APIcreateNodeRequest(contentType); + } + private okhttp3.Call createOrganizationCall(String contentType, CreateOrganizationRequest createOrganizationRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = createOrganizationRequest; + + // create path and map variables + String localVarPath = "/v1/core-objects"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createOrganizationValidateBeforeCall(String contentType, CreateOrganizationRequest createOrganizationRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling createOrganization(Async)"); + } + + return createOrganizationCall(contentType, createOrganizationRequest, _callback); + + } + + + private ApiResponse createOrganizationWithHttpInfo(String contentType, CreateOrganizationRequest createOrganizationRequest) throws ApiException { + okhttp3.Call localVarCall = createOrganizationValidateBeforeCall(contentType, createOrganizationRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call createOrganizationAsync(String contentType, CreateOrganizationRequest createOrganizationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createOrganizationValidateBeforeCall(contentType, createOrganizationRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIcreateOrganizationRequest { + private final String contentType; + private CreateOrganizationRequest createOrganizationRequest; + + private APIcreateOrganizationRequest(String contentType) { + this.contentType = contentType; + } + + /** + * Set createOrganizationRequest + * @param createOrganizationRequest (optional) + * @return APIcreateOrganizationRequest + */ + public APIcreateOrganizationRequest createOrganizationRequest(CreateOrganizationRequest createOrganizationRequest) { + this.createOrganizationRequest = createOrganizationRequest; + return this; + } + + /** + * Build call for createOrganization + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return createOrganizationCall(contentType, createOrganizationRequest, _callback); + } + + /** + * Execute createOrganization request + * @return CreateOrganization200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public CreateOrganization200Response execute() throws ApiException { + ApiResponse localVarResp = createOrganizationWithHttpInfo(contentType, createOrganizationRequest); + return localVarResp.getData(); + } + + /** + * Execute createOrganization request with HTTP info returned + * @return ApiResponse<CreateOrganization200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return createOrganizationWithHttpInfo(contentType, createOrganizationRequest); + } + + /** + * Execute createOrganization request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return createOrganizationAsync(contentType, createOrganizationRequest, _callback); + } + } + + /** + * 创建组织关系 + * 创建组织关系的元数据,同时创建根节点 + * @param contentType (required) + * @return APIcreateOrganizationRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIcreateOrganizationRequest createOrganization(String contentType) { + return new APIcreateOrganizationRequest(contentType); + } + private okhttp3.Call deleteMembersCall(String contentType, DeleteMembersRequest deleteMembersRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = deleteMembersRequest; + + // create path and map variables + String localVarPath = "/v1/tree-users"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteMembersValidateBeforeCall(String contentType, DeleteMembersRequest deleteMembersRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling deleteMembers(Async)"); + } + + return deleteMembersCall(contentType, deleteMembersRequest, _callback); + + } + + + private ApiResponse deleteMembersWithHttpInfo(String contentType, DeleteMembersRequest deleteMembersRequest) throws ApiException { + okhttp3.Call localVarCall = deleteMembersValidateBeforeCall(contentType, deleteMembersRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call deleteMembersAsync(String contentType, DeleteMembersRequest deleteMembersRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteMembersValidateBeforeCall(contentType, deleteMembersRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIdeleteMembersRequest { + private final String contentType; + private DeleteMembersRequest deleteMembersRequest; + + private APIdeleteMembersRequest(String contentType) { + this.contentType = contentType; + } + + /** + * Set deleteMembersRequest + * @param deleteMembersRequest (optional) + * @return APIdeleteMembersRequest + */ + public APIdeleteMembersRequest deleteMembersRequest(DeleteMembersRequest deleteMembersRequest) { + this.deleteMembersRequest = deleteMembersRequest; + return this; + } + + /** + * Build call for deleteMembers + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return deleteMembersCall(contentType, deleteMembersRequest, _callback); + } + + /** + * Execute deleteMembers request + * @return DeleteOrganization200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public DeleteOrganization200Response execute() throws ApiException { + ApiResponse localVarResp = deleteMembersWithHttpInfo(contentType, deleteMembersRequest); + return localVarResp.getData(); + } + + /** + * Execute deleteMembers request with HTTP info returned + * @return ApiResponse<DeleteOrganization200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteMembersWithHttpInfo(contentType, deleteMembersRequest); + } + + /** + * Execute deleteMembers request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteMembersAsync(contentType, deleteMembersRequest, _callback); + } + } + + /** + * 从节点移除用户 + * 移除用户,uri参数中的ID和json中的参数,至少有其一 + * @param contentType (required) + * @return APIdeleteMembersRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIdeleteMembersRequest deleteMembers(String contentType) { + return new APIdeleteMembersRequest(contentType); + } + private okhttp3.Call deleteNodeCall(String id, String objectCode, String contentType, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/tree-nodes/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (objectCode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("object_code", objectCode)); + } + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteNodeValidateBeforeCall(String id, String objectCode, String contentType, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling deleteNode(Async)"); + } + + // verify the required parameter 'objectCode' is set + if (objectCode == null) { + throw new ApiException("Missing the required parameter 'objectCode' when calling deleteNode(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling deleteNode(Async)"); + } + + return deleteNodeCall(id, objectCode, contentType, _callback); + + } + + + private ApiResponse deleteNodeWithHttpInfo(String id, String objectCode, String contentType) throws ApiException { + okhttp3.Call localVarCall = deleteNodeValidateBeforeCall(id, objectCode, contentType, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call deleteNodeAsync(String id, String objectCode, String contentType, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteNodeValidateBeforeCall(id, objectCode, contentType, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIdeleteNodeRequest { + private final String id; + private final String objectCode; + private final String contentType; + + private APIdeleteNodeRequest(String id, String objectCode, String contentType) { + this.id = id; + this.objectCode = objectCode; + this.contentType = contentType; + } + + /** + * Build call for deleteNode + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return deleteNodeCall(id, objectCode, contentType, _callback); + } + + /** + * Execute deleteNode request + * @return DeleteNode200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public DeleteNode200Response execute() throws ApiException { + ApiResponse localVarResp = deleteNodeWithHttpInfo(id, objectCode, contentType); + return localVarResp.getData(); + } + + /** + * Execute deleteNode request with HTTP info returned + * @return ApiResponse<DeleteNode200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteNodeWithHttpInfo(id, objectCode, contentType); + } + + /** + * Execute deleteNode request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteNodeAsync(id, objectCode, contentType, _callback); + } + } + + /** + * 删除节点 + * 如果该节点有子节点则不可删除,需要先删除所有子节点。 + * @param id (required) + * @param objectCode 树对象code (required) + * @param contentType (required) + * @return APIdeleteNodeRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIdeleteNodeRequest deleteNode(String id, String objectCode, String contentType) { + return new APIdeleteNodeRequest(id, objectCode, contentType); + } + private okhttp3.Call deleteOrganizationCall(String id, String contentType, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/core-objects/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteOrganizationValidateBeforeCall(String id, String contentType, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling deleteOrganization(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling deleteOrganization(Async)"); + } + + return deleteOrganizationCall(id, contentType, _callback); + + } + + + private ApiResponse deleteOrganizationWithHttpInfo(String id, String contentType) throws ApiException { + okhttp3.Call localVarCall = deleteOrganizationValidateBeforeCall(id, contentType, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call deleteOrganizationAsync(String id, String contentType, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteOrganizationValidateBeforeCall(id, contentType, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIdeleteOrganizationRequest { + private final String id; + private final String contentType; + + private APIdeleteOrganizationRequest(String id, String contentType) { + this.id = id; + this.contentType = contentType; + } + + /** + * Build call for deleteOrganization + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return deleteOrganizationCall(id, contentType, _callback); + } + + /** + * Execute deleteOrganization request + * @return DeleteOrganization200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public DeleteOrganization200Response execute() throws ApiException { + ApiResponse localVarResp = deleteOrganizationWithHttpInfo(id, contentType); + return localVarResp.getData(); + } + + /** + * Execute deleteOrganization request with HTTP info returned + * @return ApiResponse<DeleteOrganization200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteOrganizationWithHttpInfo(id, contentType); + } + + /** + * Execute deleteOrganization request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteOrganizationAsync(id, contentType, _callback); + } + } + + /** + * 删除组织关系 + * 如果该组织关系有子节点则不可删 + * @param id (required) + * @param contentType (required) + * @return APIdeleteOrganizationRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIdeleteOrganizationRequest deleteOrganization(String id, String contentType) { + return new APIdeleteOrganizationRequest(id, contentType); + } + private okhttp3.Call getChildrenNodesCall(String id, String mode, String objectCode, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/tree-nodes/{id}/children" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (mode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("mode", mode)); + } + + if (objectCode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("object_code", objectCode)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getChildrenNodesValidateBeforeCall(String id, String mode, String objectCode, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getChildrenNodes(Async)"); + } + + // verify the required parameter 'mode' is set + if (mode == null) { + throw new ApiException("Missing the required parameter 'mode' when calling getChildrenNodes(Async)"); + } + + // verify the required parameter 'objectCode' is set + if (objectCode == null) { + throw new ApiException("Missing the required parameter 'objectCode' when calling getChildrenNodes(Async)"); + } + + return getChildrenNodesCall(id, mode, objectCode, _callback); + + } + + + private ApiResponse> getChildrenNodesWithHttpInfo(String id, String mode, String objectCode) throws ApiException { + okhttp3.Call localVarCall = getChildrenNodesValidateBeforeCall(id, mode, objectCode, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getChildrenNodesAsync(String id, String mode, String objectCode, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getChildrenNodesValidateBeforeCall(id, mode, objectCode, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetChildrenNodesRequest { + private final String id; + private final String mode; + private final String objectCode; + + private APIgetChildrenNodesRequest(String id, String mode, String objectCode) { + this.id = id; + this.mode = mode; + this.objectCode = objectCode; + } + + /** + * Build call for getChildrenNodes + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getChildrenNodesCall(id, mode, objectCode, _callback); + } + + /** + * Execute getChildrenNodes request + * @return List<TreeNode> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public List execute() throws ApiException { + ApiResponse> localVarResp = getChildrenNodesWithHttpInfo(id, mode, objectCode); + return localVarResp.getData(); + } + + /** + * Execute getChildrenNodes request with HTTP info returned + * @return ApiResponse<List<TreeNode>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse> executeWithHttpInfo() throws ApiException { + return getChildrenNodesWithHttpInfo(id, mode, objectCode); + } + + /** + * Execute getChildrenNodes request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException { + return getChildrenNodesAsync(id, mode, objectCode, _callback); + } + } + + /** + * 获取子节点列表 + * + * @param id (required) + * @param mode // mode - 低->高 bit // 第1位:是否获得指针节点所对应的真实结点,1-是,0-否 // 第2位:是否展开WeakNode,即节点中类型不同的节点,1-展开,0-不展开 // 第3位:是否递归地展开节点(不建议) (required) + * @param objectCode 当id = 0时必填,创建树时的object_code (required) + * @return APIgetChildrenNodesRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetChildrenNodesRequest getChildrenNodes(String id, String mode, String objectCode) { + return new APIgetChildrenNodesRequest(id, mode, objectCode); + } + private okhttp3.Call getMembersCall(String userId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/tree-users"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (userId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("user_id", userId)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getMembersValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException("Missing the required parameter 'userId' when calling getMembers(Async)"); + } + + return getMembersCall(userId, _callback); + + } + + + private ApiResponse> getMembersWithHttpInfo(String userId) throws ApiException { + okhttp3.Call localVarCall = getMembersValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getMembersAsync(String userId, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getMembersValidateBeforeCall(userId, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetMembersRequest { + private final String userId; + + private APIgetMembersRequest(String userId) { + this.userId = userId; + } + + /** + * Build call for getMembers + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getMembersCall(userId, _callback); + } + + /** + * Execute getMembers request + * @return List<GetMembers200ResponseInner> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public List execute() throws ApiException { + ApiResponse> localVarResp = getMembersWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * Execute getMembers request with HTTP info returned + * @return ApiResponse<List<GetMembers200ResponseInner>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse> executeWithHttpInfo() throws ApiException { + return getMembersWithHttpInfo(userId); + } + + /** + * Execute getMembers request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException { + return getMembersAsync(userId, _callback); + } + } + + /** + * 获取与用户关联的组织关系列表 + * 根据用户id获取与用户关联的组织关系列表 + * @param userId 用户ID (required) + * @return APIgetMembersRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetMembersRequest getMembers(String userId) { + return new APIgetMembersRequest(userId); + } + private okhttp3.Call getNodeCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/tree-nodes/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getNodeValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getNode(Async)"); + } + + return getNodeCall(id, _callback); + + } + + + private ApiResponse getNodeWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getNodeValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getNodeAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getNodeValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetNodeRequest { + private final String id; + + private APIgetNodeRequest(String id) { + this.id = id; + } + + /** + * Build call for getNode + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getNodeCall(id, _callback); + } + + /** + * Execute getNode request + * @return TreeNode + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public TreeNode execute() throws ApiException { + ApiResponse localVarResp = getNodeWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Execute getNode request with HTTP info returned + * @return ApiResponse<TreeNode> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getNodeWithHttpInfo(id); + } + + /** + * Execute getNode request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getNodeAsync(id, _callback); + } + } + + /** + * 查询节点信息 + * 根据ID查询节点信息 + * @param id (required) + * @return APIgetNodeRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetNodeRequest getNode(String id) { + return new APIgetNodeRequest(id); + } + private okhttp3.Call getNodeMembersCall(String id, String relationType, String isDefault, String displayName, String username, String mode, Integer pageNum, Integer pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/tree-nodes/{id}/tree-users" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (relationType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("relation_type", relationType)); + } + + if (isDefault != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("is_default", isDefault)); + } + + if (displayName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("display_name", displayName)); + } + + if (username != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("username", username)); + } + + if (mode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("mode", mode)); + } + + if (pageNum != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_num", pageNum)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); + } + + if (pageSort != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_sort", pageSort)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getNodeMembersValidateBeforeCall(String id, String relationType, String isDefault, String displayName, String username, String mode, Integer pageNum, Integer pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getNodeMembers(Async)"); + } + + return getNodeMembersCall(id, relationType, isDefault, displayName, username, mode, pageNum, pageSize, pageSort, _callback); + + } + + + private ApiResponse getNodeMembersWithHttpInfo(String id, String relationType, String isDefault, String displayName, String username, String mode, Integer pageNum, Integer pageSize, String pageSort) throws ApiException { + okhttp3.Call localVarCall = getNodeMembersValidateBeforeCall(id, relationType, isDefault, displayName, username, mode, pageNum, pageSize, pageSort, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getNodeMembersAsync(String id, String relationType, String isDefault, String displayName, String username, String mode, Integer pageNum, Integer pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getNodeMembersValidateBeforeCall(id, relationType, isDefault, displayName, username, mode, pageNum, pageSize, pageSort, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetNodeMembersRequest { + private final String id; + private String relationType; + private String isDefault; + private String displayName; + private String username; + private String mode; + private Integer pageNum; + private Integer pageSize; + private String pageSort; + + private APIgetNodeMembersRequest(String id) { + this.id = id; + } + + /** + * Set relationType + * @param relationType 关联类型,用于区分多重关联 (optional) + * @return APIgetNodeMembersRequest + */ + public APIgetNodeMembersRequest relationType(String relationType) { + this.relationType = relationType; + return this; + } + + /** + * Set isDefault + * @param isDefault 是否默认关系 1是,0否 (optional) + * @return APIgetNodeMembersRequest + */ + public APIgetNodeMembersRequest isDefault(String isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Set displayName + * @param displayName 用户显示名 (optional) + * @return APIgetNodeMembersRequest + */ + public APIgetNodeMembersRequest displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Set username + * @param username 用户名,支持模糊搜索(仅前缀) (optional) + * @return APIgetNodeMembersRequest + */ + public APIgetNodeMembersRequest username(String username) { + this.username = username; + return this; + } + + /** + * Set mode + * @param mode // mode - 低->高 bit // 第1位:是否获得指针节点所对应的真实结点,1-是,0-否 // 第2位:是否展开WeakNode,即节点中类型不同的节点,1-展开,0-不展开 // 第3位:是否递归地展开节点(不建议) (optional) + * @return APIgetNodeMembersRequest + */ + public APIgetNodeMembersRequest mode(String mode) { + this.mode = mode; + return this; + } + + /** + * Set pageNum + * @param pageNum 起始页,默认1 (optional) + * @return APIgetNodeMembersRequest + */ + public APIgetNodeMembersRequest pageNum(Integer pageNum) { + this.pageNum = pageNum; + return this; + } + + /** + * Set pageSize + * @param pageSize 页大小,默认10 (optional) + * @return APIgetNodeMembersRequest + */ + public APIgetNodeMembersRequest pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageSort + * @param pageSort 排序方式,格式:字段[排序方式] (optional) + * @return APIgetNodeMembersRequest + */ + public APIgetNodeMembersRequest pageSort(String pageSort) { + this.pageSort = pageSort; + return this; + } + + /** + * Build call for getNodeMembers + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getNodeMembersCall(id, relationType, isDefault, displayName, username, mode, pageNum, pageSize, pageSort, _callback); + } + + /** + * Execute getNodeMembers request + * @return GetNodeMembers200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public GetNodeMembers200Response execute() throws ApiException { + ApiResponse localVarResp = getNodeMembersWithHttpInfo(id, relationType, isDefault, displayName, username, mode, pageNum, pageSize, pageSort); + return localVarResp.getData(); + } + + /** + * Execute getNodeMembers request with HTTP info returned + * @return ApiResponse<GetNodeMembers200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getNodeMembersWithHttpInfo(id, relationType, isDefault, displayName, username, mode, pageNum, pageSize, pageSort); + } + + /** + * Execute getNodeMembers request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getNodeMembersAsync(id, relationType, isDefault, displayName, username, mode, pageNum, pageSize, pageSort, _callback); + } + } + + /** + * 获取成员信息列表 + * 根据组织节点ID获取成员信息列表 + * @param id node id (required) + * @return APIgetNodeMembersRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetNodeMembersRequest getNodeMembers(String id) { + return new APIgetNodeMembersRequest(id); + } + private okhttp3.Call getNodeParentCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/tree-nodes/{id}/parent" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getNodeParentValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getNodeParent(Async)"); + } + + return getNodeParentCall(id, _callback); + + } + + + private ApiResponse> getNodeParentWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getNodeParentValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getNodeParentAsync(String id, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getNodeParentValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetNodeParentRequest { + private final String id; + + private APIgetNodeParentRequest(String id) { + this.id = id; + } + + /** + * Build call for getNodeParent + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getNodeParentCall(id, _callback); + } + + /** + * Execute getNodeParent request + * @return List<TreeNode> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public List execute() throws ApiException { + ApiResponse> localVarResp = getNodeParentWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Execute getNodeParent request with HTTP info returned + * @return ApiResponse<List<TreeNode>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse> executeWithHttpInfo() throws ApiException { + return getNodeParentWithHttpInfo(id); + } + + /** + * Execute getNodeParent request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException { + return getNodeParentAsync(id, _callback); + } + } + + /** + * 查询父节点 + * + * @param id (required) + * @return APIgetNodeParentRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetNodeParentRequest getNodeParent(String id) { + return new APIgetNodeParentRequest(id); + } + private okhttp3.Call getNodesCall(String objectCode, String name, String code, String tag, String timeModifiedFrom, String timeModifiedTo, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/tree-nodes"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (objectCode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("object_code", objectCode)); + } + + if (name != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("name", name)); + } + + if (code != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("code", code)); + } + + if (tag != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tag", tag)); + } + + if (timeModifiedFrom != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("time_modified_from", timeModifiedFrom)); + } + + if (timeModifiedTo != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("time_modified_to", timeModifiedTo)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getNodesValidateBeforeCall(String objectCode, String name, String code, String tag, String timeModifiedFrom, String timeModifiedTo, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'objectCode' is set + if (objectCode == null) { + throw new ApiException("Missing the required parameter 'objectCode' when calling getNodes(Async)"); + } + + return getNodesCall(objectCode, name, code, tag, timeModifiedFrom, timeModifiedTo, _callback); + + } + + + private ApiResponse> getNodesWithHttpInfo(String objectCode, String name, String code, String tag, String timeModifiedFrom, String timeModifiedTo) throws ApiException { + okhttp3.Call localVarCall = getNodesValidateBeforeCall(objectCode, name, code, tag, timeModifiedFrom, timeModifiedTo, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getNodesAsync(String objectCode, String name, String code, String tag, String timeModifiedFrom, String timeModifiedTo, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getNodesValidateBeforeCall(objectCode, name, code, tag, timeModifiedFrom, timeModifiedTo, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetNodesRequest { + private final String objectCode; + private String name; + private String code; + private String tag; + private String timeModifiedFrom; + private String timeModifiedTo; + + private APIgetNodesRequest(String objectCode) { + this.objectCode = objectCode; + } + + /** + * Set name + * @param name 名字,支持前缀搜索 (optional) + * @return APIgetNodesRequest + */ + public APIgetNodesRequest name(String name) { + this.name = name; + return this; + } + + /** + * Set code + * @param code 编号 (optional) + * @return APIgetNodesRequest + */ + public APIgetNodesRequest code(String code) { + this.code = code; + return this; + } + + /** + * Set tag + * @param tag 标签 (optional) + * @return APIgetNodesRequest + */ + public APIgetNodesRequest tag(String tag) { + this.tag = tag; + return this; + } + + /** + * Set timeModifiedFrom + * @param timeModifiedFrom 更新时间起点 (optional) + * @return APIgetNodesRequest + */ + public APIgetNodesRequest timeModifiedFrom(String timeModifiedFrom) { + this.timeModifiedFrom = timeModifiedFrom; + return this; + } + + /** + * Set timeModifiedTo + * @param timeModifiedTo 更新时间终点,默认至今 (optional) + * @return APIgetNodesRequest + */ + public APIgetNodesRequest timeModifiedTo(String timeModifiedTo) { + this.timeModifiedTo = timeModifiedTo; + return this; + } + + /** + * Build call for getNodes + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getNodesCall(objectCode, name, code, tag, timeModifiedFrom, timeModifiedTo, _callback); + } + + /** + * Execute getNodes request + * @return List<TreeNode> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public List execute() throws ApiException { + ApiResponse> localVarResp = getNodesWithHttpInfo(objectCode, name, code, tag, timeModifiedFrom, timeModifiedTo); + return localVarResp.getData(); + } + + /** + * Execute getNodes request with HTTP info returned + * @return ApiResponse<List<TreeNode>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse> executeWithHttpInfo() throws ApiException { + return getNodesWithHttpInfo(objectCode, name, code, tag, timeModifiedFrom, timeModifiedTo); + } + + /** + * Execute getNodes request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException { + return getNodesAsync(objectCode, name, code, tag, timeModifiedFrom, timeModifiedTo, _callback); + } + } + + /** + * 查询节点信息列表 + * + * @param objectCode 组织编码 (required) + * @return APIgetNodesRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetNodesRequest getNodes(String objectCode) { + return new APIgetNodesRequest(objectCode); + } + private okhttp3.Call getOrganizationCall(String id, String code, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/core-objects/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (code != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("code", code)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getOrganizationValidateBeforeCall(String id, String code, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getOrganization(Async)"); + } + + // verify the required parameter 'code' is set + if (code == null) { + throw new ApiException("Missing the required parameter 'code' when calling getOrganization(Async)"); + } + + return getOrganizationCall(id, code, _callback); + + } + + + private ApiResponse> getOrganizationWithHttpInfo(String id, String code) throws ApiException { + okhttp3.Call localVarCall = getOrganizationValidateBeforeCall(id, code, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getOrganizationAsync(String id, String code, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getOrganizationValidateBeforeCall(id, code, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetOrganizationRequest { + private final String id; + private final String code; + + private APIgetOrganizationRequest(String id, String code) { + this.id = id; + this.code = code; + } + + /** + * Build call for getOrganization + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getOrganizationCall(id, code, _callback); + } + + /** + * Execute getOrganization request + * @return List<GetOrganization200ResponseInner> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public List execute() throws ApiException { + ApiResponse> localVarResp = getOrganizationWithHttpInfo(id, code); + return localVarResp.getData(); + } + + /** + * Execute getOrganization request with HTTP info returned + * @return ApiResponse<List<GetOrganization200ResponseInner>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse> executeWithHttpInfo() throws ApiException { + return getOrganizationWithHttpInfo(id, code); + } + + /** + * Execute getOrganization request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException { + return getOrganizationAsync(id, code, _callback); + } + } + + /** + * 获取组织关系基本信息 + * + * @param id (required) + * @param code (required) + * @return APIgetOrganizationRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetOrganizationRequest getOrganization(String id, String code) { + return new APIgetOrganizationRequest(id, code); + } + private okhttp3.Call getOrganizationsCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/core-objects"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getOrganizationsValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getOrganizationsCall(_callback); + + } + + + private ApiResponse> getOrganizationsWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getOrganizationsValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getOrganizationsAsync(final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getOrganizationsValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetOrganizationsRequest { + + private APIgetOrganizationsRequest() { + } + + /** + * Build call for getOrganizations + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getOrganizationsCall(_callback); + } + + /** + * Execute getOrganizations request + * @return List<GetOrganizations200ResponseInner> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public List execute() throws ApiException { + ApiResponse> localVarResp = getOrganizationsWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Execute getOrganizations request with HTTP info returned + * @return ApiResponse<List<GetOrganizations200ResponseInner>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse> executeWithHttpInfo() throws ApiException { + return getOrganizationsWithHttpInfo(); + } + + /** + * Execute getOrganizations request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException { + return getOrganizationsAsync(_callback); + } + } + + /** + * 获取组织关系列表 + * + * @return APIgetOrganizationsRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetOrganizationsRequest getOrganizations() { + return new APIgetOrganizationsRequest(); + } + private okhttp3.Call updateMemberCall(String id, String contentType, UpdateMemberRequest updateMemberRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = updateMemberRequest; + + // create path and map variables + String localVarPath = "/v1/tree-users/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateMemberValidateBeforeCall(String id, String contentType, UpdateMemberRequest updateMemberRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling updateMember(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling updateMember(Async)"); + } + + return updateMemberCall(id, contentType, updateMemberRequest, _callback); + + } + + + private ApiResponse updateMemberWithHttpInfo(String id, String contentType, UpdateMemberRequest updateMemberRequest) throws ApiException { + okhttp3.Call localVarCall = updateMemberValidateBeforeCall(id, contentType, updateMemberRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call updateMemberAsync(String id, String contentType, UpdateMemberRequest updateMemberRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateMemberValidateBeforeCall(id, contentType, updateMemberRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIupdateMemberRequest { + private final String id; + private final String contentType; + private UpdateMemberRequest updateMemberRequest; + + private APIupdateMemberRequest(String id, String contentType) { + this.id = id; + this.contentType = contentType; + } + + /** + * Set updateMemberRequest + * @param updateMemberRequest (optional) + * @return APIupdateMemberRequest + */ + public APIupdateMemberRequest updateMemberRequest(UpdateMemberRequest updateMemberRequest) { + this.updateMemberRequest = updateMemberRequest; + return this; + } + + /** + * Build call for updateMember + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return updateMemberCall(id, contentType, updateMemberRequest, _callback); + } + + /** + * Execute updateMember request + * @return EmptyObject13 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public EmptyObject13 execute() throws ApiException { + ApiResponse localVarResp = updateMemberWithHttpInfo(id, contentType, updateMemberRequest); + return localVarResp.getData(); + } + + /** + * Execute updateMember request with HTTP info returned + * @return ApiResponse<EmptyObject13> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return updateMemberWithHttpInfo(id, contentType, updateMemberRequest); + } + + /** + * Execute updateMember request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return updateMemberAsync(id, contentType, updateMemberRequest, _callback); + } + } + + /** + * 更新用户节点 + * + * @param id (required) + * @param contentType (required) + * @return APIupdateMemberRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIupdateMemberRequest updateMember(String id, String contentType) { + return new APIupdateMemberRequest(id, contentType); + } + private okhttp3.Call updateNodeCall(String id, String contentType, UpdateNodeRequest updateNodeRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = updateNodeRequest; + + // create path and map variables + String localVarPath = "/v1/tree-nodes/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateNodeValidateBeforeCall(String id, String contentType, UpdateNodeRequest updateNodeRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling updateNode(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling updateNode(Async)"); + } + + return updateNodeCall(id, contentType, updateNodeRequest, _callback); + + } + + + private ApiResponse updateNodeWithHttpInfo(String id, String contentType, UpdateNodeRequest updateNodeRequest) throws ApiException { + okhttp3.Call localVarCall = updateNodeValidateBeforeCall(id, contentType, updateNodeRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call updateNodeAsync(String id, String contentType, UpdateNodeRequest updateNodeRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateNodeValidateBeforeCall(id, contentType, updateNodeRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIupdateNodeRequest { + private final String id; + private final String contentType; + private UpdateNodeRequest updateNodeRequest; + + private APIupdateNodeRequest(String id, String contentType) { + this.id = id; + this.contentType = contentType; + } + + /** + * Set updateNodeRequest + * @param updateNodeRequest (optional) + * @return APIupdateNodeRequest + */ + public APIupdateNodeRequest updateNodeRequest(UpdateNodeRequest updateNodeRequest) { + this.updateNodeRequest = updateNodeRequest; + return this; + } + + /** + * Build call for updateNode + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return updateNodeCall(id, contentType, updateNodeRequest, _callback); + } + + /** + * Execute updateNode request + * @return UpdateNode200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public UpdateNode200Response execute() throws ApiException { + ApiResponse localVarResp = updateNodeWithHttpInfo(id, contentType, updateNodeRequest); + return localVarResp.getData(); + } + + /** + * Execute updateNode request with HTTP info returned + * @return ApiResponse<UpdateNode200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return updateNodeWithHttpInfo(id, contentType, updateNodeRequest); + } + + /** + * Execute updateNode request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return updateNodeAsync(id, contentType, updateNodeRequest, _callback); + } + } + + /** + * 编辑节点 + * 移动节点修改parent_id + * @param id 更新树节点 (required) + * @param contentType (required) + * @return APIupdateNodeRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIupdateNodeRequest updateNode(String id, String contentType) { + return new APIupdateNodeRequest(id, contentType); + } + private okhttp3.Call updateOrganizationCall(String id, String contentType, UpdateOrganizationRequest updateOrganizationRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = updateOrganizationRequest; + + // create path and map variables + String localVarPath = "/v1/core-objects/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateOrganizationValidateBeforeCall(String id, String contentType, UpdateOrganizationRequest updateOrganizationRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling updateOrganization(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling updateOrganization(Async)"); + } + + return updateOrganizationCall(id, contentType, updateOrganizationRequest, _callback); + + } + + + private ApiResponse updateOrganizationWithHttpInfo(String id, String contentType, UpdateOrganizationRequest updateOrganizationRequest) throws ApiException { + okhttp3.Call localVarCall = updateOrganizationValidateBeforeCall(id, contentType, updateOrganizationRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call updateOrganizationAsync(String id, String contentType, UpdateOrganizationRequest updateOrganizationRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateOrganizationValidateBeforeCall(id, contentType, updateOrganizationRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIupdateOrganizationRequest { + private final String id; + private final String contentType; + private UpdateOrganizationRequest updateOrganizationRequest; + + private APIupdateOrganizationRequest(String id, String contentType) { + this.id = id; + this.contentType = contentType; + } + + /** + * Set updateOrganizationRequest + * @param updateOrganizationRequest (optional) + * @return APIupdateOrganizationRequest + */ + public APIupdateOrganizationRequest updateOrganizationRequest(UpdateOrganizationRequest updateOrganizationRequest) { + this.updateOrganizationRequest = updateOrganizationRequest; + return this; + } + + /** + * Build call for updateOrganization + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return updateOrganizationCall(id, contentType, updateOrganizationRequest, _callback); + } + + /** + * Execute updateOrganization request + * @return DeleteOrganization200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public DeleteOrganization200Response execute() throws ApiException { + ApiResponse localVarResp = updateOrganizationWithHttpInfo(id, contentType, updateOrganizationRequest); + return localVarResp.getData(); + } + + /** + * Execute updateOrganization request with HTTP info returned + * @return ApiResponse<DeleteOrganization200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return updateOrganizationWithHttpInfo(id, contentType, updateOrganizationRequest); + } + + /** + * Execute updateOrganization request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return updateOrganizationAsync(id, contentType, updateOrganizationRequest, _callback); + } + } + + /** + * 修改组织关系基本信息 + * + * @param id (required) + * @param contentType (required) + * @return APIupdateOrganizationRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIupdateOrganizationRequest updateOrganization(String id, String contentType) { + return new APIupdateOrganizationRequest(id, contentType); + } +} diff --git a/src/main/java/com/idmesh/api/PermissionApi.java b/src/main/java/com/idmesh/api/PermissionApi.java new file mode 100644 index 0000000..d8ceebd --- /dev/null +++ b/src/main/java/com/idmesh/api/PermissionApi.java @@ -0,0 +1,4818 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.api; + +import com.idmesh.ApiCallback; +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.ApiResponse; +import com.idmesh.Configuration; +import com.idmesh.Pair; +import com.idmesh.ProgressRequestBody; +import com.idmesh.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.idmesh.model.Au; +import com.idmesh.model.AuthUnit; +import com.idmesh.model.AuthorizeApplicationsRequest; +import com.idmesh.model.AuthzApp; +import com.idmesh.model.DeleteAuthUnitRulesRequest; +import com.idmesh.model.DeleteResourcesRequest; +import com.idmesh.model.EmptyObject10; +import com.idmesh.model.EmptyObject11; +import com.idmesh.model.EmptyObject12; +import com.idmesh.model.EmptyObject2; +import com.idmesh.model.EmptyObject3; +import com.idmesh.model.EmptyObject4; +import com.idmesh.model.EmptyObject5; +import com.idmesh.model.EmptyObject6; +import com.idmesh.model.EmptyObject7; +import com.idmesh.model.EmptyObject8; +import com.idmesh.model.EmptyObject9; +import com.idmesh.model.Get400Response; +import com.idmesh.model.GetAuthUnits200Response; +import com.idmesh.model.GetPrivileges200Response; +import com.idmesh.model.GetResource200Response; +import com.idmesh.model.GetResourceMembers200Response; +import com.idmesh.model.GetResourceSets200Response; +import com.idmesh.model.GetResources200Response; +import com.idmesh.model.ResourceSet; +import com.idmesh.model.ResourceSetMember; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class PermissionApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public PermissionApi() { + this(Configuration.getDefaultApiClient()); + } + + public PermissionApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + private okhttp3.Call authorizeApplicationsCall(String xTenantId, AuthorizeApplicationsRequest authorizeApplicationsRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = authorizeApplicationsRequest; + + // create path and map variables + String localVarPath = "/v1/batch/authz-apps"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (xTenantId != null) { + localVarHeaderParams.put("X-Tenant-Id", localVarApiClient.parameterToString(xTenantId)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call authorizeApplicationsValidateBeforeCall(String xTenantId, AuthorizeApplicationsRequest authorizeApplicationsRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'xTenantId' is set + if (xTenantId == null) { + throw new ApiException("Missing the required parameter 'xTenantId' when calling authorizeApplications(Async)"); + } + + return authorizeApplicationsCall(xTenantId, authorizeApplicationsRequest, _callback); + + } + + + private ApiResponse authorizeApplicationsWithHttpInfo(String xTenantId, AuthorizeApplicationsRequest authorizeApplicationsRequest) throws ApiException { + okhttp3.Call localVarCall = authorizeApplicationsValidateBeforeCall(xTenantId, authorizeApplicationsRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call authorizeApplicationsAsync(String xTenantId, AuthorizeApplicationsRequest authorizeApplicationsRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = authorizeApplicationsValidateBeforeCall(xTenantId, authorizeApplicationsRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIauthorizeApplicationsRequest { + private final String xTenantId; + private AuthorizeApplicationsRequest authorizeApplicationsRequest; + + private APIauthorizeApplicationsRequest(String xTenantId) { + this.xTenantId = xTenantId; + } + + /** + * Set authorizeApplicationsRequest + * @param authorizeApplicationsRequest (optional) + * @return APIauthorizeApplicationsRequest + */ + public APIauthorizeApplicationsRequest authorizeApplicationsRequest(AuthorizeApplicationsRequest authorizeApplicationsRequest) { + this.authorizeApplicationsRequest = authorizeApplicationsRequest; + return this; + } + + /** + * Build call for authorizeApplications + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return authorizeApplicationsCall(xTenantId, authorizeApplicationsRequest, _callback); + } + + /** + * Execute authorizeApplications request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = authorizeApplicationsWithHttpInfo(xTenantId, authorizeApplicationsRequest); + return localVarResp.getData(); + } + + /** + * Execute authorizeApplications request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return authorizeApplicationsWithHttpInfo(xTenantId, authorizeApplicationsRequest); + } + + /** + * Execute authorizeApplications request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return authorizeApplicationsAsync(xTenantId, authorizeApplicationsRequest, _callback); + } + } + + /** + * 授权应用 + * + * @param xTenantId 租户id (required) + * @return APIauthorizeApplicationsRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIauthorizeApplicationsRequest authorizeApplications(String xTenantId) { + return new APIauthorizeApplicationsRequest(xTenantId); + } + private okhttp3.Call createAuthUnitRulesCall(String contentType, EmptyObject2 emptyObject2, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = emptyObject2; + + // create path and map variables + String localVarPath = "/v1/batch/auth-unit-rules"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createAuthUnitRulesValidateBeforeCall(String contentType, EmptyObject2 emptyObject2, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling createAuthUnitRules(Async)"); + } + + return createAuthUnitRulesCall(contentType, emptyObject2, _callback); + + } + + + private ApiResponse createAuthUnitRulesWithHttpInfo(String contentType, EmptyObject2 emptyObject2) throws ApiException { + okhttp3.Call localVarCall = createAuthUnitRulesValidateBeforeCall(contentType, emptyObject2, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call createAuthUnitRulesAsync(String contentType, EmptyObject2 emptyObject2, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createAuthUnitRulesValidateBeforeCall(contentType, emptyObject2, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIcreateAuthUnitRulesRequest { + private final String contentType; + private EmptyObject2 emptyObject2; + + private APIcreateAuthUnitRulesRequest(String contentType) { + this.contentType = contentType; + } + + /** + * Set emptyObject2 + * @param emptyObject2 (optional) + * @return APIcreateAuthUnitRulesRequest + */ + public APIcreateAuthUnitRulesRequest emptyObject2(EmptyObject2 emptyObject2) { + this.emptyObject2 = emptyObject2; + return this; + } + + /** + * Build call for createAuthUnitRules + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return createAuthUnitRulesCall(contentType, emptyObject2, _callback); + } + + /** + * Execute createAuthUnitRules request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = createAuthUnitRulesWithHttpInfo(contentType, emptyObject2); + return localVarResp.getData(); + } + + /** + * Execute createAuthUnitRules request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return createAuthUnitRulesWithHttpInfo(contentType, emptyObject2); + } + + /** + * Execute createAuthUnitRules request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return createAuthUnitRulesAsync(contentType, emptyObject2, _callback); + } + } + + /** + * 批量创建授权规则 + * + * @param contentType (required) + * @return APIcreateAuthUnitRulesRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIcreateAuthUnitRulesRequest createAuthUnitRules(String contentType) { + return new APIcreateAuthUnitRulesRequest(contentType); + } + private okhttp3.Call createResourceCall(String contentType, EmptyObject5 emptyObject5, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = emptyObject5; + + // create path and map variables + String localVarPath = "/v1/resources"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createResourceValidateBeforeCall(String contentType, EmptyObject5 emptyObject5, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling createResource(Async)"); + } + + return createResourceCall(contentType, emptyObject5, _callback); + + } + + + private ApiResponse createResourceWithHttpInfo(String contentType, EmptyObject5 emptyObject5) throws ApiException { + okhttp3.Call localVarCall = createResourceValidateBeforeCall(contentType, emptyObject5, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call createResourceAsync(String contentType, EmptyObject5 emptyObject5, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createResourceValidateBeforeCall(contentType, emptyObject5, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIcreateResourceRequest { + private final String contentType; + private EmptyObject5 emptyObject5; + + private APIcreateResourceRequest(String contentType) { + this.contentType = contentType; + } + + /** + * Set emptyObject5 + * @param emptyObject5 (optional) + * @return APIcreateResourceRequest + */ + public APIcreateResourceRequest emptyObject5(EmptyObject5 emptyObject5) { + this.emptyObject5 = emptyObject5; + return this; + } + + /** + * Build call for createResource + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return createResourceCall(contentType, emptyObject5, _callback); + } + + /** + * Execute createResource request + * @return EmptyObject6 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public EmptyObject6 execute() throws ApiException { + ApiResponse localVarResp = createResourceWithHttpInfo(contentType, emptyObject5); + return localVarResp.getData(); + } + + /** + * Execute createResource request with HTTP info returned + * @return ApiResponse<EmptyObject6> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return createResourceWithHttpInfo(contentType, emptyObject5); + } + + /** + * Execute createResource request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return createResourceAsync(contentType, emptyObject5, _callback); + } + } + + /** + * 创建资源 + * + * @param contentType (required) + * @return APIcreateResourceRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIcreateResourceRequest createResource(String contentType) { + return new APIcreateResourceRequest(contentType); + } + private okhttp3.Call createResourceSetCall(String contentType, String xTenantId, EmptyObject8 emptyObject8, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = emptyObject8; + + // create path and map variables + String localVarPath = "/v1/resource-sets"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + if (xTenantId != null) { + localVarHeaderParams.put("X-Tenant-id", localVarApiClient.parameterToString(xTenantId)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createResourceSetValidateBeforeCall(String contentType, String xTenantId, EmptyObject8 emptyObject8, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling createResourceSet(Async)"); + } + + // verify the required parameter 'xTenantId' is set + if (xTenantId == null) { + throw new ApiException("Missing the required parameter 'xTenantId' when calling createResourceSet(Async)"); + } + + return createResourceSetCall(contentType, xTenantId, emptyObject8, _callback); + + } + + + private ApiResponse createResourceSetWithHttpInfo(String contentType, String xTenantId, EmptyObject8 emptyObject8) throws ApiException { + okhttp3.Call localVarCall = createResourceSetValidateBeforeCall(contentType, xTenantId, emptyObject8, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call createResourceSetAsync(String contentType, String xTenantId, EmptyObject8 emptyObject8, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createResourceSetValidateBeforeCall(contentType, xTenantId, emptyObject8, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIcreateResourceSetRequest { + private final String contentType; + private final String xTenantId; + private EmptyObject8 emptyObject8; + + private APIcreateResourceSetRequest(String contentType, String xTenantId) { + this.contentType = contentType; + this.xTenantId = xTenantId; + } + + /** + * Set emptyObject8 + * @param emptyObject8 (optional) + * @return APIcreateResourceSetRequest + */ + public APIcreateResourceSetRequest emptyObject8(EmptyObject8 emptyObject8) { + this.emptyObject8 = emptyObject8; + return this; + } + + /** + * Build call for createResourceSet + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return createResourceSetCall(contentType, xTenantId, emptyObject8, _callback); + } + + /** + * Execute createResourceSet request + * @return EmptyObject9 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public EmptyObject9 execute() throws ApiException { + ApiResponse localVarResp = createResourceSetWithHttpInfo(contentType, xTenantId, emptyObject8); + return localVarResp.getData(); + } + + /** + * Execute createResourceSet request with HTTP info returned + * @return ApiResponse<EmptyObject9> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return createResourceSetWithHttpInfo(contentType, xTenantId, emptyObject8); + } + + /** + * Execute createResourceSet request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return createResourceSetAsync(contentType, xTenantId, emptyObject8, _callback); + } + } + + /** + * 创建资源集合 + * + * @param contentType (required) + * @param xTenantId 租户id (required) + * @return APIcreateResourceSetRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIcreateResourceSetRequest createResourceSet(String contentType, String xTenantId) { + return new APIcreateResourceSetRequest(contentType, xTenantId); + } + private okhttp3.Call createResourceSetMemberCall(String id, String contentType, EmptyObject10 emptyObject10, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = emptyObject10; + + // create path and map variables + String localVarPath = "/v1/resource-sets/{id}/members" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createResourceSetMemberValidateBeforeCall(String id, String contentType, EmptyObject10 emptyObject10, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling createResourceSetMember(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling createResourceSetMember(Async)"); + } + + return createResourceSetMemberCall(id, contentType, emptyObject10, _callback); + + } + + + private ApiResponse createResourceSetMemberWithHttpInfo(String id, String contentType, EmptyObject10 emptyObject10) throws ApiException { + okhttp3.Call localVarCall = createResourceSetMemberValidateBeforeCall(id, contentType, emptyObject10, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call createResourceSetMemberAsync(String id, String contentType, EmptyObject10 emptyObject10, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createResourceSetMemberValidateBeforeCall(id, contentType, emptyObject10, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIcreateResourceSetMemberRequest { + private final String id; + private final String contentType; + private EmptyObject10 emptyObject10; + + private APIcreateResourceSetMemberRequest(String id, String contentType) { + this.id = id; + this.contentType = contentType; + } + + /** + * Set emptyObject10 + * @param emptyObject10 (optional) + * @return APIcreateResourceSetMemberRequest + */ + public APIcreateResourceSetMemberRequest emptyObject10(EmptyObject10 emptyObject10) { + this.emptyObject10 = emptyObject10; + return this; + } + + /** + * Build call for createResourceSetMember + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return createResourceSetMemberCall(id, contentType, emptyObject10, _callback); + } + + /** + * Execute createResourceSetMember request + * @return EmptyObject11 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public EmptyObject11 execute() throws ApiException { + ApiResponse localVarResp = createResourceSetMemberWithHttpInfo(id, contentType, emptyObject10); + return localVarResp.getData(); + } + + /** + * Execute createResourceSetMember request with HTTP info returned + * @return ApiResponse<EmptyObject11> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return createResourceSetMemberWithHttpInfo(id, contentType, emptyObject10); + } + + /** + * Execute createResourceSetMember request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return createResourceSetMemberAsync(id, contentType, emptyObject10, _callback); + } + } + + /** + * 创建资源集合成员 + * + * @param id 集合id (required) + * @param contentType (required) + * @return APIcreateResourceSetMemberRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIcreateResourceSetMemberRequest createResourceSetMember(String id, String contentType) { + return new APIcreateResourceSetMemberRequest(id, contentType); + } + private okhttp3.Call deleteAuthUnitRulesCall(String contentType, DeleteAuthUnitRulesRequest deleteAuthUnitRulesRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = deleteAuthUnitRulesRequest; + + // create path and map variables + String localVarPath = "/v1/batch/auth-unit-rules"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteAuthUnitRulesValidateBeforeCall(String contentType, DeleteAuthUnitRulesRequest deleteAuthUnitRulesRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling deleteAuthUnitRules(Async)"); + } + + return deleteAuthUnitRulesCall(contentType, deleteAuthUnitRulesRequest, _callback); + + } + + + private ApiResponse deleteAuthUnitRulesWithHttpInfo(String contentType, DeleteAuthUnitRulesRequest deleteAuthUnitRulesRequest) throws ApiException { + okhttp3.Call localVarCall = deleteAuthUnitRulesValidateBeforeCall(contentType, deleteAuthUnitRulesRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call deleteAuthUnitRulesAsync(String contentType, DeleteAuthUnitRulesRequest deleteAuthUnitRulesRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteAuthUnitRulesValidateBeforeCall(contentType, deleteAuthUnitRulesRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIdeleteAuthUnitRulesRequest { + private final String contentType; + private DeleteAuthUnitRulesRequest deleteAuthUnitRulesRequest; + + private APIdeleteAuthUnitRulesRequest(String contentType) { + this.contentType = contentType; + } + + /** + * Set deleteAuthUnitRulesRequest + * @param deleteAuthUnitRulesRequest (optional) + * @return APIdeleteAuthUnitRulesRequest + */ + public APIdeleteAuthUnitRulesRequest deleteAuthUnitRulesRequest(DeleteAuthUnitRulesRequest deleteAuthUnitRulesRequest) { + this.deleteAuthUnitRulesRequest = deleteAuthUnitRulesRequest; + return this; + } + + /** + * Build call for deleteAuthUnitRules + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return deleteAuthUnitRulesCall(contentType, deleteAuthUnitRulesRequest, _callback); + } + + /** + * Execute deleteAuthUnitRules request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = deleteAuthUnitRulesWithHttpInfo(contentType, deleteAuthUnitRulesRequest); + return localVarResp.getData(); + } + + /** + * Execute deleteAuthUnitRules request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteAuthUnitRulesWithHttpInfo(contentType, deleteAuthUnitRulesRequest); + } + + /** + * Execute deleteAuthUnitRules request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteAuthUnitRulesAsync(contentType, deleteAuthUnitRulesRequest, _callback); + } + } + + /** + * 批量删除授权规则 + * + * @param contentType (required) + * @return APIdeleteAuthUnitRulesRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIdeleteAuthUnitRulesRequest deleteAuthUnitRules(String contentType) { + return new APIdeleteAuthUnitRulesRequest(contentType); + } + private okhttp3.Call deleteResourcesCall(String contentType, DeleteResourcesRequest deleteResourcesRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = deleteResourcesRequest; + + // create path and map variables + String localVarPath = "/v1/batch/resources"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteResourcesValidateBeforeCall(String contentType, DeleteResourcesRequest deleteResourcesRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling deleteResources(Async)"); + } + + return deleteResourcesCall(contentType, deleteResourcesRequest, _callback); + + } + + + private ApiResponse deleteResourcesWithHttpInfo(String contentType, DeleteResourcesRequest deleteResourcesRequest) throws ApiException { + okhttp3.Call localVarCall = deleteResourcesValidateBeforeCall(contentType, deleteResourcesRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call deleteResourcesAsync(String contentType, DeleteResourcesRequest deleteResourcesRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteResourcesValidateBeforeCall(contentType, deleteResourcesRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIdeleteResourcesRequest { + private final String contentType; + private DeleteResourcesRequest deleteResourcesRequest; + + private APIdeleteResourcesRequest(String contentType) { + this.contentType = contentType; + } + + /** + * Set deleteResourcesRequest + * @param deleteResourcesRequest (optional) + * @return APIdeleteResourcesRequest + */ + public APIdeleteResourcesRequest deleteResourcesRequest(DeleteResourcesRequest deleteResourcesRequest) { + this.deleteResourcesRequest = deleteResourcesRequest; + return this; + } + + /** + * Build call for deleteResources + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return deleteResourcesCall(contentType, deleteResourcesRequest, _callback); + } + + /** + * Execute deleteResources request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = deleteResourcesWithHttpInfo(contentType, deleteResourcesRequest); + return localVarResp.getData(); + } + + /** + * Execute deleteResources request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteResourcesWithHttpInfo(contentType, deleteResourcesRequest); + } + + /** + * Execute deleteResources request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteResourcesAsync(contentType, deleteResourcesRequest, _callback); + } + } + + /** + * 删除资源 + * + * @param contentType (required) + * @return APIdeleteResourcesRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIdeleteResourcesRequest deleteResources(String contentType) { + return new APIdeleteResourcesRequest(contentType); + } + private okhttp3.Call getAuthUnitCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/auth-units/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAuthUnitValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getAuthUnit(Async)"); + } + + return getAuthUnitCall(id, _callback); + + } + + + private ApiResponse getAuthUnitWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getAuthUnitValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getAuthUnitAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAuthUnitValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetAuthUnitRequest { + private final String id; + + private APIgetAuthUnitRequest(String id) { + this.id = id; + } + + /** + * Build call for getAuthUnit + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getAuthUnitCall(id, _callback); + } + + /** + * Execute getAuthUnit request + * @return AuthUnit + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public AuthUnit execute() throws ApiException { + ApiResponse localVarResp = getAuthUnitWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Execute getAuthUnit request with HTTP info returned + * @return ApiResponse<AuthUnit> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getAuthUnitWithHttpInfo(id); + } + + /** + * Execute getAuthUnit request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getAuthUnitAsync(id, _callback); + } + } + + /** + * 按 ID 查询授权单元 + * + * @param id au id (required) + * @return APIgetAuthUnitRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetAuthUnitRequest getAuthUnit(String id) { + return new APIgetAuthUnitRequest(id); + } + private okhttp3.Call getAuthUnitsCall(String identityId, String identityType, String identityName, String pageNum, String pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/auth-units"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (identityId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("identity_id", identityId)); + } + + if (identityType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("identity_type", identityType)); + } + + if (identityName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("identity_name", identityName)); + } + + if (pageNum != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_num", pageNum)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); + } + + if (pageSort != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_sort", pageSort)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAuthUnitsValidateBeforeCall(String identityId, String identityType, String identityName, String pageNum, String pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + return getAuthUnitsCall(identityId, identityType, identityName, pageNum, pageSize, pageSort, _callback); + + } + + + private ApiResponse getAuthUnitsWithHttpInfo(String identityId, String identityType, String identityName, String pageNum, String pageSize, String pageSort) throws ApiException { + okhttp3.Call localVarCall = getAuthUnitsValidateBeforeCall(identityId, identityType, identityName, pageNum, pageSize, pageSort, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getAuthUnitsAsync(String identityId, String identityType, String identityName, String pageNum, String pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAuthUnitsValidateBeforeCall(identityId, identityType, identityName, pageNum, pageSize, pageSort, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetAuthUnitsRequest { + private String identityId; + private String identityType; + private String identityName; + private String pageNum; + private String pageSize; + private String pageSort; + + private APIgetAuthUnitsRequest() { + } + + /** + * Set identityId + * @param identityId 主体id (optional) + * @return APIgetAuthUnitsRequest + */ + public APIgetAuthUnitsRequest identityId(String identityId) { + this.identityId = identityId; + return this; + } + + /** + * Set identityType + * @param identityType 主体类型 (optional) + * @return APIgetAuthUnitsRequest + */ + public APIgetAuthUnitsRequest identityType(String identityType) { + this.identityType = identityType; + return this; + } + + /** + * Set identityName + * @param identityName 主体名称 (optional) + * @return APIgetAuthUnitsRequest + */ + public APIgetAuthUnitsRequest identityName(String identityName) { + this.identityName = identityName; + return this; + } + + /** + * Set pageNum + * @param pageNum 起始页,默认1 (optional) + * @return APIgetAuthUnitsRequest + */ + public APIgetAuthUnitsRequest pageNum(String pageNum) { + this.pageNum = pageNum; + return this; + } + + /** + * Set pageSize + * @param pageSize 页大小,默认20 (optional) + * @return APIgetAuthUnitsRequest + */ + public APIgetAuthUnitsRequest pageSize(String pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageSort + * @param pageSort 排序方式,格式:字段[排序方式] (optional) + * @return APIgetAuthUnitsRequest + */ + public APIgetAuthUnitsRequest pageSort(String pageSort) { + this.pageSort = pageSort; + return this; + } + + /** + * Build call for getAuthUnits + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getAuthUnitsCall(identityId, identityType, identityName, pageNum, pageSize, pageSort, _callback); + } + + /** + * Execute getAuthUnits request + * @return GetAuthUnits200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public GetAuthUnits200Response execute() throws ApiException { + ApiResponse localVarResp = getAuthUnitsWithHttpInfo(identityId, identityType, identityName, pageNum, pageSize, pageSort); + return localVarResp.getData(); + } + + /** + * Execute getAuthUnits request with HTTP info returned + * @return ApiResponse<GetAuthUnits200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getAuthUnitsWithHttpInfo(identityId, identityType, identityName, pageNum, pageSize, pageSort); + } + + /** + * Execute getAuthUnits request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getAuthUnitsAsync(identityId, identityType, identityName, pageNum, pageSize, pageSort, _callback); + } + } + + /** + * 获取授权单元列表 + * + * @return APIgetAuthUnitsRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetAuthUnitsRequest getAuthUnits() { + return new APIgetAuthUnitsRequest(); + } + private okhttp3.Call getAuthUnitsRulesCall(String rid, String applicationId, String type, String code, String selfOnly, String resourceId, String resourceMatchAllResources, String resourceMatchAllActions, String resourceSetId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/auth-units/{rid}/rules" + .replace("{" + "rid" + "}", localVarApiClient.escapeString(rid.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (applicationId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("application_id", applicationId)); + } + + if (type != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); + } + + if (code != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("code", code)); + } + + if (selfOnly != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("self_only", selfOnly)); + } + + if (resourceId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("resource_id", resourceId)); + } + + if (resourceMatchAllResources != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("resource_match_all_resources", resourceMatchAllResources)); + } + + if (resourceMatchAllActions != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("resource_match_all_actions", resourceMatchAllActions)); + } + + if (resourceSetId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("resource_set_id", resourceSetId)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAuthUnitsRulesValidateBeforeCall(String rid, String applicationId, String type, String code, String selfOnly, String resourceId, String resourceMatchAllResources, String resourceMatchAllActions, String resourceSetId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'rid' is set + if (rid == null) { + throw new ApiException("Missing the required parameter 'rid' when calling getAuthUnitsRules(Async)"); + } + + return getAuthUnitsRulesCall(rid, applicationId, type, code, selfOnly, resourceId, resourceMatchAllResources, resourceMatchAllActions, resourceSetId, _callback); + + } + + + private ApiResponse> getAuthUnitsRulesWithHttpInfo(String rid, String applicationId, String type, String code, String selfOnly, String resourceId, String resourceMatchAllResources, String resourceMatchAllActions, String resourceSetId) throws ApiException { + okhttp3.Call localVarCall = getAuthUnitsRulesValidateBeforeCall(rid, applicationId, type, code, selfOnly, resourceId, resourceMatchAllResources, resourceMatchAllActions, resourceSetId, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getAuthUnitsRulesAsync(String rid, String applicationId, String type, String code, String selfOnly, String resourceId, String resourceMatchAllResources, String resourceMatchAllActions, String resourceSetId, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getAuthUnitsRulesValidateBeforeCall(rid, applicationId, type, code, selfOnly, resourceId, resourceMatchAllResources, resourceMatchAllActions, resourceSetId, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetAuthUnitsRulesRequest { + private final String rid; + private String applicationId; + private String type; + private String code; + private String selfOnly; + private String resourceId; + private String resourceMatchAllResources; + private String resourceMatchAllActions; + private String resourceSetId; + + private APIgetAuthUnitsRulesRequest(String rid) { + this.rid = rid; + } + + /** + * Set applicationId + * @param applicationId 应用id (optional) + * @return APIgetAuthUnitsRulesRequest + */ + public APIgetAuthUnitsRulesRequest applicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Set type + * @param type 规则类型 (optional) + * @return APIgetAuthUnitsRulesRequest + */ + public APIgetAuthUnitsRulesRequest type(String type) { + this.type = type; + return this; + } + + /** + * Set code + * @param code 资源或资源集合code (optional) + * @return APIgetAuthUnitsRulesRequest + */ + public APIgetAuthUnitsRulesRequest code(String code) { + this.code = code; + return this; + } + + /** + * Set selfOnly + * @param selfOnly 只查询指定主体下的授权 (optional) + * @return APIgetAuthUnitsRulesRequest + */ + public APIgetAuthUnitsRulesRequest selfOnly(String selfOnly) { + this.selfOnly = selfOnly; + return this; + } + + /** + * Set resourceId + * @param resourceId 资源id,当type=api,ui,data时有效 (optional) + * @return APIgetAuthUnitsRulesRequest + */ + public APIgetAuthUnitsRulesRequest resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Set resourceMatchAllResources + * @param resourceMatchAllResources 匹配所有资源,当type=res时有效 (optional) + * @return APIgetAuthUnitsRulesRequest + */ + public APIgetAuthUnitsRulesRequest resourceMatchAllResources(String resourceMatchAllResources) { + this.resourceMatchAllResources = resourceMatchAllResources; + return this; + } + + /** + * Set resourceMatchAllActions + * @param resourceMatchAllActions 匹配所有资源操作,当type=res时有效 (optional) + * @return APIgetAuthUnitsRulesRequest + */ + public APIgetAuthUnitsRulesRequest resourceMatchAllActions(String resourceMatchAllActions) { + this.resourceMatchAllActions = resourceMatchAllActions; + return this; + } + + /** + * Set resourceSetId + * @param resourceSetId 资源集合id,当type=res_set (optional) + * @return APIgetAuthUnitsRulesRequest + */ + public APIgetAuthUnitsRulesRequest resourceSetId(String resourceSetId) { + this.resourceSetId = resourceSetId; + return this; + } + + /** + * Build call for getAuthUnitsRules + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getAuthUnitsRulesCall(rid, applicationId, type, code, selfOnly, resourceId, resourceMatchAllResources, resourceMatchAllActions, resourceSetId, _callback); + } + + /** + * Execute getAuthUnitsRules request + * @return List<Au> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public List execute() throws ApiException { + ApiResponse> localVarResp = getAuthUnitsRulesWithHttpInfo(rid, applicationId, type, code, selfOnly, resourceId, resourceMatchAllResources, resourceMatchAllActions, resourceSetId); + return localVarResp.getData(); + } + + /** + * Execute getAuthUnitsRules request with HTTP info returned + * @return ApiResponse<List<Au>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse> executeWithHttpInfo() throws ApiException { + return getAuthUnitsRulesWithHttpInfo(rid, applicationId, type, code, selfOnly, resourceId, resourceMatchAllResources, resourceMatchAllActions, resourceSetId); + } + + /** + * Execute getAuthUnitsRules request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException { + return getAuthUnitsRulesAsync(rid, applicationId, type, code, selfOnly, resourceId, resourceMatchAllResources, resourceMatchAllActions, resourceSetId, _callback); + } + } + + /** + * 查询授权单元下的授权规则列表 + * + * @param rid AU id (required) + * @return APIgetAuthUnitsRulesRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetAuthUnitsRulesRequest getAuthUnitsRules(String rid) { + return new APIgetAuthUnitsRulesRequest(rid); + } + private okhttp3.Call getPrivilegesCall(String applicationId, String identityId, String identityType, String identityName, String objectType, String objectCode, String affect, String pageNum, String pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/privileges"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (identityId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("identity_id", identityId)); + } + + if (identityType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("identity_type", identityType)); + } + + if (identityName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("identity_name", identityName)); + } + + if (applicationId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("application_id", applicationId)); + } + + if (objectType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("object_type", objectType)); + } + + if (objectCode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("object_code", objectCode)); + } + + if (affect != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("affect", affect)); + } + + if (pageNum != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_num", pageNum)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); + } + + if (pageSort != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_sort", pageSort)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getPrivilegesValidateBeforeCall(String applicationId, String identityId, String identityType, String identityName, String objectType, String objectCode, String affect, String pageNum, String pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'applicationId' is set + if (applicationId == null) { + throw new ApiException("Missing the required parameter 'applicationId' when calling getPrivileges(Async)"); + } + + return getPrivilegesCall(applicationId, identityId, identityType, identityName, objectType, objectCode, affect, pageNum, pageSize, pageSort, _callback); + + } + + + private ApiResponse getPrivilegesWithHttpInfo(String applicationId, String identityId, String identityType, String identityName, String objectType, String objectCode, String affect, String pageNum, String pageSize, String pageSort) throws ApiException { + okhttp3.Call localVarCall = getPrivilegesValidateBeforeCall(applicationId, identityId, identityType, identityName, objectType, objectCode, affect, pageNum, pageSize, pageSort, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getPrivilegesAsync(String applicationId, String identityId, String identityType, String identityName, String objectType, String objectCode, String affect, String pageNum, String pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getPrivilegesValidateBeforeCall(applicationId, identityId, identityType, identityName, objectType, objectCode, affect, pageNum, pageSize, pageSort, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetPrivilegesRequest { + private final String applicationId; + private String identityId; + private String identityType; + private String identityName; + private String objectType; + private String objectCode; + private String affect; + private String pageNum; + private String pageSize; + private String pageSort; + + private APIgetPrivilegesRequest(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Set identityId + * @param identityId 主体id (optional) + * @return APIgetPrivilegesRequest + */ + public APIgetPrivilegesRequest identityId(String identityId) { + this.identityId = identityId; + return this; + } + + /** + * Set identityType + * @param identityType 主体类型 (optional) + * @return APIgetPrivilegesRequest + */ + public APIgetPrivilegesRequest identityType(String identityType) { + this.identityType = identityType; + return this; + } + + /** + * Set identityName + * @param identityName 主体名称 (optional) + * @return APIgetPrivilegesRequest + */ + public APIgetPrivilegesRequest identityName(String identityName) { + this.identityName = identityName; + return this; + } + + /** + * Set objectType + * @param objectType 对象类型(可选值: data, api, ui, res_set, app) (optional) + * @return APIgetPrivilegesRequest + */ + public APIgetPrivilegesRequest objectType(String objectType) { + this.objectType = objectType; + return this; + } + + /** + * Set objectCode + * @param objectCode 对象代码 (optional) + * @return APIgetPrivilegesRequest + */ + public APIgetPrivilegesRequest objectCode(String objectCode) { + this.objectCode = objectCode; + return this; + } + + /** + * Set affect + * @param affect 作用方式(affect,deny) (optional) + * @return APIgetPrivilegesRequest + */ + public APIgetPrivilegesRequest affect(String affect) { + this.affect = affect; + return this; + } + + /** + * Set pageNum + * @param pageNum 起始页,默认1 (optional) + * @return APIgetPrivilegesRequest + */ + public APIgetPrivilegesRequest pageNum(String pageNum) { + this.pageNum = pageNum; + return this; + } + + /** + * Set pageSize + * @param pageSize 页大小,默认20 (optional) + * @return APIgetPrivilegesRequest + */ + public APIgetPrivilegesRequest pageSize(String pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageSort + * @param pageSort 排序方式,格式:字段[排序方式] (optional) + * @return APIgetPrivilegesRequest + */ + public APIgetPrivilegesRequest pageSort(String pageSort) { + this.pageSort = pageSort; + return this; + } + + /** + * Build call for getPrivileges + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getPrivilegesCall(applicationId, identityId, identityType, identityName, objectType, objectCode, affect, pageNum, pageSize, pageSort, _callback); + } + + /** + * Execute getPrivileges request + * @return GetPrivileges200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public GetPrivileges200Response execute() throws ApiException { + ApiResponse localVarResp = getPrivilegesWithHttpInfo(applicationId, identityId, identityType, identityName, objectType, objectCode, affect, pageNum, pageSize, pageSort); + return localVarResp.getData(); + } + + /** + * Execute getPrivileges request with HTTP info returned + * @return ApiResponse<GetPrivileges200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getPrivilegesWithHttpInfo(applicationId, identityId, identityType, identityName, objectType, objectCode, affect, pageNum, pageSize, pageSort); + } + + /** + * Execute getPrivileges request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getPrivilegesAsync(applicationId, identityId, identityType, identityName, objectType, objectCode, affect, pageNum, pageSize, pageSort, _callback); + } + } + + /** + * 获取权限列表 + * + * @param applicationId 应用id (required) + * @return APIgetPrivilegesRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetPrivilegesRequest getPrivileges(String applicationId) { + return new APIgetPrivilegesRequest(applicationId); + } + private okhttp3.Call getResourceCall(String id, String applicationId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/resources/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (applicationId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("application_id", applicationId)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getResourceValidateBeforeCall(String id, String applicationId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getResource(Async)"); + } + + // verify the required parameter 'applicationId' is set + if (applicationId == null) { + throw new ApiException("Missing the required parameter 'applicationId' when calling getResource(Async)"); + } + + return getResourceCall(id, applicationId, _callback); + + } + + + private ApiResponse getResourceWithHttpInfo(String id, String applicationId) throws ApiException { + okhttp3.Call localVarCall = getResourceValidateBeforeCall(id, applicationId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getResourceAsync(String id, String applicationId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getResourceValidateBeforeCall(id, applicationId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetResourceRequest { + private final String id; + private final String applicationId; + + private APIgetResourceRequest(String id, String applicationId) { + this.id = id; + this.applicationId = applicationId; + } + + /** + * Build call for getResource + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getResourceCall(id, applicationId, _callback); + } + + /** + * Execute getResource request + * @return GetResource200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public GetResource200Response execute() throws ApiException { + ApiResponse localVarResp = getResourceWithHttpInfo(id, applicationId); + return localVarResp.getData(); + } + + /** + * Execute getResource request with HTTP info returned + * @return ApiResponse<GetResource200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getResourceWithHttpInfo(id, applicationId); + } + + /** + * Execute getResource request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getResourceAsync(id, applicationId, _callback); + } + } + + /** + * 按 ID 查询资源 + * + * @param id 资源id (required) + * @param applicationId 应用id (required) + * @return APIgetResourceRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetResourceRequest getResource(String id, String applicationId) { + return new APIgetResourceRequest(id, applicationId); + } + private okhttp3.Call getResourceMemberCall(String sid, String mid, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/resource-sets/{sid}/members/{mid}" + .replace("{" + "sid" + "}", localVarApiClient.escapeString(sid.toString())) + .replace("{" + "mid" + "}", localVarApiClient.escapeString(mid.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getResourceMemberValidateBeforeCall(String sid, String mid, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'sid' is set + if (sid == null) { + throw new ApiException("Missing the required parameter 'sid' when calling getResourceMember(Async)"); + } + + // verify the required parameter 'mid' is set + if (mid == null) { + throw new ApiException("Missing the required parameter 'mid' when calling getResourceMember(Async)"); + } + + return getResourceMemberCall(sid, mid, _callback); + + } + + + private ApiResponse getResourceMemberWithHttpInfo(String sid, String mid) throws ApiException { + okhttp3.Call localVarCall = getResourceMemberValidateBeforeCall(sid, mid, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getResourceMemberAsync(String sid, String mid, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getResourceMemberValidateBeforeCall(sid, mid, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetResourceMemberRequest { + private final String sid; + private final String mid; + + private APIgetResourceMemberRequest(String sid, String mid) { + this.sid = sid; + this.mid = mid; + } + + /** + * Build call for getResourceMember + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getResourceMemberCall(sid, mid, _callback); + } + + /** + * Execute getResourceMember request + * @return ResourceSetMember + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ResourceSetMember execute() throws ApiException { + ApiResponse localVarResp = getResourceMemberWithHttpInfo(sid, mid); + return localVarResp.getData(); + } + + /** + * Execute getResourceMember request with HTTP info returned + * @return ApiResponse<ResourceSetMember> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getResourceMemberWithHttpInfo(sid, mid); + } + + /** + * Execute getResourceMember request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getResourceMemberAsync(sid, mid, _callback); + } + } + + /** + * 按 ID 查询资源集合成员 + * + * @param sid 资源集合id (required) + * @param mid 成员id (required) + * @return APIgetResourceMemberRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetResourceMemberRequest getResourceMember(String sid, String mid) { + return new APIgetResourceMemberRequest(sid, mid); + } + private okhttp3.Call getResourceMembersCall(String sid, String resourceCode, String resourceType, String pageNum, String pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/resource-sets/{sid}/members" + .replace("{" + "sid" + "}", localVarApiClient.escapeString(sid.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (resourceCode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("resource_code", resourceCode)); + } + + if (resourceType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("resource_type", resourceType)); + } + + if (pageNum != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_num", pageNum)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); + } + + if (pageSort != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_sort", pageSort)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getResourceMembersValidateBeforeCall(String sid, String resourceCode, String resourceType, String pageNum, String pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'sid' is set + if (sid == null) { + throw new ApiException("Missing the required parameter 'sid' when calling getResourceMembers(Async)"); + } + + return getResourceMembersCall(sid, resourceCode, resourceType, pageNum, pageSize, pageSort, _callback); + + } + + + private ApiResponse getResourceMembersWithHttpInfo(String sid, String resourceCode, String resourceType, String pageNum, String pageSize, String pageSort) throws ApiException { + okhttp3.Call localVarCall = getResourceMembersValidateBeforeCall(sid, resourceCode, resourceType, pageNum, pageSize, pageSort, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getResourceMembersAsync(String sid, String resourceCode, String resourceType, String pageNum, String pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getResourceMembersValidateBeforeCall(sid, resourceCode, resourceType, pageNum, pageSize, pageSort, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetResourceMembersRequest { + private final String sid; + private String resourceCode; + private String resourceType; + private String pageNum; + private String pageSize; + private String pageSort; + + private APIgetResourceMembersRequest(String sid) { + this.sid = sid; + } + + /** + * Set resourceCode + * @param resourceCode 资源代码 (optional) + * @return APIgetResourceMembersRequest + */ + public APIgetResourceMembersRequest resourceCode(String resourceCode) { + this.resourceCode = resourceCode; + return this; + } + + /** + * Set resourceType + * @param resourceType 资源类型 (optional) + * @return APIgetResourceMembersRequest + */ + public APIgetResourceMembersRequest resourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Set pageNum + * @param pageNum 起始页,默认1 (optional) + * @return APIgetResourceMembersRequest + */ + public APIgetResourceMembersRequest pageNum(String pageNum) { + this.pageNum = pageNum; + return this; + } + + /** + * Set pageSize + * @param pageSize 页大小,默认20 (optional) + * @return APIgetResourceMembersRequest + */ + public APIgetResourceMembersRequest pageSize(String pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageSort + * @param pageSort 排序方式,格式:字段[排序方式] (optional) + * @return APIgetResourceMembersRequest + */ + public APIgetResourceMembersRequest pageSort(String pageSort) { + this.pageSort = pageSort; + return this; + } + + /** + * Build call for getResourceMembers + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getResourceMembersCall(sid, resourceCode, resourceType, pageNum, pageSize, pageSort, _callback); + } + + /** + * Execute getResourceMembers request + * @return GetResourceMembers200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public GetResourceMembers200Response execute() throws ApiException { + ApiResponse localVarResp = getResourceMembersWithHttpInfo(sid, resourceCode, resourceType, pageNum, pageSize, pageSort); + return localVarResp.getData(); + } + + /** + * Execute getResourceMembers request with HTTP info returned + * @return ApiResponse<GetResourceMembers200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getResourceMembersWithHttpInfo(sid, resourceCode, resourceType, pageNum, pageSize, pageSort); + } + + /** + * Execute getResourceMembers request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getResourceMembersAsync(sid, resourceCode, resourceType, pageNum, pageSize, pageSort, _callback); + } + } + + /** + * 查询资源集合成员列表 + * + * @param sid 资源集合id (required) + * @return APIgetResourceMembersRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetResourceMembersRequest getResourceMembers(String sid) { + return new APIgetResourceMembersRequest(sid); + } + private okhttp3.Call getResourceSetCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/resource-sets/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getResourceSetValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getResourceSet(Async)"); + } + + return getResourceSetCall(id, _callback); + + } + + + private ApiResponse getResourceSetWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getResourceSetValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getResourceSetAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getResourceSetValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetResourceSetRequest { + private final String id; + + private APIgetResourceSetRequest(String id) { + this.id = id; + } + + /** + * Build call for getResourceSet + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getResourceSetCall(id, _callback); + } + + /** + * Execute getResourceSet request + * @return ResourceSet + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ResourceSet execute() throws ApiException { + ApiResponse localVarResp = getResourceSetWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Execute getResourceSet request with HTTP info returned + * @return ApiResponse<ResourceSet> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getResourceSetWithHttpInfo(id); + } + + /** + * Execute getResourceSet request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getResourceSetAsync(id, _callback); + } + } + + /** + * 按 ID 查询资源集合 + * + * @param id 资源集合id (required) + * @return APIgetResourceSetRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetResourceSetRequest getResourceSet(String id) { + return new APIgetResourceSetRequest(id); + } + private okhttp3.Call getResourceSetsCall(String applicationId, String code, String includeGlobal, String pageNum, String pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/resource-sets"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (code != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("code", code)); + } + + if (applicationId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("application_id", applicationId)); + } + + if (includeGlobal != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("include_global", includeGlobal)); + } + + if (pageNum != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_num", pageNum)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); + } + + if (pageSort != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_sort", pageSort)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getResourceSetsValidateBeforeCall(String applicationId, String code, String includeGlobal, String pageNum, String pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'applicationId' is set + if (applicationId == null) { + throw new ApiException("Missing the required parameter 'applicationId' when calling getResourceSets(Async)"); + } + + return getResourceSetsCall(applicationId, code, includeGlobal, pageNum, pageSize, pageSort, _callback); + + } + + + private ApiResponse getResourceSetsWithHttpInfo(String applicationId, String code, String includeGlobal, String pageNum, String pageSize, String pageSort) throws ApiException { + okhttp3.Call localVarCall = getResourceSetsValidateBeforeCall(applicationId, code, includeGlobal, pageNum, pageSize, pageSort, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getResourceSetsAsync(String applicationId, String code, String includeGlobal, String pageNum, String pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getResourceSetsValidateBeforeCall(applicationId, code, includeGlobal, pageNum, pageSize, pageSort, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetResourceSetsRequest { + private final String applicationId; + private String code; + private String includeGlobal; + private String pageNum; + private String pageSize; + private String pageSort; + + private APIgetResourceSetsRequest(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Set code + * @param code 集合代码 (optional) + * @return APIgetResourceSetsRequest + */ + public APIgetResourceSetsRequest code(String code) { + this.code = code; + return this; + } + + /** + * Set includeGlobal + * @param includeGlobal 查询是否包含全局资源集合 (optional) + * @return APIgetResourceSetsRequest + */ + public APIgetResourceSetsRequest includeGlobal(String includeGlobal) { + this.includeGlobal = includeGlobal; + return this; + } + + /** + * Set pageNum + * @param pageNum 起始页,默认1 (optional) + * @return APIgetResourceSetsRequest + */ + public APIgetResourceSetsRequest pageNum(String pageNum) { + this.pageNum = pageNum; + return this; + } + + /** + * Set pageSize + * @param pageSize 页大小,默认20 (optional) + * @return APIgetResourceSetsRequest + */ + public APIgetResourceSetsRequest pageSize(String pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageSort + * @param pageSort 排序方式,格式:字段[排序方式] (optional) + * @return APIgetResourceSetsRequest + */ + public APIgetResourceSetsRequest pageSort(String pageSort) { + this.pageSort = pageSort; + return this; + } + + /** + * Build call for getResourceSets + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getResourceSetsCall(applicationId, code, includeGlobal, pageNum, pageSize, pageSort, _callback); + } + + /** + * Execute getResourceSets request + * @return GetResourceSets200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public GetResourceSets200Response execute() throws ApiException { + ApiResponse localVarResp = getResourceSetsWithHttpInfo(applicationId, code, includeGlobal, pageNum, pageSize, pageSort); + return localVarResp.getData(); + } + + /** + * Execute getResourceSets request with HTTP info returned + * @return ApiResponse<GetResourceSets200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getResourceSetsWithHttpInfo(applicationId, code, includeGlobal, pageNum, pageSize, pageSort); + } + + /** + * Execute getResourceSets request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getResourceSetsAsync(applicationId, code, includeGlobal, pageNum, pageSize, pageSort, _callback); + } + } + + /** + * 查询资源集合列表 + * + * @param applicationId 应用id (required) + * @return APIgetResourceSetsRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetResourceSetsRequest getResourceSets(String applicationId) { + return new APIgetResourceSetsRequest(applicationId); + } + private okhttp3.Call getResourcesCall(String applicationId, String type, String code, String includeGlobal, String pageNum, String pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/resources"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (applicationId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("application_id", applicationId)); + } + + if (type != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); + } + + if (code != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("code", code)); + } + + if (includeGlobal != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("include_global", includeGlobal)); + } + + if (pageNum != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_num", pageNum)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); + } + + if (pageSort != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_sort", pageSort)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getResourcesValidateBeforeCall(String applicationId, String type, String code, String includeGlobal, String pageNum, String pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'applicationId' is set + if (applicationId == null) { + throw new ApiException("Missing the required parameter 'applicationId' when calling getResources(Async)"); + } + + return getResourcesCall(applicationId, type, code, includeGlobal, pageNum, pageSize, pageSort, _callback); + + } + + + private ApiResponse getResourcesWithHttpInfo(String applicationId, String type, String code, String includeGlobal, String pageNum, String pageSize, String pageSort) throws ApiException { + okhttp3.Call localVarCall = getResourcesValidateBeforeCall(applicationId, type, code, includeGlobal, pageNum, pageSize, pageSort, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getResourcesAsync(String applicationId, String type, String code, String includeGlobal, String pageNum, String pageSize, String pageSort, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getResourcesValidateBeforeCall(applicationId, type, code, includeGlobal, pageNum, pageSize, pageSort, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetResourcesRequest { + private final String applicationId; + private String type; + private String code; + private String includeGlobal; + private String pageNum; + private String pageSize; + private String pageSort; + + private APIgetResourcesRequest(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Set type + * @param type 资源类型 (optional) + * @return APIgetResourcesRequest + */ + public APIgetResourcesRequest type(String type) { + this.type = type; + return this; + } + + /** + * Set code + * @param code 资源代码 (optional) + * @return APIgetResourcesRequest + */ + public APIgetResourcesRequest code(String code) { + this.code = code; + return this; + } + + /** + * Set includeGlobal + * @param includeGlobal 是否查询包含全局资源 (optional) + * @return APIgetResourcesRequest + */ + public APIgetResourcesRequest includeGlobal(String includeGlobal) { + this.includeGlobal = includeGlobal; + return this; + } + + /** + * Set pageNum + * @param pageNum 起始页,默认1 (optional) + * @return APIgetResourcesRequest + */ + public APIgetResourcesRequest pageNum(String pageNum) { + this.pageNum = pageNum; + return this; + } + + /** + * Set pageSize + * @param pageSize 页大小,默认20 (optional) + * @return APIgetResourcesRequest + */ + public APIgetResourcesRequest pageSize(String pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageSort + * @param pageSort 排序方式,格式:字段[排序方式] (optional) + * @return APIgetResourcesRequest + */ + public APIgetResourcesRequest pageSort(String pageSort) { + this.pageSort = pageSort; + return this; + } + + /** + * Build call for getResources + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getResourcesCall(applicationId, type, code, includeGlobal, pageNum, pageSize, pageSort, _callback); + } + + /** + * Execute getResources request + * @return GetResources200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public GetResources200Response execute() throws ApiException { + ApiResponse localVarResp = getResourcesWithHttpInfo(applicationId, type, code, includeGlobal, pageNum, pageSize, pageSort); + return localVarResp.getData(); + } + + /** + * Execute getResources request with HTTP info returned + * @return ApiResponse<GetResources200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getResourcesWithHttpInfo(applicationId, type, code, includeGlobal, pageNum, pageSize, pageSort); + } + + /** + * Execute getResources request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getResourcesAsync(applicationId, type, code, includeGlobal, pageNum, pageSize, pageSort, _callback); + } + } + + /** + * 查询资源列表 + * + * @param applicationId 应用id (required) + * @return APIgetResourcesRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetResourcesRequest getResources(String applicationId) { + return new APIgetResourcesRequest(applicationId); + } + private okhttp3.Call listAuthorizedApplicationsCall(String identityId, String identityType, String xTenantId, String type, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/authz-apps"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (identityId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("identity_id", identityId)); + } + + if (identityType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("identity_type", identityType)); + } + + if (type != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); + } + + if (xTenantId != null) { + localVarHeaderParams.put("X-Tenant-Id", localVarApiClient.parameterToString(xTenantId)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listAuthorizedApplicationsValidateBeforeCall(String identityId, String identityType, String xTenantId, String type, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'identityId' is set + if (identityId == null) { + throw new ApiException("Missing the required parameter 'identityId' when calling listAuthorizedApplications(Async)"); + } + + // verify the required parameter 'identityType' is set + if (identityType == null) { + throw new ApiException("Missing the required parameter 'identityType' when calling listAuthorizedApplications(Async)"); + } + + // verify the required parameter 'xTenantId' is set + if (xTenantId == null) { + throw new ApiException("Missing the required parameter 'xTenantId' when calling listAuthorizedApplications(Async)"); + } + + return listAuthorizedApplicationsCall(identityId, identityType, xTenantId, type, _callback); + + } + + + private ApiResponse> listAuthorizedApplicationsWithHttpInfo(String identityId, String identityType, String xTenantId, String type) throws ApiException { + okhttp3.Call localVarCall = listAuthorizedApplicationsValidateBeforeCall(identityId, identityType, xTenantId, type, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call listAuthorizedApplicationsAsync(String identityId, String identityType, String xTenantId, String type, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = listAuthorizedApplicationsValidateBeforeCall(identityId, identityType, xTenantId, type, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIlistAuthorizedApplicationsRequest { + private final String identityId; + private final String identityType; + private final String xTenantId; + private String type; + + private APIlistAuthorizedApplicationsRequest(String identityId, String identityType, String xTenantId) { + this.identityId = identityId; + this.identityType = identityType; + this.xTenantId = xTenantId; + } + + /** + * Set type + * @param type 应用类型: 0-默认应用 1-自建应用 2-模板应用 3-组件应用 (optional) + * @return APIlistAuthorizedApplicationsRequest + */ + public APIlistAuthorizedApplicationsRequest type(String type) { + this.type = type; + return this; + } + + /** + * Build call for listAuthorizedApplications + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return listAuthorizedApplicationsCall(identityId, identityType, xTenantId, type, _callback); + } + + /** + * Execute listAuthorizedApplications request + * @return List<AuthzApp> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public List execute() throws ApiException { + ApiResponse> localVarResp = listAuthorizedApplicationsWithHttpInfo(identityId, identityType, xTenantId, type); + return localVarResp.getData(); + } + + /** + * Execute listAuthorizedApplications request with HTTP info returned + * @return ApiResponse<List<AuthzApp>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse> executeWithHttpInfo() throws ApiException { + return listAuthorizedApplicationsWithHttpInfo(identityId, identityType, xTenantId, type); + } + + /** + * Execute listAuthorizedApplications request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException { + return listAuthorizedApplicationsAsync(identityId, identityType, xTenantId, type, _callback); + } + } + + /** + * 查询已授权应用列表 + * + * @param identityId 授权主体 id (required) + * @param identityType 授权主体类型 (required) + * @param xTenantId 租户id (required) + * @return APIlistAuthorizedApplicationsRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIlistAuthorizedApplicationsRequest listAuthorizedApplications(String identityId, String identityType, String xTenantId) { + return new APIlistAuthorizedApplicationsRequest(identityId, identityType, xTenantId); + } + private okhttp3.Call modifyAuthUnitCall(String rid, String tid, String contentType, EmptyObject4 emptyObject4, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = emptyObject4; + + // create path and map variables + String localVarPath = "/v1/auth-units/{rid}/rules/{tid}" + .replace("{" + "rid" + "}", localVarApiClient.escapeString(rid.toString())) + .replace("{" + "tid" + "}", localVarApiClient.escapeString(tid.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call modifyAuthUnitValidateBeforeCall(String rid, String tid, String contentType, EmptyObject4 emptyObject4, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'rid' is set + if (rid == null) { + throw new ApiException("Missing the required parameter 'rid' when calling modifyAuthUnit(Async)"); + } + + // verify the required parameter 'tid' is set + if (tid == null) { + throw new ApiException("Missing the required parameter 'tid' when calling modifyAuthUnit(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling modifyAuthUnit(Async)"); + } + + return modifyAuthUnitCall(rid, tid, contentType, emptyObject4, _callback); + + } + + + private ApiResponse modifyAuthUnitWithHttpInfo(String rid, String tid, String contentType, EmptyObject4 emptyObject4) throws ApiException { + okhttp3.Call localVarCall = modifyAuthUnitValidateBeforeCall(rid, tid, contentType, emptyObject4, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call modifyAuthUnitAsync(String rid, String tid, String contentType, EmptyObject4 emptyObject4, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = modifyAuthUnitValidateBeforeCall(rid, tid, contentType, emptyObject4, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APImodifyAuthUnitRequest { + private final String rid; + private final String tid; + private final String contentType; + private EmptyObject4 emptyObject4; + + private APImodifyAuthUnitRequest(String rid, String tid, String contentType) { + this.rid = rid; + this.tid = tid; + this.contentType = contentType; + } + + /** + * Set emptyObject4 + * @param emptyObject4 (optional) + * @return APImodifyAuthUnitRequest + */ + public APImodifyAuthUnitRequest emptyObject4(EmptyObject4 emptyObject4) { + this.emptyObject4 = emptyObject4; + return this; + } + + /** + * Build call for modifyAuthUnit + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return modifyAuthUnitCall(rid, tid, contentType, emptyObject4, _callback); + } + + /** + * Execute modifyAuthUnit request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = modifyAuthUnitWithHttpInfo(rid, tid, contentType, emptyObject4); + return localVarResp.getData(); + } + + /** + * Execute modifyAuthUnit request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return modifyAuthUnitWithHttpInfo(rid, tid, contentType, emptyObject4); + } + + /** + * Execute modifyAuthUnit request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return modifyAuthUnitAsync(rid, tid, contentType, emptyObject4, _callback); + } + } + + /** + * 更新授权规则 + * + * @param rid AU id (required) + * @param tid 规则id (required) + * @param contentType (required) + * @return APImodifyAuthUnitRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APImodifyAuthUnitRequest modifyAuthUnit(String rid, String tid, String contentType) { + return new APImodifyAuthUnitRequest(rid, tid, contentType); + } + private okhttp3.Call modifyResourceCall(String id, String contentType, EmptyObject3 emptyObject3, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = emptyObject3; + + // create path and map variables + String localVarPath = "/v1/resources/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call modifyResourceValidateBeforeCall(String id, String contentType, EmptyObject3 emptyObject3, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling modifyResource(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling modifyResource(Async)"); + } + + return modifyResourceCall(id, contentType, emptyObject3, _callback); + + } + + + private ApiResponse modifyResourceWithHttpInfo(String id, String contentType, EmptyObject3 emptyObject3) throws ApiException { + okhttp3.Call localVarCall = modifyResourceValidateBeforeCall(id, contentType, emptyObject3, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call modifyResourceAsync(String id, String contentType, EmptyObject3 emptyObject3, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = modifyResourceValidateBeforeCall(id, contentType, emptyObject3, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APImodifyResourceRequest { + private final String id; + private final String contentType; + private EmptyObject3 emptyObject3; + + private APImodifyResourceRequest(String id, String contentType) { + this.id = id; + this.contentType = contentType; + } + + /** + * Set emptyObject3 + * @param emptyObject3 (optional) + * @return APImodifyResourceRequest + */ + public APImodifyResourceRequest emptyObject3(EmptyObject3 emptyObject3) { + this.emptyObject3 = emptyObject3; + return this; + } + + /** + * Build call for modifyResource + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return modifyResourceCall(id, contentType, emptyObject3, _callback); + } + + /** + * Execute modifyResource request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ * @deprecated + */ + @Deprecated + public Object execute() throws ApiException { + ApiResponse localVarResp = modifyResourceWithHttpInfo(id, contentType, emptyObject3); + return localVarResp.getData(); + } + + /** + * Execute modifyResource request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ * @deprecated + */ + @Deprecated + public ApiResponse executeWithHttpInfo() throws ApiException { + return modifyResourceWithHttpInfo(id, contentType, emptyObject3); + } + + /** + * Execute modifyResource request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return modifyResourceAsync(id, contentType, emptyObject3, _callback); + } + } + + /** + * 更新资源 + * + * @param id 资源id (required) + * @param contentType (required) + * @return APImodifyResourceRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ * @deprecated + */ + @Deprecated + public APImodifyResourceRequest modifyResource(String id, String contentType) { + return new APImodifyResourceRequest(id, contentType); + } + private okhttp3.Call modifyResourceSetCall(String id, String contentType, String xTenantId, EmptyObject7 emptyObject7, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = emptyObject7; + + // create path and map variables + String localVarPath = "/v1/resource-sets/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + if (xTenantId != null) { + localVarHeaderParams.put("X-Tenant-Id", localVarApiClient.parameterToString(xTenantId)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call modifyResourceSetValidateBeforeCall(String id, String contentType, String xTenantId, EmptyObject7 emptyObject7, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling modifyResourceSet(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling modifyResourceSet(Async)"); + } + + // verify the required parameter 'xTenantId' is set + if (xTenantId == null) { + throw new ApiException("Missing the required parameter 'xTenantId' when calling modifyResourceSet(Async)"); + } + + return modifyResourceSetCall(id, contentType, xTenantId, emptyObject7, _callback); + + } + + + private ApiResponse modifyResourceSetWithHttpInfo(String id, String contentType, String xTenantId, EmptyObject7 emptyObject7) throws ApiException { + okhttp3.Call localVarCall = modifyResourceSetValidateBeforeCall(id, contentType, xTenantId, emptyObject7, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call modifyResourceSetAsync(String id, String contentType, String xTenantId, EmptyObject7 emptyObject7, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = modifyResourceSetValidateBeforeCall(id, contentType, xTenantId, emptyObject7, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APImodifyResourceSetRequest { + private final String id; + private final String contentType; + private final String xTenantId; + private EmptyObject7 emptyObject7; + + private APImodifyResourceSetRequest(String id, String contentType, String xTenantId) { + this.id = id; + this.contentType = contentType; + this.xTenantId = xTenantId; + } + + /** + * Set emptyObject7 + * @param emptyObject7 (optional) + * @return APImodifyResourceSetRequest + */ + public APImodifyResourceSetRequest emptyObject7(EmptyObject7 emptyObject7) { + this.emptyObject7 = emptyObject7; + return this; + } + + /** + * Build call for modifyResourceSet + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return modifyResourceSetCall(id, contentType, xTenantId, emptyObject7, _callback); + } + + /** + * Execute modifyResourceSet request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = modifyResourceSetWithHttpInfo(id, contentType, xTenantId, emptyObject7); + return localVarResp.getData(); + } + + /** + * Execute modifyResourceSet request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return modifyResourceSetWithHttpInfo(id, contentType, xTenantId, emptyObject7); + } + + /** + * Execute modifyResourceSet request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return modifyResourceSetAsync(id, contentType, xTenantId, emptyObject7, _callback); + } + } + + /** + * 更新资源集合 + * + * @param id 集合id (required) + * @param contentType (required) + * @param xTenantId 租户id (required) + * @return APImodifyResourceSetRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APImodifyResourceSetRequest modifyResourceSet(String id, String contentType, String xTenantId) { + return new APImodifyResourceSetRequest(id, contentType, xTenantId); + } + private okhttp3.Call modifyResourceSetMemberCall(String sid, String mid, String contentType, EmptyObject12 emptyObject12, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = emptyObject12; + + // create path and map variables + String localVarPath = "/v1/resource-sets/{sid}/members/{mid}" + .replace("{" + "sid" + "}", localVarApiClient.escapeString(sid.toString())) + .replace("{" + "mid" + "}", localVarApiClient.escapeString(mid.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call modifyResourceSetMemberValidateBeforeCall(String sid, String mid, String contentType, EmptyObject12 emptyObject12, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'sid' is set + if (sid == null) { + throw new ApiException("Missing the required parameter 'sid' when calling modifyResourceSetMember(Async)"); + } + + // verify the required parameter 'mid' is set + if (mid == null) { + throw new ApiException("Missing the required parameter 'mid' when calling modifyResourceSetMember(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling modifyResourceSetMember(Async)"); + } + + return modifyResourceSetMemberCall(sid, mid, contentType, emptyObject12, _callback); + + } + + + private ApiResponse modifyResourceSetMemberWithHttpInfo(String sid, String mid, String contentType, EmptyObject12 emptyObject12) throws ApiException { + okhttp3.Call localVarCall = modifyResourceSetMemberValidateBeforeCall(sid, mid, contentType, emptyObject12, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call modifyResourceSetMemberAsync(String sid, String mid, String contentType, EmptyObject12 emptyObject12, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = modifyResourceSetMemberValidateBeforeCall(sid, mid, contentType, emptyObject12, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APImodifyResourceSetMemberRequest { + private final String sid; + private final String mid; + private final String contentType; + private EmptyObject12 emptyObject12; + + private APImodifyResourceSetMemberRequest(String sid, String mid, String contentType) { + this.sid = sid; + this.mid = mid; + this.contentType = contentType; + } + + /** + * Set emptyObject12 + * @param emptyObject12 (optional) + * @return APImodifyResourceSetMemberRequest + */ + public APImodifyResourceSetMemberRequest emptyObject12(EmptyObject12 emptyObject12) { + this.emptyObject12 = emptyObject12; + return this; + } + + /** + * Build call for modifyResourceSetMember + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return modifyResourceSetMemberCall(sid, mid, contentType, emptyObject12, _callback); + } + + /** + * Execute modifyResourceSetMember request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = modifyResourceSetMemberWithHttpInfo(sid, mid, contentType, emptyObject12); + return localVarResp.getData(); + } + + /** + * Execute modifyResourceSetMember request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return modifyResourceSetMemberWithHttpInfo(sid, mid, contentType, emptyObject12); + } + + /** + * Execute modifyResourceSetMember request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return modifyResourceSetMemberAsync(sid, mid, contentType, emptyObject12, _callback); + } + } + + /** + * 更新资源集合成员 + * + * @param sid 资源集合id (required) + * @param mid 资源集合成员id (required) + * @param contentType (required) + * @return APImodifyResourceSetMemberRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APImodifyResourceSetMemberRequest modifyResourceSetMember(String sid, String mid, String contentType) { + return new APImodifyResourceSetMemberRequest(sid, mid, contentType); + } + private okhttp3.Call queryAuthUnitsRulesCall(String identityId, String identityType, String applicationId, String type, String code, String identityName, String selfOnly, String resourceId, String resourceMatchAllResources, String resourceMatchAllActions, String resourceSetId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/auth-unit-rules"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (applicationId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("application_id", applicationId)); + } + + if (type != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); + } + + if (code != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("code", code)); + } + + if (identityId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("identity_id", identityId)); + } + + if (identityType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("identity_type", identityType)); + } + + if (identityName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("identity_name", identityName)); + } + + if (selfOnly != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("self_only", selfOnly)); + } + + if (resourceId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("resource_id", resourceId)); + } + + if (resourceMatchAllResources != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("resource_match_all_resources", resourceMatchAllResources)); + } + + if (resourceMatchAllActions != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("resource_match_all_actions", resourceMatchAllActions)); + } + + if (resourceSetId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("resource_set_id", resourceSetId)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call queryAuthUnitsRulesValidateBeforeCall(String identityId, String identityType, String applicationId, String type, String code, String identityName, String selfOnly, String resourceId, String resourceMatchAllResources, String resourceMatchAllActions, String resourceSetId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'identityId' is set + if (identityId == null) { + throw new ApiException("Missing the required parameter 'identityId' when calling queryAuthUnitsRules(Async)"); + } + + // verify the required parameter 'identityType' is set + if (identityType == null) { + throw new ApiException("Missing the required parameter 'identityType' when calling queryAuthUnitsRules(Async)"); + } + + return queryAuthUnitsRulesCall(identityId, identityType, applicationId, type, code, identityName, selfOnly, resourceId, resourceMatchAllResources, resourceMatchAllActions, resourceSetId, _callback); + + } + + + private ApiResponse> queryAuthUnitsRulesWithHttpInfo(String identityId, String identityType, String applicationId, String type, String code, String identityName, String selfOnly, String resourceId, String resourceMatchAllResources, String resourceMatchAllActions, String resourceSetId) throws ApiException { + okhttp3.Call localVarCall = queryAuthUnitsRulesValidateBeforeCall(identityId, identityType, applicationId, type, code, identityName, selfOnly, resourceId, resourceMatchAllResources, resourceMatchAllActions, resourceSetId, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call queryAuthUnitsRulesAsync(String identityId, String identityType, String applicationId, String type, String code, String identityName, String selfOnly, String resourceId, String resourceMatchAllResources, String resourceMatchAllActions, String resourceSetId, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = queryAuthUnitsRulesValidateBeforeCall(identityId, identityType, applicationId, type, code, identityName, selfOnly, resourceId, resourceMatchAllResources, resourceMatchAllActions, resourceSetId, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIqueryAuthUnitsRulesRequest { + private final String identityId; + private final String identityType; + private String applicationId; + private String type; + private String code; + private String identityName; + private String selfOnly; + private String resourceId; + private String resourceMatchAllResources; + private String resourceMatchAllActions; + private String resourceSetId; + + private APIqueryAuthUnitsRulesRequest(String identityId, String identityType) { + this.identityId = identityId; + this.identityType = identityType; + } + + /** + * Set applicationId + * @param applicationId 应用id (optional) + * @return APIqueryAuthUnitsRulesRequest + */ + public APIqueryAuthUnitsRulesRequest applicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Set type + * @param type 规则类型 (optional) + * @return APIqueryAuthUnitsRulesRequest + */ + public APIqueryAuthUnitsRulesRequest type(String type) { + this.type = type; + return this; + } + + /** + * Set code + * @param code 资源或资源集合code (optional) + * @return APIqueryAuthUnitsRulesRequest + */ + public APIqueryAuthUnitsRulesRequest code(String code) { + this.code = code; + return this; + } + + /** + * Set identityName + * @param identityName 主体名称 (optional) + * @return APIqueryAuthUnitsRulesRequest + */ + public APIqueryAuthUnitsRulesRequest identityName(String identityName) { + this.identityName = identityName; + return this; + } + + /** + * Set selfOnly + * @param selfOnly 只查询指定主体下的授权 (optional) + * @return APIqueryAuthUnitsRulesRequest + */ + public APIqueryAuthUnitsRulesRequest selfOnly(String selfOnly) { + this.selfOnly = selfOnly; + return this; + } + + /** + * Set resourceId + * @param resourceId 资源id,当type=api,ui,data时有效 (optional) + * @return APIqueryAuthUnitsRulesRequest + */ + public APIqueryAuthUnitsRulesRequest resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Set resourceMatchAllResources + * @param resourceMatchAllResources 匹配所有资源,当type=res时有效 (optional) + * @return APIqueryAuthUnitsRulesRequest + */ + public APIqueryAuthUnitsRulesRequest resourceMatchAllResources(String resourceMatchAllResources) { + this.resourceMatchAllResources = resourceMatchAllResources; + return this; + } + + /** + * Set resourceMatchAllActions + * @param resourceMatchAllActions 匹配所有资源操作,当type=res时有效 (optional) + * @return APIqueryAuthUnitsRulesRequest + */ + public APIqueryAuthUnitsRulesRequest resourceMatchAllActions(String resourceMatchAllActions) { + this.resourceMatchAllActions = resourceMatchAllActions; + return this; + } + + /** + * Set resourceSetId + * @param resourceSetId 资源集合id,当type=res_set (optional) + * @return APIqueryAuthUnitsRulesRequest + */ + public APIqueryAuthUnitsRulesRequest resourceSetId(String resourceSetId) { + this.resourceSetId = resourceSetId; + return this; + } + + /** + * Build call for queryAuthUnitsRules + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return queryAuthUnitsRulesCall(identityId, identityType, applicationId, type, code, identityName, selfOnly, resourceId, resourceMatchAllResources, resourceMatchAllActions, resourceSetId, _callback); + } + + /** + * Execute queryAuthUnitsRules request + * @return List<Au> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public List execute() throws ApiException { + ApiResponse> localVarResp = queryAuthUnitsRulesWithHttpInfo(identityId, identityType, applicationId, type, code, identityName, selfOnly, resourceId, resourceMatchAllResources, resourceMatchAllActions, resourceSetId); + return localVarResp.getData(); + } + + /** + * Execute queryAuthUnitsRules request with HTTP info returned + * @return ApiResponse<List<Au>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse> executeWithHttpInfo() throws ApiException { + return queryAuthUnitsRulesWithHttpInfo(identityId, identityType, applicationId, type, code, identityName, selfOnly, resourceId, resourceMatchAllResources, resourceMatchAllActions, resourceSetId); + } + + /** + * Execute queryAuthUnitsRules request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException { + return queryAuthUnitsRulesAsync(identityId, identityType, applicationId, type, code, identityName, selfOnly, resourceId, resourceMatchAllResources, resourceMatchAllActions, resourceSetId, _callback); + } + } + + /** + * 查询授权规则列表 + * + * @param identityId 主体id (required) + * @param identityType 主体类型 (required) + * @return APIqueryAuthUnitsRulesRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIqueryAuthUnitsRulesRequest queryAuthUnitsRules(String identityId, String identityType) { + return new APIqueryAuthUnitsRulesRequest(identityId, identityType); + } +} diff --git a/src/main/java/com/idmesh/api/StorageApi.java b/src/main/java/com/idmesh/api/StorageApi.java new file mode 100644 index 0000000..baa0a35 --- /dev/null +++ b/src/main/java/com/idmesh/api/StorageApi.java @@ -0,0 +1,1287 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.api; + +import com.idmesh.ApiCallback; +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.ApiResponse; +import com.idmesh.Configuration; +import com.idmesh.Pair; +import com.idmesh.ProgressRequestBody; +import com.idmesh.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.idmesh.model.Bucket; +import com.idmesh.model.Get400Response; +import com.idmesh.model.ModelObject; +import com.idmesh.model.SaveObjectRequest; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class StorageApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public StorageApi() { + this(Configuration.getDefaultApiClient()); + } + + public StorageApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + private okhttp3.Call deleteBucketCall(String bucket, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/buckets/{bucket}" + .replace("{" + "bucket" + "}", localVarApiClient.escapeString(bucket.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteBucketValidateBeforeCall(String bucket, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'bucket' is set + if (bucket == null) { + throw new ApiException("Missing the required parameter 'bucket' when calling deleteBucket(Async)"); + } + + return deleteBucketCall(bucket, _callback); + + } + + + private ApiResponse deleteBucketWithHttpInfo(String bucket) throws ApiException { + okhttp3.Call localVarCall = deleteBucketValidateBeforeCall(bucket, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call deleteBucketAsync(String bucket, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteBucketValidateBeforeCall(bucket, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIdeleteBucketRequest { + private final String bucket; + + private APIdeleteBucketRequest(String bucket) { + this.bucket = bucket; + } + + /** + * Build call for deleteBucket + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return deleteBucketCall(bucket, _callback); + } + + /** + * Execute deleteBucket request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = deleteBucketWithHttpInfo(bucket); + return localVarResp.getData(); + } + + /** + * Execute deleteBucket request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteBucketWithHttpInfo(bucket); + } + + /** + * Execute deleteBucket request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteBucketAsync(bucket, _callback); + } + } + + /** + * 删除 Bucket + * 删除bucket会间接删掉bucket下所有object + * @param bucket bucket 名称 (required) + * @return APIdeleteBucketRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIdeleteBucketRequest deleteBucket(String bucket) { + return new APIdeleteBucketRequest(bucket); + } + private okhttp3.Call deleteObjectCall(String bucket, String key, String keyAsPrefix, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/buckets/{bucket}/objects/{key}" + .replace("{" + "bucket" + "}", localVarApiClient.escapeString(bucket.toString())) + .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (keyAsPrefix != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("key_as_prefix", keyAsPrefix)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteObjectValidateBeforeCall(String bucket, String key, String keyAsPrefix, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'bucket' is set + if (bucket == null) { + throw new ApiException("Missing the required parameter 'bucket' when calling deleteObject(Async)"); + } + + // verify the required parameter 'key' is set + if (key == null) { + throw new ApiException("Missing the required parameter 'key' when calling deleteObject(Async)"); + } + + return deleteObjectCall(bucket, key, keyAsPrefix, _callback); + + } + + + private ApiResponse deleteObjectWithHttpInfo(String bucket, String key, String keyAsPrefix) throws ApiException { + okhttp3.Call localVarCall = deleteObjectValidateBeforeCall(bucket, key, keyAsPrefix, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call deleteObjectAsync(String bucket, String key, String keyAsPrefix, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteObjectValidateBeforeCall(bucket, key, keyAsPrefix, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIdeleteObjectRequest { + private final String bucket; + private final String key; + private String keyAsPrefix; + + private APIdeleteObjectRequest(String bucket, String key) { + this.bucket = bucket; + this.key = key; + } + + /** + * Set keyAsPrefix + * @param keyAsPrefix 将键名称作为前缀执行删除 (optional) + * @return APIdeleteObjectRequest + */ + public APIdeleteObjectRequest keyAsPrefix(String keyAsPrefix) { + this.keyAsPrefix = keyAsPrefix; + return this; + } + + /** + * Build call for deleteObject + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return deleteObjectCall(bucket, key, keyAsPrefix, _callback); + } + + /** + * Execute deleteObject request + * @return ModelObject + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ModelObject execute() throws ApiException { + ApiResponse localVarResp = deleteObjectWithHttpInfo(bucket, key, keyAsPrefix); + return localVarResp.getData(); + } + + /** + * Execute deleteObject request with HTTP info returned + * @return ApiResponse<ModelObject> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteObjectWithHttpInfo(bucket, key, keyAsPrefix); + } + + /** + * Execute deleteObject request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteObjectAsync(bucket, key, keyAsPrefix, _callback); + } + } + + /** + * 删除 Object + * + * @param bucket bucket名称 (required) + * @param key 键 (required) + * @return APIdeleteObjectRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIdeleteObjectRequest deleteObject(String bucket, String key) { + return new APIdeleteObjectRequest(bucket, key); + } + private okhttp3.Call getBucketCall(String bucket, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/buckets/{bucket}" + .replace("{" + "bucket" + "}", localVarApiClient.escapeString(bucket.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getBucketValidateBeforeCall(String bucket, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'bucket' is set + if (bucket == null) { + throw new ApiException("Missing the required parameter 'bucket' when calling getBucket(Async)"); + } + + return getBucketCall(bucket, _callback); + + } + + + private ApiResponse getBucketWithHttpInfo(String bucket) throws ApiException { + okhttp3.Call localVarCall = getBucketValidateBeforeCall(bucket, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getBucketAsync(String bucket, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getBucketValidateBeforeCall(bucket, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetBucketRequest { + private final String bucket; + + private APIgetBucketRequest(String bucket) { + this.bucket = bucket; + } + + /** + * Build call for getBucket + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getBucketCall(bucket, _callback); + } + + /** + * Execute getBucket request + * @return Bucket + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Bucket execute() throws ApiException { + ApiResponse localVarResp = getBucketWithHttpInfo(bucket); + return localVarResp.getData(); + } + + /** + * Execute getBucket request with HTTP info returned + * @return ApiResponse<Bucket> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getBucketWithHttpInfo(bucket); + } + + /** + * Execute getBucket request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getBucketAsync(bucket, _callback); + } + } + + /** + * 获取 Bucket 详情 + * + * @param bucket bucket 名称 (required) + * @return APIgetBucketRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetBucketRequest getBucket(String bucket) { + return new APIgetBucketRequest(bucket); + } + private okhttp3.Call getBucketsCall(String last, Integer limit, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/buckets"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (last != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("last", last)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getBucketsValidateBeforeCall(String last, Integer limit, final ApiCallback _callback) throws ApiException { + return getBucketsCall(last, limit, _callback); + + } + + + private ApiResponse> getBucketsWithHttpInfo(String last, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getBucketsValidateBeforeCall(last, limit, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getBucketsAsync(String last, Integer limit, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getBucketsValidateBeforeCall(last, limit, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetBucketsRequest { + private String last; + private Integer limit; + + private APIgetBucketsRequest() { + } + + /** + * Set last + * @param last 最后一个bucket的名字 (optional) + * @return APIgetBucketsRequest + */ + public APIgetBucketsRequest last(String last) { + this.last = last; + return this; + } + + /** + * Set limit + * @param limit 页大小 (optional) + * @return APIgetBucketsRequest + */ + public APIgetBucketsRequest limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Build call for getBuckets + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getBucketsCall(last, limit, _callback); + } + + /** + * Execute getBuckets request + * @return List<Bucket> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public List execute() throws ApiException { + ApiResponse> localVarResp = getBucketsWithHttpInfo(last, limit); + return localVarResp.getData(); + } + + /** + * Execute getBuckets request with HTTP info returned + * @return ApiResponse<List<Bucket>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse> executeWithHttpInfo() throws ApiException { + return getBucketsWithHttpInfo(last, limit); + } + + /** + * Execute getBuckets request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException { + return getBucketsAsync(last, limit, _callback); + } + } + + /** + * 获取 Bucket 列表 + * + * @return APIgetBucketsRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetBucketsRequest getBuckets() { + return new APIgetBucketsRequest(); + } + private okhttp3.Call getObjectCall(String bucket, String key, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/buckets/{bucket}/objects/{key}" + .replace("{" + "bucket" + "}", localVarApiClient.escapeString(bucket.toString())) + .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getObjectValidateBeforeCall(String bucket, String key, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'bucket' is set + if (bucket == null) { + throw new ApiException("Missing the required parameter 'bucket' when calling getObject(Async)"); + } + + // verify the required parameter 'key' is set + if (key == null) { + throw new ApiException("Missing the required parameter 'key' when calling getObject(Async)"); + } + + return getObjectCall(bucket, key, _callback); + + } + + + private ApiResponse getObjectWithHttpInfo(String bucket, String key) throws ApiException { + okhttp3.Call localVarCall = getObjectValidateBeforeCall(bucket, key, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getObjectAsync(String bucket, String key, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getObjectValidateBeforeCall(bucket, key, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetObjectRequest { + private final String bucket; + private final String key; + + private APIgetObjectRequest(String bucket, String key) { + this.bucket = bucket; + this.key = key; + } + + /** + * Build call for getObject + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getObjectCall(bucket, key, _callback); + } + + /** + * Execute getObject request + * @return ModelObject + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ModelObject execute() throws ApiException { + ApiResponse localVarResp = getObjectWithHttpInfo(bucket, key); + return localVarResp.getData(); + } + + /** + * Execute getObject request with HTTP info returned + * @return ApiResponse<ModelObject> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getObjectWithHttpInfo(bucket, key); + } + + /** + * Execute getObject request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getObjectAsync(bucket, key, _callback); + } + } + + /** + * 获取 Object 详情 + * + * @param bucket bucket名称 (required) + * @param key 键 (required) + * @return APIgetObjectRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetObjectRequest getObject(String bucket, String key) { + return new APIgetObjectRequest(bucket, key); + } + private okhttp3.Call getObjectsCall(String bucket, String last, Integer limit, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/buckets/{bucket}/objects" + .replace("{" + "bucket" + "}", localVarApiClient.escapeString(bucket.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (last != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("last", last)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getObjectsValidateBeforeCall(String bucket, String last, Integer limit, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'bucket' is set + if (bucket == null) { + throw new ApiException("Missing the required parameter 'bucket' when calling getObjects(Async)"); + } + + return getObjectsCall(bucket, last, limit, _callback); + + } + + + private ApiResponse> getObjectsWithHttpInfo(String bucket, String last, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getObjectsValidateBeforeCall(bucket, last, limit, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getObjectsAsync(String bucket, String last, Integer limit, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getObjectsValidateBeforeCall(bucket, last, limit, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetObjectsRequest { + private final String bucket; + private String last; + private Integer limit; + + private APIgetObjectsRequest(String bucket) { + this.bucket = bucket; + } + + /** + * Set last + * @param last 最后一个object的名字 (optional) + * @return APIgetObjectsRequest + */ + public APIgetObjectsRequest last(String last) { + this.last = last; + return this; + } + + /** + * Set limit + * @param limit 页大小 (optional) + * @return APIgetObjectsRequest + */ + public APIgetObjectsRequest limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Build call for getObjects + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getObjectsCall(bucket, last, limit, _callback); + } + + /** + * Execute getObjects request + * @return List<ModelObject> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public List execute() throws ApiException { + ApiResponse> localVarResp = getObjectsWithHttpInfo(bucket, last, limit); + return localVarResp.getData(); + } + + /** + * Execute getObjects request with HTTP info returned + * @return ApiResponse<List<ModelObject>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse> executeWithHttpInfo() throws ApiException { + return getObjectsWithHttpInfo(bucket, last, limit); + } + + /** + * Execute getObjects request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException { + return getObjectsAsync(bucket, last, limit, _callback); + } + } + + /** + * 获取 Object 列表 + * + * @param bucket bucket名称 (required) + * @return APIgetObjectsRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetObjectsRequest getObjects(String bucket) { + return new APIgetObjectsRequest(bucket); + } + private okhttp3.Call saveObjectCall(String bucket, SaveObjectRequest saveObjectRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = saveObjectRequest; + + // create path and map variables + String localVarPath = "/v1/buckets/{bucket}/objects" + .replace("{" + "bucket" + "}", localVarApiClient.escapeString(bucket.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call saveObjectValidateBeforeCall(String bucket, SaveObjectRequest saveObjectRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'bucket' is set + if (bucket == null) { + throw new ApiException("Missing the required parameter 'bucket' when calling saveObject(Async)"); + } + + return saveObjectCall(bucket, saveObjectRequest, _callback); + + } + + + private ApiResponse saveObjectWithHttpInfo(String bucket, SaveObjectRequest saveObjectRequest) throws ApiException { + okhttp3.Call localVarCall = saveObjectValidateBeforeCall(bucket, saveObjectRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call saveObjectAsync(String bucket, SaveObjectRequest saveObjectRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = saveObjectValidateBeforeCall(bucket, saveObjectRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIsaveObjectRequest { + private final String bucket; + private SaveObjectRequest saveObjectRequest; + + private APIsaveObjectRequest(String bucket) { + this.bucket = bucket; + } + + /** + * Set saveObjectRequest + * @param saveObjectRequest (optional) + * @return APIsaveObjectRequest + */ + public APIsaveObjectRequest saveObjectRequest(SaveObjectRequest saveObjectRequest) { + this.saveObjectRequest = saveObjectRequest; + return this; + } + + /** + * Build call for saveObject + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return saveObjectCall(bucket, saveObjectRequest, _callback); + } + + /** + * Execute saveObject request + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Object execute() throws ApiException { + ApiResponse localVarResp = saveObjectWithHttpInfo(bucket, saveObjectRequest); + return localVarResp.getData(); + } + + /** + * Execute saveObject request with HTTP info returned + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return saveObjectWithHttpInfo(bucket, saveObjectRequest); + } + + /** + * Execute saveObject request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return saveObjectAsync(bucket, saveObjectRequest, _callback); + } + } + + /** + * 创建 Object + * - 如果path中的bucket没有创建,会默认创建 - 如果key已经存在,会更新原有的值 + * @param bucket bucket名称 (required) + * @return APIsaveObjectRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIsaveObjectRequest saveObject(String bucket) { + return new APIsaveObjectRequest(bucket); + } +} diff --git a/src/main/java/com/idmesh/api/UserApi.java b/src/main/java/com/idmesh/api/UserApi.java new file mode 100644 index 0000000..55da4c2 --- /dev/null +++ b/src/main/java/com/idmesh/api/UserApi.java @@ -0,0 +1,1513 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.api; + +import com.idmesh.ApiCallback; +import com.idmesh.ApiClient; +import com.idmesh.ApiException; +import com.idmesh.ApiResponse; +import com.idmesh.Configuration; +import com.idmesh.Pair; +import com.idmesh.ProgressRequestBody; +import com.idmesh.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import java.math.BigDecimal; +import com.idmesh.model.CreateRequest; +import com.idmesh.model.CreateStoreCredential200Response; +import com.idmesh.model.CreateStoreCredentialRequest; +import com.idmesh.model.Delete200Response; +import com.idmesh.model.Get200Response; +import com.idmesh.model.Get400Response; +import com.idmesh.model.GetStoredCredentials200Response; +import com.idmesh.model.List200Response; +import com.idmesh.model.Modify200Response; +import com.idmesh.model.ModifyRequest; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class UserApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public UserApi() { + this(Configuration.getDefaultApiClient()); + } + + public UserApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + private okhttp3.Call callListCall(Integer pageSize, Integer pageNum, String searchType, String keyword, String timeModifiedFrom, String timeModifiedTo, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/users"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); + } + + if (pageNum != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_num", pageNum)); + } + + if (searchType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("search_type", searchType)); + } + + if (keyword != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("keyword", keyword)); + } + + if (timeModifiedFrom != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("time_modified_from", timeModifiedFrom)); + } + + if (timeModifiedTo != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("time_modified_to", timeModifiedTo)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call callListValidateBeforeCall(Integer pageSize, Integer pageNum, String searchType, String keyword, String timeModifiedFrom, String timeModifiedTo, final ApiCallback _callback) throws ApiException { + return callListCall(pageSize, pageNum, searchType, keyword, timeModifiedFrom, timeModifiedTo, _callback); + + } + + + private ApiResponse callListWithHttpInfo(Integer pageSize, Integer pageNum, String searchType, String keyword, String timeModifiedFrom, String timeModifiedTo) throws ApiException { + okhttp3.Call localVarCall = callListValidateBeforeCall(pageSize, pageNum, searchType, keyword, timeModifiedFrom, timeModifiedTo, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call callListAsync(Integer pageSize, Integer pageNum, String searchType, String keyword, String timeModifiedFrom, String timeModifiedTo, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = callListValidateBeforeCall(pageSize, pageNum, searchType, keyword, timeModifiedFrom, timeModifiedTo, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIcallListRequest { + private Integer pageSize; + private Integer pageNum; + private String searchType; + private String keyword; + private String timeModifiedFrom; + private String timeModifiedTo; + + private APIcallListRequest() { + } + + /** + * Set pageSize + * @param pageSize (optional) + * @return APIcallListRequest + */ + public APIcallListRequest pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageNum + * @param pageNum (optional) + * @return APIcallListRequest + */ + public APIcallListRequest pageNum(Integer pageNum) { + this.pageNum = pageNum; + return this; + } + + /** + * Set searchType + * @param searchType 默认按用户基础字段搜索;当值为:generic时,全文检索 (optional) + * @return APIcallListRequest + */ + public APIcallListRequest searchType(String searchType) { + this.searchType = searchType; + return this; + } + + /** + * Set keyword + * @param keyword 检索值 (optional) + * @return APIcallListRequest + */ + public APIcallListRequest keyword(String keyword) { + this.keyword = keyword; + return this; + } + + /** + * Set timeModifiedFrom + * @param timeModifiedFrom 开始时间 (optional) + * @return APIcallListRequest + */ + public APIcallListRequest timeModifiedFrom(String timeModifiedFrom) { + this.timeModifiedFrom = timeModifiedFrom; + return this; + } + + /** + * Set timeModifiedTo + * @param timeModifiedTo 结束时间 (optional) + * @return APIcallListRequest + */ + public APIcallListRequest timeModifiedTo(String timeModifiedTo) { + this.timeModifiedTo = timeModifiedTo; + return this; + } + + /** + * Build call for callList + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return callListCall(pageSize, pageNum, searchType, keyword, timeModifiedFrom, timeModifiedTo, _callback); + } + + /** + * Execute callList request + * @return List200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public List200Response execute() throws ApiException { + ApiResponse localVarResp = callListWithHttpInfo(pageSize, pageNum, searchType, keyword, timeModifiedFrom, timeModifiedTo); + return localVarResp.getData(); + } + + /** + * Execute callList request with HTTP info returned + * @return ApiResponse<List200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return callListWithHttpInfo(pageSize, pageNum, searchType, keyword, timeModifiedFrom, timeModifiedTo); + } + + /** + * Execute callList request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return callListAsync(pageSize, pageNum, searchType, keyword, timeModifiedFrom, timeModifiedTo, _callback); + } + } + + /** + * 查询用户列表 + * + * @return APIcallListRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIcallListRequest callList() { + return new APIcallListRequest(); + } + private okhttp3.Call createCall(String contentType, CreateRequest createRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = createRequest; + + // create path and map variables + String localVarPath = "/v1/users"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createValidateBeforeCall(String contentType, CreateRequest createRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling create(Async)"); + } + + return createCall(contentType, createRequest, _callback); + + } + + + private ApiResponse createWithHttpInfo(String contentType, CreateRequest createRequest) throws ApiException { + okhttp3.Call localVarCall = createValidateBeforeCall(contentType, createRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call createAsync(String contentType, CreateRequest createRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createValidateBeforeCall(contentType, createRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIcreateRequest { + private final String contentType; + private CreateRequest createRequest; + + private APIcreateRequest(String contentType) { + this.contentType = contentType; + } + + /** + * Set createRequest + * @param createRequest (optional) + * @return APIcreateRequest + */ + public APIcreateRequest createRequest(CreateRequest createRequest) { + this.createRequest = createRequest; + return this; + } + + /** + * Build call for create + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return createCall(contentType, createRequest, _callback); + } + + /** + * Execute create request + * @return Modify200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Modify200Response execute() throws ApiException { + ApiResponse localVarResp = createWithHttpInfo(contentType, createRequest); + return localVarResp.getData(); + } + + /** + * Execute create request with HTTP info returned + * @return ApiResponse<Modify200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return createWithHttpInfo(contentType, createRequest); + } + + /** + * Execute create request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return createAsync(contentType, createRequest, _callback); + } + } + + /** + * 创建用户 + * + * @param contentType (required) + * @return APIcreateRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIcreateRequest create(String contentType) { + return new APIcreateRequest(contentType); + } + private okhttp3.Call createStoreCredentialCall(String contentType, CreateStoreCredentialRequest createStoreCredentialRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = createStoreCredentialRequest; + + // create path and map variables + String localVarPath = "/v1/user-stored-credentials"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createStoreCredentialValidateBeforeCall(String contentType, CreateStoreCredentialRequest createStoreCredentialRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling createStoreCredential(Async)"); + } + + return createStoreCredentialCall(contentType, createStoreCredentialRequest, _callback); + + } + + + private ApiResponse createStoreCredentialWithHttpInfo(String contentType, CreateStoreCredentialRequest createStoreCredentialRequest) throws ApiException { + okhttp3.Call localVarCall = createStoreCredentialValidateBeforeCall(contentType, createStoreCredentialRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call createStoreCredentialAsync(String contentType, CreateStoreCredentialRequest createStoreCredentialRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createStoreCredentialValidateBeforeCall(contentType, createStoreCredentialRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIcreateStoreCredentialRequest { + private final String contentType; + private CreateStoreCredentialRequest createStoreCredentialRequest; + + private APIcreateStoreCredentialRequest(String contentType) { + this.contentType = contentType; + } + + /** + * Set createStoreCredentialRequest + * @param createStoreCredentialRequest (optional) + * @return APIcreateStoreCredentialRequest + */ + public APIcreateStoreCredentialRequest createStoreCredentialRequest(CreateStoreCredentialRequest createStoreCredentialRequest) { + this.createStoreCredentialRequest = createStoreCredentialRequest; + return this; + } + + /** + * Build call for createStoreCredential + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return createStoreCredentialCall(contentType, createStoreCredentialRequest, _callback); + } + + /** + * Execute createStoreCredential request + * @return CreateStoreCredential200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public CreateStoreCredential200Response execute() throws ApiException { + ApiResponse localVarResp = createStoreCredentialWithHttpInfo(contentType, createStoreCredentialRequest); + return localVarResp.getData(); + } + + /** + * Execute createStoreCredential request with HTTP info returned + * @return ApiResponse<CreateStoreCredential200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return createStoreCredentialWithHttpInfo(contentType, createStoreCredentialRequest); + } + + /** + * Execute createStoreCredential request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return createStoreCredentialAsync(contentType, createStoreCredentialRequest, _callback); + } + } + + /** + * 创建用户存储凭证 + * + * @param contentType (required) + * @return APIcreateStoreCredentialRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIcreateStoreCredentialRequest createStoreCredential(String contentType) { + return new APIcreateStoreCredentialRequest(contentType); + } + private okhttp3.Call deleteCall(String id, String contentType, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/users/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteValidateBeforeCall(String id, String contentType, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling delete(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling delete(Async)"); + } + + return deleteCall(id, contentType, _callback); + + } + + + private ApiResponse deleteWithHttpInfo(String id, String contentType) throws ApiException { + okhttp3.Call localVarCall = deleteValidateBeforeCall(id, contentType, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call deleteAsync(String id, String contentType, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteValidateBeforeCall(id, contentType, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIdeleteRequest { + private final String id; + private final String contentType; + + private APIdeleteRequest(String id, String contentType) { + this.id = id; + this.contentType = contentType; + } + + /** + * Build call for delete + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return deleteCall(id, contentType, _callback); + } + + /** + * Execute delete request + * @return Delete200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Delete200Response execute() throws ApiException { + ApiResponse localVarResp = deleteWithHttpInfo(id, contentType); + return localVarResp.getData(); + } + + /** + * Execute delete request with HTTP info returned + * @return ApiResponse<Delete200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteWithHttpInfo(id, contentType); + } + + /** + * Execute delete request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteAsync(id, contentType, _callback); + } + } + + /** + * 删除用户 + * + * @param id (required) + * @param contentType (required) + * @return APIdeleteRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIdeleteRequest delete(String id, String contentType) { + return new APIdeleteRequest(id, contentType); + } + private okhttp3.Call getCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/users/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling get(Async)"); + } + + return getCall(id, _callback); + + } + + + private ApiResponse getWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetRequest { + private final String id; + + private APIgetRequest(String id) { + this.id = id; + } + + /** + * Build call for get + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getCall(id, _callback); + } + + /** + * Execute get request + * @return Get200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Get200Response execute() throws ApiException { + ApiResponse localVarResp = getWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Execute get request with HTTP info returned + * @return ApiResponse<Get200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getWithHttpInfo(id); + } + + /** + * Execute get request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getAsync(id, _callback); + } + } + + /** + * 查询用户详情 + * + * @param id (required) + * @return APIgetRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetRequest get(String id) { + return new APIgetRequest(id); + } + private okhttp3.Call getStoredCredentialsCall(String contentType, BigDecimal userId, String providerCode, BigDecimal idpConfigId, String id1, String id2, String metadata, String status, String username, String displayName, Integer pageSize, Integer pageNum, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/user-stored-credentials"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (userId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("user_id", userId)); + } + + if (providerCode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("provider_code", providerCode)); + } + + if (idpConfigId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("idp_config_id", idpConfigId)); + } + + if (id1 != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("id1", id1)); + } + + if (id2 != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("id2", id2)); + } + + if (metadata != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("metadata", metadata)); + } + + if (status != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("status", status)); + } + + if (username != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("username", username)); + } + + if (displayName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("display_name", displayName)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); + } + + if (pageNum != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_num", pageNum)); + } + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getStoredCredentialsValidateBeforeCall(String contentType, BigDecimal userId, String providerCode, BigDecimal idpConfigId, String id1, String id2, String metadata, String status, String username, String displayName, Integer pageSize, Integer pageNum, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling getStoredCredentials(Async)"); + } + + return getStoredCredentialsCall(contentType, userId, providerCode, idpConfigId, id1, id2, metadata, status, username, displayName, pageSize, pageNum, _callback); + + } + + + private ApiResponse getStoredCredentialsWithHttpInfo(String contentType, BigDecimal userId, String providerCode, BigDecimal idpConfigId, String id1, String id2, String metadata, String status, String username, String displayName, Integer pageSize, Integer pageNum) throws ApiException { + okhttp3.Call localVarCall = getStoredCredentialsValidateBeforeCall(contentType, userId, providerCode, idpConfigId, id1, id2, metadata, status, username, displayName, pageSize, pageNum, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getStoredCredentialsAsync(String contentType, BigDecimal userId, String providerCode, BigDecimal idpConfigId, String id1, String id2, String metadata, String status, String username, String displayName, Integer pageSize, Integer pageNum, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getStoredCredentialsValidateBeforeCall(contentType, userId, providerCode, idpConfigId, id1, id2, metadata, status, username, displayName, pageSize, pageNum, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetStoredCredentialsRequest { + private final String contentType; + private BigDecimal userId; + private String providerCode; + private BigDecimal idpConfigId; + private String id1; + private String id2; + private String metadata; + private String status; + private String username; + private String displayName; + private Integer pageSize; + private Integer pageNum; + + private APIgetStoredCredentialsRequest(String contentType) { + this.contentType = contentType; + } + + /** + * Set userId + * @param userId 用户id标识 (optional) + * @return APIgetStoredCredentialsRequest + */ + public APIgetStoredCredentialsRequest userId(BigDecimal userId) { + this.userId = userId; + return this; + } + + /** + * Set providerCode + * @param providerCode 社会化登录提供者的code (optional) + * @return APIgetStoredCredentialsRequest + */ + public APIgetStoredCredentialsRequest providerCode(String providerCode) { + this.providerCode = providerCode; + return this; + } + + /** + * Set idpConfigId + * @param idpConfigId 社会化登录配置的ID (optional) + * @return APIgetStoredCredentialsRequest + */ + public APIgetStoredCredentialsRequest idpConfigId(BigDecimal idpConfigId) { + this.idpConfigId = idpConfigId; + return this; + } + + /** + * Set id1 + * @param id1 社会化身份标识1,约定此字段保存用户唯一标识,如openid (optional) + * @return APIgetStoredCredentialsRequest + */ + public APIgetStoredCredentialsRequest id1(String id1) { + this.id1 = id1; + return this; + } + + /** + * Set id2 + * @param id2 社会化身份标识2,如unionid (optional) + * @return APIgetStoredCredentialsRequest + */ + public APIgetStoredCredentialsRequest id2(String id2) { + this.id2 = id2; + return this; + } + + /** + * Set metadata + * @param metadata 更多社会化身份标识 (optional) + * @return APIgetStoredCredentialsRequest + */ + public APIgetStoredCredentialsRequest metadata(String metadata) { + this.metadata = metadata; + return this; + } + + /** + * Set status + * @param status 状态 (optional) + * @return APIgetStoredCredentialsRequest + */ + public APIgetStoredCredentialsRequest status(String status) { + this.status = status; + return this; + } + + /** + * Set username + * @param username 用户名 (optional) + * @return APIgetStoredCredentialsRequest + */ + public APIgetStoredCredentialsRequest username(String username) { + this.username = username; + return this; + } + + /** + * Set displayName + * @param displayName 显示名 (optional) + * @return APIgetStoredCredentialsRequest + */ + public APIgetStoredCredentialsRequest displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Set pageSize + * @param pageSize (optional) + * @return APIgetStoredCredentialsRequest + */ + public APIgetStoredCredentialsRequest pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageNum + * @param pageNum (optional) + * @return APIgetStoredCredentialsRequest + */ + public APIgetStoredCredentialsRequest pageNum(Integer pageNum) { + this.pageNum = pageNum; + return this; + } + + /** + * Build call for getStoredCredentials + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getStoredCredentialsCall(contentType, userId, providerCode, idpConfigId, id1, id2, metadata, status, username, displayName, pageSize, pageNum, _callback); + } + + /** + * Execute getStoredCredentials request + * @return GetStoredCredentials200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public GetStoredCredentials200Response execute() throws ApiException { + ApiResponse localVarResp = getStoredCredentialsWithHttpInfo(contentType, userId, providerCode, idpConfigId, id1, id2, metadata, status, username, displayName, pageSize, pageNum); + return localVarResp.getData(); + } + + /** + * Execute getStoredCredentials request with HTTP info returned + * @return ApiResponse<GetStoredCredentials200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getStoredCredentialsWithHttpInfo(contentType, userId, providerCode, idpConfigId, id1, id2, metadata, status, username, displayName, pageSize, pageNum); + } + + /** + * Execute getStoredCredentials request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getStoredCredentialsAsync(contentType, userId, providerCode, idpConfigId, id1, id2, metadata, status, username, displayName, pageSize, pageNum, _callback); + } + } + + /** + * 查询用户存储凭证列表 + * + * @param contentType (required) + * @return APIgetStoredCredentialsRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APIgetStoredCredentialsRequest getStoredCredentials(String contentType) { + return new APIgetStoredCredentialsRequest(contentType); + } + private okhttp3.Call modifyCall(String id, String contentType, ModifyRequest modifyRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + }else if (localVarApiClient.getBasePath() != null) { + basePath = localVarApiClient.getBasePath(); + } else { + basePath = null; + } + + Object localVarPostBody = modifyRequest; + + // create path and map variables + String localVarPath = "/v1/users/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentType != null) { + localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "aksk" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call modifyValidateBeforeCall(String id, String contentType, ModifyRequest modifyRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling modify(Async)"); + } + + // verify the required parameter 'contentType' is set + if (contentType == null) { + throw new ApiException("Missing the required parameter 'contentType' when calling modify(Async)"); + } + + return modifyCall(id, contentType, modifyRequest, _callback); + + } + + + private ApiResponse modifyWithHttpInfo(String id, String contentType, ModifyRequest modifyRequest) throws ApiException { + okhttp3.Call localVarCall = modifyValidateBeforeCall(id, contentType, modifyRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call modifyAsync(String id, String contentType, ModifyRequest modifyRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = modifyValidateBeforeCall(id, contentType, modifyRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APImodifyRequest { + private final String id; + private final String contentType; + private ModifyRequest modifyRequest; + + private APImodifyRequest(String id, String contentType) { + this.id = id; + this.contentType = contentType; + } + + /** + * Set modifyRequest + * @param modifyRequest (optional) + * @return APImodifyRequest + */ + public APImodifyRequest modifyRequest(ModifyRequest modifyRequest) { + this.modifyRequest = modifyRequest; + return this; + } + + /** + * Build call for modify + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return modifyCall(id, contentType, modifyRequest, _callback); + } + + /** + * Execute modify request + * @return Modify200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public Modify200Response execute() throws ApiException { + ApiResponse localVarResp = modifyWithHttpInfo(id, contentType, modifyRequest); + return localVarResp.getData(); + } + + /** + * Execute modify request with HTTP info returned + * @return ApiResponse<Modify200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return modifyWithHttpInfo(id, contentType, modifyRequest); + } + + /** + * Execute modify request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return modifyAsync(id, contentType, modifyRequest, _callback); + } + } + + /** + * 编辑用户 + * + * @param id (required) + * @param contentType (required) + * @return APImodifyRequest + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功 -
400 参数错误 -
+ */ + public APImodifyRequest modify(String id, String contentType) { + return new APImodifyRequest(id, contentType); + } +} diff --git a/src/main/java/com/idmesh/auth/AccessKeyAuth.java b/src/main/java/com/idmesh/auth/AccessKeyAuth.java new file mode 100644 index 0000000..9127042 --- /dev/null +++ b/src/main/java/com/idmesh/auth/AccessKeyAuth.java @@ -0,0 +1,272 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.auth; + +import com.idmesh.*; +import org.bouncycastle.crypto.digests.SM3Digest; +import org.bouncycastle.crypto.macs.HMac; +import org.bouncycastle.crypto.params.KeyParameter; +import org.bouncycastle.jce.provider.BouncyCastleProvider; + +import java.io.UnsupportedEncodingException; +import java.lang.reflect.Field; +import java.math.BigInteger; +import java.net.URI; +import java.security.Security; +import java.util.*; + +public class AccessKeyAuth implements Authentication{ + private final String ENCODING = "UTF-8"; + + { + Security.addProvider(new BouncyCastleProvider()); + } + private String ak; + private String sk; + + public AccessKeyAuth(String ak, String sk) { + this.ak = ak; + this.sk = sk; + } + + private final List SIGN_KEYS = Arrays.asList("nonce", "timestamp"); + + public boolean isEmpty(String str) { + return str == null || str.length() == 0; + } + public boolean isTrimEmpty(String str) { + return str == null || str.trim().length() == 0; + } + + // 生成指定位数的随机字符串 + public String getRandomString(int length) { + String str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + int index = (int)(Math.random() * str.length()); + sb.append(str.charAt(index)); + } + return sb.toString(); + } + + public Long getTimestamp() { + return System.currentTimeMillis(); + } + + public String getSign(List params, String path, String ak, String sk, String nonce, Long timestamp) { + StringBuilder sb = new StringBuilder(path); + if (params == null) { + params = new ArrayList<>(); + } + params.add(new Pair("nonce", nonce)); + params.add(new Pair("timestamp", String.valueOf(timestamp))); + params.sort(Comparator.comparing(Pair::getName)); + for (Pair param : params) { + int i = SIGN_KEYS.indexOf(param.getName()); + if(i >= 0) { + sb.append(param.getName()).append("=").append(param.getValue()); + if (i < SIGN_KEYS.size() - 1) { + sb.append("&"); + } + } + } + sb.append(sk); + String sign = encrypt(sb.toString()); + sign = nonce + "$" + timestamp + "$v2$" + ak + "$sm3$" + sign; + return sign; + } + + /** + * sm3算法加密 + * + * @param paramStr 待加密字符串 + * @return 返回加密后,固定长度=32的16进制字符串 + * @explain + */ + public String encrypt(String paramStr) { + // 将返回的hash值转换成16进制字符串 + String resultHexString = ""; + try { + // 将字符串转换成byte数组 + byte[] srcData = paramStr.getBytes(ENCODING); + // 调用hash() + byte[] resultHash = hash(srcData); + // 将返回的hash值转换成16进制字符串 + resultHexString = byteArrayToHexString(resultHash); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + return resultHexString; + } + + /** + * 返回长度=32的byte数组 + * + * @param srcData + * @return + * @explain 生成对应的hash值 + */ + public byte[] hash(byte[] srcData) { + SM3Digest digest = new SM3Digest(); + digest.update(srcData, 0, srcData.length); + byte[] hash = new byte[digest.getDigestSize()]; + digest.doFinal(hash, 0); + return hash; + } + + /** + * sm3算法加密 + * + * @param paramStr 待加密字符串 + * @param key 密钥 + * @return 返回加密后,固定长度=32的16进制字符串 + * @explain + */ + public String encryptPlus(String paramStr, String key) { + // 将返回的hash值转换成16进制字符串 + String resultHexString = ""; + try { + // 将字符串转换成byte数组 + byte[] srcData = paramStr.getBytes(ENCODING); + // 调用hash() + byte[] resultHash = hmac(srcData, key.getBytes(ENCODING)); + // 将返回的hash值转换成16进制字符串 + resultHexString = byteArrayToHexString(resultHash); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + return resultHexString; + } + + /** + * 通过密钥进行加密 + * + * @param key 密钥 + * @param srcData 被加密的byte数组 + * @return + * @explain 指定密钥进行加密 + */ + public byte[] hmac(byte[] key, byte[] srcData) { + KeyParameter keyParameter = new KeyParameter(key); + SM3Digest digest = new SM3Digest(); + HMac mac = new HMac(digest); + mac.init(keyParameter); + mac.update(srcData, 0, srcData.length); + byte[] result = new byte[mac.getMacSize()]; + mac.doFinal(result, 0); + return result; + } + + /** + * 判断源数据与加密数据是否一致 + * + * @param srcStr 原字符串 + * @param sm3HexString 16进制字符串 + * @return 校验结果 + * @explain 通过验证原数组和生成的hash数组是否为同一数组,验证2者是否为同一数据 + */ + public boolean verify(String srcStr, String sm3HexString) { + boolean flag = false; + try { + byte[] srcData = srcStr.getBytes(ENCODING); + byte[] sm3Hash = hexStringToByteArray(sm3HexString); + byte[] newHash = hash(srcData); + if (Arrays.equals(newHash, sm3Hash)) + flag = true; + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + return flag; + } + + + public String getSign(Object body, String path, String ak, String sk, String nonce, Long timestamp) { + TreeMap map = printObjectProperties(body); + map.put("nonce", nonce); + map.put("timestamp", timestamp); + List params = new ArrayList<>(); + for (Map.Entry entry : map.entrySet()) { + params.add(new Pair(entry.getKey(), entry.getValue().toString())); + } + return this.getSign(params, path, ak, sk, nonce, timestamp); + } + + + public TreeMap printObjectProperties(Object obj) { + // 获取对象的类 + Class clazz = obj.getClass(); + + // 获取类的所有字段 + Field[] fields = clazz.getDeclaredFields(); + TreeMap map = new TreeMap<>(); + // 遍历字段并获取对应的值 + for (Field field : fields) { + field.setAccessible(true); // 设置为可访问,即使是私有字段 + + try { + Object value = field.get(obj); + map.put(field.getName(), value); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + } + return map; + } + + public static byte[] hexStringToByteArray(String hexString) { + int length = hexString.length(); + + // Ensure the hexString has an even length + if (length % 2 != 0) { + throw new IllegalArgumentException("Hex string must have an even length"); + } + + byte[] result = new byte[length / 2]; + + for (int i = 0; i < length; i += 2) { + String hexByte = hexString.substring(i, i + 2); + result[i / 2] = (byte) Integer.parseInt(hexByte, 16); + } + + return result; + } + + public static String byteArrayToHexString(byte[] bytes) { + BigInteger bigInt = new BigInteger(1, bytes); + String hexString = bigInt.toString(16); + + // Ensure the hexString has an even length by padding with zeros if needed + int paddingLength = (bytes.length * 2) - hexString.length(); + if (paddingLength > 0) { + return String.format("%0" + paddingLength + "d%s", 0, hexString); + } else { + return hexString; + } + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + // add sign header + if (isTrimEmpty(ak)) { + throw new ApiException("ak is null"); + } + if (isTrimEmpty(sk)) { + throw new ApiException("sk is null"); + } + String nonce = getRandomString(32); + Long timestamp = getTimestamp(); + String sign = getSign(null, uri.getPath(), ak, sk, nonce, timestamp); + headerParams.put("X-Idmesh-Signature", sign); + } +} diff --git a/src/main/java/com/idmesh/auth/ApiKeyAuth.java b/src/main/java/com/idmesh/auth/ApiKeyAuth.java new file mode 100644 index 0000000..e45302f --- /dev/null +++ b/src/main/java/com/idmesh/auth/ApiKeyAuth.java @@ -0,0 +1,80 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.auth; + +import com.idmesh.ApiException; +import com.idmesh.Pair; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); + } + } +} diff --git a/src/main/java/com/idmesh/auth/Authentication.java b/src/main/java/com/idmesh/auth/Authentication.java new file mode 100644 index 0000000..3ccc430 --- /dev/null +++ b/src/main/java/com/idmesh/auth/Authentication.java @@ -0,0 +1,36 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.auth; + +import com.idmesh.Pair; +import com.idmesh.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +public interface Authentication { + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + * @param payload HTTP request body + * @param method HTTP method + * @param uri URI + * @throws ApiException if failed to update the parameters + */ + void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; +} diff --git a/src/main/java/com/idmesh/auth/HttpBasicAuth.java b/src/main/java/com/idmesh/auth/HttpBasicAuth.java new file mode 100644 index 0000000..aec5c23 --- /dev/null +++ b/src/main/java/com/idmesh/auth/HttpBasicAuth.java @@ -0,0 +1,57 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.auth; + +import com.idmesh.Pair; +import com.idmesh.ApiException; + +import okhttp3.Credentials; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +import java.io.UnsupportedEncodingException; + +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + if (username == null && password == null) { + return; + } + headerParams.put("Authorization", Credentials.basic( + username == null ? "" : username, + password == null ? "" : password)); + } +} diff --git a/src/main/java/com/idmesh/auth/HttpBearerAuth.java b/src/main/java/com/idmesh/auth/HttpBearerAuth.java new file mode 100644 index 0000000..e181ac1 --- /dev/null +++ b/src/main/java/com/idmesh/auth/HttpBearerAuth.java @@ -0,0 +1,63 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.auth; + +import com.idmesh.ApiException; +import com.idmesh.Pair; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class HttpBearerAuth implements Authentication { + private final String scheme; + private String bearerToken; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return bearerToken; + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.bearerToken = bearerToken; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + if (bearerToken == null) { + return; + } + + headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/src/main/java/com/idmesh/model/AbstractOpenApiSchema.java b/src/main/java/com/idmesh/model/AbstractOpenApiSchema.java new file mode 100644 index 0000000..25bd292 --- /dev/null +++ b/src/main/java/com/idmesh/model/AbstractOpenApiSchema.java @@ -0,0 +1,148 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.idmesh.ApiException; +import java.util.Objects; +import java.lang.reflect.Type; +import java.util.Map; + +//import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map> getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + //@JsonValue + public Object getActualInstance() {return instance;} + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } + + + +} diff --git a/src/main/java/com/idmesh/model/App.java b/src/main/java/com/idmesh/model/App.java new file mode 100644 index 0000000..ae5bab5 --- /dev/null +++ b/src/main/java/com/idmesh/model/App.java @@ -0,0 +1,629 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * App + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class App { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_DEVELOPER_ID = "developer_id"; + @SerializedName(SERIALIZED_NAME_DEVELOPER_ID) + private String developerId; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private String tenantId; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_APP_ID = "app_id"; + @SerializedName(SERIALIZED_NAME_APP_ID) + private String appId; + + public static final String SERIALIZED_NAME_CATEGORY = "category"; + @SerializedName(SERIALIZED_NAME_CATEGORY) + private String category; + + public static final String SERIALIZED_NAME_APP_SECRET = "app_secret"; + @SerializedName(SERIALIZED_NAME_APP_SECRET) + private String appSecret; + + public static final String SERIALIZED_NAME_DESCR = "descr"; + @SerializedName(SERIALIZED_NAME_DESCR) + private String descr; + + public static final String SERIALIZED_NAME_LOGO = "logo"; + @SerializedName(SERIALIZED_NAME_LOGO) + private String logo; + + public static final String SERIALIZED_NAME_LOGIN_URL = "login_url"; + @SerializedName(SERIALIZED_NAME_LOGIN_URL) + private String loginUrl; + + public static final String SERIALIZED_NAME_DOMAIN = "domain"; + @SerializedName(SERIALIZED_NAME_DOMAIN) + private String domain; + + public static final String SERIALIZED_NAME_REDIRECT_URL = "redirect_url"; + @SerializedName(SERIALIZED_NAME_REDIRECT_URL) + private String redirectUrl; + + public static final String SERIALIZED_NAME_LOGOUT_URL = "logout_url"; + @SerializedName(SERIALIZED_NAME_LOGOUT_URL) + private String logoutUrl; + + public static final String SERIALIZED_NAME_SUB_ACCOUNT_POLICY = "sub_account_policy"; + @SerializedName(SERIALIZED_NAME_SUB_ACCOUNT_POLICY) + private Integer subAccountPolicy; + + public static final String SERIALIZED_NAME_PROP = "prop"; + @SerializedName(SERIALIZED_NAME_PROP) + private Object prop; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public App() { + } + /** + * 唯一标识 + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * 开发者ID + * @return developerId + **/ + @javax.annotation.Nonnull + public String getDeveloperId() { + return developerId; + } + + + public void setDeveloperId(String developerId) { + this.developerId = developerId; + } + + /** + * 租户ID + * @return tenantId + **/ + @javax.annotation.Nonnull + public String getTenantId() { + return tenantId; + } + + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + /** + * 应用名称 + * @return name + **/ + @javax.annotation.Nullable + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + /** + * 应用类型,1自建应用,2市场应用 + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * APPID + * @return appId + **/ + @javax.annotation.Nullable + public String getAppId() { + return appId; + } + + + public void setAppId(String appId) { + this.appId = appId; + } + + /** + * 应用分类,1 标准web应用,2单页web应用,3客户端应用,4后端服务 + * @return category + **/ + @javax.annotation.Nullable + public String getCategory() { + return category; + } + + + public void setCategory(String category) { + this.category = category; + } + + /** + * APPSEC,开发者用户调用返回 + * @return appSecret + **/ + @javax.annotation.Nullable + public String getAppSecret() { + return appSecret; + } + + + public void setAppSecret(String appSecret) { + this.appSecret = appSecret; + } + + /** + * 应用描述 + * @return descr + **/ + @javax.annotation.Nullable + public String getDescr() { + return descr; + } + + + public void setDescr(String descr) { + this.descr = descr; + } + + /** + * logo路径 + * @return logo + **/ + @javax.annotation.Nullable + public String getLogo() { + return logo; + } + + + public void setLogo(String logo) { + this.logo = logo; + } + + /** + * 登录路径 + * @return loginUrl + **/ + @javax.annotation.Nullable + public String getLoginUrl() { + return loginUrl; + } + + + public void setLoginUrl(String loginUrl) { + this.loginUrl = loginUrl; + } + + /** + * 应用绑定的唯一域名 + * @return domain + **/ + @javax.annotation.Nullable + public String getDomain() { + return domain; + } + + + public void setDomain(String domain) { + this.domain = domain; + } + + /** + * 重定向url + * @return redirectUrl + **/ + @javax.annotation.Nullable + public String getRedirectUrl() { + return redirectUrl; + } + + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + /** + * 登出url + * @return logoutUrl + **/ + @javax.annotation.Nullable + public String getLogoutUrl() { + return logoutUrl; + } + + + public void setLogoutUrl(String logoutUrl) { + this.logoutUrl = logoutUrl; + } + + /** + * 子账号策略 + * @return subAccountPolicy + **/ + @javax.annotation.Nullable + public Integer getSubAccountPolicy() { + return subAccountPolicy; + } + + + public void setSubAccountPolicy(Integer subAccountPolicy) { + this.subAccountPolicy = subAccountPolicy; + } + + /** + * 扩展属性 + * @return prop + **/ + @javax.annotation.Nullable + public Object getProp() { + return prop; + } + + + public void setProp(Object prop) { + this.prop = prop; + } + + /** + * 创建时间 + * @return timeCreated + **/ + @javax.annotation.Nullable + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * 更新时间 + * @return timeModified + **/ + @javax.annotation.Nullable + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + /** + * 状态,1启用,0禁用 + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + App app = (App) o; + return Objects.equals(this.id, app.id) && + Objects.equals(this.developerId, app.developerId) && + Objects.equals(this.tenantId, app.tenantId) && + Objects.equals(this.name, app.name) && + Objects.equals(this.type, app.type) && + Objects.equals(this.appId, app.appId) && + Objects.equals(this.category, app.category) && + Objects.equals(this.appSecret, app.appSecret) && + Objects.equals(this.descr, app.descr) && + Objects.equals(this.logo, app.logo) && + Objects.equals(this.loginUrl, app.loginUrl) && + Objects.equals(this.domain, app.domain) && + Objects.equals(this.redirectUrl, app.redirectUrl) && + Objects.equals(this.logoutUrl, app.logoutUrl) && + Objects.equals(this.subAccountPolicy, app.subAccountPolicy) && + Objects.equals(this.prop, app.prop) && + Objects.equals(this.timeCreated, app.timeCreated) && + Objects.equals(this.timeModified, app.timeModified) && + Objects.equals(this.status, app.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, developerId, tenantId, name, type, appId, category, appSecret, descr, logo, loginUrl, domain, redirectUrl, logoutUrl, subAccountPolicy, prop, timeCreated, timeModified, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class App {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" developerId: ").append(toIndentedString(developerId)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" appSecret: ").append(toIndentedString(appSecret)).append("\n"); + sb.append(" descr: ").append(toIndentedString(descr)).append("\n"); + sb.append(" logo: ").append(toIndentedString(logo)).append("\n"); + sb.append(" loginUrl: ").append(toIndentedString(loginUrl)).append("\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" redirectUrl: ").append(toIndentedString(redirectUrl)).append("\n"); + sb.append(" logoutUrl: ").append(toIndentedString(logoutUrl)).append("\n"); + sb.append(" subAccountPolicy: ").append(toIndentedString(subAccountPolicy)).append("\n"); + sb.append(" prop: ").append(toIndentedString(prop)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("developer_id"); + openapiFields.add("tenant_id"); + openapiFields.add("name"); + openapiFields.add("type"); + openapiFields.add("app_id"); + openapiFields.add("category"); + openapiFields.add("app_secret"); + openapiFields.add("descr"); + openapiFields.add("logo"); + openapiFields.add("login_url"); + openapiFields.add("domain"); + openapiFields.add("redirect_url"); + openapiFields.add("logout_url"); + openapiFields.add("sub_account_policy"); + openapiFields.add("prop"); + openapiFields.add("time_created"); + openapiFields.add("time_modified"); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("developer_id"); + openapiRequiredFields.add("tenant_id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to App + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!App.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in App is not found in the empty JSON string", App.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : App.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("developer_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `developer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("developer_id").toString())); + } + if (!jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("app_id") != null && !jsonObj.get("app_id").isJsonNull()) && !jsonObj.get("app_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `app_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("app_id").toString())); + } + if ((jsonObj.get("category") != null && !jsonObj.get("category").isJsonNull()) && !jsonObj.get("category").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); + } + if ((jsonObj.get("app_secret") != null && !jsonObj.get("app_secret").isJsonNull()) && !jsonObj.get("app_secret").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `app_secret` to be a primitive type in the JSON string but got `%s`", jsonObj.get("app_secret").toString())); + } + if ((jsonObj.get("descr") != null && !jsonObj.get("descr").isJsonNull()) && !jsonObj.get("descr").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `descr` to be a primitive type in the JSON string but got `%s`", jsonObj.get("descr").toString())); + } + if ((jsonObj.get("logo") != null && !jsonObj.get("logo").isJsonNull()) && !jsonObj.get("logo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `logo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logo").toString())); + } + if ((jsonObj.get("login_url") != null && !jsonObj.get("login_url").isJsonNull()) && !jsonObj.get("login_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `login_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("login_url").toString())); + } + if ((jsonObj.get("domain") != null && !jsonObj.get("domain").isJsonNull()) && !jsonObj.get("domain").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `domain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("domain").toString())); + } + if ((jsonObj.get("redirect_url") != null && !jsonObj.get("redirect_url").isJsonNull()) && !jsonObj.get("redirect_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `redirect_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirect_url").toString())); + } + if ((jsonObj.get("logout_url") != null && !jsonObj.get("logout_url").isJsonNull()) && !jsonObj.get("logout_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `logout_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logout_url").toString())); + } + if ((jsonObj.get("time_created") != null && !jsonObj.get("time_created").isJsonNull()) && !jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if ((jsonObj.get("time_modified") != null && !jsonObj.get("time_modified").isJsonNull()) && !jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!App.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'App' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(App.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, App value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public App read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of App given an JSON string + * + * @param jsonString JSON string + * @return An instance of App + * @throws IOException if the JSON string is invalid with respect to App + */ + public static App fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, App.class); + } + + /** + * Convert an instance of App to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/AppConfig.java b/src/main/java/com/idmesh/model/AppConfig.java new file mode 100644 index 0000000..f86434e --- /dev/null +++ b/src/main/java/com/idmesh/model/AppConfig.java @@ -0,0 +1,564 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.AppConfigAllowedIdProvider; +import com.idmesh.model.MFA; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * AppConfig + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AppConfig { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_APP_ID = "app_id"; + @SerializedName(SERIALIZED_NAME_APP_ID) + private String appId; + + public static final String SERIALIZED_NAME_ALLOWED_LOGIN_METHOD = "allowed_login_method"; + @SerializedName(SERIALIZED_NAME_ALLOWED_LOGIN_METHOD) + private String allowedLoginMethod; + + public static final String SERIALIZED_NAME_DEFAULT_LOGIN_METHOD = "default_login_method"; + @SerializedName(SERIALIZED_NAME_DEFAULT_LOGIN_METHOD) + private String defaultLoginMethod; + + public static final String SERIALIZED_NAME_ALLOWED_REG_METHOD = "allowed_reg_method"; + @SerializedName(SERIALIZED_NAME_ALLOWED_REG_METHOD) + private String allowedRegMethod; + + public static final String SERIALIZED_NAME_DEFAULT_REG_METHOD = "default_reg_method"; + @SerializedName(SERIALIZED_NAME_DEFAULT_REG_METHOD) + private String defaultRegMethod; + + public static final String SERIALIZED_NAME_ACCESS_POLICY = "access_policy"; + @SerializedName(SERIALIZED_NAME_ACCESS_POLICY) + private String accessPolicy; + + public static final String SERIALIZED_NAME_REG_POLICY = "reg_policy"; + @SerializedName(SERIALIZED_NAME_REG_POLICY) + private String regPolicy; + + public static final String SERIALIZED_NAME_ALLOWED_ID_PROVIDER = "allowed_id_provider"; + @SerializedName(SERIALIZED_NAME_ALLOWED_ID_PROVIDER) + private AppConfigAllowedIdProvider allowedIdProvider; + + public static final String SERIALIZED_NAME_SSO_ENABLED = "sso_enabled"; + @SerializedName(SERIALIZED_NAME_SSO_ENABLED) + private Boolean ssoEnabled; + + public static final String SERIALIZED_NAME_MFA_ENABLED = "mfa_enabled"; + @SerializedName(SERIALIZED_NAME_MFA_ENABLED) + private Boolean mfaEnabled; + + public static final String SERIALIZED_NAME_MFA_CONFIG = "mfa_config"; + @SerializedName(SERIALIZED_NAME_MFA_CONFIG) + private MFA mfaConfig; + + public static final String SERIALIZED_NAME_ACCESS_CONTROL_ENABLED = "access_control_enabled"; + @SerializedName(SERIALIZED_NAME_ACCESS_CONTROL_ENABLED) + private Boolean accessControlEnabled; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public AppConfig() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * Get appId + * @return appId + **/ + @javax.annotation.Nonnull + public String getAppId() { + return appId; + } + + + public void setAppId(String appId) { + this.appId = appId; + } + + /** + * 格式为:[\"password\", \"vercode\"] + * @return allowedLoginMethod + **/ + @javax.annotation.Nullable + public String getAllowedLoginMethod() { + return allowedLoginMethod; + } + + + public void setAllowedLoginMethod(String allowedLoginMethod) { + this.allowedLoginMethod = allowedLoginMethod; + } + + /** + * 格式为:password + * @return defaultLoginMethod + **/ + @javax.annotation.Nullable + public String getDefaultLoginMethod() { + return defaultLoginMethod; + } + + + public void setDefaultLoginMethod(String defaultLoginMethod) { + this.defaultLoginMethod = defaultLoginMethod; + } + + /** + * 格式为:[\"mobile\", \"email\"] + * @return allowedRegMethod + **/ + @javax.annotation.Nullable + public String getAllowedRegMethod() { + return allowedRegMethod; + } + + + public void setAllowedRegMethod(String allowedRegMethod) { + this.allowedRegMethod = allowedRegMethod; + } + + /** + * 格式为:mobile + * @return defaultRegMethod + **/ + @javax.annotation.Nullable + public String getDefaultRegMethod() { + return defaultRegMethod; + } + + + public void setDefaultRegMethod(String defaultRegMethod) { + this.defaultRegMethod = defaultRegMethod; + } + + /** + * permitted,all + * @return accessPolicy + **/ + @javax.annotation.Nullable + public String getAccessPolicy() { + return accessPolicy; + } + + + public void setAccessPolicy(String accessPolicy) { + this.accessPolicy = accessPolicy; + } + + /** + * Get regPolicy + * @return regPolicy + **/ + @javax.annotation.Nullable + public String getRegPolicy() { + return regPolicy; + } + + + public void setRegPolicy(String regPolicy) { + this.regPolicy = regPolicy; + } + + /** + * Get allowedIdProvider + * @return allowedIdProvider + **/ + @javax.annotation.Nullable + public AppConfigAllowedIdProvider getAllowedIdProvider() { + return allowedIdProvider; + } + + + public void setAllowedIdProvider(AppConfigAllowedIdProvider allowedIdProvider) { + this.allowedIdProvider = allowedIdProvider; + } + + /** + * Get ssoEnabled + * @return ssoEnabled + **/ + @javax.annotation.Nonnull + public Boolean getSsoEnabled() { + return ssoEnabled; + } + + + public void setSsoEnabled(Boolean ssoEnabled) { + this.ssoEnabled = ssoEnabled; + } + + /** + * Get mfaEnabled + * @return mfaEnabled + **/ + @javax.annotation.Nonnull + public Boolean getMfaEnabled() { + return mfaEnabled; + } + + + public void setMfaEnabled(Boolean mfaEnabled) { + this.mfaEnabled = mfaEnabled; + } + + /** + * Get mfaConfig + * @return mfaConfig + **/ + @javax.annotation.Nullable + public MFA getMfaConfig() { + return mfaConfig; + } + + + public void setMfaConfig(MFA mfaConfig) { + this.mfaConfig = mfaConfig; + } + + /** + * Get accessControlEnabled + * @return accessControlEnabled + **/ + @javax.annotation.Nonnull + public Boolean getAccessControlEnabled() { + return accessControlEnabled; + } + + + public void setAccessControlEnabled(Boolean accessControlEnabled) { + this.accessControlEnabled = accessControlEnabled; + } + + /** + * Get timeCreated + * @return timeCreated + **/ + @javax.annotation.Nonnull + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * Get timeModified + * @return timeModified + **/ + @javax.annotation.Nonnull + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + /** + * 1启用,0禁用 + * @return status + **/ + @javax.annotation.Nonnull + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppConfig appConfig = (AppConfig) o; + return Objects.equals(this.id, appConfig.id) && + Objects.equals(this.appId, appConfig.appId) && + Objects.equals(this.allowedLoginMethod, appConfig.allowedLoginMethod) && + Objects.equals(this.defaultLoginMethod, appConfig.defaultLoginMethod) && + Objects.equals(this.allowedRegMethod, appConfig.allowedRegMethod) && + Objects.equals(this.defaultRegMethod, appConfig.defaultRegMethod) && + Objects.equals(this.accessPolicy, appConfig.accessPolicy) && + Objects.equals(this.regPolicy, appConfig.regPolicy) && + Objects.equals(this.allowedIdProvider, appConfig.allowedIdProvider) && + Objects.equals(this.ssoEnabled, appConfig.ssoEnabled) && + Objects.equals(this.mfaEnabled, appConfig.mfaEnabled) && + Objects.equals(this.mfaConfig, appConfig.mfaConfig) && + Objects.equals(this.accessControlEnabled, appConfig.accessControlEnabled) && + Objects.equals(this.timeCreated, appConfig.timeCreated) && + Objects.equals(this.timeModified, appConfig.timeModified) && + Objects.equals(this.status, appConfig.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, appId, allowedLoginMethod, defaultLoginMethod, allowedRegMethod, defaultRegMethod, accessPolicy, regPolicy, allowedIdProvider, ssoEnabled, mfaEnabled, mfaConfig, accessControlEnabled, timeCreated, timeModified, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppConfig {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); + sb.append(" allowedLoginMethod: ").append(toIndentedString(allowedLoginMethod)).append("\n"); + sb.append(" defaultLoginMethod: ").append(toIndentedString(defaultLoginMethod)).append("\n"); + sb.append(" allowedRegMethod: ").append(toIndentedString(allowedRegMethod)).append("\n"); + sb.append(" defaultRegMethod: ").append(toIndentedString(defaultRegMethod)).append("\n"); + sb.append(" accessPolicy: ").append(toIndentedString(accessPolicy)).append("\n"); + sb.append(" regPolicy: ").append(toIndentedString(regPolicy)).append("\n"); + sb.append(" allowedIdProvider: ").append(toIndentedString(allowedIdProvider)).append("\n"); + sb.append(" ssoEnabled: ").append(toIndentedString(ssoEnabled)).append("\n"); + sb.append(" mfaEnabled: ").append(toIndentedString(mfaEnabled)).append("\n"); + sb.append(" mfaConfig: ").append(toIndentedString(mfaConfig)).append("\n"); + sb.append(" accessControlEnabled: ").append(toIndentedString(accessControlEnabled)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("app_id"); + openapiFields.add("allowed_login_method"); + openapiFields.add("default_login_method"); + openapiFields.add("allowed_reg_method"); + openapiFields.add("default_reg_method"); + openapiFields.add("access_policy"); + openapiFields.add("reg_policy"); + openapiFields.add("allowed_id_provider"); + openapiFields.add("sso_enabled"); + openapiFields.add("mfa_enabled"); + openapiFields.add("mfa_config"); + openapiFields.add("access_control_enabled"); + openapiFields.add("time_created"); + openapiFields.add("time_modified"); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("app_id"); + openapiRequiredFields.add("sso_enabled"); + openapiRequiredFields.add("mfa_enabled"); + openapiRequiredFields.add("access_control_enabled"); + openapiRequiredFields.add("time_created"); + openapiRequiredFields.add("time_modified"); + openapiRequiredFields.add("status"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppConfig + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AppConfig is not found in the empty JSON string", AppConfig.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppConfig.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("app_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `app_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("app_id").toString())); + } + if ((jsonObj.get("allowed_login_method") != null && !jsonObj.get("allowed_login_method").isJsonNull()) && !jsonObj.get("allowed_login_method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `allowed_login_method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("allowed_login_method").toString())); + } + if ((jsonObj.get("default_login_method") != null && !jsonObj.get("default_login_method").isJsonNull()) && !jsonObj.get("default_login_method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `default_login_method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_login_method").toString())); + } + if ((jsonObj.get("allowed_reg_method") != null && !jsonObj.get("allowed_reg_method").isJsonNull()) && !jsonObj.get("allowed_reg_method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `allowed_reg_method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("allowed_reg_method").toString())); + } + if ((jsonObj.get("default_reg_method") != null && !jsonObj.get("default_reg_method").isJsonNull()) && !jsonObj.get("default_reg_method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `default_reg_method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_reg_method").toString())); + } + if ((jsonObj.get("access_policy") != null && !jsonObj.get("access_policy").isJsonNull()) && !jsonObj.get("access_policy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `access_policy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_policy").toString())); + } + if ((jsonObj.get("reg_policy") != null && !jsonObj.get("reg_policy").isJsonNull()) && !jsonObj.get("reg_policy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `reg_policy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reg_policy").toString())); + } + // validate the optional field `allowed_id_provider` + if (jsonObj.get("allowed_id_provider") != null && !jsonObj.get("allowed_id_provider").isJsonNull()) { + AppConfigAllowedIdProvider.validateJsonElement(jsonObj.get("allowed_id_provider")); + } + // validate the optional field `mfa_config` + if (jsonObj.get("mfa_config") != null && !jsonObj.get("mfa_config").isJsonNull()) { + MFA.validateJsonElement(jsonObj.get("mfa_config")); + } + if (!jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if (!jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppConfig.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppConfig' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppConfig.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppConfig value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AppConfig read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppConfig given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppConfig + * @throws IOException if the JSON string is invalid with respect to AppConfig + */ + public static AppConfig fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppConfig.class); + } + + /** + * Convert an instance of AppConfig to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/AppConfigAllowedIdProvider.java b/src/main/java/com/idmesh/model/AppConfigAllowedIdProvider.java new file mode 100644 index 0000000..3eab784 --- /dev/null +++ b/src/main/java/com/idmesh/model/AppConfigAllowedIdProvider.java @@ -0,0 +1,302 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * 格式为:{\"wechat_scan_qr\": 1, \"dingding_scan_qr\": 2} + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AppConfigAllowedIdProvider { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_IDP_CODE = "idp_code"; + @SerializedName(SERIALIZED_NAME_IDP_CODE) + private String idpCode; + + public static final String SERIALIZED_NAME_IDP_CONFIG_ID = "idp_config_id"; + @SerializedName(SERIALIZED_NAME_IDP_CONFIG_ID) + private String idpConfigId; + + public static final String SERIALIZED_NAME_AUTH_METHOD_CODE = "auth_method_code"; + @SerializedName(SERIALIZED_NAME_AUTH_METHOD_CODE) + private String authMethodCode; + + public static final String SERIALIZED_NAME_AUTH_METHOD_DISPLAY_NAME = "auth_method_display_name"; + @SerializedName(SERIALIZED_NAME_AUTH_METHOD_DISPLAY_NAME) + private String authMethodDisplayName; + + public AppConfigAllowedIdProvider() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * Get idpCode + * @return idpCode + **/ + @javax.annotation.Nonnull + public String getIdpCode() { + return idpCode; + } + + + public void setIdpCode(String idpCode) { + this.idpCode = idpCode; + } + + /** + * Get idpConfigId + * @return idpConfigId + **/ + @javax.annotation.Nonnull + public String getIdpConfigId() { + return idpConfigId; + } + + + public void setIdpConfigId(String idpConfigId) { + this.idpConfigId = idpConfigId; + } + + /** + * Get authMethodCode + * @return authMethodCode + **/ + @javax.annotation.Nonnull + public String getAuthMethodCode() { + return authMethodCode; + } + + + public void setAuthMethodCode(String authMethodCode) { + this.authMethodCode = authMethodCode; + } + + /** + * Get authMethodDisplayName + * @return authMethodDisplayName + **/ + @javax.annotation.Nonnull + public String getAuthMethodDisplayName() { + return authMethodDisplayName; + } + + + public void setAuthMethodDisplayName(String authMethodDisplayName) { + this.authMethodDisplayName = authMethodDisplayName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppConfigAllowedIdProvider appConfigAllowedIdProvider = (AppConfigAllowedIdProvider) o; + return Objects.equals(this.id, appConfigAllowedIdProvider.id) && + Objects.equals(this.idpCode, appConfigAllowedIdProvider.idpCode) && + Objects.equals(this.idpConfigId, appConfigAllowedIdProvider.idpConfigId) && + Objects.equals(this.authMethodCode, appConfigAllowedIdProvider.authMethodCode) && + Objects.equals(this.authMethodDisplayName, appConfigAllowedIdProvider.authMethodDisplayName); + } + + @Override + public int hashCode() { + return Objects.hash(id, idpCode, idpConfigId, authMethodCode, authMethodDisplayName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppConfigAllowedIdProvider {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" idpCode: ").append(toIndentedString(idpCode)).append("\n"); + sb.append(" idpConfigId: ").append(toIndentedString(idpConfigId)).append("\n"); + sb.append(" authMethodCode: ").append(toIndentedString(authMethodCode)).append("\n"); + sb.append(" authMethodDisplayName: ").append(toIndentedString(authMethodDisplayName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("idp_code"); + openapiFields.add("idp_config_id"); + openapiFields.add("auth_method_code"); + openapiFields.add("auth_method_display_name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("idp_code"); + openapiRequiredFields.add("idp_config_id"); + openapiRequiredFields.add("auth_method_code"); + openapiRequiredFields.add("auth_method_display_name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppConfigAllowedIdProvider + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppConfigAllowedIdProvider.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AppConfigAllowedIdProvider is not found in the empty JSON string", AppConfigAllowedIdProvider.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppConfigAllowedIdProvider.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("idp_code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `idp_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idp_code").toString())); + } + if (!jsonObj.get("idp_config_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `idp_config_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idp_config_id").toString())); + } + if (!jsonObj.get("auth_method_code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `auth_method_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("auth_method_code").toString())); + } + if (!jsonObj.get("auth_method_display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `auth_method_display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("auth_method_display_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppConfigAllowedIdProvider.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppConfigAllowedIdProvider' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppConfigAllowedIdProvider.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppConfigAllowedIdProvider value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AppConfigAllowedIdProvider read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppConfigAllowedIdProvider given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppConfigAllowedIdProvider + * @throws IOException if the JSON string is invalid with respect to AppConfigAllowedIdProvider + */ + public static AppConfigAllowedIdProvider fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppConfigAllowedIdProvider.class); + } + + /** + * Convert an instance of AppConfigAllowedIdProvider to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/AppDetail.java b/src/main/java/com/idmesh/model/AppDetail.java new file mode 100644 index 0000000..bcfc6cd --- /dev/null +++ b/src/main/java/com/idmesh/model/AppDetail.java @@ -0,0 +1,702 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * AppDetail + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AppDetail { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_DEVELOPER_ID = "developer_id"; + @SerializedName(SERIALIZED_NAME_DEVELOPER_ID) + private String developerId; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private String tenantId; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_APP_ID = "app_id"; + @SerializedName(SERIALIZED_NAME_APP_ID) + private String appId; + + public static final String SERIALIZED_NAME_CATEGORY = "category"; + @SerializedName(SERIALIZED_NAME_CATEGORY) + private String category; + + public static final String SERIALIZED_NAME_APP_SECRET = "app_secret"; + @SerializedName(SERIALIZED_NAME_APP_SECRET) + private String appSecret; + + public static final String SERIALIZED_NAME_DESCR = "descr"; + @SerializedName(SERIALIZED_NAME_DESCR) + private String descr; + + public static final String SERIALIZED_NAME_LOGO = "logo"; + @SerializedName(SERIALIZED_NAME_LOGO) + private String logo; + + public static final String SERIALIZED_NAME_LOGIN_URL = "login_url"; + @SerializedName(SERIALIZED_NAME_LOGIN_URL) + private String loginUrl; + + public static final String SERIALIZED_NAME_DOMAIN = "domain"; + @SerializedName(SERIALIZED_NAME_DOMAIN) + private String domain; + + public static final String SERIALIZED_NAME_DOMAIN_SN = "domain_sn"; + @SerializedName(SERIALIZED_NAME_DOMAIN_SN) + private String domainSn; + + public static final String SERIALIZED_NAME_REDIRECT_URL = "redirect_url"; + @SerializedName(SERIALIZED_NAME_REDIRECT_URL) + private String redirectUrl; + + public static final String SERIALIZED_NAME_LOGOUT_URL = "logout_url"; + @SerializedName(SERIALIZED_NAME_LOGOUT_URL) + private String logoutUrl; + + public static final String SERIALIZED_NAME_SUB_ACCOUNT_POLICY = "sub_account_policy"; + @SerializedName(SERIALIZED_NAME_SUB_ACCOUNT_POLICY) + private Integer subAccountPolicy; + + public static final String SERIALIZED_NAME_PROP = "prop"; + @SerializedName(SERIALIZED_NAME_PROP) + private Object prop; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_CONFIG = "config"; + @SerializedName(SERIALIZED_NAME_CONFIG) + private Object config; + + public static final String SERIALIZED_NAME_PROTOCOLS = "protocols"; + @SerializedName(SERIALIZED_NAME_PROTOCOLS) + private List protocols; + + public AppDetail() { + } + /** + * 唯一标识 + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * 开发者ID + * @return developerId + **/ + @javax.annotation.Nonnull + public String getDeveloperId() { + return developerId; + } + + + public void setDeveloperId(String developerId) { + this.developerId = developerId; + } + + /** + * 租户ID + * @return tenantId + **/ + @javax.annotation.Nonnull + public String getTenantId() { + return tenantId; + } + + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + /** + * 应用名称 + * @return name + **/ + @javax.annotation.Nullable + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + /** + * 应用类型,1自建应用,2市场应用 + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * APPID + * @return appId + **/ + @javax.annotation.Nullable + public String getAppId() { + return appId; + } + + + public void setAppId(String appId) { + this.appId = appId; + } + + /** + * 应用分类,1 标准web应用,2单页web应用,3客户端应用,4后端服务 + * @return category + **/ + @javax.annotation.Nullable + public String getCategory() { + return category; + } + + + public void setCategory(String category) { + this.category = category; + } + + /** + * APPSEC,开发者用户调用返回 + * @return appSecret + **/ + @javax.annotation.Nullable + public String getAppSecret() { + return appSecret; + } + + + public void setAppSecret(String appSecret) { + this.appSecret = appSecret; + } + + /** + * 应用描述 + * @return descr + **/ + @javax.annotation.Nullable + public String getDescr() { + return descr; + } + + + public void setDescr(String descr) { + this.descr = descr; + } + + /** + * logo路径 + * @return logo + **/ + @javax.annotation.Nullable + public String getLogo() { + return logo; + } + + + public void setLogo(String logo) { + this.logo = logo; + } + + /** + * 登录路径 + * @return loginUrl + **/ + @javax.annotation.Nullable + public String getLoginUrl() { + return loginUrl; + } + + + public void setLoginUrl(String loginUrl) { + this.loginUrl = loginUrl; + } + + /** + * 应用绑定的唯一域名 + * @return domain + **/ + @javax.annotation.Nullable + public String getDomain() { + return domain; + } + + + public void setDomain(String domain) { + this.domain = domain; + } + + /** + * 应用域名 SN + * @return domainSn + **/ + @javax.annotation.Nullable + public String getDomainSn() { + return domainSn; + } + + + public void setDomainSn(String domainSn) { + this.domainSn = domainSn; + } + + /** + * 重定向url + * @return redirectUrl + **/ + @javax.annotation.Nullable + public String getRedirectUrl() { + return redirectUrl; + } + + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + /** + * 登出url + * @return logoutUrl + **/ + @javax.annotation.Nullable + public String getLogoutUrl() { + return logoutUrl; + } + + + public void setLogoutUrl(String logoutUrl) { + this.logoutUrl = logoutUrl; + } + + /** + * 子账号策略 + * @return subAccountPolicy + **/ + @javax.annotation.Nullable + public Integer getSubAccountPolicy() { + return subAccountPolicy; + } + + + public void setSubAccountPolicy(Integer subAccountPolicy) { + this.subAccountPolicy = subAccountPolicy; + } + + /** + * 扩展属性 + * @return prop + **/ + @javax.annotation.Nullable + public Object getProp() { + return prop; + } + + + public void setProp(Object prop) { + this.prop = prop; + } + + /** + * 创建时间 + * @return timeCreated + **/ + @javax.annotation.Nullable + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * 更新时间 + * @return timeModified + **/ + @javax.annotation.Nullable + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + /** + * 状态,1启用,0禁用 + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + /** + * Get config + * @return config + **/ + @javax.annotation.Nonnull + public Object getConfig() { + return config; + } + + + public void setConfig(Object config) { + this.config = config; + } + + /** + * Get protocols + * @return protocols + **/ + @javax.annotation.Nullable + public List getProtocols() { + return protocols; + } + + + public void setProtocols(List protocols) { + this.protocols = protocols; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppDetail appDetail = (AppDetail) o; + return Objects.equals(this.id, appDetail.id) && + Objects.equals(this.developerId, appDetail.developerId) && + Objects.equals(this.tenantId, appDetail.tenantId) && + Objects.equals(this.name, appDetail.name) && + Objects.equals(this.type, appDetail.type) && + Objects.equals(this.appId, appDetail.appId) && + Objects.equals(this.category, appDetail.category) && + Objects.equals(this.appSecret, appDetail.appSecret) && + Objects.equals(this.descr, appDetail.descr) && + Objects.equals(this.logo, appDetail.logo) && + Objects.equals(this.loginUrl, appDetail.loginUrl) && + Objects.equals(this.domain, appDetail.domain) && + Objects.equals(this.domainSn, appDetail.domainSn) && + Objects.equals(this.redirectUrl, appDetail.redirectUrl) && + Objects.equals(this.logoutUrl, appDetail.logoutUrl) && + Objects.equals(this.subAccountPolicy, appDetail.subAccountPolicy) && + Objects.equals(this.prop, appDetail.prop) && + Objects.equals(this.timeCreated, appDetail.timeCreated) && + Objects.equals(this.timeModified, appDetail.timeModified) && + Objects.equals(this.status, appDetail.status) && + Objects.equals(this.config, appDetail.config) && + Objects.equals(this.protocols, appDetail.protocols); + } + + @Override + public int hashCode() { + return Objects.hash(id, developerId, tenantId, name, type, appId, category, appSecret, descr, logo, loginUrl, domain, domainSn, redirectUrl, logoutUrl, subAccountPolicy, prop, timeCreated, timeModified, status, config, protocols); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppDetail {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" developerId: ").append(toIndentedString(developerId)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" appSecret: ").append(toIndentedString(appSecret)).append("\n"); + sb.append(" descr: ").append(toIndentedString(descr)).append("\n"); + sb.append(" logo: ").append(toIndentedString(logo)).append("\n"); + sb.append(" loginUrl: ").append(toIndentedString(loginUrl)).append("\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" domainSn: ").append(toIndentedString(domainSn)).append("\n"); + sb.append(" redirectUrl: ").append(toIndentedString(redirectUrl)).append("\n"); + sb.append(" logoutUrl: ").append(toIndentedString(logoutUrl)).append("\n"); + sb.append(" subAccountPolicy: ").append(toIndentedString(subAccountPolicy)).append("\n"); + sb.append(" prop: ").append(toIndentedString(prop)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" protocols: ").append(toIndentedString(protocols)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("developer_id"); + openapiFields.add("tenant_id"); + openapiFields.add("name"); + openapiFields.add("type"); + openapiFields.add("app_id"); + openapiFields.add("category"); + openapiFields.add("app_secret"); + openapiFields.add("descr"); + openapiFields.add("logo"); + openapiFields.add("login_url"); + openapiFields.add("domain"); + openapiFields.add("domain_sn"); + openapiFields.add("redirect_url"); + openapiFields.add("logout_url"); + openapiFields.add("sub_account_policy"); + openapiFields.add("prop"); + openapiFields.add("time_created"); + openapiFields.add("time_modified"); + openapiFields.add("status"); + openapiFields.add("config"); + openapiFields.add("protocols"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("developer_id"); + openapiRequiredFields.add("tenant_id"); + openapiRequiredFields.add("config"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppDetail + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppDetail.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AppDetail is not found in the empty JSON string", AppDetail.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppDetail.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("developer_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `developer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("developer_id").toString())); + } + if (!jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("app_id") != null && !jsonObj.get("app_id").isJsonNull()) && !jsonObj.get("app_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `app_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("app_id").toString())); + } + if ((jsonObj.get("category") != null && !jsonObj.get("category").isJsonNull()) && !jsonObj.get("category").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); + } + if ((jsonObj.get("app_secret") != null && !jsonObj.get("app_secret").isJsonNull()) && !jsonObj.get("app_secret").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `app_secret` to be a primitive type in the JSON string but got `%s`", jsonObj.get("app_secret").toString())); + } + if ((jsonObj.get("descr") != null && !jsonObj.get("descr").isJsonNull()) && !jsonObj.get("descr").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `descr` to be a primitive type in the JSON string but got `%s`", jsonObj.get("descr").toString())); + } + if ((jsonObj.get("logo") != null && !jsonObj.get("logo").isJsonNull()) && !jsonObj.get("logo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `logo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logo").toString())); + } + if ((jsonObj.get("login_url") != null && !jsonObj.get("login_url").isJsonNull()) && !jsonObj.get("login_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `login_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("login_url").toString())); + } + if ((jsonObj.get("domain") != null && !jsonObj.get("domain").isJsonNull()) && !jsonObj.get("domain").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `domain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("domain").toString())); + } + if ((jsonObj.get("domain_sn") != null && !jsonObj.get("domain_sn").isJsonNull()) && !jsonObj.get("domain_sn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `domain_sn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("domain_sn").toString())); + } + if ((jsonObj.get("redirect_url") != null && !jsonObj.get("redirect_url").isJsonNull()) && !jsonObj.get("redirect_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `redirect_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirect_url").toString())); + } + if ((jsonObj.get("logout_url") != null && !jsonObj.get("logout_url").isJsonNull()) && !jsonObj.get("logout_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `logout_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logout_url").toString())); + } + if ((jsonObj.get("time_created") != null && !jsonObj.get("time_created").isJsonNull()) && !jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if ((jsonObj.get("time_modified") != null && !jsonObj.get("time_modified").isJsonNull()) && !jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("protocols") != null && !jsonObj.get("protocols").isJsonNull() && !jsonObj.get("protocols").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `protocols` to be an array in the JSON string but got `%s`", jsonObj.get("protocols").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppDetail.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppDetail' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppDetail.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppDetail value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AppDetail read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppDetail given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppDetail + * @throws IOException if the JSON string is invalid with respect to AppDetail + */ + public static AppDetail fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppDetail.class); + } + + /** + * Convert an instance of AppDetail to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/AppSubAccount.java b/src/main/java/com/idmesh/model/AppSubAccount.java new file mode 100644 index 0000000..907f8df --- /dev/null +++ b/src/main/java/com/idmesh/model/AppSubAccount.java @@ -0,0 +1,574 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * AppSubAccount + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AppSubAccount { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_USER_ID = "user_id"; + @SerializedName(SERIALIZED_NAME_USER_ID) + private String userId; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + private String username; + + public static final String SERIALIZED_NAME_APP_ID = "app_id"; + @SerializedName(SERIALIZED_NAME_APP_ID) + private String appId; + + public static final String SERIALIZED_NAME_APP_NAME = "app_name"; + @SerializedName(SERIALIZED_NAME_APP_NAME) + private String appName; + + public static final String SERIALIZED_NAME_ACC_NAME = "acc_name"; + @SerializedName(SERIALIZED_NAME_ACC_NAME) + private String accName; + + public static final String SERIALIZED_NAME_ACC_NAME_DISPLAYED = "acc_name_displayed"; + @SerializedName(SERIALIZED_NAME_ACC_NAME_DISPLAYED) + private String accNameDisplayed; + + public static final String SERIALIZED_NAME_ACC_SOURCE = "acc_source"; + @SerializedName(SERIALIZED_NAME_ACC_SOURCE) + private String accSource; + + public static final String SERIALIZED_NAME_DEVELOPER_ID = "developer_id"; + @SerializedName(SERIALIZED_NAME_DEVELOPER_ID) + private String developerId; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private String tenantId; + + public static final String SERIALIZED_NAME_ACC_PASSWORD = "acc_password"; + @SerializedName(SERIALIZED_NAME_ACC_PASSWORD) + private String accPassword; + + public static final String SERIALIZED_NAME_ACC_STATUS = "acc_status"; + @SerializedName(SERIALIZED_NAME_ACC_STATUS) + private String accStatus; + + public static final String SERIALIZED_NAME_ACC_SYNC_STATUS = "acc_sync_status"; + @SerializedName(SERIALIZED_NAME_ACC_SYNC_STATUS) + private String accSyncStatus; + + public static final String SERIALIZED_NAME_ACC_PROP = "acc_prop"; + @SerializedName(SERIALIZED_NAME_ACC_PROP) + private Object accProp; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public AppSubAccount() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * Get userId + * @return userId + **/ + @javax.annotation.Nonnull + public String getUserId() { + return userId; + } + + + public void setUserId(String userId) { + this.userId = userId; + } + + /** + * Get username + * @return username + **/ + @javax.annotation.Nonnull + public String getUsername() { + return username; + } + + + public void setUsername(String username) { + this.username = username; + } + + /** + * Get appId + * @return appId + **/ + @javax.annotation.Nonnull + public String getAppId() { + return appId; + } + + + public void setAppId(String appId) { + this.appId = appId; + } + + /** + * Get appName + * @return appName + **/ + @javax.annotation.Nonnull + public String getAppName() { + return appName; + } + + + public void setAppName(String appName) { + this.appName = appName; + } + + /** + * Get accName + * @return accName + **/ + @javax.annotation.Nonnull + public String getAccName() { + return accName; + } + + + public void setAccName(String accName) { + this.accName = accName; + } + + /** + * Get accNameDisplayed + * @return accNameDisplayed + **/ + @javax.annotation.Nonnull + public String getAccNameDisplayed() { + return accNameDisplayed; + } + + + public void setAccNameDisplayed(String accNameDisplayed) { + this.accNameDisplayed = accNameDisplayed; + } + + /** + * Get accSource + * @return accSource + **/ + @javax.annotation.Nonnull + public String getAccSource() { + return accSource; + } + + + public void setAccSource(String accSource) { + this.accSource = accSource; + } + + /** + * Get developerId + * @return developerId + **/ + @javax.annotation.Nonnull + public String getDeveloperId() { + return developerId; + } + + + public void setDeveloperId(String developerId) { + this.developerId = developerId; + } + + /** + * Get tenantId + * @return tenantId + **/ + @javax.annotation.Nonnull + public String getTenantId() { + return tenantId; + } + + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + /** + * Get accPassword + * @return accPassword + **/ + @javax.annotation.Nonnull + public String getAccPassword() { + return accPassword; + } + + + public void setAccPassword(String accPassword) { + this.accPassword = accPassword; + } + + /** + * Get accStatus + * @return accStatus + **/ + @javax.annotation.Nonnull + public String getAccStatus() { + return accStatus; + } + + + public void setAccStatus(String accStatus) { + this.accStatus = accStatus; + } + + /** + * Get accSyncStatus + * @return accSyncStatus + **/ + @javax.annotation.Nonnull + public String getAccSyncStatus() { + return accSyncStatus; + } + + + public void setAccSyncStatus(String accSyncStatus) { + this.accSyncStatus = accSyncStatus; + } + + /** + * Get accProp + * @return accProp + **/ + @javax.annotation.Nonnull + public Object getAccProp() { + return accProp; + } + + + public void setAccProp(Object accProp) { + this.accProp = accProp; + } + + /** + * Get timeCreated + * @return timeCreated + **/ + @javax.annotation.Nonnull + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * Get timeModified + * @return timeModified + **/ + @javax.annotation.Nonnull + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppSubAccount appSubAccount = (AppSubAccount) o; + return Objects.equals(this.id, appSubAccount.id) && + Objects.equals(this.userId, appSubAccount.userId) && + Objects.equals(this.username, appSubAccount.username) && + Objects.equals(this.appId, appSubAccount.appId) && + Objects.equals(this.appName, appSubAccount.appName) && + Objects.equals(this.accName, appSubAccount.accName) && + Objects.equals(this.accNameDisplayed, appSubAccount.accNameDisplayed) && + Objects.equals(this.accSource, appSubAccount.accSource) && + Objects.equals(this.developerId, appSubAccount.developerId) && + Objects.equals(this.tenantId, appSubAccount.tenantId) && + Objects.equals(this.accPassword, appSubAccount.accPassword) && + Objects.equals(this.accStatus, appSubAccount.accStatus) && + Objects.equals(this.accSyncStatus, appSubAccount.accSyncStatus) && + Objects.equals(this.accProp, appSubAccount.accProp) && + Objects.equals(this.timeCreated, appSubAccount.timeCreated) && + Objects.equals(this.timeModified, appSubAccount.timeModified); + } + + @Override + public int hashCode() { + return Objects.hash(id, userId, username, appId, appName, accName, accNameDisplayed, accSource, developerId, tenantId, accPassword, accStatus, accSyncStatus, accProp, timeCreated, timeModified); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppSubAccount {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); + sb.append(" appName: ").append(toIndentedString(appName)).append("\n"); + sb.append(" accName: ").append(toIndentedString(accName)).append("\n"); + sb.append(" accNameDisplayed: ").append(toIndentedString(accNameDisplayed)).append("\n"); + sb.append(" accSource: ").append(toIndentedString(accSource)).append("\n"); + sb.append(" developerId: ").append(toIndentedString(developerId)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" accPassword: ").append(toIndentedString(accPassword)).append("\n"); + sb.append(" accStatus: ").append(toIndentedString(accStatus)).append("\n"); + sb.append(" accSyncStatus: ").append(toIndentedString(accSyncStatus)).append("\n"); + sb.append(" accProp: ").append(toIndentedString(accProp)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("user_id"); + openapiFields.add("username"); + openapiFields.add("app_id"); + openapiFields.add("app_name"); + openapiFields.add("acc_name"); + openapiFields.add("acc_name_displayed"); + openapiFields.add("acc_source"); + openapiFields.add("developer_id"); + openapiFields.add("tenant_id"); + openapiFields.add("acc_password"); + openapiFields.add("acc_status"); + openapiFields.add("acc_sync_status"); + openapiFields.add("acc_prop"); + openapiFields.add("time_created"); + openapiFields.add("time_modified"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("user_id"); + openapiRequiredFields.add("username"); + openapiRequiredFields.add("app_id"); + openapiRequiredFields.add("app_name"); + openapiRequiredFields.add("acc_name"); + openapiRequiredFields.add("acc_name_displayed"); + openapiRequiredFields.add("acc_source"); + openapiRequiredFields.add("developer_id"); + openapiRequiredFields.add("tenant_id"); + openapiRequiredFields.add("acc_password"); + openapiRequiredFields.add("acc_status"); + openapiRequiredFields.add("acc_sync_status"); + openapiRequiredFields.add("acc_prop"); + openapiRequiredFields.add("time_created"); + openapiRequiredFields.add("time_modified"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppSubAccount + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppSubAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AppSubAccount is not found in the empty JSON string", AppSubAccount.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppSubAccount.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("user_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_id").toString())); + } + if (!jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if (!jsonObj.get("app_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `app_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("app_id").toString())); + } + if (!jsonObj.get("app_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `app_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("app_name").toString())); + } + if (!jsonObj.get("acc_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `acc_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acc_name").toString())); + } + if (!jsonObj.get("acc_name_displayed").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `acc_name_displayed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acc_name_displayed").toString())); + } + if (!jsonObj.get("acc_source").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `acc_source` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acc_source").toString())); + } + if (!jsonObj.get("developer_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `developer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("developer_id").toString())); + } + if (!jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + if (!jsonObj.get("acc_password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `acc_password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acc_password").toString())); + } + if (!jsonObj.get("acc_status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `acc_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acc_status").toString())); + } + if (!jsonObj.get("acc_sync_status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `acc_sync_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acc_sync_status").toString())); + } + if (!jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if (!jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppSubAccount.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppSubAccount' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppSubAccount.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppSubAccount value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AppSubAccount read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppSubAccount given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppSubAccount + * @throws IOException if the JSON string is invalid with respect to AppSubAccount + */ + public static AppSubAccount fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppSubAccount.class); + } + + /** + * Convert an instance of AppSubAccount to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/Au.java b/src/main/java/com/idmesh/model/Au.java new file mode 100644 index 0000000..4ce84e1 --- /dev/null +++ b/src/main/java/com/idmesh/model/Au.java @@ -0,0 +1,494 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.AuResourceSet; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * Au + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Au { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_AUTH_UNIT_ID = "auth_unit_id"; + @SerializedName(SERIALIZED_NAME_AUTH_UNIT_ID) + private String authUnitId; + + public static final String SERIALIZED_NAME_RESOURCE = "resource"; + @SerializedName(SERIALIZED_NAME_RESOURCE) + private Object resource; + + public static final String SERIALIZED_NAME_RESOURCE_SET = "resource_set"; + @SerializedName(SERIALIZED_NAME_RESOURCE_SET) + private AuResourceSet resourceSet; + + public static final String SERIALIZED_NAME_AFFECT = "affect"; + @SerializedName(SERIALIZED_NAME_AFFECT) + private String affect; + + public static final String SERIALIZED_NAME_RESOURCE_TYPE = "resource_type"; + @SerializedName(SERIALIZED_NAME_RESOURCE_TYPE) + private String resourceType; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_APPLICATION_NAME = "application_name"; + @SerializedName(SERIALIZED_NAME_APPLICATION_NAME) + private String applicationName; + + public static final String SERIALIZED_NAME_IDENTITY_ID = "identity_id"; + @SerializedName(SERIALIZED_NAME_IDENTITY_ID) + private String identityId; + + public static final String SERIALIZED_NAME_IDENTITY_TYPE = "identity_type"; + @SerializedName(SERIALIZED_NAME_IDENTITY_TYPE) + private String identityType; + + public static final String SERIALIZED_NAME_IDENTITY_NAME = "identity_name"; + @SerializedName(SERIALIZED_NAME_IDENTITY_NAME) + private String identityName; + + public static final String SERIALIZED_NAME_INHERITED = "inherited"; + @SerializedName(SERIALIZED_NAME_INHERITED) + private Boolean inherited; + + public Au() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * Get authUnitId + * @return authUnitId + **/ + @javax.annotation.Nonnull + public String getAuthUnitId() { + return authUnitId; + } + + + public void setAuthUnitId(String authUnitId) { + this.authUnitId = authUnitId; + } + + /** + * Get resource + * @return resource + **/ + @javax.annotation.Nullable + public Object getResource() { + return resource; + } + + + public void setResource(Object resource) { + this.resource = resource; + } + + /** + * Get resourceSet + * @return resourceSet + **/ + @javax.annotation.Nullable + public AuResourceSet getResourceSet() { + return resourceSet; + } + + + public void setResourceSet(AuResourceSet resourceSet) { + this.resourceSet = resourceSet; + } + + /** + * allow/deny + * @return affect + **/ + @javax.annotation.Nonnull + public String getAffect() { + return affect; + } + + + public void setAffect(String affect) { + this.affect = affect; + } + + /** + * 当resource存在时 + * @return resourceType + **/ + @javax.annotation.Nullable + public String getResourceType() { + return resourceType; + } + + + public void setResourceType(String resourceType) { + this.resourceType = resourceType; + } + + /** + * 当 resource 存在时表示 resource_code 当 resource_set存在时表示 resource_set_code + * @return code + **/ + @javax.annotation.Nonnull + public String getCode() { + return code; + } + + + public void setCode(String code) { + this.code = code; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + /** + * Get applicationName + * @return applicationName + **/ + @javax.annotation.Nonnull + public String getApplicationName() { + return applicationName; + } + + + public void setApplicationName(String applicationName) { + this.applicationName = applicationName; + } + + /** + * Get identityId + * @return identityId + **/ + @javax.annotation.Nonnull + public String getIdentityId() { + return identityId; + } + + + public void setIdentityId(String identityId) { + this.identityId = identityId; + } + + /** + * Get identityType + * @return identityType + **/ + @javax.annotation.Nonnull + public String getIdentityType() { + return identityType; + } + + + public void setIdentityType(String identityType) { + this.identityType = identityType; + } + + /** + * Get identityName + * @return identityName + **/ + @javax.annotation.Nonnull + public String getIdentityName() { + return identityName; + } + + + public void setIdentityName(String identityName) { + this.identityName = identityName; + } + + /** + * Get inherited + * @return inherited + **/ + @javax.annotation.Nonnull + public Boolean getInherited() { + return inherited; + } + + + public void setInherited(Boolean inherited) { + this.inherited = inherited; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Au au = (Au) o; + return Objects.equals(this.id, au.id) && + Objects.equals(this.authUnitId, au.authUnitId) && + Objects.equals(this.resource, au.resource) && + Objects.equals(this.resourceSet, au.resourceSet) && + Objects.equals(this.affect, au.affect) && + Objects.equals(this.resourceType, au.resourceType) && + Objects.equals(this.code, au.code) && + Objects.equals(this.description, au.description) && + Objects.equals(this.applicationName, au.applicationName) && + Objects.equals(this.identityId, au.identityId) && + Objects.equals(this.identityType, au.identityType) && + Objects.equals(this.identityName, au.identityName) && + Objects.equals(this.inherited, au.inherited); + } + + @Override + public int hashCode() { + return Objects.hash(id, authUnitId, resource, resourceSet, affect, resourceType, code, description, applicationName, identityId, identityType, identityName, inherited); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Au {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" authUnitId: ").append(toIndentedString(authUnitId)).append("\n"); + sb.append(" resource: ").append(toIndentedString(resource)).append("\n"); + sb.append(" resourceSet: ").append(toIndentedString(resourceSet)).append("\n"); + sb.append(" affect: ").append(toIndentedString(affect)).append("\n"); + sb.append(" resourceType: ").append(toIndentedString(resourceType)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" applicationName: ").append(toIndentedString(applicationName)).append("\n"); + sb.append(" identityId: ").append(toIndentedString(identityId)).append("\n"); + sb.append(" identityType: ").append(toIndentedString(identityType)).append("\n"); + sb.append(" identityName: ").append(toIndentedString(identityName)).append("\n"); + sb.append(" inherited: ").append(toIndentedString(inherited)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("auth_unit_id"); + openapiFields.add("resource"); + openapiFields.add("resource_set"); + openapiFields.add("affect"); + openapiFields.add("resource_type"); + openapiFields.add("code"); + openapiFields.add("description"); + openapiFields.add("application_name"); + openapiFields.add("identity_id"); + openapiFields.add("identity_type"); + openapiFields.add("identity_name"); + openapiFields.add("inherited"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("auth_unit_id"); + openapiRequiredFields.add("affect"); + openapiRequiredFields.add("code"); + openapiRequiredFields.add("application_name"); + openapiRequiredFields.add("identity_id"); + openapiRequiredFields.add("identity_type"); + openapiRequiredFields.add("identity_name"); + openapiRequiredFields.add("inherited"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Au + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Au.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Au is not found in the empty JSON string", Au.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Au.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("auth_unit_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `auth_unit_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("auth_unit_id").toString())); + } + // validate the optional field `resource_set` + if (jsonObj.get("resource_set") != null && !jsonObj.get("resource_set").isJsonNull()) { + AuResourceSet.validateJsonElement(jsonObj.get("resource_set")); + } + if (!jsonObj.get("affect").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `affect` to be a primitive type in the JSON string but got `%s`", jsonObj.get("affect").toString())); + } + if ((jsonObj.get("resource_type") != null && !jsonObj.get("resource_type").isJsonNull()) && !jsonObj.get("resource_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `resource_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("resource_type").toString())); + } + if (!jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if (!jsonObj.get("application_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `application_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("application_name").toString())); + } + if (!jsonObj.get("identity_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identity_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identity_id").toString())); + } + if (!jsonObj.get("identity_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identity_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identity_type").toString())); + } + if (!jsonObj.get("identity_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identity_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identity_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Au.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Au' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Au.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Au value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Au read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Au given an JSON string + * + * @param jsonString JSON string + * @return An instance of Au + * @throws IOException if the JSON string is invalid with respect to Au + */ + public static Au fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Au.class); + } + + /** + * Convert an instance of Au to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/AuResourceSet.java b/src/main/java/com/idmesh/model/AuResourceSet.java new file mode 100644 index 0000000..aadb7c0 --- /dev/null +++ b/src/main/java/com/idmesh/model/AuResourceSet.java @@ -0,0 +1,418 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.ResourceSetMember; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * AuResourceSet + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuResourceSet { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_APPLICATION_ID = "application_id"; + @SerializedName(SERIALIZED_NAME_APPLICATION_ID) + private String applicationId; + + public static final String SERIALIZED_NAME_APPLICATION_NAME = "application_name"; + @SerializedName(SERIALIZED_NAME_APPLICATION_NAME) + private String applicationName; + + public static final String SERIALIZED_NAME_IS_GLOBAL = "is_global"; + @SerializedName(SERIALIZED_NAME_IS_GLOBAL) + private Boolean isGlobal; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_MEMBERS = "members"; + @SerializedName(SERIALIZED_NAME_MEMBERS) + private List members; + + public static final String SERIALIZED_NAME_MATCH_ALL_RESOURCES = "match_all_resources"; + @SerializedName(SERIALIZED_NAME_MATCH_ALL_RESOURCES) + private Boolean matchAllResources; + + public AuResourceSet() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * Get applicationId + * @return applicationId + **/ + @javax.annotation.Nullable + public String getApplicationId() { + return applicationId; + } + + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Get applicationName + * @return applicationName + **/ + @javax.annotation.Nullable + public String getApplicationName() { + return applicationName; + } + + + public void setApplicationName(String applicationName) { + this.applicationName = applicationName; + } + + /** + * Get isGlobal + * @return isGlobal + **/ + @javax.annotation.Nullable + public Boolean getIsGlobal() { + return isGlobal; + } + + + public void setIsGlobal(Boolean isGlobal) { + this.isGlobal = isGlobal; + } + + /** + * Get code + * @return code + **/ + @javax.annotation.Nullable + public String getCode() { + return code; + } + + + public void setCode(String code) { + this.code = code; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + /** + * Get timeModified + * @return timeModified + **/ + @javax.annotation.Nullable + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + /** + * Get timeCreated + * @return timeCreated + **/ + @javax.annotation.Nullable + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * Get members + * @return members + **/ + @javax.annotation.Nullable + public List getMembers() { + return members; + } + + + public void setMembers(List members) { + this.members = members; + } + + /** + * Get matchAllResources + * @return matchAllResources + **/ + @javax.annotation.Nullable + public Boolean getMatchAllResources() { + return matchAllResources; + } + + + public void setMatchAllResources(Boolean matchAllResources) { + this.matchAllResources = matchAllResources; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuResourceSet auResourceSet = (AuResourceSet) o; + return Objects.equals(this.id, auResourceSet.id) && + Objects.equals(this.applicationId, auResourceSet.applicationId) && + Objects.equals(this.applicationName, auResourceSet.applicationName) && + Objects.equals(this.isGlobal, auResourceSet.isGlobal) && + Objects.equals(this.code, auResourceSet.code) && + Objects.equals(this.description, auResourceSet.description) && + Objects.equals(this.timeModified, auResourceSet.timeModified) && + Objects.equals(this.timeCreated, auResourceSet.timeCreated) && + Objects.equals(this.members, auResourceSet.members) && + Objects.equals(this.matchAllResources, auResourceSet.matchAllResources); + } + + @Override + public int hashCode() { + return Objects.hash(id, applicationId, applicationName, isGlobal, code, description, timeModified, timeCreated, members, matchAllResources); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuResourceSet {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" applicationName: ").append(toIndentedString(applicationName)).append("\n"); + sb.append(" isGlobal: ").append(toIndentedString(isGlobal)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" members: ").append(toIndentedString(members)).append("\n"); + sb.append(" matchAllResources: ").append(toIndentedString(matchAllResources)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("application_id"); + openapiFields.add("application_name"); + openapiFields.add("is_global"); + openapiFields.add("code"); + openapiFields.add("description"); + openapiFields.add("time_modified"); + openapiFields.add("time_created"); + openapiFields.add("members"); + openapiFields.add("match_all_resources"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AuResourceSet + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AuResourceSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AuResourceSet is not found in the empty JSON string", AuResourceSet.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("application_id") != null && !jsonObj.get("application_id").isJsonNull()) && !jsonObj.get("application_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `application_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("application_id").toString())); + } + if ((jsonObj.get("application_name") != null && !jsonObj.get("application_name").isJsonNull()) && !jsonObj.get("application_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `application_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("application_name").toString())); + } + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("time_modified") != null && !jsonObj.get("time_modified").isJsonNull()) && !jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + if ((jsonObj.get("time_created") != null && !jsonObj.get("time_created").isJsonNull()) && !jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if (jsonObj.get("members") != null && !jsonObj.get("members").isJsonNull()) { + JsonArray jsonArraymembers = jsonObj.getAsJsonArray("members"); + if (jsonArraymembers != null) { + // ensure the json data is an array + if (!jsonObj.get("members").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `members` to be an array in the JSON string but got `%s`", jsonObj.get("members").toString())); + } + + // validate the optional field `members` (array) + for (int i = 0; i < jsonArraymembers.size(); i++) { + ResourceSetMember.validateJsonElement(jsonArraymembers.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuResourceSet.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AuResourceSet' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AuResourceSet.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AuResourceSet value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AuResourceSet read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AuResourceSet given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuResourceSet + * @throws IOException if the JSON string is invalid with respect to AuResourceSet + */ + public static AuResourceSet fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AuResourceSet.class); + } + + /** + * Convert an instance of AuResourceSet to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/AuthRuleArg.java b/src/main/java/com/idmesh/model/AuthRuleArg.java new file mode 100644 index 0000000..c08ed86 --- /dev/null +++ b/src/main/java/com/idmesh/model/AuthRuleArg.java @@ -0,0 +1,317 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.EmptyObject4Application; +import com.idmesh.model.EmptyObject4Resource; +import com.idmesh.model.EmptyObject4ResourceSet; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * AuthRuleArg + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuthRuleArg { + public static final String SERIALIZED_NAME_RESOURCE = "resource"; + @SerializedName(SERIALIZED_NAME_RESOURCE) + private EmptyObject4Resource resource; + + public static final String SERIALIZED_NAME_RESOURCE_SET = "resource_set"; + @SerializedName(SERIALIZED_NAME_RESOURCE_SET) + private EmptyObject4ResourceSet resourceSet; + + public static final String SERIALIZED_NAME_APPLICATION = "application"; + @SerializedName(SERIALIZED_NAME_APPLICATION) + private EmptyObject4Application application; + + public static final String SERIALIZED_NAME_AFFECT = "affect"; + @SerializedName(SERIALIZED_NAME_AFFECT) + private String affect; + + public static final String SERIALIZED_NAME_OWNER_APP_ID = "owner_app_id"; + @SerializedName(SERIALIZED_NAME_OWNER_APP_ID) + private String ownerAppId; + + public AuthRuleArg() { + } + /** + * Get resource + * @return resource + **/ + @javax.annotation.Nullable + public EmptyObject4Resource getResource() { + return resource; + } + + + public void setResource(EmptyObject4Resource resource) { + this.resource = resource; + } + + /** + * Get resourceSet + * @return resourceSet + **/ + @javax.annotation.Nullable + public EmptyObject4ResourceSet getResourceSet() { + return resourceSet; + } + + + public void setResourceSet(EmptyObject4ResourceSet resourceSet) { + this.resourceSet = resourceSet; + } + + /** + * Get application + * @return application + **/ + @javax.annotation.Nullable + public EmptyObject4Application getApplication() { + return application; + } + + + public void setApplication(EmptyObject4Application application) { + this.application = application; + } + + /** + * allow/deny + * @return affect + **/ + @javax.annotation.Nonnull + public String getAffect() { + return affect; + } + + + public void setAffect(String affect) { + this.affect = affect; + } + + /** + * 用于标识应用(尤其是在使用全局资源的场景下) + * @return ownerAppId + **/ + @javax.annotation.Nonnull + public String getOwnerAppId() { + return ownerAppId; + } + + + public void setOwnerAppId(String ownerAppId) { + this.ownerAppId = ownerAppId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthRuleArg authRuleArg = (AuthRuleArg) o; + return Objects.equals(this.resource, authRuleArg.resource) && + Objects.equals(this.resourceSet, authRuleArg.resourceSet) && + Objects.equals(this.application, authRuleArg.application) && + Objects.equals(this.affect, authRuleArg.affect) && + Objects.equals(this.ownerAppId, authRuleArg.ownerAppId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(resource, resourceSet, application, affect, ownerAppId); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthRuleArg {\n"); + sb.append(" resource: ").append(toIndentedString(resource)).append("\n"); + sb.append(" resourceSet: ").append(toIndentedString(resourceSet)).append("\n"); + sb.append(" application: ").append(toIndentedString(application)).append("\n"); + sb.append(" affect: ").append(toIndentedString(affect)).append("\n"); + sb.append(" ownerAppId: ").append(toIndentedString(ownerAppId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("resource"); + openapiFields.add("resource_set"); + openapiFields.add("application"); + openapiFields.add("affect"); + openapiFields.add("owner_app_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("affect"); + openapiRequiredFields.add("owner_app_id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AuthRuleArg + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AuthRuleArg.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AuthRuleArg is not found in the empty JSON string", AuthRuleArg.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AuthRuleArg.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `resource` + if (jsonObj.get("resource") != null && !jsonObj.get("resource").isJsonNull()) { + EmptyObject4Resource.validateJsonElement(jsonObj.get("resource")); + } + // validate the optional field `resource_set` + if (jsonObj.get("resource_set") != null && !jsonObj.get("resource_set").isJsonNull()) { + EmptyObject4ResourceSet.validateJsonElement(jsonObj.get("resource_set")); + } + // validate the optional field `application` + if (jsonObj.get("application") != null && !jsonObj.get("application").isJsonNull()) { + EmptyObject4Application.validateJsonElement(jsonObj.get("application")); + } + if (!jsonObj.get("affect").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `affect` to be a primitive type in the JSON string but got `%s`", jsonObj.get("affect").toString())); + } + if (!jsonObj.get("owner_app_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `owner_app_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner_app_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuthRuleArg.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AuthRuleArg' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AuthRuleArg.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AuthRuleArg value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AuthRuleArg read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AuthRuleArg given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuthRuleArg + * @throws IOException if the JSON string is invalid with respect to AuthRuleArg + */ + public static AuthRuleArg fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AuthRuleArg.class); + } + + /** + * Convert an instance of AuthRuleArg to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/AuthUnit.java b/src/main/java/com/idmesh/model/AuthUnit.java new file mode 100644 index 0000000..2b522d6 --- /dev/null +++ b/src/main/java/com/idmesh/model/AuthUnit.java @@ -0,0 +1,362 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.Au; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * AuthUnit + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuthUnit { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_IDENTITY_ID = "identity_id"; + @SerializedName(SERIALIZED_NAME_IDENTITY_ID) + private String identityId; + + public static final String SERIALIZED_NAME_IDENTITY_NAME = "identity_name"; + @SerializedName(SERIALIZED_NAME_IDENTITY_NAME) + private String identityName; + + public static final String SERIALIZED_NAME_IDENTITY_TYPE = "identity_type"; + @SerializedName(SERIALIZED_NAME_IDENTITY_TYPE) + private String identityType; + + public static final String SERIALIZED_NAME_RULES = "rules"; + @SerializedName(SERIALIZED_NAME_RULES) + private List rules = new ArrayList<>(); + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public AuthUnit() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * Get identityId + * @return identityId + **/ + @javax.annotation.Nonnull + public String getIdentityId() { + return identityId; + } + + + public void setIdentityId(String identityId) { + this.identityId = identityId; + } + + /** + * Get identityName + * @return identityName + **/ + @javax.annotation.Nonnull + public String getIdentityName() { + return identityName; + } + + + public void setIdentityName(String identityName) { + this.identityName = identityName; + } + + /** + * user 用户 ,programmer 编程者,node 组织/自定义关系 + * @return identityType + **/ + @javax.annotation.Nonnull + public String getIdentityType() { + return identityType; + } + + + public void setIdentityType(String identityType) { + this.identityType = identityType; + } + + /** + * Get rules + * @return rules + **/ + @javax.annotation.Nonnull + public List getRules() { + return rules; + } + + + public void setRules(List rules) { + this.rules = rules; + } + + /** + * Get timeCreated + * @return timeCreated + **/ + @javax.annotation.Nonnull + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * Get timeModified + * @return timeModified + **/ + @javax.annotation.Nonnull + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthUnit authUnit = (AuthUnit) o; + return Objects.equals(this.id, authUnit.id) && + Objects.equals(this.identityId, authUnit.identityId) && + Objects.equals(this.identityName, authUnit.identityName) && + Objects.equals(this.identityType, authUnit.identityType) && + Objects.equals(this.rules, authUnit.rules) && + Objects.equals(this.timeCreated, authUnit.timeCreated) && + Objects.equals(this.timeModified, authUnit.timeModified); + } + + @Override + public int hashCode() { + return Objects.hash(id, identityId, identityName, identityType, rules, timeCreated, timeModified); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthUnit {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" identityId: ").append(toIndentedString(identityId)).append("\n"); + sb.append(" identityName: ").append(toIndentedString(identityName)).append("\n"); + sb.append(" identityType: ").append(toIndentedString(identityType)).append("\n"); + sb.append(" rules: ").append(toIndentedString(rules)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("identity_id"); + openapiFields.add("identity_name"); + openapiFields.add("identity_type"); + openapiFields.add("rules"); + openapiFields.add("time_created"); + openapiFields.add("time_modified"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("identity_id"); + openapiRequiredFields.add("identity_name"); + openapiRequiredFields.add("identity_type"); + openapiRequiredFields.add("rules"); + openapiRequiredFields.add("time_created"); + openapiRequiredFields.add("time_modified"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AuthUnit + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AuthUnit.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AuthUnit is not found in the empty JSON string", AuthUnit.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AuthUnit.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("identity_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identity_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identity_id").toString())); + } + if (!jsonObj.get("identity_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identity_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identity_name").toString())); + } + if (!jsonObj.get("identity_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identity_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identity_type").toString())); + } + // ensure the json data is an array + if (!jsonObj.get("rules").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `rules` to be an array in the JSON string but got `%s`", jsonObj.get("rules").toString())); + } + + JsonArray jsonArrayrules = jsonObj.getAsJsonArray("rules"); + // validate the required field `rules` (array) + for (int i = 0; i < jsonArrayrules.size(); i++) { + Au.validateJsonElement(jsonArrayrules.get(i)); + }; + if (!jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if (!jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuthUnit.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AuthUnit' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AuthUnit.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AuthUnit value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AuthUnit read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AuthUnit given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuthUnit + * @throws IOException if the JSON string is invalid with respect to AuthUnit + */ + public static AuthUnit fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AuthUnit.class); + } + + /** + * Convert an instance of AuthUnit to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/AuthUnitResouce.java b/src/main/java/com/idmesh/model/AuthUnitResouce.java new file mode 100644 index 0000000..d373a96 --- /dev/null +++ b/src/main/java/com/idmesh/model/AuthUnitResouce.java @@ -0,0 +1,579 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * AuthUnitResouce + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuthUnitResouce { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_DEVELOPER_ID = "developer_id"; + @SerializedName(SERIALIZED_NAME_DEVELOPER_ID) + private String developerId; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private String tenantId; + + public static final String SERIALIZED_NAME_APPLICATION_ID = "application_id"; + @SerializedName(SERIALIZED_NAME_APPLICATION_ID) + private String applicationId; + + public static final String SERIALIZED_NAME_APPLICATIOIN_NAME = "applicatioin_name"; + @SerializedName(SERIALIZED_NAME_APPLICATIOIN_NAME) + private String applicatioinName; + + public static final String SERIALIZED_NAME_IS_GLOBAL = "is_global"; + @SerializedName(SERIALIZED_NAME_IS_GLOBAL) + private Boolean isGlobal; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_URI = "uri"; + @SerializedName(SERIALIZED_NAME_URI) + private String uri; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_SCOPE = "scope"; + @SerializedName(SERIALIZED_NAME_SCOPE) + private String scope; + + public static final String SERIALIZED_NAME_SELECTED_ACTIONS = "selected_actions"; + @SerializedName(SERIALIZED_NAME_SELECTED_ACTIONS) + private List selectedActions; + + public static final String SERIALIZED_NAME_MATCH_ALL_ACTIONS = "match_all_actions"; + @SerializedName(SERIALIZED_NAME_MATCH_ALL_ACTIONS) + private Boolean matchAllActions; + + public static final String SERIALIZED_NAME_MATCH_ALL_RESOURCES = "match_all_resources"; + @SerializedName(SERIALIZED_NAME_MATCH_ALL_RESOURCES) + private Boolean matchAllResources; + + public AuthUnitResouce() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * Get developerId + * @return developerId + **/ + @javax.annotation.Nonnull + public String getDeveloperId() { + return developerId; + } + + + public void setDeveloperId(String developerId) { + this.developerId = developerId; + } + + /** + * Get tenantId + * @return tenantId + **/ + @javax.annotation.Nonnull + public String getTenantId() { + return tenantId; + } + + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + /** + * Get applicationId + * @return applicationId + **/ + @javax.annotation.Nonnull + public String getApplicationId() { + return applicationId; + } + + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Get applicatioinName + * @return applicatioinName + **/ + @javax.annotation.Nonnull + public String getApplicatioinName() { + return applicatioinName; + } + + + public void setApplicatioinName(String applicatioinName) { + this.applicatioinName = applicatioinName; + } + + /** + * Get isGlobal + * @return isGlobal + **/ + @javax.annotation.Nonnull + public Boolean getIsGlobal() { + return isGlobal; + } + + + public void setIsGlobal(Boolean isGlobal) { + this.isGlobal = isGlobal; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * Get code + * @return code + **/ + @javax.annotation.Nonnull + public String getCode() { + return code; + } + + + public void setCode(String code) { + this.code = code; + } + + /** + * Get uri + * @return uri + **/ + @javax.annotation.Nullable + public String getUri() { + return uri; + } + + + public void setUri(String uri) { + this.uri = uri; + } + + /** + * Get timeModified + * @return timeModified + **/ + @javax.annotation.Nonnull + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + /** + * Get timeCreated + * @return timeCreated + **/ + @javax.annotation.Nonnull + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * Get scope + * @return scope + **/ + @javax.annotation.Nonnull + public String getScope() { + return scope; + } + + + public void setScope(String scope) { + this.scope = scope; + } + + /** + * Get selectedActions + * @return selectedActions + **/ + @javax.annotation.Nullable + public List getSelectedActions() { + return selectedActions; + } + + + public void setSelectedActions(List selectedActions) { + this.selectedActions = selectedActions; + } + + /** + * Get matchAllActions + * @return matchAllActions + **/ + @javax.annotation.Nullable + public Boolean getMatchAllActions() { + return matchAllActions; + } + + + public void setMatchAllActions(Boolean matchAllActions) { + this.matchAllActions = matchAllActions; + } + + /** + * Get matchAllResources + * @return matchAllResources + **/ + @javax.annotation.Nullable + public Boolean getMatchAllResources() { + return matchAllResources; + } + + + public void setMatchAllResources(Boolean matchAllResources) { + this.matchAllResources = matchAllResources; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthUnitResouce authUnitResouce = (AuthUnitResouce) o; + return Objects.equals(this.id, authUnitResouce.id) && + Objects.equals(this.developerId, authUnitResouce.developerId) && + Objects.equals(this.tenantId, authUnitResouce.tenantId) && + Objects.equals(this.applicationId, authUnitResouce.applicationId) && + Objects.equals(this.applicatioinName, authUnitResouce.applicatioinName) && + Objects.equals(this.isGlobal, authUnitResouce.isGlobal) && + Objects.equals(this.description, authUnitResouce.description) && + Objects.equals(this.type, authUnitResouce.type) && + Objects.equals(this.code, authUnitResouce.code) && + Objects.equals(this.uri, authUnitResouce.uri) && + Objects.equals(this.timeModified, authUnitResouce.timeModified) && + Objects.equals(this.timeCreated, authUnitResouce.timeCreated) && + Objects.equals(this.scope, authUnitResouce.scope) && + Objects.equals(this.selectedActions, authUnitResouce.selectedActions) && + Objects.equals(this.matchAllActions, authUnitResouce.matchAllActions) && + Objects.equals(this.matchAllResources, authUnitResouce.matchAllResources); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, developerId, tenantId, applicationId, applicatioinName, isGlobal, description, type, code, uri, timeModified, timeCreated, scope, selectedActions, matchAllActions, matchAllResources); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthUnitResouce {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" developerId: ").append(toIndentedString(developerId)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" applicatioinName: ").append(toIndentedString(applicatioinName)).append("\n"); + sb.append(" isGlobal: ").append(toIndentedString(isGlobal)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" uri: ").append(toIndentedString(uri)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" selectedActions: ").append(toIndentedString(selectedActions)).append("\n"); + sb.append(" matchAllActions: ").append(toIndentedString(matchAllActions)).append("\n"); + sb.append(" matchAllResources: ").append(toIndentedString(matchAllResources)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("developer_id"); + openapiFields.add("tenant_id"); + openapiFields.add("application_id"); + openapiFields.add("applicatioin_name"); + openapiFields.add("is_global"); + openapiFields.add("description"); + openapiFields.add("type"); + openapiFields.add("code"); + openapiFields.add("uri"); + openapiFields.add("time_modified"); + openapiFields.add("time_created"); + openapiFields.add("scope"); + openapiFields.add("selected_actions"); + openapiFields.add("match_all_actions"); + openapiFields.add("match_all_resources"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("developer_id"); + openapiRequiredFields.add("tenant_id"); + openapiRequiredFields.add("application_id"); + openapiRequiredFields.add("applicatioin_name"); + openapiRequiredFields.add("is_global"); + openapiRequiredFields.add("description"); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("code"); + openapiRequiredFields.add("time_modified"); + openapiRequiredFields.add("time_created"); + openapiRequiredFields.add("scope"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AuthUnitResouce + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AuthUnitResouce.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AuthUnitResouce is not found in the empty JSON string", AuthUnitResouce.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AuthUnitResouce.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("developer_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `developer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("developer_id").toString())); + } + if (!jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + if (!jsonObj.get("application_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `application_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("application_id").toString())); + } + if (!jsonObj.get("applicatioin_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `applicatioin_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicatioin_name").toString())); + } + if (!jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if (!jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if ((jsonObj.get("uri") != null && !jsonObj.get("uri").isJsonNull()) && !jsonObj.get("uri").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uri").toString())); + } + if (!jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + if (!jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if (!jsonObj.get("scope").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("selected_actions") != null && !jsonObj.get("selected_actions").isJsonNull() && !jsonObj.get("selected_actions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `selected_actions` to be an array in the JSON string but got `%s`", jsonObj.get("selected_actions").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuthUnitResouce.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AuthUnitResouce' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AuthUnitResouce.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AuthUnitResouce value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AuthUnitResouce read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AuthUnitResouce given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuthUnitResouce + * @throws IOException if the JSON string is invalid with respect to AuthUnitResouce + */ + public static AuthUnitResouce fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AuthUnitResouce.class); + } + + /** + * Convert an instance of AuthUnitResouce to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/AuthUnitResourceSet.java b/src/main/java/com/idmesh/model/AuthUnitResourceSet.java new file mode 100644 index 0000000..1154915 --- /dev/null +++ b/src/main/java/com/idmesh/model/AuthUnitResourceSet.java @@ -0,0 +1,418 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.ResourceSetMember; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * AuthUnitResourceSet + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuthUnitResourceSet { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_APPLICATION_ID = "application_id"; + @SerializedName(SERIALIZED_NAME_APPLICATION_ID) + private String applicationId; + + public static final String SERIALIZED_NAME_APPLICATION_NAME = "application_name"; + @SerializedName(SERIALIZED_NAME_APPLICATION_NAME) + private String applicationName; + + public static final String SERIALIZED_NAME_IS_GLOBAL = "is_global"; + @SerializedName(SERIALIZED_NAME_IS_GLOBAL) + private Boolean isGlobal; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_MEMBERS = "members"; + @SerializedName(SERIALIZED_NAME_MEMBERS) + private List members; + + public static final String SERIALIZED_NAME_MATCH_ALL_RESOURCES = "match_all_resources"; + @SerializedName(SERIALIZED_NAME_MATCH_ALL_RESOURCES) + private Boolean matchAllResources; + + public AuthUnitResourceSet() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * Get applicationId + * @return applicationId + **/ + @javax.annotation.Nullable + public String getApplicationId() { + return applicationId; + } + + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Get applicationName + * @return applicationName + **/ + @javax.annotation.Nullable + public String getApplicationName() { + return applicationName; + } + + + public void setApplicationName(String applicationName) { + this.applicationName = applicationName; + } + + /** + * Get isGlobal + * @return isGlobal + **/ + @javax.annotation.Nullable + public Boolean getIsGlobal() { + return isGlobal; + } + + + public void setIsGlobal(Boolean isGlobal) { + this.isGlobal = isGlobal; + } + + /** + * Get code + * @return code + **/ + @javax.annotation.Nullable + public String getCode() { + return code; + } + + + public void setCode(String code) { + this.code = code; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + /** + * Get timeModified + * @return timeModified + **/ + @javax.annotation.Nullable + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + /** + * Get timeCreated + * @return timeCreated + **/ + @javax.annotation.Nullable + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * Get members + * @return members + **/ + @javax.annotation.Nullable + public List getMembers() { + return members; + } + + + public void setMembers(List members) { + this.members = members; + } + + /** + * Get matchAllResources + * @return matchAllResources + **/ + @javax.annotation.Nullable + public Boolean getMatchAllResources() { + return matchAllResources; + } + + + public void setMatchAllResources(Boolean matchAllResources) { + this.matchAllResources = matchAllResources; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthUnitResourceSet authUnitResourceSet = (AuthUnitResourceSet) o; + return Objects.equals(this.id, authUnitResourceSet.id) && + Objects.equals(this.applicationId, authUnitResourceSet.applicationId) && + Objects.equals(this.applicationName, authUnitResourceSet.applicationName) && + Objects.equals(this.isGlobal, authUnitResourceSet.isGlobal) && + Objects.equals(this.code, authUnitResourceSet.code) && + Objects.equals(this.description, authUnitResourceSet.description) && + Objects.equals(this.timeModified, authUnitResourceSet.timeModified) && + Objects.equals(this.timeCreated, authUnitResourceSet.timeCreated) && + Objects.equals(this.members, authUnitResourceSet.members) && + Objects.equals(this.matchAllResources, authUnitResourceSet.matchAllResources); + } + + @Override + public int hashCode() { + return Objects.hash(id, applicationId, applicationName, isGlobal, code, description, timeModified, timeCreated, members, matchAllResources); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthUnitResourceSet {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" applicationName: ").append(toIndentedString(applicationName)).append("\n"); + sb.append(" isGlobal: ").append(toIndentedString(isGlobal)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" members: ").append(toIndentedString(members)).append("\n"); + sb.append(" matchAllResources: ").append(toIndentedString(matchAllResources)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("application_id"); + openapiFields.add("application_name"); + openapiFields.add("is_global"); + openapiFields.add("code"); + openapiFields.add("description"); + openapiFields.add("time_modified"); + openapiFields.add("time_created"); + openapiFields.add("members"); + openapiFields.add("match_all_resources"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AuthUnitResourceSet + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AuthUnitResourceSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AuthUnitResourceSet is not found in the empty JSON string", AuthUnitResourceSet.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("application_id") != null && !jsonObj.get("application_id").isJsonNull()) && !jsonObj.get("application_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `application_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("application_id").toString())); + } + if ((jsonObj.get("application_name") != null && !jsonObj.get("application_name").isJsonNull()) && !jsonObj.get("application_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `application_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("application_name").toString())); + } + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("time_modified") != null && !jsonObj.get("time_modified").isJsonNull()) && !jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + if ((jsonObj.get("time_created") != null && !jsonObj.get("time_created").isJsonNull()) && !jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if (jsonObj.get("members") != null && !jsonObj.get("members").isJsonNull()) { + JsonArray jsonArraymembers = jsonObj.getAsJsonArray("members"); + if (jsonArraymembers != null) { + // ensure the json data is an array + if (!jsonObj.get("members").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `members` to be an array in the JSON string but got `%s`", jsonObj.get("members").toString())); + } + + // validate the optional field `members` (array) + for (int i = 0; i < jsonArraymembers.size(); i++) { + ResourceSetMember.validateJsonElement(jsonArraymembers.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuthUnitResourceSet.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AuthUnitResourceSet' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AuthUnitResourceSet.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AuthUnitResourceSet value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AuthUnitResourceSet read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AuthUnitResourceSet given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuthUnitResourceSet + * @throws IOException if the JSON string is invalid with respect to AuthUnitResourceSet + */ + public static AuthUnitResourceSet fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AuthUnitResourceSet.class); + } + + /** + * Convert an instance of AuthUnitResourceSet to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/AuthorizeApplicationsRequest.java b/src/main/java/com/idmesh/model/AuthorizeApplicationsRequest.java new file mode 100644 index 0000000..a70b966 --- /dev/null +++ b/src/main/java/com/idmesh/model/AuthorizeApplicationsRequest.java @@ -0,0 +1,262 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.IdentityObj; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * AuthorizeApplicationsRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuthorizeApplicationsRequest { + public static final String SERIALIZED_NAME_IDENTITIES = "identities"; + @SerializedName(SERIALIZED_NAME_IDENTITIES) + private List identities = new ArrayList<>(); + + public static final String SERIALIZED_NAME_APPLICATION_ID = "application_id"; + @SerializedName(SERIALIZED_NAME_APPLICATION_ID) + private String applicationId; + + public static final String SERIALIZED_NAME_AFFECT = "affect"; + @SerializedName(SERIALIZED_NAME_AFFECT) + private String affect; + + public AuthorizeApplicationsRequest() { + } + /** + * Get identities + * @return identities + **/ + @javax.annotation.Nonnull + public List getIdentities() { + return identities; + } + + + public void setIdentities(List identities) { + this.identities = identities; + } + + /** + * Get applicationId + * @return applicationId + **/ + @javax.annotation.Nonnull + public String getApplicationId() { + return applicationId; + } + + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * allow, deny + * @return affect + **/ + @javax.annotation.Nonnull + public String getAffect() { + return affect; + } + + + public void setAffect(String affect) { + this.affect = affect; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthorizeApplicationsRequest authorizeApplicationsRequest = (AuthorizeApplicationsRequest) o; + return Objects.equals(this.identities, authorizeApplicationsRequest.identities) && + Objects.equals(this.applicationId, authorizeApplicationsRequest.applicationId) && + Objects.equals(this.affect, authorizeApplicationsRequest.affect); + } + + @Override + public int hashCode() { + return Objects.hash(identities, applicationId, affect); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthorizeApplicationsRequest {\n"); + sb.append(" identities: ").append(toIndentedString(identities)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" affect: ").append(toIndentedString(affect)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identities"); + openapiFields.add("application_id"); + openapiFields.add("affect"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identities"); + openapiRequiredFields.add("application_id"); + openapiRequiredFields.add("affect"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AuthorizeApplicationsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AuthorizeApplicationsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AuthorizeApplicationsRequest is not found in the empty JSON string", AuthorizeApplicationsRequest.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AuthorizeApplicationsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("identities").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `identities` to be an array in the JSON string but got `%s`", jsonObj.get("identities").toString())); + } + + JsonArray jsonArrayidentities = jsonObj.getAsJsonArray("identities"); + // validate the required field `identities` (array) + for (int i = 0; i < jsonArrayidentities.size(); i++) { + IdentityObj.validateJsonElement(jsonArrayidentities.get(i)); + }; + if (!jsonObj.get("application_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `application_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("application_id").toString())); + } + if (!jsonObj.get("affect").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `affect` to be a primitive type in the JSON string but got `%s`", jsonObj.get("affect").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuthorizeApplicationsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AuthorizeApplicationsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AuthorizeApplicationsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AuthorizeApplicationsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AuthorizeApplicationsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AuthorizeApplicationsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuthorizeApplicationsRequest + * @throws IOException if the JSON string is invalid with respect to AuthorizeApplicationsRequest + */ + public static AuthorizeApplicationsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AuthorizeApplicationsRequest.class); + } + + /** + * Convert an instance of AuthorizeApplicationsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/AuthzApp.java b/src/main/java/com/idmesh/model/AuthzApp.java new file mode 100644 index 0000000..a299e6f --- /dev/null +++ b/src/main/java/com/idmesh/model/AuthzApp.java @@ -0,0 +1,478 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * AuthzApp + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuthzApp { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_DEVELOPER_ID = "developer_id"; + @SerializedName(SERIALIZED_NAME_DEVELOPER_ID) + private String developerId; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private String tenantId; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ACCESS_POLICY = "access_policy"; + @SerializedName(SERIALIZED_NAME_ACCESS_POLICY) + private String accessPolicy; + + public static final String SERIALIZED_NAME_DECR = "decr"; + @SerializedName(SERIALIZED_NAME_DECR) + private String decr; + + public static final String SERIALIZED_NAME_LOGO = "logo"; + @SerializedName(SERIALIZED_NAME_LOGO) + private String logo; + + public static final String SERIALIZED_NAME_ACCESS_URL = "access_url"; + @SerializedName(SERIALIZED_NAME_ACCESS_URL) + private String accessUrl; + + public static final String SERIALIZED_NAME_ENABLED_PROTOCOLS = "enabled_protocols"; + @SerializedName(SERIALIZED_NAME_ENABLED_PROTOCOLS) + private List enabledProtocols; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public AuthzApp() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * Get developerId + * @return developerId + **/ + @javax.annotation.Nonnull + public String getDeveloperId() { + return developerId; + } + + + public void setDeveloperId(String developerId) { + this.developerId = developerId; + } + + /** + * Get tenantId + * @return tenantId + **/ + @javax.annotation.Nonnull + public String getTenantId() { + return tenantId; + } + + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + /** + * - 0 默认应用 - 1 自建应用 - 2 模板应用 - 3 组件应用 + * @return type + **/ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * Get accessPolicy + * @return accessPolicy + **/ + @javax.annotation.Nonnull + public String getAccessPolicy() { + return accessPolicy; + } + + + public void setAccessPolicy(String accessPolicy) { + this.accessPolicy = accessPolicy; + } + + /** + * Get decr + * @return decr + **/ + @javax.annotation.Nullable + public String getDecr() { + return decr; + } + + + public void setDecr(String decr) { + this.decr = decr; + } + + /** + * base64编码 + * @return logo + **/ + @javax.annotation.Nonnull + public String getLogo() { + return logo; + } + + + public void setLogo(String logo) { + this.logo = logo; + } + + /** + * Get accessUrl + * @return accessUrl + **/ + @javax.annotation.Nonnull + public String getAccessUrl() { + return accessUrl; + } + + + public void setAccessUrl(String accessUrl) { + this.accessUrl = accessUrl; + } + + /** + * oidc/saml/sxp 等 + * @return enabledProtocols + **/ + @javax.annotation.Nullable + public List getEnabledProtocols() { + return enabledProtocols; + } + + + public void setEnabledProtocols(List enabledProtocols) { + this.enabledProtocols = enabledProtocols; + } + + /** + * rfc3339 + * @return timeModified + **/ + @javax.annotation.Nonnull + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + /** + * rfc3339 + * @return timeCreated + **/ + @javax.annotation.Nonnull + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthzApp authzApp = (AuthzApp) o; + return Objects.equals(this.id, authzApp.id) && + Objects.equals(this.developerId, authzApp.developerId) && + Objects.equals(this.tenantId, authzApp.tenantId) && + Objects.equals(this.name, authzApp.name) && + Objects.equals(this.type, authzApp.type) && + Objects.equals(this.accessPolicy, authzApp.accessPolicy) && + Objects.equals(this.decr, authzApp.decr) && + Objects.equals(this.logo, authzApp.logo) && + Objects.equals(this.accessUrl, authzApp.accessUrl) && + Objects.equals(this.enabledProtocols, authzApp.enabledProtocols) && + Objects.equals(this.timeModified, authzApp.timeModified) && + Objects.equals(this.timeCreated, authzApp.timeCreated); + } + + @Override + public int hashCode() { + return Objects.hash(id, developerId, tenantId, name, type, accessPolicy, decr, logo, accessUrl, enabledProtocols, timeModified, timeCreated); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthzApp {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" developerId: ").append(toIndentedString(developerId)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" accessPolicy: ").append(toIndentedString(accessPolicy)).append("\n"); + sb.append(" decr: ").append(toIndentedString(decr)).append("\n"); + sb.append(" logo: ").append(toIndentedString(logo)).append("\n"); + sb.append(" accessUrl: ").append(toIndentedString(accessUrl)).append("\n"); + sb.append(" enabledProtocols: ").append(toIndentedString(enabledProtocols)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("developer_id"); + openapiFields.add("tenant_id"); + openapiFields.add("name"); + openapiFields.add("type"); + openapiFields.add("access_policy"); + openapiFields.add("decr"); + openapiFields.add("logo"); + openapiFields.add("access_url"); + openapiFields.add("enabled_protocols"); + openapiFields.add("time_modified"); + openapiFields.add("time_created"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("developer_id"); + openapiRequiredFields.add("tenant_id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("access_policy"); + openapiRequiredFields.add("logo"); + openapiRequiredFields.add("access_url"); + openapiRequiredFields.add("time_modified"); + openapiRequiredFields.add("time_created"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AuthzApp + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AuthzApp.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AuthzApp is not found in the empty JSON string", AuthzApp.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AuthzApp.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("developer_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `developer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("developer_id").toString())); + } + if (!jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if (!jsonObj.get("access_policy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `access_policy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_policy").toString())); + } + if ((jsonObj.get("decr") != null && !jsonObj.get("decr").isJsonNull()) && !jsonObj.get("decr").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `decr` to be a primitive type in the JSON string but got `%s`", jsonObj.get("decr").toString())); + } + if (!jsonObj.get("logo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `logo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logo").toString())); + } + if (!jsonObj.get("access_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `access_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_url").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("enabled_protocols") != null && !jsonObj.get("enabled_protocols").isJsonNull() && !jsonObj.get("enabled_protocols").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `enabled_protocols` to be an array in the JSON string but got `%s`", jsonObj.get("enabled_protocols").toString())); + } + if (!jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + if (!jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuthzApp.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AuthzApp' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AuthzApp.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AuthzApp value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AuthzApp read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AuthzApp given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuthzApp + * @throws IOException if the JSON string is invalid with respect to AuthzApp + */ + public static AuthzApp fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AuthzApp.class); + } + + /** + * Convert an instance of AuthzApp to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/Bucket.java b/src/main/java/com/idmesh/model/Bucket.java new file mode 100644 index 0000000..06f45e8 --- /dev/null +++ b/src/main/java/com/idmesh/model/Bucket.java @@ -0,0 +1,246 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * Bucket + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Bucket { + public static final String SERIALIZED_NAME_BUCKET = "bucket"; + @SerializedName(SERIALIZED_NAME_BUCKET) + private String bucket; + + public static final String SERIALIZED_NAME_DATA_SIZE = "data_size"; + @SerializedName(SERIALIZED_NAME_DATA_SIZE) + private Integer dataSize; + + public static final String SERIALIZED_NAME_OBJECT_COUNT = "object_count"; + @SerializedName(SERIALIZED_NAME_OBJECT_COUNT) + private Integer objectCount; + + public Bucket() { + } + /** + * Get bucket + * @return bucket + **/ + @javax.annotation.Nonnull + public String getBucket() { + return bucket; + } + + + public void setBucket(String bucket) { + this.bucket = bucket; + } + + /** + * 单位:byte + * @return dataSize + **/ + @javax.annotation.Nonnull + public Integer getDataSize() { + return dataSize; + } + + + public void setDataSize(Integer dataSize) { + this.dataSize = dataSize; + } + + /** + * Get objectCount + * @return objectCount + **/ + @javax.annotation.Nonnull + public Integer getObjectCount() { + return objectCount; + } + + + public void setObjectCount(Integer objectCount) { + this.objectCount = objectCount; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Bucket bucket = (Bucket) o; + return Objects.equals(this.bucket, bucket.bucket) && + Objects.equals(this.dataSize, bucket.dataSize) && + Objects.equals(this.objectCount, bucket.objectCount); + } + + @Override + public int hashCode() { + return Objects.hash(bucket, dataSize, objectCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Bucket {\n"); + sb.append(" bucket: ").append(toIndentedString(bucket)).append("\n"); + sb.append(" dataSize: ").append(toIndentedString(dataSize)).append("\n"); + sb.append(" objectCount: ").append(toIndentedString(objectCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("bucket"); + openapiFields.add("data_size"); + openapiFields.add("object_count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("bucket"); + openapiRequiredFields.add("data_size"); + openapiRequiredFields.add("object_count"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Bucket + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Bucket.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Bucket is not found in the empty JSON string", Bucket.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Bucket.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("bucket").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `bucket` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bucket").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Bucket.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Bucket' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Bucket.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Bucket value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Bucket read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Bucket given an JSON string + * + * @param jsonString JSON string + * @return An instance of Bucket + * @throws IOException if the JSON string is invalid with respect to Bucket + */ + public static Bucket fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Bucket.class); + } + + /** + * Convert an instance of Bucket to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/CoreObject.java b/src/main/java/com/idmesh/model/CoreObject.java new file mode 100644 index 0000000..d1f0c5d --- /dev/null +++ b/src/main/java/com/idmesh/model/CoreObject.java @@ -0,0 +1,445 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * CoreObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CoreObject { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_OBJECT_DISPLAY_NAME = "object_display_name"; + @SerializedName(SERIALIZED_NAME_OBJECT_DISPLAY_NAME) + private String objectDisplayName; + + public static final String SERIALIZED_NAME_OBJECT_TYPE = "object_type"; + @SerializedName(SERIALIZED_NAME_OBJECT_TYPE) + private String objectType; + + public static final String SERIALIZED_NAME_OBJECT_CODE = "object_code"; + @SerializedName(SERIALIZED_NAME_OBJECT_CODE) + private String objectCode; + + public static final String SERIALIZED_NAME_OBJECT_PROPS = "object_props"; + @SerializedName(SERIALIZED_NAME_OBJECT_PROPS) + private String objectProps; + + public static final String SERIALIZED_NAME_IS_DEFAULT = "is_default"; + @SerializedName(SERIALIZED_NAME_IS_DEFAULT) + private String isDefault; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_DEVELOPER_ID = "developer_id"; + @SerializedName(SERIALIZED_NAME_DEVELOPER_ID) + private String developerId; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private String tenantId; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public CoreObject() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * Get objectDisplayName + * @return objectDisplayName + **/ + @javax.annotation.Nonnull + public String getObjectDisplayName() { + return objectDisplayName; + } + + + public void setObjectDisplayName(String objectDisplayName) { + this.objectDisplayName = objectDisplayName; + } + + /** + * 固定值:tree + * @return objectType + **/ + @javax.annotation.Nonnull + public String getObjectType() { + return objectType; + } + + + public void setObjectType(String objectType) { + this.objectType = objectType; + } + + /** + * 唯一,不可改,外键关联引用 + * @return objectCode + **/ + @javax.annotation.Nonnull + public String getObjectCode() { + return objectCode; + } + + + public void setObjectCode(String objectCode) { + this.objectCode = objectCode; + } + + /** + * Get objectProps + * @return objectProps + **/ + @javax.annotation.Nullable + public String getObjectProps() { + return objectProps; + } + + + public void setObjectProps(String objectProps) { + this.objectProps = objectProps; + } + + /** + * 是否默认组织关系,1是,0否 + * @return isDefault + **/ + @javax.annotation.Nullable + public String getIsDefault() { + return isDefault; + } + + + public void setIsDefault(String isDefault) { + this.isDefault = isDefault; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + /** + * Get developerId + * @return developerId + **/ + @javax.annotation.Nullable + public String getDeveloperId() { + return developerId; + } + + + public void setDeveloperId(String developerId) { + this.developerId = developerId; + } + + /** + * Get tenantId + * @return tenantId + **/ + @javax.annotation.Nullable + public String getTenantId() { + return tenantId; + } + + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + /** + * Get timeCreated + * @return timeCreated + **/ + @javax.annotation.Nullable + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * Get timeModified + * @return timeModified + **/ + @javax.annotation.Nullable + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CoreObject coreObject = (CoreObject) o; + return Objects.equals(this.id, coreObject.id) && + Objects.equals(this.objectDisplayName, coreObject.objectDisplayName) && + Objects.equals(this.objectType, coreObject.objectType) && + Objects.equals(this.objectCode, coreObject.objectCode) && + Objects.equals(this.objectProps, coreObject.objectProps) && + Objects.equals(this.isDefault, coreObject.isDefault) && + Objects.equals(this.status, coreObject.status) && + Objects.equals(this.developerId, coreObject.developerId) && + Objects.equals(this.tenantId, coreObject.tenantId) && + Objects.equals(this.timeCreated, coreObject.timeCreated) && + Objects.equals(this.timeModified, coreObject.timeModified); + } + + @Override + public int hashCode() { + return Objects.hash(id, objectDisplayName, objectType, objectCode, objectProps, isDefault, status, developerId, tenantId, timeCreated, timeModified); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CoreObject {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" objectDisplayName: ").append(toIndentedString(objectDisplayName)).append("\n"); + sb.append(" objectType: ").append(toIndentedString(objectType)).append("\n"); + sb.append(" objectCode: ").append(toIndentedString(objectCode)).append("\n"); + sb.append(" objectProps: ").append(toIndentedString(objectProps)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" developerId: ").append(toIndentedString(developerId)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("object_display_name"); + openapiFields.add("object_type"); + openapiFields.add("object_code"); + openapiFields.add("object_props"); + openapiFields.add("is_default"); + openapiFields.add("status"); + openapiFields.add("developer_id"); + openapiFields.add("tenant_id"); + openapiFields.add("time_created"); + openapiFields.add("time_modified"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("object_display_name"); + openapiRequiredFields.add("object_type"); + openapiRequiredFields.add("object_code"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CoreObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CoreObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CoreObject is not found in the empty JSON string", CoreObject.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CoreObject.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("object_display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_display_name").toString())); + } + if (!jsonObj.get("object_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_type").toString())); + } + if (!jsonObj.get("object_code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_code").toString())); + } + if ((jsonObj.get("object_props") != null && !jsonObj.get("object_props").isJsonNull()) && !jsonObj.get("object_props").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_props` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_props").toString())); + } + if ((jsonObj.get("is_default") != null && !jsonObj.get("is_default").isJsonNull()) && !jsonObj.get("is_default").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `is_default` to be a primitive type in the JSON string but got `%s`", jsonObj.get("is_default").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("developer_id") != null && !jsonObj.get("developer_id").isJsonNull()) && !jsonObj.get("developer_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `developer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("developer_id").toString())); + } + if ((jsonObj.get("tenant_id") != null && !jsonObj.get("tenant_id").isJsonNull()) && !jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + if ((jsonObj.get("time_created") != null && !jsonObj.get("time_created").isJsonNull()) && !jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if ((jsonObj.get("time_modified") != null && !jsonObj.get("time_modified").isJsonNull()) && !jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CoreObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CoreObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CoreObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CoreObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CoreObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CoreObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of CoreObject + * @throws IOException if the JSON string is invalid with respect to CoreObject + */ + public static CoreObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CoreObject.class); + } + + /** + * Convert an instance of CoreObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/Create200Response.java b/src/main/java/com/idmesh/model/Create200Response.java new file mode 100644 index 0000000..8b4f55f --- /dev/null +++ b/src/main/java/com/idmesh/model/Create200Response.java @@ -0,0 +1,194 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * Create200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Create200Response { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public Create200Response() { + } + /** + * 唯一标识 + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Create200Response create200Response = (Create200Response) o; + return Objects.equals(this.id, create200Response.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Create200Response {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Create200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Create200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Create200Response is not found in the empty JSON string", Create200Response.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Create200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Create200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Create200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Create200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Create200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Create200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of Create200Response + * @throws IOException if the JSON string is invalid with respect to Create200Response + */ + public static Create200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Create200Response.class); + } + + /** + * Convert an instance of Create200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/CreateAccountRequest.java b/src/main/java/com/idmesh/model/CreateAccountRequest.java new file mode 100644 index 0000000..689e346 --- /dev/null +++ b/src/main/java/com/idmesh/model/CreateAccountRequest.java @@ -0,0 +1,417 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * CreateAccountRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAccountRequest { + public static final String SERIALIZED_NAME_USER_ID = "user_id"; + @SerializedName(SERIALIZED_NAME_USER_ID) + private String userId; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + private String username; + + public static final String SERIALIZED_NAME_APP_ID = "app_id"; + @SerializedName(SERIALIZED_NAME_APP_ID) + private String appId; + + public static final String SERIALIZED_NAME_ACC_NAME = "acc_name"; + @SerializedName(SERIALIZED_NAME_ACC_NAME) + private String accName; + + public static final String SERIALIZED_NAME_ACC_NAME_DISPLAYED = "acc_name_displayed"; + @SerializedName(SERIALIZED_NAME_ACC_NAME_DISPLAYED) + private String accNameDisplayed; + + public static final String SERIALIZED_NAME_ACC_SOURCE = "acc_source"; + @SerializedName(SERIALIZED_NAME_ACC_SOURCE) + private String accSource; + + public static final String SERIALIZED_NAME_ACC_PASSWORD = "acc_password"; + @SerializedName(SERIALIZED_NAME_ACC_PASSWORD) + private String accPassword; + + public static final String SERIALIZED_NAME_ACC_STATUS = "acc_status"; + @SerializedName(SERIALIZED_NAME_ACC_STATUS) + private String accStatus; + + public static final String SERIALIZED_NAME_SYS_EXT_PROPS = "sys_ext_props"; + @SerializedName(SERIALIZED_NAME_SYS_EXT_PROPS) + private Object sysExtProps; + + public static final String SERIALIZED_NAME_FREE_EXT_PROPS = "free_ext_props"; + @SerializedName(SERIALIZED_NAME_FREE_EXT_PROPS) + private Object freeExtProps; + + public CreateAccountRequest() { + } + /** + * Get userId + * @return userId + **/ + @javax.annotation.Nonnull + public String getUserId() { + return userId; + } + + + public void setUserId(String userId) { + this.userId = userId; + } + + /** + * Get username + * @return username + **/ + @javax.annotation.Nonnull + public String getUsername() { + return username; + } + + + public void setUsername(String username) { + this.username = username; + } + + /** + * Get appId + * @return appId + **/ + @javax.annotation.Nonnull + public String getAppId() { + return appId; + } + + + public void setAppId(String appId) { + this.appId = appId; + } + + /** + * Get accName + * @return accName + **/ + @javax.annotation.Nonnull + public String getAccName() { + return accName; + } + + + public void setAccName(String accName) { + this.accName = accName; + } + + /** + * Get accNameDisplayed + * @return accNameDisplayed + **/ + @javax.annotation.Nullable + public String getAccNameDisplayed() { + return accNameDisplayed; + } + + + public void setAccNameDisplayed(String accNameDisplayed) { + this.accNameDisplayed = accNameDisplayed; + } + + /** + * Get accSource + * @return accSource + **/ + @javax.annotation.Nullable + public String getAccSource() { + return accSource; + } + + + public void setAccSource(String accSource) { + this.accSource = accSource; + } + + /** + * Get accPassword + * @return accPassword + **/ + @javax.annotation.Nonnull + public String getAccPassword() { + return accPassword; + } + + + public void setAccPassword(String accPassword) { + this.accPassword = accPassword; + } + + /** + * 1启用,0禁用 + * @return accStatus + **/ + @javax.annotation.Nonnull + public String getAccStatus() { + return accStatus; + } + + + public void setAccStatus(String accStatus) { + this.accStatus = accStatus; + } + + /** + * Get sysExtProps + * @return sysExtProps + **/ + @javax.annotation.Nullable + public Object getSysExtProps() { + return sysExtProps; + } + + + public void setSysExtProps(Object sysExtProps) { + this.sysExtProps = sysExtProps; + } + + /** + * Get freeExtProps + * @return freeExtProps + **/ + @javax.annotation.Nullable + public Object getFreeExtProps() { + return freeExtProps; + } + + + public void setFreeExtProps(Object freeExtProps) { + this.freeExtProps = freeExtProps; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAccountRequest createAccountRequest = (CreateAccountRequest) o; + return Objects.equals(this.userId, createAccountRequest.userId) && + Objects.equals(this.username, createAccountRequest.username) && + Objects.equals(this.appId, createAccountRequest.appId) && + Objects.equals(this.accName, createAccountRequest.accName) && + Objects.equals(this.accNameDisplayed, createAccountRequest.accNameDisplayed) && + Objects.equals(this.accSource, createAccountRequest.accSource) && + Objects.equals(this.accPassword, createAccountRequest.accPassword) && + Objects.equals(this.accStatus, createAccountRequest.accStatus) && + Objects.equals(this.sysExtProps, createAccountRequest.sysExtProps) && + Objects.equals(this.freeExtProps, createAccountRequest.freeExtProps); + } + + @Override + public int hashCode() { + return Objects.hash(userId, username, appId, accName, accNameDisplayed, accSource, accPassword, accStatus, sysExtProps, freeExtProps); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAccountRequest {\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); + sb.append(" accName: ").append(toIndentedString(accName)).append("\n"); + sb.append(" accNameDisplayed: ").append(toIndentedString(accNameDisplayed)).append("\n"); + sb.append(" accSource: ").append(toIndentedString(accSource)).append("\n"); + sb.append(" accPassword: ").append(toIndentedString(accPassword)).append("\n"); + sb.append(" accStatus: ").append(toIndentedString(accStatus)).append("\n"); + sb.append(" sysExtProps: ").append(toIndentedString(sysExtProps)).append("\n"); + sb.append(" freeExtProps: ").append(toIndentedString(freeExtProps)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("user_id"); + openapiFields.add("username"); + openapiFields.add("app_id"); + openapiFields.add("acc_name"); + openapiFields.add("acc_name_displayed"); + openapiFields.add("acc_source"); + openapiFields.add("acc_password"); + openapiFields.add("acc_status"); + openapiFields.add("sys_ext_props"); + openapiFields.add("free_ext_props"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("user_id"); + openapiRequiredFields.add("username"); + openapiRequiredFields.add("app_id"); + openapiRequiredFields.add("acc_name"); + openapiRequiredFields.add("acc_password"); + openapiRequiredFields.add("acc_status"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateAccountRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateAccountRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAccountRequest is not found in the empty JSON string", CreateAccountRequest.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateAccountRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("user_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_id").toString())); + } + if (!jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if (!jsonObj.get("app_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `app_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("app_id").toString())); + } + if (!jsonObj.get("acc_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `acc_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acc_name").toString())); + } + if ((jsonObj.get("acc_name_displayed") != null && !jsonObj.get("acc_name_displayed").isJsonNull()) && !jsonObj.get("acc_name_displayed").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `acc_name_displayed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acc_name_displayed").toString())); + } + if ((jsonObj.get("acc_source") != null && !jsonObj.get("acc_source").isJsonNull()) && !jsonObj.get("acc_source").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `acc_source` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acc_source").toString())); + } + if (!jsonObj.get("acc_password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `acc_password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acc_password").toString())); + } + if (!jsonObj.get("acc_status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `acc_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acc_status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateAccountRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateAccountRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateAccountRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateAccountRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateAccountRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateAccountRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAccountRequest + * @throws IOException if the JSON string is invalid with respect to CreateAccountRequest + */ + public static CreateAccountRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateAccountRequest.class); + } + + /** + * Convert an instance of CreateAccountRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/CreateNodeRequest.java b/src/main/java/com/idmesh/model/CreateNodeRequest.java new file mode 100644 index 0000000..9619961 --- /dev/null +++ b/src/main/java/com/idmesh/model/CreateNodeRequest.java @@ -0,0 +1,676 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * CreateNodeRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateNodeRequest { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_ARN = "arn"; + @SerializedName(SERIALIZED_NAME_ARN) + private String arn; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_TAG = "tag"; + @SerializedName(SERIALIZED_NAME_TAG) + private String tag; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_IS_POINTER = "is_pointer"; + @SerializedName(SERIALIZED_NAME_IS_POINTER) + private String isPointer; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_PERM_NAMESPACE_ARN = "perm_namespace_arn"; + @SerializedName(SERIALIZED_NAME_PERM_NAMESPACE_ARN) + private String permNamespaceArn; + + public static final String SERIALIZED_NAME_CONDITION = "condition"; + @SerializedName(SERIALIZED_NAME_CONDITION) + private String condition; + + public static final String SERIALIZED_NAME_IS_DYNAMIC = "is_dynamic"; + @SerializedName(SERIALIZED_NAME_IS_DYNAMIC) + private String isDynamic; + + public static final String SERIALIZED_NAME_SYS_CODE = "sys_code"; + @SerializedName(SERIALIZED_NAME_SYS_CODE) + private String sysCode; + + public static final String SERIALIZED_NAME_OPERATOR_ID = "operator_id"; + @SerializedName(SERIALIZED_NAME_OPERATOR_ID) + private String operatorId; + + public static final String SERIALIZED_NAME_POINTER_ID = "pointer_id"; + @SerializedName(SERIALIZED_NAME_POINTER_ID) + private String pointerId; + + public static final String SERIALIZED_NAME_SEQ = "seq"; + @SerializedName(SERIALIZED_NAME_SEQ) + private Integer seq; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public static final String SERIALIZED_NAME_OBJECT_CODE = "object_code"; + @SerializedName(SERIALIZED_NAME_OBJECT_CODE) + private String objectCode; + + public static final String SERIALIZED_NAME_PARENT_ID = "parent_id"; + @SerializedName(SERIALIZED_NAME_PARENT_ID) + private String parentId; + + public static final String SERIALIZED_NAME_SYS_EXT_PROPS = "sys_ext_props"; + @SerializedName(SERIALIZED_NAME_SYS_EXT_PROPS) + private Object sysExtProps; + + public static final String SERIALIZED_NAME_FREE_EXT_PROPS = "free_ext_props"; + @SerializedName(SERIALIZED_NAME_FREE_EXT_PROPS) + private Object freeExtProps; + + public CreateNodeRequest() { + } + /** + * 节点ID + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * Get arn + * @return arn + **/ + @javax.annotation.Nullable + public String getArn() { + return arn; + } + + + public void setArn(String arn) { + this.arn = arn; + } + + /** + * 创建时间 + * @return timeCreated + **/ + @javax.annotation.Nullable + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * 用于定义节点类型,目前支持:org(组织),role(角色),position(岗位),group(组) + * @return tag + **/ + @javax.annotation.Nullable + public String getTag() { + return tag; + } + + + public void setTag(String tag) { + this.tag = tag; + } + + /** + * 状态 + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + /** + * 是否指针类型 + * @return isPointer + **/ + @javax.annotation.Nullable + public String getIsPointer() { + return isPointer; + } + + + public void setIsPointer(String isPointer) { + this.isPointer = isPointer; + } + + /** + * 节点code + * @return code + **/ + @javax.annotation.Nonnull + public String getCode() { + return code; + } + + + public void setCode(String code) { + this.code = code; + } + + /** + * 节点名字 + * @return name + **/ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + /** + * 抽象权限容器的ARN + * @return permNamespaceArn + **/ + @javax.annotation.Nullable + public String getPermNamespaceArn() { + return permNamespaceArn; + } + + + public void setPermNamespaceArn(String permNamespaceArn) { + this.permNamespaceArn = permNamespaceArn; + } + + /** + * Get condition + * @return condition + **/ + @javax.annotation.Nullable + public String getCondition() { + return condition; + } + + + public void setCondition(String condition) { + this.condition = condition; + } + + /** + * 是否动态节点(0普通结点,1动态结点) + * @return isDynamic + **/ + @javax.annotation.Nullable + public String getIsDynamic() { + return isDynamic; + } + + + public void setIsDynamic(String isDynamic) { + this.isDynamic = isDynamic; + } + + /** + * 系统code + * @return sysCode + **/ + @javax.annotation.Nonnull + public String getSysCode() { + return sysCode; + } + + + public void setSysCode(String sysCode) { + this.sysCode = sysCode; + } + + /** + * 操作者id + * @return operatorId + **/ + @javax.annotation.Nullable + public String getOperatorId() { + return operatorId; + } + + + public void setOperatorId(String operatorId) { + this.operatorId = operatorId; + } + + /** + * 指针指向的实体节点 + * @return pointerId + **/ + @javax.annotation.Nullable + public String getPointerId() { + return pointerId; + } + + + public void setPointerId(String pointerId) { + this.pointerId = pointerId; + } + + /** + * 序号 + * @return seq + **/ + @javax.annotation.Nullable + public Integer getSeq() { + return seq; + } + + + public void setSeq(Integer seq) { + this.seq = seq; + } + + /** + * 描述 + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + /** + * 最后修改时间 + * @return timeModified + **/ + @javax.annotation.Nullable + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + /** + * OBJ_ID,组织,角色,岗位,职级等 + * @return objectCode + **/ + @javax.annotation.Nonnull + public String getObjectCode() { + return objectCode; + } + + + public void setObjectCode(String objectCode) { + this.objectCode = objectCode; + } + + /** + * 父节点id + * @return parentId + **/ + @javax.annotation.Nullable + public String getParentId() { + return parentId; + } + + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + /** + * 额外属性,需要先定义schema + * @return sysExtProps + **/ + @javax.annotation.Nullable + public Object getSysExtProps() { + return sysExtProps; + } + + + public void setSysExtProps(Object sysExtProps) { + this.sysExtProps = sysExtProps; + } + + /** + * 可以自由扩展 + * @return freeExtProps + **/ + @javax.annotation.Nullable + public Object getFreeExtProps() { + return freeExtProps; + } + + + public void setFreeExtProps(Object freeExtProps) { + this.freeExtProps = freeExtProps; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateNodeRequest createNodeRequest = (CreateNodeRequest) o; + return Objects.equals(this.id, createNodeRequest.id) && + Objects.equals(this.arn, createNodeRequest.arn) && + Objects.equals(this.timeCreated, createNodeRequest.timeCreated) && + Objects.equals(this.tag, createNodeRequest.tag) && + Objects.equals(this.status, createNodeRequest.status) && + Objects.equals(this.isPointer, createNodeRequest.isPointer) && + Objects.equals(this.code, createNodeRequest.code) && + Objects.equals(this.name, createNodeRequest.name) && + Objects.equals(this.permNamespaceArn, createNodeRequest.permNamespaceArn) && + Objects.equals(this.condition, createNodeRequest.condition) && + Objects.equals(this.isDynamic, createNodeRequest.isDynamic) && + Objects.equals(this.sysCode, createNodeRequest.sysCode) && + Objects.equals(this.operatorId, createNodeRequest.operatorId) && + Objects.equals(this.pointerId, createNodeRequest.pointerId) && + Objects.equals(this.seq, createNodeRequest.seq) && + Objects.equals(this.description, createNodeRequest.description) && + Objects.equals(this.timeModified, createNodeRequest.timeModified) && + Objects.equals(this.objectCode, createNodeRequest.objectCode) && + Objects.equals(this.parentId, createNodeRequest.parentId) && + Objects.equals(this.sysExtProps, createNodeRequest.sysExtProps) && + Objects.equals(this.freeExtProps, createNodeRequest.freeExtProps); + } + + @Override + public int hashCode() { + return Objects.hash(id, arn, timeCreated, tag, status, isPointer, code, name, permNamespaceArn, condition, isDynamic, sysCode, operatorId, pointerId, seq, description, timeModified, objectCode, parentId, sysExtProps, freeExtProps); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateNodeRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" arn: ").append(toIndentedString(arn)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" isPointer: ").append(toIndentedString(isPointer)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" permNamespaceArn: ").append(toIndentedString(permNamespaceArn)).append("\n"); + sb.append(" condition: ").append(toIndentedString(condition)).append("\n"); + sb.append(" isDynamic: ").append(toIndentedString(isDynamic)).append("\n"); + sb.append(" sysCode: ").append(toIndentedString(sysCode)).append("\n"); + sb.append(" operatorId: ").append(toIndentedString(operatorId)).append("\n"); + sb.append(" pointerId: ").append(toIndentedString(pointerId)).append("\n"); + sb.append(" seq: ").append(toIndentedString(seq)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" objectCode: ").append(toIndentedString(objectCode)).append("\n"); + sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); + sb.append(" sysExtProps: ").append(toIndentedString(sysExtProps)).append("\n"); + sb.append(" freeExtProps: ").append(toIndentedString(freeExtProps)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("arn"); + openapiFields.add("time_created"); + openapiFields.add("tag"); + openapiFields.add("status"); + openapiFields.add("is_pointer"); + openapiFields.add("code"); + openapiFields.add("name"); + openapiFields.add("perm_namespace_arn"); + openapiFields.add("condition"); + openapiFields.add("is_dynamic"); + openapiFields.add("sys_code"); + openapiFields.add("operator_id"); + openapiFields.add("pointer_id"); + openapiFields.add("seq"); + openapiFields.add("description"); + openapiFields.add("time_modified"); + openapiFields.add("object_code"); + openapiFields.add("parent_id"); + openapiFields.add("sys_ext_props"); + openapiFields.add("free_ext_props"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("code"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("sys_code"); + openapiRequiredFields.add("object_code"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateNodeRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateNodeRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateNodeRequest is not found in the empty JSON string", CreateNodeRequest.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateNodeRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("arn") != null && !jsonObj.get("arn").isJsonNull()) && !jsonObj.get("arn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `arn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("arn").toString())); + } + if ((jsonObj.get("time_created") != null && !jsonObj.get("time_created").isJsonNull()) && !jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("is_pointer") != null && !jsonObj.get("is_pointer").isJsonNull()) && !jsonObj.get("is_pointer").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `is_pointer` to be a primitive type in the JSON string but got `%s`", jsonObj.get("is_pointer").toString())); + } + if (!jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("perm_namespace_arn") != null && !jsonObj.get("perm_namespace_arn").isJsonNull()) && !jsonObj.get("perm_namespace_arn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `perm_namespace_arn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("perm_namespace_arn").toString())); + } + if ((jsonObj.get("condition") != null && !jsonObj.get("condition").isJsonNull()) && !jsonObj.get("condition").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `condition` to be a primitive type in the JSON string but got `%s`", jsonObj.get("condition").toString())); + } + if ((jsonObj.get("is_dynamic") != null && !jsonObj.get("is_dynamic").isJsonNull()) && !jsonObj.get("is_dynamic").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `is_dynamic` to be a primitive type in the JSON string but got `%s`", jsonObj.get("is_dynamic").toString())); + } + if (!jsonObj.get("sys_code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sys_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sys_code").toString())); + } + if ((jsonObj.get("operator_id") != null && !jsonObj.get("operator_id").isJsonNull()) && !jsonObj.get("operator_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `operator_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator_id").toString())); + } + if ((jsonObj.get("pointer_id") != null && !jsonObj.get("pointer_id").isJsonNull()) && !jsonObj.get("pointer_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `pointer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pointer_id").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("time_modified") != null && !jsonObj.get("time_modified").isJsonNull()) && !jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + if (!jsonObj.get("object_code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_code").toString())); + } + if ((jsonObj.get("parent_id") != null && !jsonObj.get("parent_id").isJsonNull()) && !jsonObj.get("parent_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `parent_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parent_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateNodeRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateNodeRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateNodeRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateNodeRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateNodeRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateNodeRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateNodeRequest + * @throws IOException if the JSON string is invalid with respect to CreateNodeRequest + */ + public static CreateNodeRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateNodeRequest.class); + } + + /** + * Convert an instance of CreateNodeRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/CreateOrganization200Response.java b/src/main/java/com/idmesh/model/CreateOrganization200Response.java new file mode 100644 index 0000000..3068ba8 --- /dev/null +++ b/src/main/java/com/idmesh/model/CreateOrganization200Response.java @@ -0,0 +1,194 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * CreateOrganization200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateOrganization200Response { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public CreateOrganization200Response() { + } + /** + * 创建ID + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateOrganization200Response createOrganization200Response = (CreateOrganization200Response) o; + return Objects.equals(this.id, createOrganization200Response.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateOrganization200Response {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateOrganization200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateOrganization200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateOrganization200Response is not found in the empty JSON string", CreateOrganization200Response.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateOrganization200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateOrganization200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateOrganization200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateOrganization200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateOrganization200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateOrganization200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateOrganization200Response + * @throws IOException if the JSON string is invalid with respect to CreateOrganization200Response + */ + public static CreateOrganization200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateOrganization200Response.class); + } + + /** + * Convert an instance of CreateOrganization200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/CreateOrganizationRequest.java b/src/main/java/com/idmesh/model/CreateOrganizationRequest.java new file mode 100644 index 0000000..47b744e --- /dev/null +++ b/src/main/java/com/idmesh/model/CreateOrganizationRequest.java @@ -0,0 +1,324 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * CreateOrganizationRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateOrganizationRequest { + public static final String SERIALIZED_NAME_OBJECT_DISPLAY_NAME = "object_display_name"; + @SerializedName(SERIALIZED_NAME_OBJECT_DISPLAY_NAME) + private String objectDisplayName; + + public static final String SERIALIZED_NAME_OBJECT_TYPE = "object_type"; + @SerializedName(SERIALIZED_NAME_OBJECT_TYPE) + private String objectType; + + public static final String SERIALIZED_NAME_OBJECT_CODE = "object_code"; + @SerializedName(SERIALIZED_NAME_OBJECT_CODE) + private String objectCode; + + public static final String SERIALIZED_NAME_OBJECT_PROPS = "object_props"; + @SerializedName(SERIALIZED_NAME_OBJECT_PROPS) + private String objectProps; + + public static final String SERIALIZED_NAME_IS_DEFAULT = "is_default"; + @SerializedName(SERIALIZED_NAME_IS_DEFAULT) + private String isDefault; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public CreateOrganizationRequest() { + } + /** + * Get objectDisplayName + * @return objectDisplayName + **/ + @javax.annotation.Nonnull + public String getObjectDisplayName() { + return objectDisplayName; + } + + + public void setObjectDisplayName(String objectDisplayName) { + this.objectDisplayName = objectDisplayName; + } + + /** + * 固定值:tree + * @return objectType + **/ + @javax.annotation.Nonnull + public String getObjectType() { + return objectType; + } + + + public void setObjectType(String objectType) { + this.objectType = objectType; + } + + /** + * 唯一,不可改,外键关联引用 + * @return objectCode + **/ + @javax.annotation.Nonnull + public String getObjectCode() { + return objectCode; + } + + + public void setObjectCode(String objectCode) { + this.objectCode = objectCode; + } + + /** + * Get objectProps + * @return objectProps + **/ + @javax.annotation.Nullable + public String getObjectProps() { + return objectProps; + } + + + public void setObjectProps(String objectProps) { + this.objectProps = objectProps; + } + + /** + * 是否默认组织关系,1是,0否 + * @return isDefault + **/ + @javax.annotation.Nullable + public String getIsDefault() { + return isDefault; + } + + + public void setIsDefault(String isDefault) { + this.isDefault = isDefault; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateOrganizationRequest createOrganizationRequest = (CreateOrganizationRequest) o; + return Objects.equals(this.objectDisplayName, createOrganizationRequest.objectDisplayName) && + Objects.equals(this.objectType, createOrganizationRequest.objectType) && + Objects.equals(this.objectCode, createOrganizationRequest.objectCode) && + Objects.equals(this.objectProps, createOrganizationRequest.objectProps) && + Objects.equals(this.isDefault, createOrganizationRequest.isDefault) && + Objects.equals(this.status, createOrganizationRequest.status); + } + + @Override + public int hashCode() { + return Objects.hash(objectDisplayName, objectType, objectCode, objectProps, isDefault, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateOrganizationRequest {\n"); + sb.append(" objectDisplayName: ").append(toIndentedString(objectDisplayName)).append("\n"); + sb.append(" objectType: ").append(toIndentedString(objectType)).append("\n"); + sb.append(" objectCode: ").append(toIndentedString(objectCode)).append("\n"); + sb.append(" objectProps: ").append(toIndentedString(objectProps)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("object_display_name"); + openapiFields.add("object_type"); + openapiFields.add("object_code"); + openapiFields.add("object_props"); + openapiFields.add("is_default"); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("object_display_name"); + openapiRequiredFields.add("object_type"); + openapiRequiredFields.add("object_code"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateOrganizationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateOrganizationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateOrganizationRequest is not found in the empty JSON string", CreateOrganizationRequest.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateOrganizationRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("object_display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_display_name").toString())); + } + if (!jsonObj.get("object_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_type").toString())); + } + if (!jsonObj.get("object_code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_code").toString())); + } + if ((jsonObj.get("object_props") != null && !jsonObj.get("object_props").isJsonNull()) && !jsonObj.get("object_props").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_props` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_props").toString())); + } + if ((jsonObj.get("is_default") != null && !jsonObj.get("is_default").isJsonNull()) && !jsonObj.get("is_default").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `is_default` to be a primitive type in the JSON string but got `%s`", jsonObj.get("is_default").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateOrganizationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateOrganizationRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateOrganizationRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateOrganizationRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateOrganizationRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateOrganizationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateOrganizationRequest + * @throws IOException if the JSON string is invalid with respect to CreateOrganizationRequest + */ + public static CreateOrganizationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateOrganizationRequest.class); + } + + /** + * Convert an instance of CreateOrganizationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/CreateRequest.java b/src/main/java/com/idmesh/model/CreateRequest.java new file mode 100644 index 0000000..74a2e7a --- /dev/null +++ b/src/main/java/com/idmesh/model/CreateRequest.java @@ -0,0 +1,695 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * CreateRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRequest { + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + private String username; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + @SerializedName(SERIALIZED_NAME_PASSWORD) + private String password; + + public static final String SERIALIZED_NAME_PASSWORD_STATUS = "password_status"; + @SerializedName(SERIALIZED_NAME_PASSWORD_STATUS) + private String passwordStatus; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + private String displayName; + + public static final String SERIALIZED_NAME_FIRSTNAME = "firstname"; + @SerializedName(SERIALIZED_NAME_FIRSTNAME) + private String firstname; + + public static final String SERIALIZED_NAME_LASTNAME = "lastname"; + @SerializedName(SERIALIZED_NAME_LASTNAME) + private String lastname; + + public static final String SERIALIZED_NAME_REALNAME = "realname"; + @SerializedName(SERIALIZED_NAME_REALNAME) + private String realname; + + public static final String SERIALIZED_NAME_PINYIN = "pinyin"; + @SerializedName(SERIALIZED_NAME_PINYIN) + private String pinyin; + + public static final String SERIALIZED_NAME_NICKNAME = "nickname"; + @SerializedName(SERIALIZED_NAME_NICKNAME) + private String nickname; + + public static final String SERIALIZED_NAME_USER_TYPE = "user_type"; + @SerializedName(SERIALIZED_NAME_USER_TYPE) + private String userType; + + public static final String SERIALIZED_NAME_MOBILE = "mobile"; + @SerializedName(SERIALIZED_NAME_MOBILE) + private String mobile; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_GENDER = "gender"; + @SerializedName(SERIALIZED_NAME_GENDER) + private String gender; + + public static final String SERIALIZED_NAME_CERT_TYPE = "cert_type"; + @SerializedName(SERIALIZED_NAME_CERT_TYPE) + private String certType; + + public static final String SERIALIZED_NAME_CERT_NUMBER = "cert_number"; + @SerializedName(SERIALIZED_NAME_CERT_NUMBER) + private String certNumber; + + public static final String SERIALIZED_NAME_REGION = "region"; + @SerializedName(SERIALIZED_NAME_REGION) + private String region; + + public static final String SERIALIZED_NAME_WORK_TIME = "work_time"; + @SerializedName(SERIALIZED_NAME_WORK_TIME) + private String workTime; + + public static final String SERIALIZED_NAME_WORK_TITLE = "work_title"; + @SerializedName(SERIALIZED_NAME_WORK_TITLE) + private String workTitle; + + public static final String SERIALIZED_NAME_IDP_CONFIG_ID = "idp_config_id"; + @SerializedName(SERIALIZED_NAME_IDP_CONFIG_ID) + private BigDecimal idpConfigId; + + public static final String SERIALIZED_NAME_SYS_EXT_PROPS = "sys_ext_props"; + @SerializedName(SERIALIZED_NAME_SYS_EXT_PROPS) + private Object sysExtProps; + + public static final String SERIALIZED_NAME_FREE_EXT_PROPS = "free_ext_props"; + @SerializedName(SERIALIZED_NAME_FREE_EXT_PROPS) + private Object freeExtProps; + + public static final String SERIALIZED_NAME_IS_NOTIFY = "is_notify"; + @SerializedName(SERIALIZED_NAME_IS_NOTIFY) + private Boolean isNotify; + + public CreateRequest() { + } + /** + * 用户名,唯一,不传后台自动生成 + * @return username + **/ + @javax.annotation.Nullable + public String getUsername() { + return username; + } + + + public void setUsername(String username) { + this.username = username; + } + + /** + * 密码,不传后台生成默认密码 + * @return password + **/ + @javax.annotation.Nullable + public String getPassword() { + return password; + } + + + public void setPassword(String password) { + this.password = password; + } + + /** + * 密码状态(valid/invalid) + * @return passwordStatus + **/ + @javax.annotation.Nullable + public String getPasswordStatus() { + return passwordStatus; + } + + + public void setPasswordStatus(String passwordStatus) { + this.passwordStatus = passwordStatus; + } + + /** + * 显示名称 + * @return displayName + **/ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + /** + * 名 + * @return firstname + **/ + @javax.annotation.Nullable + public String getFirstname() { + return firstname; + } + + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + + /** + * 姓 + * @return lastname + **/ + @javax.annotation.Nullable + public String getLastname() { + return lastname; + } + + + public void setLastname(String lastname) { + this.lastname = lastname; + } + + /** + * 真实姓名 + * @return realname + **/ + @javax.annotation.Nullable + public String getRealname() { + return realname; + } + + + public void setRealname(String realname) { + this.realname = realname; + } + + /** + * 拼音 + * @return pinyin + **/ + @javax.annotation.Nullable + public String getPinyin() { + return pinyin; + } + + + public void setPinyin(String pinyin) { + this.pinyin = pinyin; + } + + /** + * 昵称 + * @return nickname + **/ + @javax.annotation.Nullable + public String getNickname() { + return nickname; + } + + + public void setNickname(String nickname) { + this.nickname = nickname; + } + + /** + * 用户类型,不传后台设置系统默认类型 + * @return userType + **/ + @javax.annotation.Nullable + public String getUserType() { + return userType; + } + + + public void setUserType(String userType) { + this.userType = userType; + } + + /** + * 手机 + * @return mobile + **/ + @javax.annotation.Nullable + public String getMobile() { + return mobile; + } + + + public void setMobile(String mobile) { + this.mobile = mobile; + } + + /** + * 邮箱 + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + + public void setEmail(String email) { + this.email = email; + } + + /** + * 性别 + * @return gender + **/ + @javax.annotation.Nullable + public String getGender() { + return gender; + } + + + public void setGender(String gender) { + this.gender = gender; + } + + /** + * 证件类型 + * @return certType + **/ + @javax.annotation.Nullable + public String getCertType() { + return certType; + } + + + public void setCertType(String certType) { + this.certType = certType; + } + + /** + * 证件号 + * @return certNumber + **/ + @javax.annotation.Nullable + public String getCertNumber() { + return certNumber; + } + + + public void setCertNumber(String certNumber) { + this.certNumber = certNumber; + } + + /** + * 区域 + * @return region + **/ + @javax.annotation.Nullable + public String getRegion() { + return region; + } + + + public void setRegion(String region) { + this.region = region; + } + + /** + * 加入时间 + * @return workTime + **/ + @javax.annotation.Nullable + public String getWorkTime() { + return workTime; + } + + + public void setWorkTime(String workTime) { + this.workTime = workTime; + } + + /** + * 职位 + * @return workTitle + **/ + @javax.annotation.Nullable + public String getWorkTitle() { + return workTitle; + } + + + public void setWorkTitle(String workTitle) { + this.workTitle = workTitle; + } + + /** + * 身份源ID,作为创建时记录,不做更新 + * @return idpConfigId + **/ + @javax.annotation.Nonnull + public BigDecimal getIdpConfigId() { + return idpConfigId; + } + + + public void setIdpConfigId(BigDecimal idpConfigId) { + this.idpConfigId = idpConfigId; + } + + /** + * 系统扩展属性,json对象{\"age\": 18, \"love\": \"足球\"} + * @return sysExtProps + **/ + @javax.annotation.Nullable + public Object getSysExtProps() { + return sysExtProps; + } + + + public void setSysExtProps(Object sysExtProps) { + this.sysExtProps = sysExtProps; + } + + /** + * 自由扩展属性,json对象 + * @return freeExtProps + **/ + @javax.annotation.Nullable + public Object getFreeExtProps() { + return freeExtProps; + } + + + public void setFreeExtProps(Object freeExtProps) { + this.freeExtProps = freeExtProps; + } + + /** + * 是否通知:默认不传false不通知,true通知 + * @return isNotify + **/ + @javax.annotation.Nullable + public Boolean getIsNotify() { + return isNotify; + } + + + public void setIsNotify(Boolean isNotify) { + this.isNotify = isNotify; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRequest createRequest = (CreateRequest) o; + return Objects.equals(this.username, createRequest.username) && + Objects.equals(this.password, createRequest.password) && + Objects.equals(this.passwordStatus, createRequest.passwordStatus) && + Objects.equals(this.displayName, createRequest.displayName) && + Objects.equals(this.firstname, createRequest.firstname) && + Objects.equals(this.lastname, createRequest.lastname) && + Objects.equals(this.realname, createRequest.realname) && + Objects.equals(this.pinyin, createRequest.pinyin) && + Objects.equals(this.nickname, createRequest.nickname) && + Objects.equals(this.userType, createRequest.userType) && + Objects.equals(this.mobile, createRequest.mobile) && + Objects.equals(this.email, createRequest.email) && + Objects.equals(this.gender, createRequest.gender) && + Objects.equals(this.certType, createRequest.certType) && + Objects.equals(this.certNumber, createRequest.certNumber) && + Objects.equals(this.region, createRequest.region) && + Objects.equals(this.workTime, createRequest.workTime) && + Objects.equals(this.workTitle, createRequest.workTitle) && + Objects.equals(this.idpConfigId, createRequest.idpConfigId) && + Objects.equals(this.sysExtProps, createRequest.sysExtProps) && + Objects.equals(this.freeExtProps, createRequest.freeExtProps) && + Objects.equals(this.isNotify, createRequest.isNotify); + } + + @Override + public int hashCode() { + return Objects.hash(username, password, passwordStatus, displayName, firstname, lastname, realname, pinyin, nickname, userType, mobile, email, gender, certType, certNumber, region, workTime, workTitle, idpConfigId, sysExtProps, freeExtProps, isNotify); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRequest {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" passwordStatus: ").append(toIndentedString(passwordStatus)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" firstname: ").append(toIndentedString(firstname)).append("\n"); + sb.append(" lastname: ").append(toIndentedString(lastname)).append("\n"); + sb.append(" realname: ").append(toIndentedString(realname)).append("\n"); + sb.append(" pinyin: ").append(toIndentedString(pinyin)).append("\n"); + sb.append(" nickname: ").append(toIndentedString(nickname)).append("\n"); + sb.append(" userType: ").append(toIndentedString(userType)).append("\n"); + sb.append(" mobile: ").append(toIndentedString(mobile)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" certType: ").append(toIndentedString(certType)).append("\n"); + sb.append(" certNumber: ").append(toIndentedString(certNumber)).append("\n"); + sb.append(" region: ").append(toIndentedString(region)).append("\n"); + sb.append(" workTime: ").append(toIndentedString(workTime)).append("\n"); + sb.append(" workTitle: ").append(toIndentedString(workTitle)).append("\n"); + sb.append(" idpConfigId: ").append(toIndentedString(idpConfigId)).append("\n"); + sb.append(" sysExtProps: ").append(toIndentedString(sysExtProps)).append("\n"); + sb.append(" freeExtProps: ").append(toIndentedString(freeExtProps)).append("\n"); + sb.append(" isNotify: ").append(toIndentedString(isNotify)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("username"); + openapiFields.add("password"); + openapiFields.add("password_status"); + openapiFields.add("display_name"); + openapiFields.add("firstname"); + openapiFields.add("lastname"); + openapiFields.add("realname"); + openapiFields.add("pinyin"); + openapiFields.add("nickname"); + openapiFields.add("user_type"); + openapiFields.add("mobile"); + openapiFields.add("email"); + openapiFields.add("gender"); + openapiFields.add("cert_type"); + openapiFields.add("cert_number"); + openapiFields.add("region"); + openapiFields.add("work_time"); + openapiFields.add("work_title"); + openapiFields.add("idp_config_id"); + openapiFields.add("sys_ext_props"); + openapiFields.add("free_ext_props"); + openapiFields.add("is_notify"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("idp_config_id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRequest is not found in the empty JSON string", CreateRequest.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } + if ((jsonObj.get("password_status") != null && !jsonObj.get("password_status").isJsonNull()) && !jsonObj.get("password_status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password_status").toString())); + } + if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) && !jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + if ((jsonObj.get("firstname") != null && !jsonObj.get("firstname").isJsonNull()) && !jsonObj.get("firstname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `firstname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstname").toString())); + } + if ((jsonObj.get("lastname") != null && !jsonObj.get("lastname").isJsonNull()) && !jsonObj.get("lastname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lastname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastname").toString())); + } + if ((jsonObj.get("realname") != null && !jsonObj.get("realname").isJsonNull()) && !jsonObj.get("realname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `realname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("realname").toString())); + } + if ((jsonObj.get("pinyin") != null && !jsonObj.get("pinyin").isJsonNull()) && !jsonObj.get("pinyin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `pinyin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pinyin").toString())); + } + if ((jsonObj.get("nickname") != null && !jsonObj.get("nickname").isJsonNull()) && !jsonObj.get("nickname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nickname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nickname").toString())); + } + if ((jsonObj.get("user_type") != null && !jsonObj.get("user_type").isJsonNull()) && !jsonObj.get("user_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_type").toString())); + } + if ((jsonObj.get("mobile") != null && !jsonObj.get("mobile").isJsonNull()) && !jsonObj.get("mobile").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mobile` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mobile").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("gender") != null && !jsonObj.get("gender").isJsonNull()) && !jsonObj.get("gender").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `gender` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gender").toString())); + } + if ((jsonObj.get("cert_type") != null && !jsonObj.get("cert_type").isJsonNull()) && !jsonObj.get("cert_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cert_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cert_type").toString())); + } + if ((jsonObj.get("cert_number") != null && !jsonObj.get("cert_number").isJsonNull()) && !jsonObj.get("cert_number").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cert_number` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cert_number").toString())); + } + if ((jsonObj.get("region") != null && !jsonObj.get("region").isJsonNull()) && !jsonObj.get("region").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `region` to be a primitive type in the JSON string but got `%s`", jsonObj.get("region").toString())); + } + if ((jsonObj.get("work_time") != null && !jsonObj.get("work_time").isJsonNull()) && !jsonObj.get("work_time").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `work_time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("work_time").toString())); + } + if ((jsonObj.get("work_title") != null && !jsonObj.get("work_title").isJsonNull()) && !jsonObj.get("work_title").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `work_title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("work_title").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateRequest + * @throws IOException if the JSON string is invalid with respect to CreateRequest + */ + public static CreateRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateRequest.class); + } + + /** + * Convert an instance of CreateRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/CreateRequest1.java b/src/main/java/com/idmesh/model/CreateRequest1.java new file mode 100644 index 0000000..34faaea --- /dev/null +++ b/src/main/java/com/idmesh/model/CreateRequest1.java @@ -0,0 +1,564 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.CreateRequest1ConfigProp; +import com.idmesh.model.CreateRequest1ProtocolProp; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * CreateRequest1 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRequest1 { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_DOMAIN_SN = "domain_sn"; + @SerializedName(SERIALIZED_NAME_DOMAIN_SN) + private String domainSn; + + public static final String SERIALIZED_NAME_TEMPLATE_ID = "template_id"; + @SerializedName(SERIALIZED_NAME_TEMPLATE_ID) + private String templateId; + + public static final String SERIALIZED_NAME_CATEGORY = "category"; + @SerializedName(SERIALIZED_NAME_CATEGORY) + private String category; + + public static final String SERIALIZED_NAME_DESCR = "descr"; + @SerializedName(SERIALIZED_NAME_DESCR) + private String descr; + + public static final String SERIALIZED_NAME_LOGO = "logo"; + @SerializedName(SERIALIZED_NAME_LOGO) + private String logo; + + public static final String SERIALIZED_NAME_LOGIN_URL = "login_url"; + @SerializedName(SERIALIZED_NAME_LOGIN_URL) + private String loginUrl; + + public static final String SERIALIZED_NAME_REDIRECT_URL = "redirect_url"; + @SerializedName(SERIALIZED_NAME_REDIRECT_URL) + private String redirectUrl; + + public static final String SERIALIZED_NAME_LOGOUT_URL = "logout_url"; + @SerializedName(SERIALIZED_NAME_LOGOUT_URL) + private String logoutUrl; + + public static final String SERIALIZED_NAME_SUB_ACCOUNT_POLICY = "sub_account_policy"; + @SerializedName(SERIALIZED_NAME_SUB_ACCOUNT_POLICY) + private String subAccountPolicy; + + public static final String SERIALIZED_NAME_SYS_EXT_PROPS = "sys_ext_props"; + @SerializedName(SERIALIZED_NAME_SYS_EXT_PROPS) + private Object sysExtProps; + + public static final String SERIALIZED_NAME_FREE_EXT_PROPS = "free_ext_props"; + @SerializedName(SERIALIZED_NAME_FREE_EXT_PROPS) + private Object freeExtProps; + + public static final String SERIALIZED_NAME_PROTOCOL_TYPE = "protocol_type"; + @SerializedName(SERIALIZED_NAME_PROTOCOL_TYPE) + private String protocolType; + + public static final String SERIALIZED_NAME_PROTOCOL_PROP = "protocol_prop"; + @SerializedName(SERIALIZED_NAME_PROTOCOL_PROP) + private CreateRequest1ProtocolProp protocolProp; + + public static final String SERIALIZED_NAME_CONFIG_PROP = "config_prop"; + @SerializedName(SERIALIZED_NAME_CONFIG_PROP) + private CreateRequest1ConfigProp configProp; + + public CreateRequest1() { + } + /** + * Get name + * @return name + **/ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + /** + * 1,自建应用,2模板应用(市场应用) + * @return type + **/ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * 域名 + * @return domainSn + **/ + @javax.annotation.Nonnull + public String getDomainSn() { + return domainSn; + } + + + public void setDomainSn(String domainSn) { + this.domainSn = domainSn; + } + + /** + * 不填写则代表自建应用 + * @return templateId + **/ + @javax.annotation.Nullable + public String getTemplateId() { + return templateId; + } + + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + /** + * 1 标准web应用,2单页web应用,3客户端应用,4后端服务 + * @return category + **/ + @javax.annotation.Nonnull + public String getCategory() { + return category; + } + + + public void setCategory(String category) { + this.category = category; + } + + /** + * Get descr + * @return descr + **/ + @javax.annotation.Nullable + public String getDescr() { + return descr; + } + + + public void setDescr(String descr) { + this.descr = descr; + } + + /** + * 格式为:http://ip:port/logo.png + * @return logo + **/ + @javax.annotation.Nullable + public String getLogo() { + return logo; + } + + + public void setLogo(String logo) { + this.logo = logo; + } + + /** + * Get loginUrl + * @return loginUrl + **/ + @javax.annotation.Nullable + public String getLoginUrl() { + return loginUrl; + } + + + public void setLoginUrl(String loginUrl) { + this.loginUrl = loginUrl; + } + + /** + * Get redirectUrl + * @return redirectUrl + **/ + @javax.annotation.Nullable + public String getRedirectUrl() { + return redirectUrl; + } + + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + /** + * Get logoutUrl + * @return logoutUrl + **/ + @javax.annotation.Nullable + public String getLogoutUrl() { + return logoutUrl; + } + + + public void setLogoutUrl(String logoutUrl) { + this.logoutUrl = logoutUrl; + } + + /** + * 1启用,0不启用,启用后单点登录返回 + * @return subAccountPolicy + **/ + @javax.annotation.Nullable + public String getSubAccountPolicy() { + return subAccountPolicy; + } + + + public void setSubAccountPolicy(String subAccountPolicy) { + this.subAccountPolicy = subAccountPolicy; + } + + /** + * kv字典数据 + * @return sysExtProps + **/ + @javax.annotation.Nullable + public Object getSysExtProps() { + return sysExtProps; + } + + + public void setSysExtProps(Object sysExtProps) { + this.sysExtProps = sysExtProps; + } + + /** + * kv字典数据 + * @return freeExtProps + **/ + @javax.annotation.Nonnull + public Object getFreeExtProps() { + return freeExtProps; + } + + + public void setFreeExtProps(Object freeExtProps) { + this.freeExtProps = freeExtProps; + } + + /** + * 默认 oidc + * @return protocolType + **/ + @javax.annotation.Nullable + public String getProtocolType() { + return protocolType; + } + + + public void setProtocolType(String protocolType) { + this.protocolType = protocolType; + } + + /** + * Get protocolProp + * @return protocolProp + **/ + @javax.annotation.Nullable + public CreateRequest1ProtocolProp getProtocolProp() { + return protocolProp; + } + + + public void setProtocolProp(CreateRequest1ProtocolProp protocolProp) { + this.protocolProp = protocolProp; + } + + /** + * Get configProp + * @return configProp + **/ + @javax.annotation.Nullable + public CreateRequest1ConfigProp getConfigProp() { + return configProp; + } + + + public void setConfigProp(CreateRequest1ConfigProp configProp) { + this.configProp = configProp; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRequest1 createRequest1 = (CreateRequest1) o; + return Objects.equals(this.name, createRequest1.name) && + Objects.equals(this.type, createRequest1.type) && + Objects.equals(this.domainSn, createRequest1.domainSn) && + Objects.equals(this.templateId, createRequest1.templateId) && + Objects.equals(this.category, createRequest1.category) && + Objects.equals(this.descr, createRequest1.descr) && + Objects.equals(this.logo, createRequest1.logo) && + Objects.equals(this.loginUrl, createRequest1.loginUrl) && + Objects.equals(this.redirectUrl, createRequest1.redirectUrl) && + Objects.equals(this.logoutUrl, createRequest1.logoutUrl) && + Objects.equals(this.subAccountPolicy, createRequest1.subAccountPolicy) && + Objects.equals(this.sysExtProps, createRequest1.sysExtProps) && + Objects.equals(this.freeExtProps, createRequest1.freeExtProps) && + Objects.equals(this.protocolType, createRequest1.protocolType) && + Objects.equals(this.protocolProp, createRequest1.protocolProp) && + Objects.equals(this.configProp, createRequest1.configProp); + } + + @Override + public int hashCode() { + return Objects.hash(name, type, domainSn, templateId, category, descr, logo, loginUrl, redirectUrl, logoutUrl, subAccountPolicy, sysExtProps, freeExtProps, protocolType, protocolProp, configProp); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRequest1 {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" domainSn: ").append(toIndentedString(domainSn)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" descr: ").append(toIndentedString(descr)).append("\n"); + sb.append(" logo: ").append(toIndentedString(logo)).append("\n"); + sb.append(" loginUrl: ").append(toIndentedString(loginUrl)).append("\n"); + sb.append(" redirectUrl: ").append(toIndentedString(redirectUrl)).append("\n"); + sb.append(" logoutUrl: ").append(toIndentedString(logoutUrl)).append("\n"); + sb.append(" subAccountPolicy: ").append(toIndentedString(subAccountPolicy)).append("\n"); + sb.append(" sysExtProps: ").append(toIndentedString(sysExtProps)).append("\n"); + sb.append(" freeExtProps: ").append(toIndentedString(freeExtProps)).append("\n"); + sb.append(" protocolType: ").append(toIndentedString(protocolType)).append("\n"); + sb.append(" protocolProp: ").append(toIndentedString(protocolProp)).append("\n"); + sb.append(" configProp: ").append(toIndentedString(configProp)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("type"); + openapiFields.add("domain_sn"); + openapiFields.add("template_id"); + openapiFields.add("category"); + openapiFields.add("descr"); + openapiFields.add("logo"); + openapiFields.add("login_url"); + openapiFields.add("redirect_url"); + openapiFields.add("logout_url"); + openapiFields.add("sub_account_policy"); + openapiFields.add("sys_ext_props"); + openapiFields.add("free_ext_props"); + openapiFields.add("protocol_type"); + openapiFields.add("protocol_prop"); + openapiFields.add("config_prop"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("domain_sn"); + openapiRequiredFields.add("category"); + openapiRequiredFields.add("free_ext_props"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateRequest1 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateRequest1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRequest1 is not found in the empty JSON string", CreateRequest1.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateRequest1.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if (!jsonObj.get("domain_sn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `domain_sn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("domain_sn").toString())); + } + if ((jsonObj.get("template_id") != null && !jsonObj.get("template_id").isJsonNull()) && !jsonObj.get("template_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `template_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("template_id").toString())); + } + if (!jsonObj.get("category").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); + } + if ((jsonObj.get("descr") != null && !jsonObj.get("descr").isJsonNull()) && !jsonObj.get("descr").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `descr` to be a primitive type in the JSON string but got `%s`", jsonObj.get("descr").toString())); + } + if ((jsonObj.get("logo") != null && !jsonObj.get("logo").isJsonNull()) && !jsonObj.get("logo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `logo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logo").toString())); + } + if ((jsonObj.get("login_url") != null && !jsonObj.get("login_url").isJsonNull()) && !jsonObj.get("login_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `login_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("login_url").toString())); + } + if ((jsonObj.get("redirect_url") != null && !jsonObj.get("redirect_url").isJsonNull()) && !jsonObj.get("redirect_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `redirect_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirect_url").toString())); + } + if ((jsonObj.get("logout_url") != null && !jsonObj.get("logout_url").isJsonNull()) && !jsonObj.get("logout_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `logout_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logout_url").toString())); + } + if ((jsonObj.get("sub_account_policy") != null && !jsonObj.get("sub_account_policy").isJsonNull()) && !jsonObj.get("sub_account_policy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sub_account_policy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sub_account_policy").toString())); + } + if ((jsonObj.get("protocol_type") != null && !jsonObj.get("protocol_type").isJsonNull()) && !jsonObj.get("protocol_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `protocol_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("protocol_type").toString())); + } + // validate the optional field `protocol_prop` + if (jsonObj.get("protocol_prop") != null && !jsonObj.get("protocol_prop").isJsonNull()) { + CreateRequest1ProtocolProp.validateJsonElement(jsonObj.get("protocol_prop")); + } + // validate the optional field `config_prop` + if (jsonObj.get("config_prop") != null && !jsonObj.get("config_prop").isJsonNull()) { + CreateRequest1ConfigProp.validateJsonElement(jsonObj.get("config_prop")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateRequest1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateRequest1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateRequest1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateRequest1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateRequest1 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateRequest1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateRequest1 + * @throws IOException if the JSON string is invalid with respect to CreateRequest1 + */ + public static CreateRequest1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateRequest1.class); + } + + /** + * Convert an instance of CreateRequest1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/CreateRequest1ConfigProp.java b/src/main/java/com/idmesh/model/CreateRequest1ConfigProp.java new file mode 100644 index 0000000..11b6c34 --- /dev/null +++ b/src/main/java/com/idmesh/model/CreateRequest1ConfigProp.java @@ -0,0 +1,485 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.CreateRequest1ConfigPropAccessPolicy; +import com.idmesh.model.CreateRequest1ConfigPropAllowedLoginMethod; +import com.idmesh.model.CreateRequest1ConfigPropAllowedSocialLoginProvider; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * CreateRequest1ConfigProp + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRequest1ConfigProp { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private String tenantId; + + public static final String SERIALIZED_NAME_MFA_CONFIG = "mfa_config"; + @SerializedName(SERIALIZED_NAME_MFA_CONFIG) + private Object mfaConfig; + + public static final String SERIALIZED_NAME_REG_POLICY = "reg_policy"; + @SerializedName(SERIALIZED_NAME_REG_POLICY) + private List regPolicy; + + public static final String SERIALIZED_NAME_MFA_ENABLED = "mfa_enabled"; + @SerializedName(SERIALIZED_NAME_MFA_ENABLED) + private String mfaEnabled; + + public static final String SERIALIZED_NAME_SSO_ENABLED = "sso_enabled"; + @SerializedName(SERIALIZED_NAME_SSO_ENABLED) + private String ssoEnabled; + + public static final String SERIALIZED_NAME_DEVELOPER_ID = "developer_id"; + @SerializedName(SERIALIZED_NAME_DEVELOPER_ID) + private String developerId; + + public static final String SERIALIZED_NAME_ACCESS_POLICY = "access_policy"; + @SerializedName(SERIALIZED_NAME_ACCESS_POLICY) + private CreateRequest1ConfigPropAccessPolicy accessPolicy; + + public static final String SERIALIZED_NAME_ALLOWED_REG_METHOD = "allowed_reg_method"; + @SerializedName(SERIALIZED_NAME_ALLOWED_REG_METHOD) + private Object allowedRegMethod; + + public static final String SERIALIZED_NAME_DEFAULT_REG_METHOD = "default_reg_method"; + @SerializedName(SERIALIZED_NAME_DEFAULT_REG_METHOD) + private String defaultRegMethod; + + public static final String SERIALIZED_NAME_ALLOWED_LOGIN_METHOD = "allowed_login_method"; + @SerializedName(SERIALIZED_NAME_ALLOWED_LOGIN_METHOD) + private CreateRequest1ConfigPropAllowedLoginMethod allowedLoginMethod; + + public static final String SERIALIZED_NAME_DEFAULT_LOGIN_METHOD = "default_login_method"; + @SerializedName(SERIALIZED_NAME_DEFAULT_LOGIN_METHOD) + private String defaultLoginMethod; + + public static final String SERIALIZED_NAME_ALLOWED_SOCIAL_LOGIN_PROVIDER = "allowed_social_login_provider"; + @SerializedName(SERIALIZED_NAME_ALLOWED_SOCIAL_LOGIN_PROVIDER) + private CreateRequest1ConfigPropAllowedSocialLoginProvider allowedSocialLoginProvider; + + public CreateRequest1ConfigProp() { + } + /** + * Get status + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + /** + * Get tenantId + * @return tenantId + **/ + @javax.annotation.Nullable + public String getTenantId() { + return tenantId; + } + + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + /** + * Get mfaConfig + * @return mfaConfig + **/ + @javax.annotation.Nullable + public Object getMfaConfig() { + return mfaConfig; + } + + + public void setMfaConfig(Object mfaConfig) { + this.mfaConfig = mfaConfig; + } + + /** + * Get regPolicy + * @return regPolicy + **/ + @javax.annotation.Nullable + public List getRegPolicy() { + return regPolicy; + } + + + public void setRegPolicy(List regPolicy) { + this.regPolicy = regPolicy; + } + + /** + * Get mfaEnabled + * @return mfaEnabled + **/ + @javax.annotation.Nullable + public String getMfaEnabled() { + return mfaEnabled; + } + + + public void setMfaEnabled(String mfaEnabled) { + this.mfaEnabled = mfaEnabled; + } + + /** + * Get ssoEnabled + * @return ssoEnabled + **/ + @javax.annotation.Nullable + public String getSsoEnabled() { + return ssoEnabled; + } + + + public void setSsoEnabled(String ssoEnabled) { + this.ssoEnabled = ssoEnabled; + } + + /** + * Get developerId + * @return developerId + **/ + @javax.annotation.Nullable + public String getDeveloperId() { + return developerId; + } + + + public void setDeveloperId(String developerId) { + this.developerId = developerId; + } + + /** + * Get accessPolicy + * @return accessPolicy + **/ + @javax.annotation.Nullable + public CreateRequest1ConfigPropAccessPolicy getAccessPolicy() { + return accessPolicy; + } + + + public void setAccessPolicy(CreateRequest1ConfigPropAccessPolicy accessPolicy) { + this.accessPolicy = accessPolicy; + } + + /** + * Get allowedRegMethod + * @return allowedRegMethod + **/ + @javax.annotation.Nullable + public Object getAllowedRegMethod() { + return allowedRegMethod; + } + + + public void setAllowedRegMethod(Object allowedRegMethod) { + this.allowedRegMethod = allowedRegMethod; + } + + /** + * Get defaultRegMethod + * @return defaultRegMethod + **/ + @javax.annotation.Nullable + public String getDefaultRegMethod() { + return defaultRegMethod; + } + + + public void setDefaultRegMethod(String defaultRegMethod) { + this.defaultRegMethod = defaultRegMethod; + } + + /** + * Get allowedLoginMethod + * @return allowedLoginMethod + **/ + @javax.annotation.Nullable + public CreateRequest1ConfigPropAllowedLoginMethod getAllowedLoginMethod() { + return allowedLoginMethod; + } + + + public void setAllowedLoginMethod(CreateRequest1ConfigPropAllowedLoginMethod allowedLoginMethod) { + this.allowedLoginMethod = allowedLoginMethod; + } + + /** + * Get defaultLoginMethod + * @return defaultLoginMethod + **/ + @javax.annotation.Nullable + public String getDefaultLoginMethod() { + return defaultLoginMethod; + } + + + public void setDefaultLoginMethod(String defaultLoginMethod) { + this.defaultLoginMethod = defaultLoginMethod; + } + + /** + * Get allowedSocialLoginProvider + * @return allowedSocialLoginProvider + **/ + @javax.annotation.Nullable + public CreateRequest1ConfigPropAllowedSocialLoginProvider getAllowedSocialLoginProvider() { + return allowedSocialLoginProvider; + } + + + public void setAllowedSocialLoginProvider(CreateRequest1ConfigPropAllowedSocialLoginProvider allowedSocialLoginProvider) { + this.allowedSocialLoginProvider = allowedSocialLoginProvider; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRequest1ConfigProp createRequest1ConfigProp = (CreateRequest1ConfigProp) o; + return Objects.equals(this.status, createRequest1ConfigProp.status) && + Objects.equals(this.tenantId, createRequest1ConfigProp.tenantId) && + Objects.equals(this.mfaConfig, createRequest1ConfigProp.mfaConfig) && + Objects.equals(this.regPolicy, createRequest1ConfigProp.regPolicy) && + Objects.equals(this.mfaEnabled, createRequest1ConfigProp.mfaEnabled) && + Objects.equals(this.ssoEnabled, createRequest1ConfigProp.ssoEnabled) && + Objects.equals(this.developerId, createRequest1ConfigProp.developerId) && + Objects.equals(this.accessPolicy, createRequest1ConfigProp.accessPolicy) && + Objects.equals(this.allowedRegMethod, createRequest1ConfigProp.allowedRegMethod) && + Objects.equals(this.defaultRegMethod, createRequest1ConfigProp.defaultRegMethod) && + Objects.equals(this.allowedLoginMethod, createRequest1ConfigProp.allowedLoginMethod) && + Objects.equals(this.defaultLoginMethod, createRequest1ConfigProp.defaultLoginMethod) && + Objects.equals(this.allowedSocialLoginProvider, createRequest1ConfigProp.allowedSocialLoginProvider); + } + + @Override + public int hashCode() { + return Objects.hash(status, tenantId, mfaConfig, regPolicy, mfaEnabled, ssoEnabled, developerId, accessPolicy, allowedRegMethod, defaultRegMethod, allowedLoginMethod, defaultLoginMethod, allowedSocialLoginProvider); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRequest1ConfigProp {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" mfaConfig: ").append(toIndentedString(mfaConfig)).append("\n"); + sb.append(" regPolicy: ").append(toIndentedString(regPolicy)).append("\n"); + sb.append(" mfaEnabled: ").append(toIndentedString(mfaEnabled)).append("\n"); + sb.append(" ssoEnabled: ").append(toIndentedString(ssoEnabled)).append("\n"); + sb.append(" developerId: ").append(toIndentedString(developerId)).append("\n"); + sb.append(" accessPolicy: ").append(toIndentedString(accessPolicy)).append("\n"); + sb.append(" allowedRegMethod: ").append(toIndentedString(allowedRegMethod)).append("\n"); + sb.append(" defaultRegMethod: ").append(toIndentedString(defaultRegMethod)).append("\n"); + sb.append(" allowedLoginMethod: ").append(toIndentedString(allowedLoginMethod)).append("\n"); + sb.append(" defaultLoginMethod: ").append(toIndentedString(defaultLoginMethod)).append("\n"); + sb.append(" allowedSocialLoginProvider: ").append(toIndentedString(allowedSocialLoginProvider)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("status"); + openapiFields.add("tenant_id"); + openapiFields.add("mfa_config"); + openapiFields.add("reg_policy"); + openapiFields.add("mfa_enabled"); + openapiFields.add("sso_enabled"); + openapiFields.add("developer_id"); + openapiFields.add("access_policy"); + openapiFields.add("allowed_reg_method"); + openapiFields.add("default_reg_method"); + openapiFields.add("allowed_login_method"); + openapiFields.add("default_login_method"); + openapiFields.add("allowed_social_login_provider"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateRequest1ConfigProp + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateRequest1ConfigProp.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRequest1ConfigProp is not found in the empty JSON string", CreateRequest1ConfigProp.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("tenant_id") != null && !jsonObj.get("tenant_id").isJsonNull()) && !jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("reg_policy") != null && !jsonObj.get("reg_policy").isJsonNull() && !jsonObj.get("reg_policy").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `reg_policy` to be an array in the JSON string but got `%s`", jsonObj.get("reg_policy").toString())); + } + if ((jsonObj.get("mfa_enabled") != null && !jsonObj.get("mfa_enabled").isJsonNull()) && !jsonObj.get("mfa_enabled").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mfa_enabled` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mfa_enabled").toString())); + } + if ((jsonObj.get("sso_enabled") != null && !jsonObj.get("sso_enabled").isJsonNull()) && !jsonObj.get("sso_enabled").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sso_enabled` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sso_enabled").toString())); + } + if ((jsonObj.get("developer_id") != null && !jsonObj.get("developer_id").isJsonNull()) && !jsonObj.get("developer_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `developer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("developer_id").toString())); + } + // validate the optional field `access_policy` + if (jsonObj.get("access_policy") != null && !jsonObj.get("access_policy").isJsonNull()) { + CreateRequest1ConfigPropAccessPolicy.validateJsonElement(jsonObj.get("access_policy")); + } + if ((jsonObj.get("default_reg_method") != null && !jsonObj.get("default_reg_method").isJsonNull()) && !jsonObj.get("default_reg_method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `default_reg_method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_reg_method").toString())); + } + // validate the optional field `allowed_login_method` + if (jsonObj.get("allowed_login_method") != null && !jsonObj.get("allowed_login_method").isJsonNull()) { + CreateRequest1ConfigPropAllowedLoginMethod.validateJsonElement(jsonObj.get("allowed_login_method")); + } + if ((jsonObj.get("default_login_method") != null && !jsonObj.get("default_login_method").isJsonNull()) && !jsonObj.get("default_login_method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `default_login_method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_login_method").toString())); + } + // validate the optional field `allowed_social_login_provider` + if (jsonObj.get("allowed_social_login_provider") != null && !jsonObj.get("allowed_social_login_provider").isJsonNull()) { + CreateRequest1ConfigPropAllowedSocialLoginProvider.validateJsonElement(jsonObj.get("allowed_social_login_provider")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateRequest1ConfigProp.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateRequest1ConfigProp' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateRequest1ConfigProp.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateRequest1ConfigProp value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateRequest1ConfigProp read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateRequest1ConfigProp given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateRequest1ConfigProp + * @throws IOException if the JSON string is invalid with respect to CreateRequest1ConfigProp + */ + public static CreateRequest1ConfigProp fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateRequest1ConfigProp.class); + } + + /** + * Convert an instance of CreateRequest1ConfigProp to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/CreateRequest1ConfigPropAccessPolicy.java b/src/main/java/com/idmesh/model/CreateRequest1ConfigPropAccessPolicy.java new file mode 100644 index 0000000..bb006bc --- /dev/null +++ b/src/main/java/com/idmesh/model/CreateRequest1ConfigPropAccessPolicy.java @@ -0,0 +1,197 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * CreateRequest1ConfigPropAccessPolicy + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRequest1ConfigPropAccessPolicy { + public static final String SERIALIZED_NAME_FORGET_PASSWORD = "forget_password"; + @SerializedName(SERIALIZED_NAME_FORGET_PASSWORD) + private List forgetPassword; + + public CreateRequest1ConfigPropAccessPolicy() { + } + /** + * Get forgetPassword + * @return forgetPassword + **/ + @javax.annotation.Nullable + public List getForgetPassword() { + return forgetPassword; + } + + + public void setForgetPassword(List forgetPassword) { + this.forgetPassword = forgetPassword; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRequest1ConfigPropAccessPolicy createRequest1ConfigPropAccessPolicy = (CreateRequest1ConfigPropAccessPolicy) o; + return Objects.equals(this.forgetPassword, createRequest1ConfigPropAccessPolicy.forgetPassword); + } + + @Override + public int hashCode() { + return Objects.hash(forgetPassword); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRequest1ConfigPropAccessPolicy {\n"); + sb.append(" forgetPassword: ").append(toIndentedString(forgetPassword)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("forget_password"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateRequest1ConfigPropAccessPolicy + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateRequest1ConfigPropAccessPolicy.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRequest1ConfigPropAccessPolicy is not found in the empty JSON string", CreateRequest1ConfigPropAccessPolicy.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("forget_password") != null && !jsonObj.get("forget_password").isJsonNull() && !jsonObj.get("forget_password").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `forget_password` to be an array in the JSON string but got `%s`", jsonObj.get("forget_password").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateRequest1ConfigPropAccessPolicy.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateRequest1ConfigPropAccessPolicy' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateRequest1ConfigPropAccessPolicy.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateRequest1ConfigPropAccessPolicy value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateRequest1ConfigPropAccessPolicy read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateRequest1ConfigPropAccessPolicy given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateRequest1ConfigPropAccessPolicy + * @throws IOException if the JSON string is invalid with respect to CreateRequest1ConfigPropAccessPolicy + */ + public static CreateRequest1ConfigPropAccessPolicy fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateRequest1ConfigPropAccessPolicy.class); + } + + /** + * Convert an instance of CreateRequest1ConfigPropAccessPolicy to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/CreateRequest1ConfigPropAllowedLoginMethod.java b/src/main/java/com/idmesh/model/CreateRequest1ConfigPropAllowedLoginMethod.java new file mode 100644 index 0000000..87f4c87 --- /dev/null +++ b/src/main/java/com/idmesh/model/CreateRequest1ConfigPropAllowedLoginMethod.java @@ -0,0 +1,194 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * CreateRequest1ConfigPropAllowedLoginMethod + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRequest1ConfigPropAllowedLoginMethod { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public CreateRequest1ConfigPropAllowedLoginMethod() { + } + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRequest1ConfigPropAllowedLoginMethod createRequest1ConfigPropAllowedLoginMethod = (CreateRequest1ConfigPropAllowedLoginMethod) o; + return Objects.equals(this.name, createRequest1ConfigPropAllowedLoginMethod.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRequest1ConfigPropAllowedLoginMethod {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateRequest1ConfigPropAllowedLoginMethod + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateRequest1ConfigPropAllowedLoginMethod.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRequest1ConfigPropAllowedLoginMethod is not found in the empty JSON string", CreateRequest1ConfigPropAllowedLoginMethod.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateRequest1ConfigPropAllowedLoginMethod.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateRequest1ConfigPropAllowedLoginMethod' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateRequest1ConfigPropAllowedLoginMethod.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateRequest1ConfigPropAllowedLoginMethod value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateRequest1ConfigPropAllowedLoginMethod read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateRequest1ConfigPropAllowedLoginMethod given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateRequest1ConfigPropAllowedLoginMethod + * @throws IOException if the JSON string is invalid with respect to CreateRequest1ConfigPropAllowedLoginMethod + */ + public static CreateRequest1ConfigPropAllowedLoginMethod fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateRequest1ConfigPropAllowedLoginMethod.class); + } + + /** + * Convert an instance of CreateRequest1ConfigPropAllowedLoginMethod to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/CreateRequest1ConfigPropAllowedSocialLoginProvider.java b/src/main/java/com/idmesh/model/CreateRequest1ConfigPropAllowedSocialLoginProvider.java new file mode 100644 index 0000000..bc5eca1 --- /dev/null +++ b/src/main/java/com/idmesh/model/CreateRequest1ConfigPropAllowedSocialLoginProvider.java @@ -0,0 +1,213 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * CreateRequest1ConfigPropAllowedSocialLoginProvider + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRequest1ConfigPropAllowedSocialLoginProvider { + public static final String SERIALIZED_NAME_WECHAT_SCAN_QR = "wechat_scan_qr"; + @SerializedName(SERIALIZED_NAME_WECHAT_SCAN_QR) + private BigDecimal wechatScanQr; + + public static final String SERIALIZED_NAME_DINGDING_SCAN_QR = "dingding_scan_qr"; + @SerializedName(SERIALIZED_NAME_DINGDING_SCAN_QR) + private BigDecimal dingdingScanQr; + + public CreateRequest1ConfigPropAllowedSocialLoginProvider() { + } + /** + * Get wechatScanQr + * @return wechatScanQr + **/ + @javax.annotation.Nullable + public BigDecimal getWechatScanQr() { + return wechatScanQr; + } + + + public void setWechatScanQr(BigDecimal wechatScanQr) { + this.wechatScanQr = wechatScanQr; + } + + /** + * Get dingdingScanQr + * @return dingdingScanQr + **/ + @javax.annotation.Nullable + public BigDecimal getDingdingScanQr() { + return dingdingScanQr; + } + + + public void setDingdingScanQr(BigDecimal dingdingScanQr) { + this.dingdingScanQr = dingdingScanQr; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRequest1ConfigPropAllowedSocialLoginProvider createRequest1ConfigPropAllowedSocialLoginProvider = (CreateRequest1ConfigPropAllowedSocialLoginProvider) o; + return Objects.equals(this.wechatScanQr, createRequest1ConfigPropAllowedSocialLoginProvider.wechatScanQr) && + Objects.equals(this.dingdingScanQr, createRequest1ConfigPropAllowedSocialLoginProvider.dingdingScanQr); + } + + @Override + public int hashCode() { + return Objects.hash(wechatScanQr, dingdingScanQr); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRequest1ConfigPropAllowedSocialLoginProvider {\n"); + sb.append(" wechatScanQr: ").append(toIndentedString(wechatScanQr)).append("\n"); + sb.append(" dingdingScanQr: ").append(toIndentedString(dingdingScanQr)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("wechat_scan_qr"); + openapiFields.add("dingding_scan_qr"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateRequest1ConfigPropAllowedSocialLoginProvider + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateRequest1ConfigPropAllowedSocialLoginProvider.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRequest1ConfigPropAllowedSocialLoginProvider is not found in the empty JSON string", CreateRequest1ConfigPropAllowedSocialLoginProvider.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateRequest1ConfigPropAllowedSocialLoginProvider.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateRequest1ConfigPropAllowedSocialLoginProvider' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateRequest1ConfigPropAllowedSocialLoginProvider.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateRequest1ConfigPropAllowedSocialLoginProvider value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateRequest1ConfigPropAllowedSocialLoginProvider read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateRequest1ConfigPropAllowedSocialLoginProvider given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateRequest1ConfigPropAllowedSocialLoginProvider + * @throws IOException if the JSON string is invalid with respect to CreateRequest1ConfigPropAllowedSocialLoginProvider + */ + public static CreateRequest1ConfigPropAllowedSocialLoginProvider fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateRequest1ConfigPropAllowedSocialLoginProvider.class); + } + + /** + * Convert an instance of CreateRequest1ConfigPropAllowedSocialLoginProvider to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/CreateRequest1ProtocolProp.java b/src/main/java/com/idmesh/model/CreateRequest1ProtocolProp.java new file mode 100644 index 0000000..5ab6da2 --- /dev/null +++ b/src/main/java/com/idmesh/model/CreateRequest1ProtocolProp.java @@ -0,0 +1,446 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.CreateRequest1ProtocolPropResponseAttrInner; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * 默认 oidc 相关配置 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRequest1ProtocolProp { + public static final String SERIALIZED_NAME_ACS_URL = "acs_url"; + @SerializedName(SERIALIZED_NAME_ACS_URL) + private String acsUrl; + + public static final String SERIALIZED_NAME_SP_ENTITY = "sp_entity"; + @SerializedName(SERIALIZED_NAME_SP_ENTITY) + private String spEntity; + + public static final String SERIALIZED_NAME_RESPONSE_ATTR = "response_attr"; + @SerializedName(SERIALIZED_NAME_RESPONSE_ATTR) + private List responseAttr; + + public static final String SERIALIZED_NAME_DIGEST_ALGORITHM = "digest_algorithm"; + @SerializedName(SERIALIZED_NAME_DIGEST_ALGORITHM) + private String digestAlgorithm; + + public static final String SERIALIZED_NAME_LIFETIME_IN_SECONDS = "lifetime_in_seconds"; + @SerializedName(SERIALIZED_NAME_LIFETIME_IN_SECONDS) + private BigDecimal lifetimeInSeconds; + + public static final String SERIALIZED_NAME_SIGNATURE_ALGORITHM = "signature_algorithm"; + @SerializedName(SERIALIZED_NAME_SIGNATURE_ALGORITHM) + private String signatureAlgorithm; + + public static final String SERIALIZED_NAME_NAME_IDENTIFIER_FORMAT = "name_identifier_format"; + @SerializedName(SERIALIZED_NAME_NAME_IDENTIFIER_FORMAT) + private String nameIdentifierFormat; + + public static final String SERIALIZED_NAME_AUTHN_CONTEXT_CLASS_REF = "authn_context_class_ref"; + @SerializedName(SERIALIZED_NAME_AUTHN_CONTEXT_CLASS_REF) + private String authnContextClassRef; + + public static final String SERIALIZED_NAME_SAML_RESPONSE_SIGNING_KEY = "saml_response_signing_key"; + @SerializedName(SERIALIZED_NAME_SAML_RESPONSE_SIGNING_KEY) + private String samlResponseSigningKey; + + public static final String SERIALIZED_NAME_SAML_RESPONSE_SIGNING_CERT = "saml_response_signing_cert"; + @SerializedName(SERIALIZED_NAME_SAML_RESPONSE_SIGNING_CERT) + private String samlResponseSigningCert; + + public static final String SERIALIZED_NAME_SAML_RESPONSE_SIGNING_CERT_FINGERPRINT = "saml_response_signing_cert_fingerprint"; + @SerializedName(SERIALIZED_NAME_SAML_RESPONSE_SIGNING_CERT_FINGERPRINT) + private String samlResponseSigningCertFingerprint; + + public CreateRequest1ProtocolProp() { + } + /** + * Get acsUrl + * @return acsUrl + **/ + @javax.annotation.Nullable + public String getAcsUrl() { + return acsUrl; + } + + + public void setAcsUrl(String acsUrl) { + this.acsUrl = acsUrl; + } + + /** + * Get spEntity + * @return spEntity + **/ + @javax.annotation.Nullable + public String getSpEntity() { + return spEntity; + } + + + public void setSpEntity(String spEntity) { + this.spEntity = spEntity; + } + + /** + * Get responseAttr + * @return responseAttr + **/ + @javax.annotation.Nullable + public List getResponseAttr() { + return responseAttr; + } + + + public void setResponseAttr(List responseAttr) { + this.responseAttr = responseAttr; + } + + /** + * Get digestAlgorithm + * @return digestAlgorithm + **/ + @javax.annotation.Nullable + public String getDigestAlgorithm() { + return digestAlgorithm; + } + + + public void setDigestAlgorithm(String digestAlgorithm) { + this.digestAlgorithm = digestAlgorithm; + } + + /** + * Get lifetimeInSeconds + * @return lifetimeInSeconds + **/ + @javax.annotation.Nullable + public BigDecimal getLifetimeInSeconds() { + return lifetimeInSeconds; + } + + + public void setLifetimeInSeconds(BigDecimal lifetimeInSeconds) { + this.lifetimeInSeconds = lifetimeInSeconds; + } + + /** + * Get signatureAlgorithm + * @return signatureAlgorithm + **/ + @javax.annotation.Nullable + public String getSignatureAlgorithm() { + return signatureAlgorithm; + } + + + public void setSignatureAlgorithm(String signatureAlgorithm) { + this.signatureAlgorithm = signatureAlgorithm; + } + + /** + * Get nameIdentifierFormat + * @return nameIdentifierFormat + **/ + @javax.annotation.Nullable + public String getNameIdentifierFormat() { + return nameIdentifierFormat; + } + + + public void setNameIdentifierFormat(String nameIdentifierFormat) { + this.nameIdentifierFormat = nameIdentifierFormat; + } + + /** + * Get authnContextClassRef + * @return authnContextClassRef + **/ + @javax.annotation.Nullable + public String getAuthnContextClassRef() { + return authnContextClassRef; + } + + + public void setAuthnContextClassRef(String authnContextClassRef) { + this.authnContextClassRef = authnContextClassRef; + } + + /** + * Get samlResponseSigningKey + * @return samlResponseSigningKey + **/ + @javax.annotation.Nullable + public String getSamlResponseSigningKey() { + return samlResponseSigningKey; + } + + + public void setSamlResponseSigningKey(String samlResponseSigningKey) { + this.samlResponseSigningKey = samlResponseSigningKey; + } + + /** + * Get samlResponseSigningCert + * @return samlResponseSigningCert + **/ + @javax.annotation.Nullable + public String getSamlResponseSigningCert() { + return samlResponseSigningCert; + } + + + public void setSamlResponseSigningCert(String samlResponseSigningCert) { + this.samlResponseSigningCert = samlResponseSigningCert; + } + + /** + * Get samlResponseSigningCertFingerprint + * @return samlResponseSigningCertFingerprint + **/ + @javax.annotation.Nullable + public String getSamlResponseSigningCertFingerprint() { + return samlResponseSigningCertFingerprint; + } + + + public void setSamlResponseSigningCertFingerprint(String samlResponseSigningCertFingerprint) { + this.samlResponseSigningCertFingerprint = samlResponseSigningCertFingerprint; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRequest1ProtocolProp createRequest1ProtocolProp = (CreateRequest1ProtocolProp) o; + return Objects.equals(this.acsUrl, createRequest1ProtocolProp.acsUrl) && + Objects.equals(this.spEntity, createRequest1ProtocolProp.spEntity) && + Objects.equals(this.responseAttr, createRequest1ProtocolProp.responseAttr) && + Objects.equals(this.digestAlgorithm, createRequest1ProtocolProp.digestAlgorithm) && + Objects.equals(this.lifetimeInSeconds, createRequest1ProtocolProp.lifetimeInSeconds) && + Objects.equals(this.signatureAlgorithm, createRequest1ProtocolProp.signatureAlgorithm) && + Objects.equals(this.nameIdentifierFormat, createRequest1ProtocolProp.nameIdentifierFormat) && + Objects.equals(this.authnContextClassRef, createRequest1ProtocolProp.authnContextClassRef) && + Objects.equals(this.samlResponseSigningKey, createRequest1ProtocolProp.samlResponseSigningKey) && + Objects.equals(this.samlResponseSigningCert, createRequest1ProtocolProp.samlResponseSigningCert) && + Objects.equals(this.samlResponseSigningCertFingerprint, createRequest1ProtocolProp.samlResponseSigningCertFingerprint); + } + + @Override + public int hashCode() { + return Objects.hash(acsUrl, spEntity, responseAttr, digestAlgorithm, lifetimeInSeconds, signatureAlgorithm, nameIdentifierFormat, authnContextClassRef, samlResponseSigningKey, samlResponseSigningCert, samlResponseSigningCertFingerprint); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRequest1ProtocolProp {\n"); + sb.append(" acsUrl: ").append(toIndentedString(acsUrl)).append("\n"); + sb.append(" spEntity: ").append(toIndentedString(spEntity)).append("\n"); + sb.append(" responseAttr: ").append(toIndentedString(responseAttr)).append("\n"); + sb.append(" digestAlgorithm: ").append(toIndentedString(digestAlgorithm)).append("\n"); + sb.append(" lifetimeInSeconds: ").append(toIndentedString(lifetimeInSeconds)).append("\n"); + sb.append(" signatureAlgorithm: ").append(toIndentedString(signatureAlgorithm)).append("\n"); + sb.append(" nameIdentifierFormat: ").append(toIndentedString(nameIdentifierFormat)).append("\n"); + sb.append(" authnContextClassRef: ").append(toIndentedString(authnContextClassRef)).append("\n"); + sb.append(" samlResponseSigningKey: ").append(toIndentedString(samlResponseSigningKey)).append("\n"); + sb.append(" samlResponseSigningCert: ").append(toIndentedString(samlResponseSigningCert)).append("\n"); + sb.append(" samlResponseSigningCertFingerprint: ").append(toIndentedString(samlResponseSigningCertFingerprint)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("acs_url"); + openapiFields.add("sp_entity"); + openapiFields.add("response_attr"); + openapiFields.add("digest_algorithm"); + openapiFields.add("lifetime_in_seconds"); + openapiFields.add("signature_algorithm"); + openapiFields.add("name_identifier_format"); + openapiFields.add("authn_context_class_ref"); + openapiFields.add("saml_response_signing_key"); + openapiFields.add("saml_response_signing_cert"); + openapiFields.add("saml_response_signing_cert_fingerprint"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateRequest1ProtocolProp + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateRequest1ProtocolProp.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRequest1ProtocolProp is not found in the empty JSON string", CreateRequest1ProtocolProp.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("acs_url") != null && !jsonObj.get("acs_url").isJsonNull()) && !jsonObj.get("acs_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `acs_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acs_url").toString())); + } + if ((jsonObj.get("sp_entity") != null && !jsonObj.get("sp_entity").isJsonNull()) && !jsonObj.get("sp_entity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sp_entity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sp_entity").toString())); + } + if (jsonObj.get("response_attr") != null && !jsonObj.get("response_attr").isJsonNull()) { + JsonArray jsonArrayresponseAttr = jsonObj.getAsJsonArray("response_attr"); + if (jsonArrayresponseAttr != null) { + // ensure the json data is an array + if (!jsonObj.get("response_attr").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `response_attr` to be an array in the JSON string but got `%s`", jsonObj.get("response_attr").toString())); + } + + // validate the optional field `response_attr` (array) + for (int i = 0; i < jsonArrayresponseAttr.size(); i++) { + CreateRequest1ProtocolPropResponseAttrInner.validateJsonElement(jsonArrayresponseAttr.get(i)); + }; + } + } + if ((jsonObj.get("digest_algorithm") != null && !jsonObj.get("digest_algorithm").isJsonNull()) && !jsonObj.get("digest_algorithm").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `digest_algorithm` to be a primitive type in the JSON string but got `%s`", jsonObj.get("digest_algorithm").toString())); + } + if ((jsonObj.get("signature_algorithm") != null && !jsonObj.get("signature_algorithm").isJsonNull()) && !jsonObj.get("signature_algorithm").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signature_algorithm` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature_algorithm").toString())); + } + if ((jsonObj.get("name_identifier_format") != null && !jsonObj.get("name_identifier_format").isJsonNull()) && !jsonObj.get("name_identifier_format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name_identifier_format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name_identifier_format").toString())); + } + if ((jsonObj.get("authn_context_class_ref") != null && !jsonObj.get("authn_context_class_ref").isJsonNull()) && !jsonObj.get("authn_context_class_ref").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `authn_context_class_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authn_context_class_ref").toString())); + } + if ((jsonObj.get("saml_response_signing_key") != null && !jsonObj.get("saml_response_signing_key").isJsonNull()) && !jsonObj.get("saml_response_signing_key").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `saml_response_signing_key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("saml_response_signing_key").toString())); + } + if ((jsonObj.get("saml_response_signing_cert") != null && !jsonObj.get("saml_response_signing_cert").isJsonNull()) && !jsonObj.get("saml_response_signing_cert").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `saml_response_signing_cert` to be a primitive type in the JSON string but got `%s`", jsonObj.get("saml_response_signing_cert").toString())); + } + if ((jsonObj.get("saml_response_signing_cert_fingerprint") != null && !jsonObj.get("saml_response_signing_cert_fingerprint").isJsonNull()) && !jsonObj.get("saml_response_signing_cert_fingerprint").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `saml_response_signing_cert_fingerprint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("saml_response_signing_cert_fingerprint").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateRequest1ProtocolProp.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateRequest1ProtocolProp' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateRequest1ProtocolProp.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateRequest1ProtocolProp value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateRequest1ProtocolProp read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateRequest1ProtocolProp given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateRequest1ProtocolProp + * @throws IOException if the JSON string is invalid with respect to CreateRequest1ProtocolProp + */ + public static CreateRequest1ProtocolProp fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateRequest1ProtocolProp.class); + } + + /** + * Convert an instance of CreateRequest1ProtocolProp to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/CreateRequest1ProtocolPropResponseAttrInner.java b/src/main/java/com/idmesh/model/CreateRequest1ProtocolPropResponseAttrInner.java new file mode 100644 index 0000000..eb52dec --- /dev/null +++ b/src/main/java/com/idmesh/model/CreateRequest1ProtocolPropResponseAttrInner.java @@ -0,0 +1,252 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * CreateRequest1ProtocolPropResponseAttrInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateRequest1ProtocolPropResponseAttrInner { + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private String value; + + public static final String SERIALIZED_NAME_ATTRIBUTE = "attribute"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE) + private String attribute; + + public static final String SERIALIZED_NAME_NAME_FORMAT = "nameFormat"; + @SerializedName(SERIALIZED_NAME_NAME_FORMAT) + private String nameFormat; + + public CreateRequest1ProtocolPropResponseAttrInner() { + } + /** + * Get value + * @return value + **/ + @javax.annotation.Nonnull + public String getValue() { + return value; + } + + + public void setValue(String value) { + this.value = value; + } + + /** + * Get attribute + * @return attribute + **/ + @javax.annotation.Nonnull + public String getAttribute() { + return attribute; + } + + + public void setAttribute(String attribute) { + this.attribute = attribute; + } + + /** + * Get nameFormat + * @return nameFormat + **/ + @javax.annotation.Nonnull + public String getNameFormat() { + return nameFormat; + } + + + public void setNameFormat(String nameFormat) { + this.nameFormat = nameFormat; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRequest1ProtocolPropResponseAttrInner createRequest1ProtocolPropResponseAttrInner = (CreateRequest1ProtocolPropResponseAttrInner) o; + return Objects.equals(this.value, createRequest1ProtocolPropResponseAttrInner.value) && + Objects.equals(this.attribute, createRequest1ProtocolPropResponseAttrInner.attribute) && + Objects.equals(this.nameFormat, createRequest1ProtocolPropResponseAttrInner.nameFormat); + } + + @Override + public int hashCode() { + return Objects.hash(value, attribute, nameFormat); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRequest1ProtocolPropResponseAttrInner {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" attribute: ").append(toIndentedString(attribute)).append("\n"); + sb.append(" nameFormat: ").append(toIndentedString(nameFormat)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("value"); + openapiFields.add("attribute"); + openapiFields.add("nameFormat"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("value"); + openapiRequiredFields.add("attribute"); + openapiRequiredFields.add("nameFormat"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateRequest1ProtocolPropResponseAttrInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateRequest1ProtocolPropResponseAttrInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateRequest1ProtocolPropResponseAttrInner is not found in the empty JSON string", CreateRequest1ProtocolPropResponseAttrInner.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateRequest1ProtocolPropResponseAttrInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + if (!jsonObj.get("attribute").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `attribute` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attribute").toString())); + } + if (!jsonObj.get("nameFormat").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nameFormat` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nameFormat").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateRequest1ProtocolPropResponseAttrInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateRequest1ProtocolPropResponseAttrInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateRequest1ProtocolPropResponseAttrInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateRequest1ProtocolPropResponseAttrInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateRequest1ProtocolPropResponseAttrInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateRequest1ProtocolPropResponseAttrInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateRequest1ProtocolPropResponseAttrInner + * @throws IOException if the JSON string is invalid with respect to CreateRequest1ProtocolPropResponseAttrInner + */ + public static CreateRequest1ProtocolPropResponseAttrInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateRequest1ProtocolPropResponseAttrInner.class); + } + + /** + * Convert an instance of CreateRequest1ProtocolPropResponseAttrInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/CreateSecrets200Response.java b/src/main/java/com/idmesh/model/CreateSecrets200Response.java new file mode 100644 index 0000000..3190ce4 --- /dev/null +++ b/src/main/java/com/idmesh/model/CreateSecrets200Response.java @@ -0,0 +1,220 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.CreateSecrets200ResponseData; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * CreateSecrets200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateSecrets200Response { + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private CreateSecrets200ResponseData data; + + public CreateSecrets200Response() { + } + /** + * 操作结果 + * @return message + **/ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + + public void setMessage(String message) { + this.message = message; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + public CreateSecrets200ResponseData getData() { + return data; + } + + + public void setData(CreateSecrets200ResponseData data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSecrets200Response createSecrets200Response = (CreateSecrets200Response) o; + return Objects.equals(this.message, createSecrets200Response.message) && + Objects.equals(this.data, createSecrets200Response.data); + } + + @Override + public int hashCode() { + return Objects.hash(message, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateSecrets200Response {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("message"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateSecrets200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateSecrets200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateSecrets200Response is not found in the empty JSON string", CreateSecrets200Response.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CreateSecrets200ResponseData.validateJsonElement(jsonObj.get("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateSecrets200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateSecrets200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateSecrets200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateSecrets200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateSecrets200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateSecrets200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateSecrets200Response + * @throws IOException if the JSON string is invalid with respect to CreateSecrets200Response + */ + public static CreateSecrets200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateSecrets200Response.class); + } + + /** + * Convert an instance of CreateSecrets200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/CreateSecrets200ResponseData.java b/src/main/java/com/idmesh/model/CreateSecrets200ResponseData.java new file mode 100644 index 0000000..229c8f7 --- /dev/null +++ b/src/main/java/com/idmesh/model/CreateSecrets200ResponseData.java @@ -0,0 +1,218 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * CreateSecrets200ResponseData + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateSecrets200ResponseData { + public static final String SERIALIZED_NAME_APP_SECRET = "appSecret"; + @SerializedName(SERIALIZED_NAME_APP_SECRET) + private String appSecret; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public CreateSecrets200ResponseData() { + } + /** + * 安全码 + * @return appSecret + **/ + @javax.annotation.Nullable + public String getAppSecret() { + return appSecret; + } + + + public void setAppSecret(String appSecret) { + this.appSecret = appSecret; + } + + /** + * 唯一标识 + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSecrets200ResponseData createSecrets200ResponseData = (CreateSecrets200ResponseData) o; + return Objects.equals(this.appSecret, createSecrets200ResponseData.appSecret) && + Objects.equals(this.id, createSecrets200ResponseData.id); + } + + @Override + public int hashCode() { + return Objects.hash(appSecret, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateSecrets200ResponseData {\n"); + sb.append(" appSecret: ").append(toIndentedString(appSecret)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("appSecret"); + openapiFields.add("id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateSecrets200ResponseData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateSecrets200ResponseData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateSecrets200ResponseData is not found in the empty JSON string", CreateSecrets200ResponseData.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("appSecret") != null && !jsonObj.get("appSecret").isJsonNull()) && !jsonObj.get("appSecret").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `appSecret` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appSecret").toString())); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateSecrets200ResponseData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateSecrets200ResponseData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateSecrets200ResponseData.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateSecrets200ResponseData value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateSecrets200ResponseData read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateSecrets200ResponseData given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateSecrets200ResponseData + * @throws IOException if the JSON string is invalid with respect to CreateSecrets200ResponseData + */ + public static CreateSecrets200ResponseData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateSecrets200ResponseData.class); + } + + /** + * Convert an instance of CreateSecrets200ResponseData to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/CreateStoreCredential200Response.java b/src/main/java/com/idmesh/model/CreateStoreCredential200Response.java new file mode 100644 index 0000000..402f733 --- /dev/null +++ b/src/main/java/com/idmesh/model/CreateStoreCredential200Response.java @@ -0,0 +1,270 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * CreateStoreCredential200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateStoreCredential200Response { + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private BigDecimal code; + + public static final String SERIALIZED_NAME_ERRNO = "errno"; + @SerializedName(SERIALIZED_NAME_ERRNO) + private BigDecimal errno; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private String data; + + public CreateStoreCredential200Response() { + } + /** + * http状态码,成功不显示 + * @return code + **/ + @javax.annotation.Nullable + public BigDecimal getCode() { + return code; + } + + + public void setCode(BigDecimal code) { + this.code = code; + } + + /** + * 返回错误码 + * @return errno + **/ + @javax.annotation.Nonnull + public BigDecimal getErrno() { + return errno; + } + + + public void setErrno(BigDecimal errno) { + this.errno = errno; + } + + /** + * 返回描述 + * @return message + **/ + @javax.annotation.Nonnull + public String getMessage() { + return message; + } + + + public void setMessage(String message) { + this.message = message; + } + + /** + * 返回id标识 + * @return data + **/ + @javax.annotation.Nullable + public String getData() { + return data; + } + + + public void setData(String data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateStoreCredential200Response createStoreCredential200Response = (CreateStoreCredential200Response) o; + return Objects.equals(this.code, createStoreCredential200Response.code) && + Objects.equals(this.errno, createStoreCredential200Response.errno) && + Objects.equals(this.message, createStoreCredential200Response.message) && + Objects.equals(this.data, createStoreCredential200Response.data); + } + + @Override + public int hashCode() { + return Objects.hash(code, errno, message, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateStoreCredential200Response {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" errno: ").append(toIndentedString(errno)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("code"); + openapiFields.add("errno"); + openapiFields.add("message"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("errno"); + openapiRequiredFields.add("message"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateStoreCredential200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateStoreCredential200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateStoreCredential200Response is not found in the empty JSON string", CreateStoreCredential200Response.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateStoreCredential200Response.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + if ((jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) && !jsonObj.get("data").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateStoreCredential200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateStoreCredential200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateStoreCredential200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateStoreCredential200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateStoreCredential200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateStoreCredential200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateStoreCredential200Response + * @throws IOException if the JSON string is invalid with respect to CreateStoreCredential200Response + */ + public static CreateStoreCredential200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateStoreCredential200Response.class); + } + + /** + * Convert an instance of CreateStoreCredential200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/CreateStoreCredentialRequest.java b/src/main/java/com/idmesh/model/CreateStoreCredentialRequest.java new file mode 100644 index 0000000..b5aae50 --- /dev/null +++ b/src/main/java/com/idmesh/model/CreateStoreCredentialRequest.java @@ -0,0 +1,490 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * CreateStoreCredentialRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateStoreCredentialRequest { + public static final String SERIALIZED_NAME_PROVIDER_CODE = "provider_code"; + @SerializedName(SERIALIZED_NAME_PROVIDER_CODE) + private String providerCode; + + public static final String SERIALIZED_NAME_IDP_CONFIG_ID = "idp_config_id"; + @SerializedName(SERIALIZED_NAME_IDP_CONFIG_ID) + private BigDecimal idpConfigId; + + public static final String SERIALIZED_NAME_ID1 = "id1"; + @SerializedName(SERIALIZED_NAME_ID1) + private String id1; + + public static final String SERIALIZED_NAME_ID2 = "id2"; + @SerializedName(SERIALIZED_NAME_ID2) + private String id2; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + private String metadata; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_NICKNAME = "nickname"; + @SerializedName(SERIALIZED_NAME_NICKNAME) + private String nickname; + + public static final String SERIALIZED_NAME_AVATAR = "avatar"; + @SerializedName(SERIALIZED_NAME_AVATAR) + private String avatar; + + public static final String SERIALIZED_NAME_REALNAME = "realname"; + @SerializedName(SERIALIZED_NAME_REALNAME) + private String realname; + + public static final String SERIALIZED_NAME_MOBILE = "mobile"; + @SerializedName(SERIALIZED_NAME_MOBILE) + private String mobile; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_GENDER = "gender"; + @SerializedName(SERIALIZED_NAME_GENDER) + private String gender; + + public static final String SERIALIZED_NAME_ID_PROVIDER_CONNECTION = "id_provider_connection"; + @SerializedName(SERIALIZED_NAME_ID_PROVIDER_CONNECTION) + private String idProviderConnection; + + public CreateStoreCredentialRequest() { + } + /** + * 社会化身份源code + * @return providerCode + **/ + @javax.annotation.Nonnull + public String getProviderCode() { + return providerCode; + } + + + public void setProviderCode(String providerCode) { + this.providerCode = providerCode; + } + + /** + * 社会化登录配置的ID + * @return idpConfigId + **/ + @javax.annotation.Nonnull + public BigDecimal getIdpConfigId() { + return idpConfigId; + } + + + public void setIdpConfigId(BigDecimal idpConfigId) { + this.idpConfigId = idpConfigId; + } + + /** + * 社会化身份标识1,如openid + * @return id1 + **/ + @javax.annotation.Nonnull + public String getId1() { + return id1; + } + + + public void setId1(String id1) { + this.id1 = id1; + } + + /** + * 社会化身份标识2,如unionid + * @return id2 + **/ + @javax.annotation.Nullable + public String getId2() { + return id2; + } + + + public void setId2(String id2) { + this.id2 = id2; + } + + /** + * 更多社会化身份标识 + * @return metadata + **/ + @javax.annotation.Nullable + public String getMetadata() { + return metadata; + } + + + public void setMetadata(String metadata) { + this.metadata = metadata; + } + + /** + * 状态 + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + /** + * 昵称 + * @return nickname + **/ + @javax.annotation.Nullable + public String getNickname() { + return nickname; + } + + + public void setNickname(String nickname) { + this.nickname = nickname; + } + + /** + * 头像 + * @return avatar + **/ + @javax.annotation.Nullable + public String getAvatar() { + return avatar; + } + + + public void setAvatar(String avatar) { + this.avatar = avatar; + } + + /** + * 真实姓名 + * @return realname + **/ + @javax.annotation.Nullable + public String getRealname() { + return realname; + } + + + public void setRealname(String realname) { + this.realname = realname; + } + + /** + * 手机 + * @return mobile + **/ + @javax.annotation.Nullable + public String getMobile() { + return mobile; + } + + + public void setMobile(String mobile) { + this.mobile = mobile; + } + + /** + * 邮箱 + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + + public void setEmail(String email) { + this.email = email; + } + + /** + * 性别 + * @return gender + **/ + @javax.annotation.Nullable + public String getGender() { + return gender; + } + + + public void setGender(String gender) { + this.gender = gender; + } + + /** + * Get idProviderConnection + * @return idProviderConnection + **/ + @javax.annotation.Nullable + public String getIdProviderConnection() { + return idProviderConnection; + } + + + public void setIdProviderConnection(String idProviderConnection) { + this.idProviderConnection = idProviderConnection; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateStoreCredentialRequest createStoreCredentialRequest = (CreateStoreCredentialRequest) o; + return Objects.equals(this.providerCode, createStoreCredentialRequest.providerCode) && + Objects.equals(this.idpConfigId, createStoreCredentialRequest.idpConfigId) && + Objects.equals(this.id1, createStoreCredentialRequest.id1) && + Objects.equals(this.id2, createStoreCredentialRequest.id2) && + Objects.equals(this.metadata, createStoreCredentialRequest.metadata) && + Objects.equals(this.status, createStoreCredentialRequest.status) && + Objects.equals(this.nickname, createStoreCredentialRequest.nickname) && + Objects.equals(this.avatar, createStoreCredentialRequest.avatar) && + Objects.equals(this.realname, createStoreCredentialRequest.realname) && + Objects.equals(this.mobile, createStoreCredentialRequest.mobile) && + Objects.equals(this.email, createStoreCredentialRequest.email) && + Objects.equals(this.gender, createStoreCredentialRequest.gender) && + Objects.equals(this.idProviderConnection, createStoreCredentialRequest.idProviderConnection); + } + + @Override + public int hashCode() { + return Objects.hash(providerCode, idpConfigId, id1, id2, metadata, status, nickname, avatar, realname, mobile, email, gender, idProviderConnection); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateStoreCredentialRequest {\n"); + sb.append(" providerCode: ").append(toIndentedString(providerCode)).append("\n"); + sb.append(" idpConfigId: ").append(toIndentedString(idpConfigId)).append("\n"); + sb.append(" id1: ").append(toIndentedString(id1)).append("\n"); + sb.append(" id2: ").append(toIndentedString(id2)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" nickname: ").append(toIndentedString(nickname)).append("\n"); + sb.append(" avatar: ").append(toIndentedString(avatar)).append("\n"); + sb.append(" realname: ").append(toIndentedString(realname)).append("\n"); + sb.append(" mobile: ").append(toIndentedString(mobile)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" idProviderConnection: ").append(toIndentedString(idProviderConnection)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("provider_code"); + openapiFields.add("idp_config_id"); + openapiFields.add("id1"); + openapiFields.add("id2"); + openapiFields.add("metadata"); + openapiFields.add("status"); + openapiFields.add("nickname"); + openapiFields.add("avatar"); + openapiFields.add("realname"); + openapiFields.add("mobile"); + openapiFields.add("email"); + openapiFields.add("gender"); + openapiFields.add("id_provider_connection"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("provider_code"); + openapiRequiredFields.add("idp_config_id"); + openapiRequiredFields.add("id1"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateStoreCredentialRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateStoreCredentialRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateStoreCredentialRequest is not found in the empty JSON string", CreateStoreCredentialRequest.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateStoreCredentialRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("provider_code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `provider_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("provider_code").toString())); + } + if (!jsonObj.get("id1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id1").toString())); + } + if ((jsonObj.get("id2") != null && !jsonObj.get("id2").isJsonNull()) && !jsonObj.get("id2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id2").toString())); + } + if ((jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) && !jsonObj.get("metadata").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `metadata` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metadata").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("nickname") != null && !jsonObj.get("nickname").isJsonNull()) && !jsonObj.get("nickname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nickname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nickname").toString())); + } + if ((jsonObj.get("avatar") != null && !jsonObj.get("avatar").isJsonNull()) && !jsonObj.get("avatar").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `avatar` to be a primitive type in the JSON string but got `%s`", jsonObj.get("avatar").toString())); + } + if ((jsonObj.get("realname") != null && !jsonObj.get("realname").isJsonNull()) && !jsonObj.get("realname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `realname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("realname").toString())); + } + if ((jsonObj.get("mobile") != null && !jsonObj.get("mobile").isJsonNull()) && !jsonObj.get("mobile").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mobile` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mobile").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("gender") != null && !jsonObj.get("gender").isJsonNull()) && !jsonObj.get("gender").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `gender` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gender").toString())); + } + if ((jsonObj.get("id_provider_connection") != null && !jsonObj.get("id_provider_connection").isJsonNull()) && !jsonObj.get("id_provider_connection").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id_provider_connection` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id_provider_connection").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateStoreCredentialRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateStoreCredentialRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateStoreCredentialRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateStoreCredentialRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateStoreCredentialRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateStoreCredentialRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateStoreCredentialRequest + * @throws IOException if the JSON string is invalid with respect to CreateStoreCredentialRequest + */ + public static CreateStoreCredentialRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateStoreCredentialRequest.class); + } + + /** + * Convert an instance of CreateStoreCredentialRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/CronJob.java b/src/main/java/com/idmesh/model/CronJob.java new file mode 100644 index 0000000..76c44b1 --- /dev/null +++ b/src/main/java/com/idmesh/model/CronJob.java @@ -0,0 +1,657 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.Injection; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * CronJob + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CronJob { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_DEVELOPER_ID = "developer_id"; + @SerializedName(SERIALIZED_NAME_DEVELOPER_ID) + private String developerId; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private String tenantId; + + public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; + @SerializedName(SERIALIZED_NAME_NAMESPACE) + private String namespace; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DESCR = "descr"; + @SerializedName(SERIALIZED_NAME_DESCR) + private String descr; + + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) + private List tags = new ArrayList<>(); + + public static final String SERIALIZED_NAME_CONFIG = "config"; + @SerializedName(SERIALIZED_NAME_CONFIG) + private Object config; + + public static final String SERIALIZED_NAME_KIND = "kind"; + @SerializedName(SERIALIZED_NAME_KIND) + private String kind; + + public static final String SERIALIZED_NAME_FROM = "from"; + @SerializedName(SERIALIZED_NAME_FROM) + private String from; + + /** + * Gets or Sets execFrequency + */ + @JsonAdapter(ExecFrequencyEnum.Adapter.class) + public enum ExecFrequencyEnum { + MONTHLY("monthly"), + + WEEKLY("weekly"), + + DAILY("daily"), + + HOURLY("hourly"), + + EVERY_12_HOUR("every_12_hour"), + + EVERY_6_HOUR("every_6_hour"), + + EVERY_3_HOUR("every_3_hour"), + + EVERY_2_HOUR("every_2_hour"), + + EVERY_30_MINUTE("every_30_minute"); + + private String value; + + ExecFrequencyEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ExecFrequencyEnum fromValue(String value) { + for (ExecFrequencyEnum b : ExecFrequencyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ExecFrequencyEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ExecFrequencyEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ExecFrequencyEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ExecFrequencyEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_EXEC_FREQUENCY = "exec_frequency"; + @SerializedName(SERIALIZED_NAME_EXEC_FREQUENCY) + private ExecFrequencyEnum execFrequency; + + public static final String SERIALIZED_NAME_EXEC_CMD = "exec_cmd"; + @SerializedName(SERIALIZED_NAME_EXEC_CMD) + private String execCmd; + + public static final String SERIALIZED_NAME_INJECTIONS = "injections"; + @SerializedName(SERIALIZED_NAME_INJECTIONS) + private List injections; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public CronJob() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * Get developerId + * @return developerId + **/ + @javax.annotation.Nonnull + public String getDeveloperId() { + return developerId; + } + + + public void setDeveloperId(String developerId) { + this.developerId = developerId; + } + + /** + * Get tenantId + * @return tenantId + **/ + @javax.annotation.Nonnull + public String getTenantId() { + return tenantId; + } + + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + /** + * 定时任务所属的命名空间,也可以当做分组 + * @return namespace + **/ + @javax.annotation.Nonnull + public String getNamespace() { + return namespace; + } + + + public void setNamespace(String namespace) { + this.namespace = namespace; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + /** + * Get descr + * @return descr + **/ + @javax.annotation.Nullable + public String getDescr() { + return descr; + } + + + public void setDescr(String descr) { + this.descr = descr; + } + + /** + * Get tags + * @return tags + **/ + @javax.annotation.Nonnull + public List getTags() { + return tags; + } + + + public void setTags(List tags) { + this.tags = tags; + } + + /** + * json raw + * @return config + **/ + @javax.annotation.Nonnull + public Object getConfig() { + return config; + } + + + public void setConfig(Object config) { + this.config = config; + } + + /** + * Get kind + * @return kind + **/ + @javax.annotation.Nonnull + public String getKind() { + return kind; + } + + + public void setKind(String kind) { + this.kind = kind; + } + + /** + * Get from + * @return from + **/ + @javax.annotation.Nonnull + public String getFrom() { + return from; + } + + + public void setFrom(String from) { + this.from = from; + } + + /** + * Get execFrequency + * @return execFrequency + **/ + @javax.annotation.Nullable + public ExecFrequencyEnum getExecFrequency() { + return execFrequency; + } + + + public void setExecFrequency(ExecFrequencyEnum execFrequency) { + this.execFrequency = execFrequency; + } + + /** + * Get execCmd + * @return execCmd + **/ + @javax.annotation.Nullable + public String getExecCmd() { + return execCmd; + } + + + public void setExecCmd(String execCmd) { + this.execCmd = execCmd; + } + + /** + * Get injections + * @return injections + **/ + @javax.annotation.Nullable + public List getInjections() { + return injections; + } + + + public void setInjections(List injections) { + this.injections = injections; + } + + /** + * - running 运行中 - suspended 挂起 + * @return status + **/ + @javax.annotation.Nonnull + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + /** + * rfc3339 + * @return timeCreated + **/ + @javax.annotation.Nonnull + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * rfc3339 + * @return timeModified + **/ + @javax.annotation.Nonnull + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CronJob cronJob = (CronJob) o; + return Objects.equals(this.id, cronJob.id) && + Objects.equals(this.developerId, cronJob.developerId) && + Objects.equals(this.tenantId, cronJob.tenantId) && + Objects.equals(this.namespace, cronJob.namespace) && + Objects.equals(this.name, cronJob.name) && + Objects.equals(this.descr, cronJob.descr) && + Objects.equals(this.tags, cronJob.tags) && + Objects.equals(this.config, cronJob.config) && + Objects.equals(this.kind, cronJob.kind) && + Objects.equals(this.from, cronJob.from) && + Objects.equals(this.execFrequency, cronJob.execFrequency) && + Objects.equals(this.execCmd, cronJob.execCmd) && + Objects.equals(this.injections, cronJob.injections) && + Objects.equals(this.status, cronJob.status) && + Objects.equals(this.timeCreated, cronJob.timeCreated) && + Objects.equals(this.timeModified, cronJob.timeModified); + } + + @Override + public int hashCode() { + return Objects.hash(id, developerId, tenantId, namespace, name, descr, tags, config, kind, from, execFrequency, execCmd, injections, status, timeCreated, timeModified); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CronJob {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" developerId: ").append(toIndentedString(developerId)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" descr: ").append(toIndentedString(descr)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" execFrequency: ").append(toIndentedString(execFrequency)).append("\n"); + sb.append(" execCmd: ").append(toIndentedString(execCmd)).append("\n"); + sb.append(" injections: ").append(toIndentedString(injections)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("developer_id"); + openapiFields.add("tenant_id"); + openapiFields.add("namespace"); + openapiFields.add("name"); + openapiFields.add("descr"); + openapiFields.add("tags"); + openapiFields.add("config"); + openapiFields.add("kind"); + openapiFields.add("from"); + openapiFields.add("exec_frequency"); + openapiFields.add("exec_cmd"); + openapiFields.add("injections"); + openapiFields.add("status"); + openapiFields.add("time_created"); + openapiFields.add("time_modified"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("developer_id"); + openapiRequiredFields.add("tenant_id"); + openapiRequiredFields.add("namespace"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("tags"); + openapiRequiredFields.add("config"); + openapiRequiredFields.add("kind"); + openapiRequiredFields.add("from"); + openapiRequiredFields.add("status"); + openapiRequiredFields.add("time_created"); + openapiRequiredFields.add("time_modified"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CronJob + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CronJob.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CronJob is not found in the empty JSON string", CronJob.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CronJob.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("developer_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `developer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("developer_id").toString())); + } + if (!jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + if (!jsonObj.get("namespace").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `namespace` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("descr") != null && !jsonObj.get("descr").isJsonNull()) && !jsonObj.get("descr").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `descr` to be a primitive type in the JSON string but got `%s`", jsonObj.get("descr").toString())); + } + // ensure the required json array is present + if (jsonObj.get("tags") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + if (!jsonObj.get("kind").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); + } + if (!jsonObj.get("from").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + } + if ((jsonObj.get("exec_frequency") != null && !jsonObj.get("exec_frequency").isJsonNull()) && !jsonObj.get("exec_frequency").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `exec_frequency` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exec_frequency").toString())); + } + // validate the optional field `exec_frequency` + if (jsonObj.get("exec_frequency") != null && !jsonObj.get("exec_frequency").isJsonNull()) { + ExecFrequencyEnum.validateJsonElement(jsonObj.get("exec_frequency")); + } + if ((jsonObj.get("exec_cmd") != null && !jsonObj.get("exec_cmd").isJsonNull()) && !jsonObj.get("exec_cmd").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `exec_cmd` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exec_cmd").toString())); + } + if (jsonObj.get("injections") != null && !jsonObj.get("injections").isJsonNull()) { + JsonArray jsonArrayinjections = jsonObj.getAsJsonArray("injections"); + if (jsonArrayinjections != null) { + // ensure the json data is an array + if (!jsonObj.get("injections").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `injections` to be an array in the JSON string but got `%s`", jsonObj.get("injections").toString())); + } + + // validate the optional field `injections` (array) + for (int i = 0; i < jsonArrayinjections.size(); i++) { + Injection.validateJsonElement(jsonArrayinjections.get(i)); + }; + } + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if (!jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if (!jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CronJob.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CronJob' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CronJob.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CronJob value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CronJob read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CronJob given an JSON string + * + * @param jsonString JSON string + * @return An instance of CronJob + * @throws IOException if the JSON string is invalid with respect to CronJob + */ + public static CronJob fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CronJob.class); + } + + /** + * Convert an instance of CronJob to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/Delete200Response.java b/src/main/java/com/idmesh/model/Delete200Response.java new file mode 100644 index 0000000..25f0609 --- /dev/null +++ b/src/main/java/com/idmesh/model/Delete200Response.java @@ -0,0 +1,268 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * Delete200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Delete200Response { + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private BigDecimal code; + + public static final String SERIALIZED_NAME_ERRNO = "errno"; + @SerializedName(SERIALIZED_NAME_ERRNO) + private BigDecimal errno; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private BigDecimal data; + + public Delete200Response() { + } + /** + * http状态码,成功不显示 + * @return code + **/ + @javax.annotation.Nullable + public BigDecimal getCode() { + return code; + } + + + public void setCode(BigDecimal code) { + this.code = code; + } + + /** + * 返回错误码 + * @return errno + **/ + @javax.annotation.Nonnull + public BigDecimal getErrno() { + return errno; + } + + + public void setErrno(BigDecimal errno) { + this.errno = errno; + } + + /** + * 返回描述 + * @return message + **/ + @javax.annotation.Nonnull + public String getMessage() { + return message; + } + + + public void setMessage(String message) { + this.message = message; + } + + /** + * 用户id + * @return data + **/ + @javax.annotation.Nonnull + public BigDecimal getData() { + return data; + } + + + public void setData(BigDecimal data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Delete200Response delete200Response = (Delete200Response) o; + return Objects.equals(this.code, delete200Response.code) && + Objects.equals(this.errno, delete200Response.errno) && + Objects.equals(this.message, delete200Response.message) && + Objects.equals(this.data, delete200Response.data); + } + + @Override + public int hashCode() { + return Objects.hash(code, errno, message, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Delete200Response {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" errno: ").append(toIndentedString(errno)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("code"); + openapiFields.add("errno"); + openapiFields.add("message"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("errno"); + openapiRequiredFields.add("message"); + openapiRequiredFields.add("data"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Delete200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Delete200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Delete200Response is not found in the empty JSON string", Delete200Response.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Delete200Response.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Delete200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Delete200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Delete200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Delete200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Delete200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Delete200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of Delete200Response + * @throws IOException if the JSON string is invalid with respect to Delete200Response + */ + public static Delete200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Delete200Response.class); + } + + /** + * Convert an instance of Delete200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/Delete200Response1.java b/src/main/java/com/idmesh/model/Delete200Response1.java new file mode 100644 index 0000000..db0486b --- /dev/null +++ b/src/main/java/com/idmesh/model/Delete200Response1.java @@ -0,0 +1,215 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * Delete200Response1 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Delete200Response1 { + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private Object data; + + public Delete200Response1() { + } + /** + * Get message + * @return message + **/ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + + public void setMessage(String message) { + this.message = message; + } + + /** + * 结果标识true/false + * @return data + **/ + @javax.annotation.Nullable + public Object getData() { + return data; + } + + + public void setData(Object data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Delete200Response1 delete200Response1 = (Delete200Response1) o; + return Objects.equals(this.message, delete200Response1.message) && + Objects.equals(this.data, delete200Response1.data); + } + + @Override + public int hashCode() { + return Objects.hash(message, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Delete200Response1 {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("message"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Delete200Response1 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Delete200Response1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Delete200Response1 is not found in the empty JSON string", Delete200Response1.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Delete200Response1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Delete200Response1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Delete200Response1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Delete200Response1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Delete200Response1 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Delete200Response1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of Delete200Response1 + * @throws IOException if the JSON string is invalid with respect to Delete200Response1 + */ + public static Delete200Response1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Delete200Response1.class); + } + + /** + * Convert an instance of Delete200Response1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/DeleteAuthUnitRulesRequest.java b/src/main/java/com/idmesh/model/DeleteAuthUnitRulesRequest.java new file mode 100644 index 0000000..655a0b5 --- /dev/null +++ b/src/main/java/com/idmesh/model/DeleteAuthUnitRulesRequest.java @@ -0,0 +1,207 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * DeleteAuthUnitRulesRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeleteAuthUnitRulesRequest { + public static final String SERIALIZED_NAME_IDS = "ids"; + @SerializedName(SERIALIZED_NAME_IDS) + private List ids = new ArrayList<>(); + + public DeleteAuthUnitRulesRequest() { + } + /** + * Get ids + * @return ids + **/ + @javax.annotation.Nonnull + public List getIds() { + return ids; + } + + + public void setIds(List ids) { + this.ids = ids; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteAuthUnitRulesRequest deleteAuthUnitRulesRequest = (DeleteAuthUnitRulesRequest) o; + return Objects.equals(this.ids, deleteAuthUnitRulesRequest.ids); + } + + @Override + public int hashCode() { + return Objects.hash(ids); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteAuthUnitRulesRequest {\n"); + sb.append(" ids: ").append(toIndentedString(ids)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ids"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("ids"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeleteAuthUnitRulesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteAuthUnitRulesRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DeleteAuthUnitRulesRequest is not found in the empty JSON string", DeleteAuthUnitRulesRequest.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeleteAuthUnitRulesRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("ids") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("ids").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `ids` to be an array in the JSON string but got `%s`", jsonObj.get("ids").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteAuthUnitRulesRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteAuthUnitRulesRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeleteAuthUnitRulesRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteAuthUnitRulesRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DeleteAuthUnitRulesRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DeleteAuthUnitRulesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteAuthUnitRulesRequest + * @throws IOException if the JSON string is invalid with respect to DeleteAuthUnitRulesRequest + */ + public static DeleteAuthUnitRulesRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteAuthUnitRulesRequest.class); + } + + /** + * Convert an instance of DeleteAuthUnitRulesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/DeleteMembersRequest.java b/src/main/java/com/idmesh/model/DeleteMembersRequest.java new file mode 100644 index 0000000..353b2c2 --- /dev/null +++ b/src/main/java/com/idmesh/model/DeleteMembersRequest.java @@ -0,0 +1,227 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * DeleteMembersRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeleteMembersRequest { + public static final String SERIALIZED_NAME_NODE_ID = "node_id"; + @SerializedName(SERIALIZED_NAME_NODE_ID) + private String nodeId; + + public static final String SERIALIZED_NAME_USER_ID = "user_id"; + @SerializedName(SERIALIZED_NAME_USER_ID) + private String userId; + + public DeleteMembersRequest() { + } + /** + * 节点ID + * @return nodeId + **/ + @javax.annotation.Nonnull + public String getNodeId() { + return nodeId; + } + + + public void setNodeId(String nodeId) { + this.nodeId = nodeId; + } + + /** + * 用户原始ID + * @return userId + **/ + @javax.annotation.Nonnull + public String getUserId() { + return userId; + } + + + public void setUserId(String userId) { + this.userId = userId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteMembersRequest deleteMembersRequest = (DeleteMembersRequest) o; + return Objects.equals(this.nodeId, deleteMembersRequest.nodeId) && + Objects.equals(this.userId, deleteMembersRequest.userId); + } + + @Override + public int hashCode() { + return Objects.hash(nodeId, userId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteMembersRequest {\n"); + sb.append(" nodeId: ").append(toIndentedString(nodeId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("node_id"); + openapiFields.add("user_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("node_id"); + openapiRequiredFields.add("user_id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeleteMembersRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteMembersRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DeleteMembersRequest is not found in the empty JSON string", DeleteMembersRequest.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeleteMembersRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("node_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `node_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("node_id").toString())); + } + if (!jsonObj.get("user_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteMembersRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteMembersRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeleteMembersRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteMembersRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DeleteMembersRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DeleteMembersRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteMembersRequest + * @throws IOException if the JSON string is invalid with respect to DeleteMembersRequest + */ + public static DeleteMembersRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteMembersRequest.class); + } + + /** + * Convert an instance of DeleteMembersRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/DeleteNode200Response.java b/src/main/java/com/idmesh/model/DeleteNode200Response.java new file mode 100644 index 0000000..1330679 --- /dev/null +++ b/src/main/java/com/idmesh/model/DeleteNode200Response.java @@ -0,0 +1,202 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * DeleteNode200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeleteNode200Response { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public DeleteNode200Response() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteNode200Response deleteNode200Response = (DeleteNode200Response) o; + return Objects.equals(this.id, deleteNode200Response.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteNode200Response {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeleteNode200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteNode200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DeleteNode200Response is not found in the empty JSON string", DeleteNode200Response.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeleteNode200Response.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteNode200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteNode200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeleteNode200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteNode200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DeleteNode200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DeleteNode200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteNode200Response + * @throws IOException if the JSON string is invalid with respect to DeleteNode200Response + */ + public static DeleteNode200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteNode200Response.class); + } + + /** + * Convert an instance of DeleteNode200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/DeleteOrganization200Response.java b/src/main/java/com/idmesh/model/DeleteOrganization200Response.java new file mode 100644 index 0000000..82b1907 --- /dev/null +++ b/src/main/java/com/idmesh/model/DeleteOrganization200Response.java @@ -0,0 +1,194 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * DeleteOrganization200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeleteOrganization200Response { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public DeleteOrganization200Response() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteOrganization200Response deleteOrganization200Response = (DeleteOrganization200Response) o; + return Objects.equals(this.id, deleteOrganization200Response.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteOrganization200Response {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeleteOrganization200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteOrganization200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DeleteOrganization200Response is not found in the empty JSON string", DeleteOrganization200Response.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteOrganization200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteOrganization200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeleteOrganization200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteOrganization200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DeleteOrganization200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DeleteOrganization200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteOrganization200Response + * @throws IOException if the JSON string is invalid with respect to DeleteOrganization200Response + */ + public static DeleteOrganization200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteOrganization200Response.class); + } + + /** + * Convert an instance of DeleteOrganization200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/DeleteResourcesRequest.java b/src/main/java/com/idmesh/model/DeleteResourcesRequest.java new file mode 100644 index 0000000..09decc6 --- /dev/null +++ b/src/main/java/com/idmesh/model/DeleteResourcesRequest.java @@ -0,0 +1,207 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * DeleteResourcesRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeleteResourcesRequest { + public static final String SERIALIZED_NAME_IDS = "ids"; + @SerializedName(SERIALIZED_NAME_IDS) + private List ids = new ArrayList<>(); + + public DeleteResourcesRequest() { + } + /** + * Get ids + * @return ids + **/ + @javax.annotation.Nonnull + public List getIds() { + return ids; + } + + + public void setIds(List ids) { + this.ids = ids; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteResourcesRequest deleteResourcesRequest = (DeleteResourcesRequest) o; + return Objects.equals(this.ids, deleteResourcesRequest.ids); + } + + @Override + public int hashCode() { + return Objects.hash(ids); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteResourcesRequest {\n"); + sb.append(" ids: ").append(toIndentedString(ids)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ids"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("ids"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeleteResourcesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteResourcesRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DeleteResourcesRequest is not found in the empty JSON string", DeleteResourcesRequest.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeleteResourcesRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("ids") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("ids").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `ids` to be an array in the JSON string but got `%s`", jsonObj.get("ids").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteResourcesRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteResourcesRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeleteResourcesRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteResourcesRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DeleteResourcesRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DeleteResourcesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteResourcesRequest + * @throws IOException if the JSON string is invalid with respect to DeleteResourcesRequest + */ + public static DeleteResourcesRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteResourcesRequest.class); + } + + /** + * Convert an instance of DeleteResourcesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/Disable200Response.java b/src/main/java/com/idmesh/model/Disable200Response.java new file mode 100644 index 0000000..775d20f --- /dev/null +++ b/src/main/java/com/idmesh/model/Disable200Response.java @@ -0,0 +1,216 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * Disable200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Disable200Response { + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private BigDecimal data; + + public Disable200Response() { + } + /** + * Get message + * @return message + **/ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + + public void setMessage(String message) { + this.message = message; + } + + /** + * 操作ID + * @return data + **/ + @javax.annotation.Nullable + public BigDecimal getData() { + return data; + } + + + public void setData(BigDecimal data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Disable200Response disable200Response = (Disable200Response) o; + return Objects.equals(this.message, disable200Response.message) && + Objects.equals(this.data, disable200Response.data); + } + + @Override + public int hashCode() { + return Objects.hash(message, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Disable200Response {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("message"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Disable200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Disable200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Disable200Response is not found in the empty JSON string", Disable200Response.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Disable200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Disable200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Disable200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Disable200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Disable200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Disable200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of Disable200Response + * @throws IOException if the JSON string is invalid with respect to Disable200Response + */ + public static Disable200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Disable200Response.class); + } + + /** + * Convert an instance of Disable200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/EmptyObject.java b/src/main/java/com/idmesh/model/EmptyObject.java new file mode 100644 index 0000000..11db9ff --- /dev/null +++ b/src/main/java/com/idmesh/model/EmptyObject.java @@ -0,0 +1,202 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * EmptyObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmptyObject { + public static final String SERIALIZED_NAME_CONFIG_ID = "config_id"; + @SerializedName(SERIALIZED_NAME_CONFIG_ID) + private String configId; + + public EmptyObject() { + } + /** + * 已配置的idp conn id + * @return configId + **/ + @javax.annotation.Nonnull + public String getConfigId() { + return configId; + } + + + public void setConfigId(String configId) { + this.configId = configId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyObject emptyObject = (EmptyObject) o; + return Objects.equals(this.configId, emptyObject.configId); + } + + @Override + public int hashCode() { + return Objects.hash(configId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmptyObject {\n"); + sb.append(" configId: ").append(toIndentedString(configId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("config_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("config_id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EmptyObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EmptyObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EmptyObject is not found in the empty JSON string", EmptyObject.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EmptyObject.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("config_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `config_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("config_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EmptyObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EmptyObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EmptyObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EmptyObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EmptyObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EmptyObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of EmptyObject + * @throws IOException if the JSON string is invalid with respect to EmptyObject + */ + public static EmptyObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EmptyObject.class); + } + + /** + * Convert an instance of EmptyObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/EmptyObject1.java b/src/main/java/com/idmesh/model/EmptyObject1.java new file mode 100644 index 0000000..ff37c75 --- /dev/null +++ b/src/main/java/com/idmesh/model/EmptyObject1.java @@ -0,0 +1,191 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * EmptyObject1 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmptyObject1 { + public static final String SERIALIZED_NAME_CONFIG_CONTENT = "config_content"; + @SerializedName(SERIALIZED_NAME_CONFIG_CONTENT) + private Object configContent; + + public EmptyObject1() { + } + /** + * 配置参数 + * @return configContent + **/ + @javax.annotation.Nullable + public Object getConfigContent() { + return configContent; + } + + + public void setConfigContent(Object configContent) { + this.configContent = configContent; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyObject1 emptyObject1 = (EmptyObject1) o; + return Objects.equals(this.configContent, emptyObject1.configContent); + } + + @Override + public int hashCode() { + return Objects.hash(configContent); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmptyObject1 {\n"); + sb.append(" configContent: ").append(toIndentedString(configContent)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("config_content"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EmptyObject1 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EmptyObject1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EmptyObject1 is not found in the empty JSON string", EmptyObject1.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EmptyObject1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EmptyObject1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EmptyObject1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EmptyObject1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EmptyObject1 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EmptyObject1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of EmptyObject1 + * @throws IOException if the JSON string is invalid with respect to EmptyObject1 + */ + public static EmptyObject1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EmptyObject1.class); + } + + /** + * Convert an instance of EmptyObject1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/EmptyObject10.java b/src/main/java/com/idmesh/model/EmptyObject10.java new file mode 100644 index 0000000..24d42c5 --- /dev/null +++ b/src/main/java/com/idmesh/model/EmptyObject10.java @@ -0,0 +1,274 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * EmptyObject10 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmptyObject10 { + public static final String SERIALIZED_NAME_RESOURCE_ID = "resource_id"; + @SerializedName(SERIALIZED_NAME_RESOURCE_ID) + private BigDecimal resourceId; + + public static final String SERIALIZED_NAME_RESOURCE_SCOPE = "resource_scope"; + @SerializedName(SERIALIZED_NAME_RESOURCE_SCOPE) + private String resourceScope; + + public static final String SERIALIZED_NAME_RESOURCE_ACTIONS = "resource_actions"; + @SerializedName(SERIALIZED_NAME_RESOURCE_ACTIONS) + private List resourceActions; + + public static final String SERIALIZED_NAME_MATCH_ALL_ACTIONS = "match_all_actions"; + @SerializedName(SERIALIZED_NAME_MATCH_ALL_ACTIONS) + private Boolean matchAllActions; + + public EmptyObject10() { + } + /** + * Get resourceId + * @return resourceId + **/ + @javax.annotation.Nonnull + public BigDecimal getResourceId() { + return resourceId; + } + + + public void setResourceId(BigDecimal resourceId) { + this.resourceId = resourceId; + } + + /** + * Get resourceScope + * @return resourceScope + **/ + @javax.annotation.Nonnull + public String getResourceScope() { + return resourceScope; + } + + + public void setResourceScope(String resourceScope) { + this.resourceScope = resourceScope; + } + + /** + * Get resourceActions + * @return resourceActions + **/ + @javax.annotation.Nullable + public List getResourceActions() { + return resourceActions; + } + + + public void setResourceActions(List resourceActions) { + this.resourceActions = resourceActions; + } + + /** + * Get matchAllActions + * @return matchAllActions + **/ + @javax.annotation.Nonnull + public Boolean getMatchAllActions() { + return matchAllActions; + } + + + public void setMatchAllActions(Boolean matchAllActions) { + this.matchAllActions = matchAllActions; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyObject10 emptyObject10 = (EmptyObject10) o; + return Objects.equals(this.resourceId, emptyObject10.resourceId) && + Objects.equals(this.resourceScope, emptyObject10.resourceScope) && + Objects.equals(this.resourceActions, emptyObject10.resourceActions) && + Objects.equals(this.matchAllActions, emptyObject10.matchAllActions); + } + + @Override + public int hashCode() { + return Objects.hash(resourceId, resourceScope, resourceActions, matchAllActions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmptyObject10 {\n"); + sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n"); + sb.append(" resourceScope: ").append(toIndentedString(resourceScope)).append("\n"); + sb.append(" resourceActions: ").append(toIndentedString(resourceActions)).append("\n"); + sb.append(" matchAllActions: ").append(toIndentedString(matchAllActions)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("resource_id"); + openapiFields.add("resource_scope"); + openapiFields.add("resource_actions"); + openapiFields.add("match_all_actions"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("resource_id"); + openapiRequiredFields.add("resource_scope"); + openapiRequiredFields.add("match_all_actions"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EmptyObject10 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EmptyObject10.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EmptyObject10 is not found in the empty JSON string", EmptyObject10.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EmptyObject10.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("resource_scope").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `resource_scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("resource_scope").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("resource_actions") != null && !jsonObj.get("resource_actions").isJsonNull() && !jsonObj.get("resource_actions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `resource_actions` to be an array in the JSON string but got `%s`", jsonObj.get("resource_actions").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EmptyObject10.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EmptyObject10' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EmptyObject10.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EmptyObject10 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EmptyObject10 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EmptyObject10 given an JSON string + * + * @param jsonString JSON string + * @return An instance of EmptyObject10 + * @throws IOException if the JSON string is invalid with respect to EmptyObject10 + */ + public static EmptyObject10 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EmptyObject10.class); + } + + /** + * Convert an instance of EmptyObject10 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/EmptyObject11.java b/src/main/java/com/idmesh/model/EmptyObject11.java new file mode 100644 index 0000000..f4487e1 --- /dev/null +++ b/src/main/java/com/idmesh/model/EmptyObject11.java @@ -0,0 +1,202 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * EmptyObject11 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmptyObject11 { + public static final String SERIALIZED_NAME_MEMBER_ID = "member_id"; + @SerializedName(SERIALIZED_NAME_MEMBER_ID) + private String memberId; + + public EmptyObject11() { + } + /** + * 成员id + * @return memberId + **/ + @javax.annotation.Nonnull + public String getMemberId() { + return memberId; + } + + + public void setMemberId(String memberId) { + this.memberId = memberId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyObject11 emptyObject11 = (EmptyObject11) o; + return Objects.equals(this.memberId, emptyObject11.memberId); + } + + @Override + public int hashCode() { + return Objects.hash(memberId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmptyObject11 {\n"); + sb.append(" memberId: ").append(toIndentedString(memberId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("member_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("member_id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EmptyObject11 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EmptyObject11.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EmptyObject11 is not found in the empty JSON string", EmptyObject11.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EmptyObject11.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("member_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `member_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("member_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EmptyObject11.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EmptyObject11' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EmptyObject11.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EmptyObject11 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EmptyObject11 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EmptyObject11 given an JSON string + * + * @param jsonString JSON string + * @return An instance of EmptyObject11 + * @throws IOException if the JSON string is invalid with respect to EmptyObject11 + */ + public static EmptyObject11 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EmptyObject11.class); + } + + /** + * Convert an instance of EmptyObject11 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/EmptyObject12.java b/src/main/java/com/idmesh/model/EmptyObject12.java new file mode 100644 index 0000000..04af23b --- /dev/null +++ b/src/main/java/com/idmesh/model/EmptyObject12.java @@ -0,0 +1,285 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.EmptyObject12ResourceActionsInner; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * EmptyObject12 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmptyObject12 { + public static final String SERIALIZED_NAME_RESOURCE_ID = "resource_id"; + @SerializedName(SERIALIZED_NAME_RESOURCE_ID) + private BigDecimal resourceId; + + public static final String SERIALIZED_NAME_RESOURCE_SCOPE = "resource_scope"; + @SerializedName(SERIALIZED_NAME_RESOURCE_SCOPE) + private String resourceScope; + + public static final String SERIALIZED_NAME_RESOURCE_ACTIONS = "ResourceActions"; + @SerializedName(SERIALIZED_NAME_RESOURCE_ACTIONS) + private List resourceActions; + + public static final String SERIALIZED_NAME_MATCH_ALL_ACTIONS = "match_all_actions"; + @SerializedName(SERIALIZED_NAME_MATCH_ALL_ACTIONS) + private Boolean matchAllActions; + + public EmptyObject12() { + } + /** + * Get resourceId + * @return resourceId + **/ + @javax.annotation.Nonnull + public BigDecimal getResourceId() { + return resourceId; + } + + + public void setResourceId(BigDecimal resourceId) { + this.resourceId = resourceId; + } + + /** + * Get resourceScope + * @return resourceScope + **/ + @javax.annotation.Nonnull + public String getResourceScope() { + return resourceScope; + } + + + public void setResourceScope(String resourceScope) { + this.resourceScope = resourceScope; + } + + /** + * Get resourceActions + * @return resourceActions + **/ + @javax.annotation.Nullable + public List getResourceActions() { + return resourceActions; + } + + + public void setResourceActions(List resourceActions) { + this.resourceActions = resourceActions; + } + + /** + * Get matchAllActions + * @return matchAllActions + **/ + @javax.annotation.Nonnull + public Boolean getMatchAllActions() { + return matchAllActions; + } + + + public void setMatchAllActions(Boolean matchAllActions) { + this.matchAllActions = matchAllActions; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyObject12 emptyObject12 = (EmptyObject12) o; + return Objects.equals(this.resourceId, emptyObject12.resourceId) && + Objects.equals(this.resourceScope, emptyObject12.resourceScope) && + Objects.equals(this.resourceActions, emptyObject12.resourceActions) && + Objects.equals(this.matchAllActions, emptyObject12.matchAllActions); + } + + @Override + public int hashCode() { + return Objects.hash(resourceId, resourceScope, resourceActions, matchAllActions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmptyObject12 {\n"); + sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n"); + sb.append(" resourceScope: ").append(toIndentedString(resourceScope)).append("\n"); + sb.append(" resourceActions: ").append(toIndentedString(resourceActions)).append("\n"); + sb.append(" matchAllActions: ").append(toIndentedString(matchAllActions)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("resource_id"); + openapiFields.add("resource_scope"); + openapiFields.add("ResourceActions"); + openapiFields.add("match_all_actions"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("resource_id"); + openapiRequiredFields.add("resource_scope"); + openapiRequiredFields.add("match_all_actions"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EmptyObject12 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EmptyObject12.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EmptyObject12 is not found in the empty JSON string", EmptyObject12.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EmptyObject12.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("resource_scope").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `resource_scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("resource_scope").toString())); + } + if (jsonObj.get("ResourceActions") != null && !jsonObj.get("ResourceActions").isJsonNull()) { + JsonArray jsonArrayresourceActions = jsonObj.getAsJsonArray("ResourceActions"); + if (jsonArrayresourceActions != null) { + // ensure the json data is an array + if (!jsonObj.get("ResourceActions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `ResourceActions` to be an array in the JSON string but got `%s`", jsonObj.get("ResourceActions").toString())); + } + + // validate the optional field `ResourceActions` (array) + for (int i = 0; i < jsonArrayresourceActions.size(); i++) { + EmptyObject12ResourceActionsInner.validateJsonElement(jsonArrayresourceActions.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EmptyObject12.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EmptyObject12' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EmptyObject12.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EmptyObject12 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EmptyObject12 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EmptyObject12 given an JSON string + * + * @param jsonString JSON string + * @return An instance of EmptyObject12 + * @throws IOException if the JSON string is invalid with respect to EmptyObject12 + */ + public static EmptyObject12 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EmptyObject12.class); + } + + /** + * Convert an instance of EmptyObject12 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/EmptyObject12ResourceActionsInner.java b/src/main/java/com/idmesh/model/EmptyObject12ResourceActionsInner.java new file mode 100644 index 0000000..75d090d --- /dev/null +++ b/src/main/java/com/idmesh/model/EmptyObject12ResourceActionsInner.java @@ -0,0 +1,225 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * EmptyObject12ResourceActionsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmptyObject12ResourceActionsInner { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private BigDecimal id; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public EmptyObject12ResourceActionsInner() { + } + /** + * 操作id + * @return id + **/ + @javax.annotation.Nonnull + public BigDecimal getId() { + return id; + } + + + public void setId(BigDecimal id) { + this.id = id; + } + + /** + * 操作代码 + * @return code + **/ + @javax.annotation.Nonnull + public String getCode() { + return code; + } + + + public void setCode(String code) { + this.code = code; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyObject12ResourceActionsInner emptyObject12ResourceActionsInner = (EmptyObject12ResourceActionsInner) o; + return Objects.equals(this.id, emptyObject12ResourceActionsInner.id) && + Objects.equals(this.code, emptyObject12ResourceActionsInner.code); + } + + @Override + public int hashCode() { + return Objects.hash(id, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmptyObject12ResourceActionsInner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("code"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("code"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EmptyObject12ResourceActionsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EmptyObject12ResourceActionsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EmptyObject12ResourceActionsInner is not found in the empty JSON string", EmptyObject12ResourceActionsInner.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EmptyObject12ResourceActionsInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EmptyObject12ResourceActionsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EmptyObject12ResourceActionsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EmptyObject12ResourceActionsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EmptyObject12ResourceActionsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EmptyObject12ResourceActionsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EmptyObject12ResourceActionsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of EmptyObject12ResourceActionsInner + * @throws IOException if the JSON string is invalid with respect to EmptyObject12ResourceActionsInner + */ + public static EmptyObject12ResourceActionsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EmptyObject12ResourceActionsInner.class); + } + + /** + * Convert an instance of EmptyObject12ResourceActionsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/EmptyObject13.java b/src/main/java/com/idmesh/model/EmptyObject13.java new file mode 100644 index 0000000..b18dc2a --- /dev/null +++ b/src/main/java/com/idmesh/model/EmptyObject13.java @@ -0,0 +1,202 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * EmptyObject13 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmptyObject13 { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public EmptyObject13() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyObject13 emptyObject13 = (EmptyObject13) o; + return Objects.equals(this.id, emptyObject13.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmptyObject13 {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EmptyObject13 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EmptyObject13.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EmptyObject13 is not found in the empty JSON string", EmptyObject13.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EmptyObject13.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EmptyObject13.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EmptyObject13' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EmptyObject13.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EmptyObject13 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EmptyObject13 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EmptyObject13 given an JSON string + * + * @param jsonString JSON string + * @return An instance of EmptyObject13 + * @throws IOException if the JSON string is invalid with respect to EmptyObject13 + */ + public static EmptyObject13 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EmptyObject13.class); + } + + /** + * Convert an instance of EmptyObject13 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/EmptyObject2.java b/src/main/java/com/idmesh/model/EmptyObject2.java new file mode 100644 index 0000000..bba2e0f --- /dev/null +++ b/src/main/java/com/idmesh/model/EmptyObject2.java @@ -0,0 +1,245 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.AuthRuleArg; +import com.idmesh.model.IdentityObj; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * EmptyObject2 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmptyObject2 { + public static final String SERIALIZED_NAME_IDENTITIES = "identities"; + @SerializedName(SERIALIZED_NAME_IDENTITIES) + private List identities = new ArrayList<>(); + + public static final String SERIALIZED_NAME_RULES = "rules"; + @SerializedName(SERIALIZED_NAME_RULES) + private List rules = new ArrayList<>(); + + public EmptyObject2() { + } + /** + * Get identities + * @return identities + **/ + @javax.annotation.Nonnull + public List getIdentities() { + return identities; + } + + + public void setIdentities(List identities) { + this.identities = identities; + } + + /** + * Get rules + * @return rules + **/ + @javax.annotation.Nonnull + public List getRules() { + return rules; + } + + + public void setRules(List rules) { + this.rules = rules; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyObject2 emptyObject2 = (EmptyObject2) o; + return Objects.equals(this.identities, emptyObject2.identities) && + Objects.equals(this.rules, emptyObject2.rules); + } + + @Override + public int hashCode() { + return Objects.hash(identities, rules); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmptyObject2 {\n"); + sb.append(" identities: ").append(toIndentedString(identities)).append("\n"); + sb.append(" rules: ").append(toIndentedString(rules)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identities"); + openapiFields.add("rules"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identities"); + openapiRequiredFields.add("rules"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EmptyObject2 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EmptyObject2.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EmptyObject2 is not found in the empty JSON string", EmptyObject2.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EmptyObject2.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("identities").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `identities` to be an array in the JSON string but got `%s`", jsonObj.get("identities").toString())); + } + + JsonArray jsonArrayidentities = jsonObj.getAsJsonArray("identities"); + // validate the required field `identities` (array) + for (int i = 0; i < jsonArrayidentities.size(); i++) { + IdentityObj.validateJsonElement(jsonArrayidentities.get(i)); + }; + // ensure the json data is an array + if (!jsonObj.get("rules").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `rules` to be an array in the JSON string but got `%s`", jsonObj.get("rules").toString())); + } + + JsonArray jsonArrayrules = jsonObj.getAsJsonArray("rules"); + // validate the required field `rules` (array) + for (int i = 0; i < jsonArrayrules.size(); i++) { + AuthRuleArg.validateJsonElement(jsonArrayrules.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EmptyObject2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EmptyObject2' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EmptyObject2.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EmptyObject2 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EmptyObject2 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EmptyObject2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of EmptyObject2 + * @throws IOException if the JSON string is invalid with respect to EmptyObject2 + */ + public static EmptyObject2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EmptyObject2.class); + } + + /** + * Convert an instance of EmptyObject2 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/EmptyObject3.java b/src/main/java/com/idmesh/model/EmptyObject3.java new file mode 100644 index 0000000..0ccc986 --- /dev/null +++ b/src/main/java/com/idmesh/model/EmptyObject3.java @@ -0,0 +1,256 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.EmptyObject3ActionsInner; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * EmptyObject3 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmptyObject3 { + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_URI = "uri"; + @SerializedName(SERIALIZED_NAME_URI) + private String uri; + + public static final String SERIALIZED_NAME_ACTIONS = "actions"; + @SerializedName(SERIALIZED_NAME_ACTIONS) + private List actions; + + public EmptyObject3() { + } + /** + * 描述 + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + /** + * 资源URI, 当type=api/ui 时有效 + * @return uri + **/ + @javax.annotation.Nullable + public String getUri() { + return uri; + } + + + public void setUri(String uri) { + this.uri = uri; + } + + /** + * Get actions + * @return actions + **/ + @javax.annotation.Nullable + public List getActions() { + return actions; + } + + + public void setActions(List actions) { + this.actions = actions; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyObject3 emptyObject3 = (EmptyObject3) o; + return Objects.equals(this.description, emptyObject3.description) && + Objects.equals(this.uri, emptyObject3.uri) && + Objects.equals(this.actions, emptyObject3.actions); + } + + @Override + public int hashCode() { + return Objects.hash(description, uri, actions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmptyObject3 {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" uri: ").append(toIndentedString(uri)).append("\n"); + sb.append(" actions: ").append(toIndentedString(actions)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("description"); + openapiFields.add("uri"); + openapiFields.add("actions"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EmptyObject3 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EmptyObject3.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EmptyObject3 is not found in the empty JSON string", EmptyObject3.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("uri") != null && !jsonObj.get("uri").isJsonNull()) && !jsonObj.get("uri").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uri").toString())); + } + if (jsonObj.get("actions") != null && !jsonObj.get("actions").isJsonNull()) { + JsonArray jsonArrayactions = jsonObj.getAsJsonArray("actions"); + if (jsonArrayactions != null) { + // ensure the json data is an array + if (!jsonObj.get("actions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `actions` to be an array in the JSON string but got `%s`", jsonObj.get("actions").toString())); + } + + // validate the optional field `actions` (array) + for (int i = 0; i < jsonArrayactions.size(); i++) { + EmptyObject3ActionsInner.validateJsonElement(jsonArrayactions.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EmptyObject3.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EmptyObject3' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EmptyObject3.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EmptyObject3 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EmptyObject3 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EmptyObject3 given an JSON string + * + * @param jsonString JSON string + * @return An instance of EmptyObject3 + * @throws IOException if the JSON string is invalid with respect to EmptyObject3 + */ + public static EmptyObject3 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EmptyObject3.class); + } + + /** + * Convert an instance of EmptyObject3 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/EmptyObject3ActionsInner.java b/src/main/java/com/idmesh/model/EmptyObject3ActionsInner.java new file mode 100644 index 0000000..d31cb3a --- /dev/null +++ b/src/main/java/com/idmesh/model/EmptyObject3ActionsInner.java @@ -0,0 +1,250 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * EmptyObject3ActionsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmptyObject3ActionsInner { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public EmptyObject3ActionsInner() { + } + /** + * 如果不携带id,会认为是新创建的code + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * Get code + * @return code + **/ + @javax.annotation.Nonnull + public String getCode() { + return code; + } + + + public void setCode(String code) { + this.code = code; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyObject3ActionsInner emptyObject3ActionsInner = (EmptyObject3ActionsInner) o; + return Objects.equals(this.id, emptyObject3ActionsInner.id) && + Objects.equals(this.code, emptyObject3ActionsInner.code) && + Objects.equals(this.description, emptyObject3ActionsInner.description); + } + + @Override + public int hashCode() { + return Objects.hash(id, code, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmptyObject3ActionsInner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("code"); + openapiFields.add("description"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("code"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EmptyObject3ActionsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EmptyObject3ActionsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EmptyObject3ActionsInner is not found in the empty JSON string", EmptyObject3ActionsInner.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EmptyObject3ActionsInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EmptyObject3ActionsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EmptyObject3ActionsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EmptyObject3ActionsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EmptyObject3ActionsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EmptyObject3ActionsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EmptyObject3ActionsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of EmptyObject3ActionsInner + * @throws IOException if the JSON string is invalid with respect to EmptyObject3ActionsInner + */ + public static EmptyObject3ActionsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EmptyObject3ActionsInner.class); + } + + /** + * Convert an instance of EmptyObject3ActionsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/EmptyObject4.java b/src/main/java/com/idmesh/model/EmptyObject4.java new file mode 100644 index 0000000..a823e7e --- /dev/null +++ b/src/main/java/com/idmesh/model/EmptyObject4.java @@ -0,0 +1,292 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.EmptyObject4Application; +import com.idmesh.model.EmptyObject4Resource; +import com.idmesh.model.EmptyObject4ResourceSet; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * EmptyObject4 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmptyObject4 { + public static final String SERIALIZED_NAME_RESOURCE = "resource"; + @SerializedName(SERIALIZED_NAME_RESOURCE) + private EmptyObject4Resource resource; + + public static final String SERIALIZED_NAME_RESOURCE_SET = "resource_set"; + @SerializedName(SERIALIZED_NAME_RESOURCE_SET) + private EmptyObject4ResourceSet resourceSet; + + public static final String SERIALIZED_NAME_APPLICATION = "application"; + @SerializedName(SERIALIZED_NAME_APPLICATION) + private EmptyObject4Application application; + + public static final String SERIALIZED_NAME_AFFECT = "affect"; + @SerializedName(SERIALIZED_NAME_AFFECT) + private String affect; + + public EmptyObject4() { + } + /** + * Get resource + * @return resource + **/ + @javax.annotation.Nullable + public EmptyObject4Resource getResource() { + return resource; + } + + + public void setResource(EmptyObject4Resource resource) { + this.resource = resource; + } + + /** + * Get resourceSet + * @return resourceSet + **/ + @javax.annotation.Nullable + public EmptyObject4ResourceSet getResourceSet() { + return resourceSet; + } + + + public void setResourceSet(EmptyObject4ResourceSet resourceSet) { + this.resourceSet = resourceSet; + } + + /** + * Get application + * @return application + **/ + @javax.annotation.Nullable + public EmptyObject4Application getApplication() { + return application; + } + + + public void setApplication(EmptyObject4Application application) { + this.application = application; + } + + /** + * allow/deny + * @return affect + **/ + @javax.annotation.Nonnull + public String getAffect() { + return affect; + } + + + public void setAffect(String affect) { + this.affect = affect; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyObject4 emptyObject4 = (EmptyObject4) o; + return Objects.equals(this.resource, emptyObject4.resource) && + Objects.equals(this.resourceSet, emptyObject4.resourceSet) && + Objects.equals(this.application, emptyObject4.application) && + Objects.equals(this.affect, emptyObject4.affect); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(resource, resourceSet, application, affect); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmptyObject4 {\n"); + sb.append(" resource: ").append(toIndentedString(resource)).append("\n"); + sb.append(" resourceSet: ").append(toIndentedString(resourceSet)).append("\n"); + sb.append(" application: ").append(toIndentedString(application)).append("\n"); + sb.append(" affect: ").append(toIndentedString(affect)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("resource"); + openapiFields.add("resource_set"); + openapiFields.add("application"); + openapiFields.add("affect"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("affect"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EmptyObject4 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EmptyObject4.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EmptyObject4 is not found in the empty JSON string", EmptyObject4.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EmptyObject4.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `resource` + if (jsonObj.get("resource") != null && !jsonObj.get("resource").isJsonNull()) { + EmptyObject4Resource.validateJsonElement(jsonObj.get("resource")); + } + // validate the optional field `resource_set` + if (jsonObj.get("resource_set") != null && !jsonObj.get("resource_set").isJsonNull()) { + EmptyObject4ResourceSet.validateJsonElement(jsonObj.get("resource_set")); + } + // validate the optional field `application` + if (jsonObj.get("application") != null && !jsonObj.get("application").isJsonNull()) { + EmptyObject4Application.validateJsonElement(jsonObj.get("application")); + } + if (!jsonObj.get("affect").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `affect` to be a primitive type in the JSON string but got `%s`", jsonObj.get("affect").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EmptyObject4.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EmptyObject4' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EmptyObject4.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EmptyObject4 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EmptyObject4 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EmptyObject4 given an JSON string + * + * @param jsonString JSON string + * @return An instance of EmptyObject4 + * @throws IOException if the JSON string is invalid with respect to EmptyObject4 + */ + public static EmptyObject4 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EmptyObject4.class); + } + + /** + * Convert an instance of EmptyObject4 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/EmptyObject4Application.java b/src/main/java/com/idmesh/model/EmptyObject4Application.java new file mode 100644 index 0000000..5f1f20a --- /dev/null +++ b/src/main/java/com/idmesh/model/EmptyObject4Application.java @@ -0,0 +1,202 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * EmptyObject4Application + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmptyObject4Application { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public EmptyObject4Application() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyObject4Application emptyObject4Application = (EmptyObject4Application) o; + return Objects.equals(this.id, emptyObject4Application.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmptyObject4Application {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EmptyObject4Application + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EmptyObject4Application.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EmptyObject4Application is not found in the empty JSON string", EmptyObject4Application.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EmptyObject4Application.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EmptyObject4Application.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EmptyObject4Application' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EmptyObject4Application.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EmptyObject4Application value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EmptyObject4Application read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EmptyObject4Application given an JSON string + * + * @param jsonString JSON string + * @return An instance of EmptyObject4Application + * @throws IOException if the JSON string is invalid with respect to EmptyObject4Application + */ + public static EmptyObject4Application fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EmptyObject4Application.class); + } + + /** + * Convert an instance of EmptyObject4Application to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/EmptyObject4Resource.java b/src/main/java/com/idmesh/model/EmptyObject4Resource.java new file mode 100644 index 0000000..9a364f9 --- /dev/null +++ b/src/main/java/com/idmesh/model/EmptyObject4Resource.java @@ -0,0 +1,356 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * EmptyObject4Resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmptyObject4Resource { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_SCOPE = "scope"; + @SerializedName(SERIALIZED_NAME_SCOPE) + private String scope; + + public static final String SERIALIZED_NAME_ACTIONS = "actions"; + @SerializedName(SERIALIZED_NAME_ACTIONS) + private List actions; + + public static final String SERIALIZED_NAME_MATCH_ALL_ACTIONS = "match_all_actions"; + @SerializedName(SERIALIZED_NAME_MATCH_ALL_ACTIONS) + private Boolean matchAllActions; + + public static final String SERIALIZED_NAME_MATCH_ALL_RESOURCES = "match_all_resources"; + @SerializedName(SERIALIZED_NAME_MATCH_ALL_RESOURCES) + private Boolean matchAllResources; + + public static final String SERIALIZED_NAME_APPLICATION_ID = "application_id"; + @SerializedName(SERIALIZED_NAME_APPLICATION_ID) + private String applicationId; + + public static final String SERIALIZED_NAME_APPLICATION_NAME = "application_name"; + @SerializedName(SERIALIZED_NAME_APPLICATION_NAME) + private String applicationName; + + public EmptyObject4Resource() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * Get scope + * @return scope + **/ + @javax.annotation.Nonnull + public String getScope() { + return scope; + } + + + public void setScope(String scope) { + this.scope = scope; + } + + /** + * Get actions + * @return actions + **/ + @javax.annotation.Nullable + public List getActions() { + return actions; + } + + + public void setActions(List actions) { + this.actions = actions; + } + + /** + * Get matchAllActions + * @return matchAllActions + **/ + @javax.annotation.Nullable + public Boolean getMatchAllActions() { + return matchAllActions; + } + + + public void setMatchAllActions(Boolean matchAllActions) { + this.matchAllActions = matchAllActions; + } + + /** + * Get matchAllResources + * @return matchAllResources + **/ + @javax.annotation.Nullable + public Boolean getMatchAllResources() { + return matchAllResources; + } + + + public void setMatchAllResources(Boolean matchAllResources) { + this.matchAllResources = matchAllResources; + } + + /** + * 当match_all_resources=true时必填 + * @return applicationId + **/ + @javax.annotation.Nullable + public String getApplicationId() { + return applicationId; + } + + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * 当match_all_resources=true时必填 + * @return applicationName + **/ + @javax.annotation.Nullable + public String getApplicationName() { + return applicationName; + } + + + public void setApplicationName(String applicationName) { + this.applicationName = applicationName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyObject4Resource emptyObject4Resource = (EmptyObject4Resource) o; + return Objects.equals(this.id, emptyObject4Resource.id) && + Objects.equals(this.scope, emptyObject4Resource.scope) && + Objects.equals(this.actions, emptyObject4Resource.actions) && + Objects.equals(this.matchAllActions, emptyObject4Resource.matchAllActions) && + Objects.equals(this.matchAllResources, emptyObject4Resource.matchAllResources) && + Objects.equals(this.applicationId, emptyObject4Resource.applicationId) && + Objects.equals(this.applicationName, emptyObject4Resource.applicationName); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, scope, actions, matchAllActions, matchAllResources, applicationId, applicationName); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmptyObject4Resource {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" actions: ").append(toIndentedString(actions)).append("\n"); + sb.append(" matchAllActions: ").append(toIndentedString(matchAllActions)).append("\n"); + sb.append(" matchAllResources: ").append(toIndentedString(matchAllResources)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" applicationName: ").append(toIndentedString(applicationName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("scope"); + openapiFields.add("actions"); + openapiFields.add("match_all_actions"); + openapiFields.add("match_all_resources"); + openapiFields.add("application_id"); + openapiFields.add("application_name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("scope"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EmptyObject4Resource + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EmptyObject4Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EmptyObject4Resource is not found in the empty JSON string", EmptyObject4Resource.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EmptyObject4Resource.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("scope").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("actions") != null && !jsonObj.get("actions").isJsonNull() && !jsonObj.get("actions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `actions` to be an array in the JSON string but got `%s`", jsonObj.get("actions").toString())); + } + if ((jsonObj.get("application_id") != null && !jsonObj.get("application_id").isJsonNull()) && !jsonObj.get("application_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `application_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("application_id").toString())); + } + if ((jsonObj.get("application_name") != null && !jsonObj.get("application_name").isJsonNull()) && !jsonObj.get("application_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `application_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("application_name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EmptyObject4Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EmptyObject4Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EmptyObject4Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EmptyObject4Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EmptyObject4Resource read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EmptyObject4Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of EmptyObject4Resource + * @throws IOException if the JSON string is invalid with respect to EmptyObject4Resource + */ + public static EmptyObject4Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EmptyObject4Resource.class); + } + + /** + * Convert an instance of EmptyObject4Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/EmptyObject4ResourceSet.java b/src/main/java/com/idmesh/model/EmptyObject4ResourceSet.java new file mode 100644 index 0000000..94170db --- /dev/null +++ b/src/main/java/com/idmesh/model/EmptyObject4ResourceSet.java @@ -0,0 +1,202 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * EmptyObject4ResourceSet + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmptyObject4ResourceSet { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public EmptyObject4ResourceSet() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyObject4ResourceSet emptyObject4ResourceSet = (EmptyObject4ResourceSet) o; + return Objects.equals(this.id, emptyObject4ResourceSet.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmptyObject4ResourceSet {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EmptyObject4ResourceSet + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EmptyObject4ResourceSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EmptyObject4ResourceSet is not found in the empty JSON string", EmptyObject4ResourceSet.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EmptyObject4ResourceSet.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EmptyObject4ResourceSet.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EmptyObject4ResourceSet' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EmptyObject4ResourceSet.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EmptyObject4ResourceSet value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EmptyObject4ResourceSet read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EmptyObject4ResourceSet given an JSON string + * + * @param jsonString JSON string + * @return An instance of EmptyObject4ResourceSet + * @throws IOException if the JSON string is invalid with respect to EmptyObject4ResourceSet + */ + public static EmptyObject4ResourceSet fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EmptyObject4ResourceSet.class); + } + + /** + * Convert an instance of EmptyObject4ResourceSet to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/EmptyObject5.java b/src/main/java/com/idmesh/model/EmptyObject5.java new file mode 100644 index 0000000..9a608b3 --- /dev/null +++ b/src/main/java/com/idmesh/model/EmptyObject5.java @@ -0,0 +1,336 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.EmptyObject5ActionsInner; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * EmptyObject5 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmptyObject5 { + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_APPLICATION_ID = "application_id"; + @SerializedName(SERIALIZED_NAME_APPLICATION_ID) + private BigDecimal applicationId; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_URI = "uri"; + @SerializedName(SERIALIZED_NAME_URI) + private String uri; + + public static final String SERIALIZED_NAME_ACTIONS = "actions"; + @SerializedName(SERIALIZED_NAME_ACTIONS) + private List actions; + + public EmptyObject5() { + } + /** + * 描述 + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + /** + * 资源代码 + * @return code + **/ + @javax.annotation.Nonnull + public String getCode() { + return code; + } + + + public void setCode(String code) { + this.code = code; + } + + /** + * 应用id + * @return applicationId + **/ + @javax.annotation.Nonnull + public BigDecimal getApplicationId() { + return applicationId; + } + + + public void setApplicationId(BigDecimal applicationId) { + this.applicationId = applicationId; + } + + /** + * 资源类型,data/api/ui + * @return type + **/ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * 资源URI, 当type=api/ui 时有效 + * @return uri + **/ + @javax.annotation.Nullable + public String getUri() { + return uri; + } + + + public void setUri(String uri) { + this.uri = uri; + } + + /** + * Get actions + * @return actions + **/ + @javax.annotation.Nullable + public List getActions() { + return actions; + } + + + public void setActions(List actions) { + this.actions = actions; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyObject5 emptyObject5 = (EmptyObject5) o; + return Objects.equals(this.description, emptyObject5.description) && + Objects.equals(this.code, emptyObject5.code) && + Objects.equals(this.applicationId, emptyObject5.applicationId) && + Objects.equals(this.type, emptyObject5.type) && + Objects.equals(this.uri, emptyObject5.uri) && + Objects.equals(this.actions, emptyObject5.actions); + } + + @Override + public int hashCode() { + return Objects.hash(description, code, applicationId, type, uri, actions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmptyObject5 {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" uri: ").append(toIndentedString(uri)).append("\n"); + sb.append(" actions: ").append(toIndentedString(actions)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("description"); + openapiFields.add("code"); + openapiFields.add("application_id"); + openapiFields.add("type"); + openapiFields.add("uri"); + openapiFields.add("actions"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("code"); + openapiRequiredFields.add("application_id"); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EmptyObject5 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EmptyObject5.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EmptyObject5 is not found in the empty JSON string", EmptyObject5.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EmptyObject5.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if (!jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("uri") != null && !jsonObj.get("uri").isJsonNull()) && !jsonObj.get("uri").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uri").toString())); + } + if (jsonObj.get("actions") != null && !jsonObj.get("actions").isJsonNull()) { + JsonArray jsonArrayactions = jsonObj.getAsJsonArray("actions"); + if (jsonArrayactions != null) { + // ensure the json data is an array + if (!jsonObj.get("actions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `actions` to be an array in the JSON string but got `%s`", jsonObj.get("actions").toString())); + } + + // validate the optional field `actions` (array) + for (int i = 0; i < jsonArrayactions.size(); i++) { + EmptyObject5ActionsInner.validateJsonElement(jsonArrayactions.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EmptyObject5.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EmptyObject5' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EmptyObject5.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EmptyObject5 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EmptyObject5 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EmptyObject5 given an JSON string + * + * @param jsonString JSON string + * @return An instance of EmptyObject5 + * @throws IOException if the JSON string is invalid with respect to EmptyObject5 + */ + public static EmptyObject5 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EmptyObject5.class); + } + + /** + * Convert an instance of EmptyObject5 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/EmptyObject5ActionsInner.java b/src/main/java/com/idmesh/model/EmptyObject5ActionsInner.java new file mode 100644 index 0000000..931fd76 --- /dev/null +++ b/src/main/java/com/idmesh/model/EmptyObject5ActionsInner.java @@ -0,0 +1,226 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * EmptyObject5ActionsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmptyObject5ActionsInner { + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public EmptyObject5ActionsInner() { + } + /** + * Get code + * @return code + **/ + @javax.annotation.Nonnull + public String getCode() { + return code; + } + + + public void setCode(String code) { + this.code = code; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyObject5ActionsInner emptyObject5ActionsInner = (EmptyObject5ActionsInner) o; + return Objects.equals(this.code, emptyObject5ActionsInner.code) && + Objects.equals(this.description, emptyObject5ActionsInner.description); + } + + @Override + public int hashCode() { + return Objects.hash(code, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmptyObject5ActionsInner {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("code"); + openapiFields.add("description"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("code"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EmptyObject5ActionsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EmptyObject5ActionsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EmptyObject5ActionsInner is not found in the empty JSON string", EmptyObject5ActionsInner.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EmptyObject5ActionsInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EmptyObject5ActionsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EmptyObject5ActionsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EmptyObject5ActionsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EmptyObject5ActionsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EmptyObject5ActionsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EmptyObject5ActionsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of EmptyObject5ActionsInner + * @throws IOException if the JSON string is invalid with respect to EmptyObject5ActionsInner + */ + public static EmptyObject5ActionsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EmptyObject5ActionsInner.class); + } + + /** + * Convert an instance of EmptyObject5ActionsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/EmptyObject6.java b/src/main/java/com/idmesh/model/EmptyObject6.java new file mode 100644 index 0000000..dd6c26d --- /dev/null +++ b/src/main/java/com/idmesh/model/EmptyObject6.java @@ -0,0 +1,202 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * EmptyObject6 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmptyObject6 { + public static final String SERIALIZED_NAME_RESOURCE_ID = "resource_id"; + @SerializedName(SERIALIZED_NAME_RESOURCE_ID) + private String resourceId; + + public EmptyObject6() { + } + /** + * 资源id + * @return resourceId + **/ + @javax.annotation.Nonnull + public String getResourceId() { + return resourceId; + } + + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyObject6 emptyObject6 = (EmptyObject6) o; + return Objects.equals(this.resourceId, emptyObject6.resourceId); + } + + @Override + public int hashCode() { + return Objects.hash(resourceId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmptyObject6 {\n"); + sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("resource_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("resource_id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EmptyObject6 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EmptyObject6.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EmptyObject6 is not found in the empty JSON string", EmptyObject6.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EmptyObject6.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("resource_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `resource_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("resource_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EmptyObject6.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EmptyObject6' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EmptyObject6.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EmptyObject6 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EmptyObject6 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EmptyObject6 given an JSON string + * + * @param jsonString JSON string + * @return An instance of EmptyObject6 + * @throws IOException if the JSON string is invalid with respect to EmptyObject6 + */ + public static EmptyObject6 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EmptyObject6.class); + } + + /** + * Convert an instance of EmptyObject6 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/EmptyObject7.java b/src/main/java/com/idmesh/model/EmptyObject7.java new file mode 100644 index 0000000..ff3e6da --- /dev/null +++ b/src/main/java/com/idmesh/model/EmptyObject7.java @@ -0,0 +1,227 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * EmptyObject7 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmptyObject7 { + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public EmptyObject7() { + } + /** + * 集合代码 + * @return code + **/ + @javax.annotation.Nonnull + public String getCode() { + return code; + } + + + public void setCode(String code) { + this.code = code; + } + + /** + * 描述 + * @return description + **/ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyObject7 emptyObject7 = (EmptyObject7) o; + return Objects.equals(this.code, emptyObject7.code) && + Objects.equals(this.description, emptyObject7.description); + } + + @Override + public int hashCode() { + return Objects.hash(code, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmptyObject7 {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("code"); + openapiFields.add("description"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("code"); + openapiRequiredFields.add("description"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EmptyObject7 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EmptyObject7.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EmptyObject7 is not found in the empty JSON string", EmptyObject7.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EmptyObject7.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if (!jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EmptyObject7.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EmptyObject7' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EmptyObject7.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EmptyObject7 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EmptyObject7 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EmptyObject7 given an JSON string + * + * @param jsonString JSON string + * @return An instance of EmptyObject7 + * @throws IOException if the JSON string is invalid with respect to EmptyObject7 + */ + public static EmptyObject7 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EmptyObject7.class); + } + + /** + * Convert an instance of EmptyObject7 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/EmptyObject8.java b/src/main/java/com/idmesh/model/EmptyObject8.java new file mode 100644 index 0000000..bb653e6 --- /dev/null +++ b/src/main/java/com/idmesh/model/EmptyObject8.java @@ -0,0 +1,251 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * EmptyObject8 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmptyObject8 { + public static final String SERIALIZED_NAME_APPLICATION_ID = "application_id"; + @SerializedName(SERIALIZED_NAME_APPLICATION_ID) + private String applicationId; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public EmptyObject8() { + } + /** + * 应用id + * @return applicationId + **/ + @javax.annotation.Nonnull + public String getApplicationId() { + return applicationId; + } + + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * 集合代码 + * @return code + **/ + @javax.annotation.Nonnull + public String getCode() { + return code; + } + + + public void setCode(String code) { + this.code = code; + } + + /** + * 描述 + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyObject8 emptyObject8 = (EmptyObject8) o; + return Objects.equals(this.applicationId, emptyObject8.applicationId) && + Objects.equals(this.code, emptyObject8.code) && + Objects.equals(this.description, emptyObject8.description); + } + + @Override + public int hashCode() { + return Objects.hash(applicationId, code, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmptyObject8 {\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("application_id"); + openapiFields.add("code"); + openapiFields.add("description"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("application_id"); + openapiRequiredFields.add("code"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EmptyObject8 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EmptyObject8.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EmptyObject8 is not found in the empty JSON string", EmptyObject8.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EmptyObject8.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("application_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `application_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("application_id").toString())); + } + if (!jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EmptyObject8.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EmptyObject8' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EmptyObject8.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EmptyObject8 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EmptyObject8 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EmptyObject8 given an JSON string + * + * @param jsonString JSON string + * @return An instance of EmptyObject8 + * @throws IOException if the JSON string is invalid with respect to EmptyObject8 + */ + public static EmptyObject8 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EmptyObject8.class); + } + + /** + * Convert an instance of EmptyObject8 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/EmptyObject9.java b/src/main/java/com/idmesh/model/EmptyObject9.java new file mode 100644 index 0000000..922e80c --- /dev/null +++ b/src/main/java/com/idmesh/model/EmptyObject9.java @@ -0,0 +1,200 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * EmptyObject9 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmptyObject9 { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private BigDecimal id; + + public EmptyObject9() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public BigDecimal getId() { + return id; + } + + + public void setId(BigDecimal id) { + this.id = id; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmptyObject9 emptyObject9 = (EmptyObject9) o; + return Objects.equals(this.id, emptyObject9.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmptyObject9 {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EmptyObject9 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EmptyObject9.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EmptyObject9 is not found in the empty JSON string", EmptyObject9.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EmptyObject9.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EmptyObject9.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EmptyObject9' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EmptyObject9.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EmptyObject9 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EmptyObject9 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EmptyObject9 given an JSON string + * + * @param jsonString JSON string + * @return An instance of EmptyObject9 + * @throws IOException if the JSON string is invalid with respect to EmptyObject9 + */ + public static EmptyObject9 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EmptyObject9.class); + } + + /** + * Convert an instance of EmptyObject9 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/Enable200Response.java b/src/main/java/com/idmesh/model/Enable200Response.java new file mode 100644 index 0000000..fb9cb39 --- /dev/null +++ b/src/main/java/com/idmesh/model/Enable200Response.java @@ -0,0 +1,225 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * Enable200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Enable200Response { + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private BigDecimal data; + + public Enable200Response() { + } + /** + * Get message + * @return message + **/ + @javax.annotation.Nonnull + public String getMessage() { + return message; + } + + + public void setMessage(String message) { + this.message = message; + } + + /** + * 操作ID + * @return data + **/ + @javax.annotation.Nonnull + public BigDecimal getData() { + return data; + } + + + public void setData(BigDecimal data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Enable200Response enable200Response = (Enable200Response) o; + return Objects.equals(this.message, enable200Response.message) && + Objects.equals(this.data, enable200Response.data); + } + + @Override + public int hashCode() { + return Objects.hash(message, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Enable200Response {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("message"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("message"); + openapiRequiredFields.add("data"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Enable200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Enable200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Enable200Response is not found in the empty JSON string", Enable200Response.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Enable200Response.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Enable200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Enable200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Enable200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Enable200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Enable200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Enable200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of Enable200Response + * @throws IOException if the JSON string is invalid with respect to Enable200Response + */ + public static Enable200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Enable200Response.class); + } + + /** + * Convert an instance of Enable200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/Get200Response.java b/src/main/java/com/idmesh/model/Get200Response.java new file mode 100644 index 0000000..dba9df3 --- /dev/null +++ b/src/main/java/com/idmesh/model/Get200Response.java @@ -0,0 +1,825 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * Get200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Get200Response { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private BigDecimal id; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + private String username; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + @SerializedName(SERIALIZED_NAME_PASSWORD) + private String password; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + private String displayName; + + public static final String SERIALIZED_NAME_FIRSTNAME = "firstname"; + @SerializedName(SERIALIZED_NAME_FIRSTNAME) + private String firstname; + + public static final String SERIALIZED_NAME_LASTNAME = "lastname"; + @SerializedName(SERIALIZED_NAME_LASTNAME) + private String lastname; + + public static final String SERIALIZED_NAME_REALNAME = "realname"; + @SerializedName(SERIALIZED_NAME_REALNAME) + private String realname; + + public static final String SERIALIZED_NAME_PINYIN = "pinyin"; + @SerializedName(SERIALIZED_NAME_PINYIN) + private String pinyin; + + public static final String SERIALIZED_NAME_NICKNAME = "nickname"; + @SerializedName(SERIALIZED_NAME_NICKNAME) + private String nickname; + + public static final String SERIALIZED_NAME_USER_TYPE = "user_type"; + @SerializedName(SERIALIZED_NAME_USER_TYPE) + private String userType; + + public static final String SERIALIZED_NAME_MOBILE = "mobile"; + @SerializedName(SERIALIZED_NAME_MOBILE) + private String mobile; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_GENDER = "gender"; + @SerializedName(SERIALIZED_NAME_GENDER) + private String gender; + + public static final String SERIALIZED_NAME_CERT_TYPE = "cert_type"; + @SerializedName(SERIALIZED_NAME_CERT_TYPE) + private String certType; + + public static final String SERIALIZED_NAME_CERT_NUMBER = "cert_number"; + @SerializedName(SERIALIZED_NAME_CERT_NUMBER) + private String certNumber; + + public static final String SERIALIZED_NAME_REGION = "region"; + @SerializedName(SERIALIZED_NAME_REGION) + private String region; + + public static final String SERIALIZED_NAME_WORK_TIME = "work_time"; + @SerializedName(SERIALIZED_NAME_WORK_TIME) + private String workTime; + + public static final String SERIALIZED_NAME_WORK_TITLE = "work_title"; + @SerializedName(SERIALIZED_NAME_WORK_TITLE) + private String workTitle; + + public static final String SERIALIZED_NAME_EXT_PROP = "ext_prop"; + @SerializedName(SERIALIZED_NAME_EXT_PROP) + private Object extProp; + + public static final String SERIALIZED_NAME_ARN = "arn"; + @SerializedName(SERIALIZED_NAME_ARN) + private String arn; + + public static final String SERIALIZED_NAME_ID_PROVIDER_CONNECTION = "id_provider_connection"; + @SerializedName(SERIALIZED_NAME_ID_PROVIDER_CONNECTION) + private BigDecimal idProviderConnection; + + public static final String SERIALIZED_NAME_DEVELOPER_ID = "developer_id"; + @SerializedName(SERIALIZED_NAME_DEVELOPER_ID) + private BigDecimal developerId; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private BigDecimal tenantId; + + public static final String SERIALIZED_NAME_LAST_LOGIN_IPADDR = "last_login_ipaddr"; + @SerializedName(SERIALIZED_NAME_LAST_LOGIN_IPADDR) + private String lastLoginIpaddr; + + public static final String SERIALIZED_NAME_LAST_LOGIN_TIME = "last_login_time"; + @SerializedName(SERIALIZED_NAME_LAST_LOGIN_TIME) + private String lastLoginTime; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private BigDecimal timeModified; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public Get200Response() { + } + /** + * 用户id标识 + * @return id + **/ + @javax.annotation.Nullable + public BigDecimal getId() { + return id; + } + + + public void setId(BigDecimal id) { + this.id = id; + } + + /** + * 用户名,唯一 + * @return username + **/ + @javax.annotation.Nullable + public String getUsername() { + return username; + } + + + public void setUsername(String username) { + this.username = username; + } + + /** + * 密码 + * @return password + **/ + @javax.annotation.Nullable + public String getPassword() { + return password; + } + + + public void setPassword(String password) { + this.password = password; + } + + /** + * 显示名称 + * @return displayName + **/ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + /** + * 名 + * @return firstname + **/ + @javax.annotation.Nullable + public String getFirstname() { + return firstname; + } + + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + + /** + * 姓 + * @return lastname + **/ + @javax.annotation.Nullable + public String getLastname() { + return lastname; + } + + + public void setLastname(String lastname) { + this.lastname = lastname; + } + + /** + * 真实姓名 + * @return realname + **/ + @javax.annotation.Nullable + public String getRealname() { + return realname; + } + + + public void setRealname(String realname) { + this.realname = realname; + } + + /** + * 拼音 + * @return pinyin + **/ + @javax.annotation.Nullable + public String getPinyin() { + return pinyin; + } + + + public void setPinyin(String pinyin) { + this.pinyin = pinyin; + } + + /** + * 昵称 + * @return nickname + **/ + @javax.annotation.Nullable + public String getNickname() { + return nickname; + } + + + public void setNickname(String nickname) { + this.nickname = nickname; + } + + /** + * 用户类型 + * @return userType + **/ + @javax.annotation.Nullable + public String getUserType() { + return userType; + } + + + public void setUserType(String userType) { + this.userType = userType; + } + + /** + * 手机 + * @return mobile + **/ + @javax.annotation.Nullable + public String getMobile() { + return mobile; + } + + + public void setMobile(String mobile) { + this.mobile = mobile; + } + + /** + * 邮箱 + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + + public void setEmail(String email) { + this.email = email; + } + + /** + * 性别 + * @return gender + **/ + @javax.annotation.Nullable + public String getGender() { + return gender; + } + + + public void setGender(String gender) { + this.gender = gender; + } + + /** + * 证件类型 + * @return certType + **/ + @javax.annotation.Nullable + public String getCertType() { + return certType; + } + + + public void setCertType(String certType) { + this.certType = certType; + } + + /** + * 证件号 + * @return certNumber + **/ + @javax.annotation.Nullable + public String getCertNumber() { + return certNumber; + } + + + public void setCertNumber(String certNumber) { + this.certNumber = certNumber; + } + + /** + * 区域 + * @return region + **/ + @javax.annotation.Nullable + public String getRegion() { + return region; + } + + + public void setRegion(String region) { + this.region = region; + } + + /** + * 加入时间 + * @return workTime + **/ + @javax.annotation.Nullable + public String getWorkTime() { + return workTime; + } + + + public void setWorkTime(String workTime) { + this.workTime = workTime; + } + + /** + * 职位 + * @return workTitle + **/ + @javax.annotation.Nullable + public String getWorkTitle() { + return workTitle; + } + + + public void setWorkTitle(String workTitle) { + this.workTitle = workTitle; + } + + /** + * 扩展信息,json对象{\"age\": 18, \"love\": \"足球\"} + * @return extProp + **/ + @javax.annotation.Nullable + public Object getExtProp() { + return extProp; + } + + + public void setExtProp(Object extProp) { + this.extProp = extProp; + } + + /** + * arn + * @return arn + **/ + @javax.annotation.Nullable + public String getArn() { + return arn; + } + + + public void setArn(String arn) { + this.arn = arn; + } + + /** + * 身份源ID + * @return idProviderConnection + **/ + @javax.annotation.Nullable + public BigDecimal getIdProviderConnection() { + return idProviderConnection; + } + + + public void setIdProviderConnection(BigDecimal idProviderConnection) { + this.idProviderConnection = idProviderConnection; + } + + /** + * 开发者id + * @return developerId + **/ + @javax.annotation.Nullable + public BigDecimal getDeveloperId() { + return developerId; + } + + + public void setDeveloperId(BigDecimal developerId) { + this.developerId = developerId; + } + + /** + * 租户id + * @return tenantId + **/ + @javax.annotation.Nullable + public BigDecimal getTenantId() { + return tenantId; + } + + + public void setTenantId(BigDecimal tenantId) { + this.tenantId = tenantId; + } + + /** + * 上次登录IP + * @return lastLoginIpaddr + **/ + @javax.annotation.Nullable + public String getLastLoginIpaddr() { + return lastLoginIpaddr; + } + + + public void setLastLoginIpaddr(String lastLoginIpaddr) { + this.lastLoginIpaddr = lastLoginIpaddr; + } + + /** + * 上次登录时间 + * @return lastLoginTime + **/ + @javax.annotation.Nullable + public String getLastLoginTime() { + return lastLoginTime; + } + + + public void setLastLoginTime(String lastLoginTime) { + this.lastLoginTime = lastLoginTime; + } + + /** + * 创建时间 + * @return timeCreated + **/ + @javax.annotation.Nullable + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * 修改时间 + * @return timeModified + **/ + @javax.annotation.Nullable + public BigDecimal getTimeModified() { + return timeModified; + } + + + public void setTimeModified(BigDecimal timeModified) { + this.timeModified = timeModified; + } + + /** + * 状态:1正常,0禁用 + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Get200Response get200Response = (Get200Response) o; + return Objects.equals(this.id, get200Response.id) && + Objects.equals(this.username, get200Response.username) && + Objects.equals(this.password, get200Response.password) && + Objects.equals(this.displayName, get200Response.displayName) && + Objects.equals(this.firstname, get200Response.firstname) && + Objects.equals(this.lastname, get200Response.lastname) && + Objects.equals(this.realname, get200Response.realname) && + Objects.equals(this.pinyin, get200Response.pinyin) && + Objects.equals(this.nickname, get200Response.nickname) && + Objects.equals(this.userType, get200Response.userType) && + Objects.equals(this.mobile, get200Response.mobile) && + Objects.equals(this.email, get200Response.email) && + Objects.equals(this.gender, get200Response.gender) && + Objects.equals(this.certType, get200Response.certType) && + Objects.equals(this.certNumber, get200Response.certNumber) && + Objects.equals(this.region, get200Response.region) && + Objects.equals(this.workTime, get200Response.workTime) && + Objects.equals(this.workTitle, get200Response.workTitle) && + Objects.equals(this.extProp, get200Response.extProp) && + Objects.equals(this.arn, get200Response.arn) && + Objects.equals(this.idProviderConnection, get200Response.idProviderConnection) && + Objects.equals(this.developerId, get200Response.developerId) && + Objects.equals(this.tenantId, get200Response.tenantId) && + Objects.equals(this.lastLoginIpaddr, get200Response.lastLoginIpaddr) && + Objects.equals(this.lastLoginTime, get200Response.lastLoginTime) && + Objects.equals(this.timeCreated, get200Response.timeCreated) && + Objects.equals(this.timeModified, get200Response.timeModified) && + Objects.equals(this.status, get200Response.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, password, displayName, firstname, lastname, realname, pinyin, nickname, userType, mobile, email, gender, certType, certNumber, region, workTime, workTitle, extProp, arn, idProviderConnection, developerId, tenantId, lastLoginIpaddr, lastLoginTime, timeCreated, timeModified, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Get200Response {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" firstname: ").append(toIndentedString(firstname)).append("\n"); + sb.append(" lastname: ").append(toIndentedString(lastname)).append("\n"); + sb.append(" realname: ").append(toIndentedString(realname)).append("\n"); + sb.append(" pinyin: ").append(toIndentedString(pinyin)).append("\n"); + sb.append(" nickname: ").append(toIndentedString(nickname)).append("\n"); + sb.append(" userType: ").append(toIndentedString(userType)).append("\n"); + sb.append(" mobile: ").append(toIndentedString(mobile)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" certType: ").append(toIndentedString(certType)).append("\n"); + sb.append(" certNumber: ").append(toIndentedString(certNumber)).append("\n"); + sb.append(" region: ").append(toIndentedString(region)).append("\n"); + sb.append(" workTime: ").append(toIndentedString(workTime)).append("\n"); + sb.append(" workTitle: ").append(toIndentedString(workTitle)).append("\n"); + sb.append(" extProp: ").append(toIndentedString(extProp)).append("\n"); + sb.append(" arn: ").append(toIndentedString(arn)).append("\n"); + sb.append(" idProviderConnection: ").append(toIndentedString(idProviderConnection)).append("\n"); + sb.append(" developerId: ").append(toIndentedString(developerId)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" lastLoginIpaddr: ").append(toIndentedString(lastLoginIpaddr)).append("\n"); + sb.append(" lastLoginTime: ").append(toIndentedString(lastLoginTime)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("username"); + openapiFields.add("password"); + openapiFields.add("display_name"); + openapiFields.add("firstname"); + openapiFields.add("lastname"); + openapiFields.add("realname"); + openapiFields.add("pinyin"); + openapiFields.add("nickname"); + openapiFields.add("user_type"); + openapiFields.add("mobile"); + openapiFields.add("email"); + openapiFields.add("gender"); + openapiFields.add("cert_type"); + openapiFields.add("cert_number"); + openapiFields.add("region"); + openapiFields.add("work_time"); + openapiFields.add("work_title"); + openapiFields.add("ext_prop"); + openapiFields.add("arn"); + openapiFields.add("id_provider_connection"); + openapiFields.add("developer_id"); + openapiFields.add("tenant_id"); + openapiFields.add("last_login_ipaddr"); + openapiFields.add("last_login_time"); + openapiFields.add("time_created"); + openapiFields.add("time_modified"); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Get200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Get200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Get200Response is not found in the empty JSON string", Get200Response.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } + if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) && !jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + if ((jsonObj.get("firstname") != null && !jsonObj.get("firstname").isJsonNull()) && !jsonObj.get("firstname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `firstname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstname").toString())); + } + if ((jsonObj.get("lastname") != null && !jsonObj.get("lastname").isJsonNull()) && !jsonObj.get("lastname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lastname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastname").toString())); + } + if ((jsonObj.get("realname") != null && !jsonObj.get("realname").isJsonNull()) && !jsonObj.get("realname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `realname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("realname").toString())); + } + if ((jsonObj.get("pinyin") != null && !jsonObj.get("pinyin").isJsonNull()) && !jsonObj.get("pinyin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `pinyin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pinyin").toString())); + } + if ((jsonObj.get("nickname") != null && !jsonObj.get("nickname").isJsonNull()) && !jsonObj.get("nickname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nickname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nickname").toString())); + } + if ((jsonObj.get("user_type") != null && !jsonObj.get("user_type").isJsonNull()) && !jsonObj.get("user_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_type").toString())); + } + if ((jsonObj.get("mobile") != null && !jsonObj.get("mobile").isJsonNull()) && !jsonObj.get("mobile").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mobile` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mobile").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("gender") != null && !jsonObj.get("gender").isJsonNull()) && !jsonObj.get("gender").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `gender` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gender").toString())); + } + if ((jsonObj.get("cert_type") != null && !jsonObj.get("cert_type").isJsonNull()) && !jsonObj.get("cert_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cert_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cert_type").toString())); + } + if ((jsonObj.get("cert_number") != null && !jsonObj.get("cert_number").isJsonNull()) && !jsonObj.get("cert_number").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cert_number` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cert_number").toString())); + } + if ((jsonObj.get("region") != null && !jsonObj.get("region").isJsonNull()) && !jsonObj.get("region").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `region` to be a primitive type in the JSON string but got `%s`", jsonObj.get("region").toString())); + } + if ((jsonObj.get("work_time") != null && !jsonObj.get("work_time").isJsonNull()) && !jsonObj.get("work_time").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `work_time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("work_time").toString())); + } + if ((jsonObj.get("work_title") != null && !jsonObj.get("work_title").isJsonNull()) && !jsonObj.get("work_title").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `work_title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("work_title").toString())); + } + if ((jsonObj.get("arn") != null && !jsonObj.get("arn").isJsonNull()) && !jsonObj.get("arn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `arn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("arn").toString())); + } + if ((jsonObj.get("last_login_ipaddr") != null && !jsonObj.get("last_login_ipaddr").isJsonNull()) && !jsonObj.get("last_login_ipaddr").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `last_login_ipaddr` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_login_ipaddr").toString())); + } + if ((jsonObj.get("last_login_time") != null && !jsonObj.get("last_login_time").isJsonNull()) && !jsonObj.get("last_login_time").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `last_login_time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_login_time").toString())); + } + if ((jsonObj.get("time_created") != null && !jsonObj.get("time_created").isJsonNull()) && !jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Get200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Get200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Get200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Get200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Get200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Get200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of Get200Response + * @throws IOException if the JSON string is invalid with respect to Get200Response + */ + public static Get200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Get200Response.class); + } + + /** + * Convert an instance of Get200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/Get400Response.java b/src/main/java/com/idmesh/model/Get400Response.java new file mode 100644 index 0000000..c0b0338 --- /dev/null +++ b/src/main/java/com/idmesh/model/Get400Response.java @@ -0,0 +1,246 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * Get400Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Get400Response { + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private Integer code; + + public static final String SERIALIZED_NAME_ERRNO = "errno"; + @SerializedName(SERIALIZED_NAME_ERRNO) + private Integer errno; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public Get400Response() { + } + /** + * Get code + * @return code + **/ + @javax.annotation.Nonnull + public Integer getCode() { + return code; + } + + + public void setCode(Integer code) { + this.code = code; + } + + /** + * Get errno + * @return errno + **/ + @javax.annotation.Nonnull + public Integer getErrno() { + return errno; + } + + + public void setErrno(Integer errno) { + this.errno = errno; + } + + /** + * Get message + * @return message + **/ + @javax.annotation.Nonnull + public String getMessage() { + return message; + } + + + public void setMessage(String message) { + this.message = message; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Get400Response get400Response = (Get400Response) o; + return Objects.equals(this.code, get400Response.code) && + Objects.equals(this.errno, get400Response.errno) && + Objects.equals(this.message, get400Response.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, errno, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Get400Response {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" errno: ").append(toIndentedString(errno)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("code"); + openapiFields.add("errno"); + openapiFields.add("message"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("code"); + openapiRequiredFields.add("errno"); + openapiRequiredFields.add("message"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Get400Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Get400Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Get400Response is not found in the empty JSON string", Get400Response.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Get400Response.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Get400Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Get400Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Get400Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Get400Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Get400Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Get400Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of Get400Response + * @throws IOException if the JSON string is invalid with respect to Get400Response + */ + public static Get400Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Get400Response.class); + } + + /** + * Convert an instance of Get400Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/GetAccountsByApp200Response.java b/src/main/java/com/idmesh/model/GetAccountsByApp200Response.java new file mode 100644 index 0000000..609f2ac --- /dev/null +++ b/src/main/java/com/idmesh/model/GetAccountsByApp200Response.java @@ -0,0 +1,230 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.AppSubAccount; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * GetAccountsByApp200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetAccountsByApp200Response { + public static final String SERIALIZED_NAME_RECORDS = "records"; + @SerializedName(SERIALIZED_NAME_RECORDS) + private List records; + + public static final String SERIALIZED_NAME_TOTAL = "total"; + @SerializedName(SERIALIZED_NAME_TOTAL) + private BigDecimal total; + + public GetAccountsByApp200Response() { + } + /** + * Get records + * @return records + **/ + @javax.annotation.Nullable + public List getRecords() { + return records; + } + + + public void setRecords(List records) { + this.records = records; + } + + /** + * Get total + * @return total + **/ + @javax.annotation.Nullable + public BigDecimal getTotal() { + return total; + } + + + public void setTotal(BigDecimal total) { + this.total = total; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAccountsByApp200Response getAccountsByApp200Response = (GetAccountsByApp200Response) o; + return Objects.equals(this.records, getAccountsByApp200Response.records) && + Objects.equals(this.total, getAccountsByApp200Response.total); + } + + @Override + public int hashCode() { + return Objects.hash(records, total); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAccountsByApp200Response {\n"); + sb.append(" records: ").append(toIndentedString(records)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("records"); + openapiFields.add("total"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetAccountsByApp200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetAccountsByApp200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetAccountsByApp200Response is not found in the empty JSON string", GetAccountsByApp200Response.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("records") != null && !jsonObj.get("records").isJsonNull()) { + JsonArray jsonArrayrecords = jsonObj.getAsJsonArray("records"); + if (jsonArrayrecords != null) { + // ensure the json data is an array + if (!jsonObj.get("records").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `records` to be an array in the JSON string but got `%s`", jsonObj.get("records").toString())); + } + + // validate the optional field `records` (array) + for (int i = 0; i < jsonArrayrecords.size(); i++) { + AppSubAccount.validateJsonElement(jsonArrayrecords.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetAccountsByApp200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetAccountsByApp200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetAccountsByApp200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetAccountsByApp200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetAccountsByApp200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetAccountsByApp200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetAccountsByApp200Response + * @throws IOException if the JSON string is invalid with respect to GetAccountsByApp200Response + */ + public static GetAccountsByApp200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetAccountsByApp200Response.class); + } + + /** + * Convert an instance of GetAccountsByApp200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/GetAuthUnits200Response.java b/src/main/java/com/idmesh/model/GetAuthUnits200Response.java new file mode 100644 index 0000000..ea74de1 --- /dev/null +++ b/src/main/java/com/idmesh/model/GetAuthUnits200Response.java @@ -0,0 +1,230 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.AuthUnit; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * GetAuthUnits200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetAuthUnits200Response { + public static final String SERIALIZED_NAME_TOTAL_NUM = "total_num"; + @SerializedName(SERIALIZED_NAME_TOTAL_NUM) + private BigDecimal totalNum; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data; + + public GetAuthUnits200Response() { + } + /** + * 总数量 + * @return totalNum + **/ + @javax.annotation.Nullable + public BigDecimal getTotalNum() { + return totalNum; + } + + + public void setTotalNum(BigDecimal totalNum) { + this.totalNum = totalNum; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAuthUnits200Response getAuthUnits200Response = (GetAuthUnits200Response) o; + return Objects.equals(this.totalNum, getAuthUnits200Response.totalNum) && + Objects.equals(this.data, getAuthUnits200Response.data); + } + + @Override + public int hashCode() { + return Objects.hash(totalNum, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAuthUnits200Response {\n"); + sb.append(" totalNum: ").append(toIndentedString(totalNum)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("total_num"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetAuthUnits200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetAuthUnits200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetAuthUnits200Response is not found in the empty JSON string", GetAuthUnits200Response.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AuthUnit.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetAuthUnits200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetAuthUnits200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetAuthUnits200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetAuthUnits200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetAuthUnits200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetAuthUnits200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetAuthUnits200Response + * @throws IOException if the JSON string is invalid with respect to GetAuthUnits200Response + */ + public static GetAuthUnits200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetAuthUnits200Response.class); + } + + /** + * Convert an instance of GetAuthUnits200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/GetConfig200Response.java b/src/main/java/com/idmesh/model/GetConfig200Response.java new file mode 100644 index 0000000..6ee3cfe --- /dev/null +++ b/src/main/java/com/idmesh/model/GetConfig200Response.java @@ -0,0 +1,538 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.GetConfig200ResponseMfaConfig; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * GetConfig200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetConfig200Response { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_APP_ID = "app_id"; + @SerializedName(SERIALIZED_NAME_APP_ID) + private String appId; + + public static final String SERIALIZED_NAME_ALLOWED_LOGIN_METHOD = "allowed_login_method"; + @SerializedName(SERIALIZED_NAME_ALLOWED_LOGIN_METHOD) + private String allowedLoginMethod; + + public static final String SERIALIZED_NAME_DEFAULT_LOGIN_METHOD = "default_login_method"; + @SerializedName(SERIALIZED_NAME_DEFAULT_LOGIN_METHOD) + private String defaultLoginMethod; + + public static final String SERIALIZED_NAME_ALLOWED_REG_METHOD = "allowed_reg_method"; + @SerializedName(SERIALIZED_NAME_ALLOWED_REG_METHOD) + private String allowedRegMethod; + + public static final String SERIALIZED_NAME_DEFAULT_REG_METHOD = "default_reg_method"; + @SerializedName(SERIALIZED_NAME_DEFAULT_REG_METHOD) + private String defaultRegMethod; + + public static final String SERIALIZED_NAME_ACCESS_POLICY = "access_policy"; + @SerializedName(SERIALIZED_NAME_ACCESS_POLICY) + private String accessPolicy; + + public static final String SERIALIZED_NAME_REG_POLICY = "reg_policy"; + @SerializedName(SERIALIZED_NAME_REG_POLICY) + private String regPolicy; + + public static final String SERIALIZED_NAME_ALLOWED_ID_PROVIDER = "allowed_id_provider"; + @SerializedName(SERIALIZED_NAME_ALLOWED_ID_PROVIDER) + private String allowedIdProvider; + + public static final String SERIALIZED_NAME_SSO_ENABLED = "sso_enabled"; + @SerializedName(SERIALIZED_NAME_SSO_ENABLED) + private Boolean ssoEnabled; + + public static final String SERIALIZED_NAME_MFA_ENABLED = "mfa_enabled"; + @SerializedName(SERIALIZED_NAME_MFA_ENABLED) + private Boolean mfaEnabled; + + public static final String SERIALIZED_NAME_MFA_CONFIG = "mfa_config"; + @SerializedName(SERIALIZED_NAME_MFA_CONFIG) + private GetConfig200ResponseMfaConfig mfaConfig; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public GetConfig200Response() { + } + /** + * 唯一标识 + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * 应用ID + * @return appId + **/ + @javax.annotation.Nonnull + public String getAppId() { + return appId; + } + + + public void setAppId(String appId) { + this.appId = appId; + } + + /** + * 允许的登录方式,格式为:[\"password\", \"vercode\"] + * @return allowedLoginMethod + **/ + @javax.annotation.Nullable + public String getAllowedLoginMethod() { + return allowedLoginMethod; + } + + + public void setAllowedLoginMethod(String allowedLoginMethod) { + this.allowedLoginMethod = allowedLoginMethod; + } + + /** + * 默认登录方式,格式为:password + * @return defaultLoginMethod + **/ + @javax.annotation.Nonnull + public String getDefaultLoginMethod() { + return defaultLoginMethod; + } + + + public void setDefaultLoginMethod(String defaultLoginMethod) { + this.defaultLoginMethod = defaultLoginMethod; + } + + /** + * 允许注册方式,格式为:[\"mobile\", \"email\"] + * @return allowedRegMethod + **/ + @javax.annotation.Nullable + public String getAllowedRegMethod() { + return allowedRegMethod; + } + + + public void setAllowedRegMethod(String allowedRegMethod) { + this.allowedRegMethod = allowedRegMethod; + } + + /** + * 默认注册方式,格式为:mobile + * @return defaultRegMethod + **/ + @javax.annotation.Nonnull + public String getDefaultRegMethod() { + return defaultRegMethod; + } + + + public void setDefaultRegMethod(String defaultRegMethod) { + this.defaultRegMethod = defaultRegMethod; + } + + /** + * 应用级访问控制权限,格式为:{\"password_recovery\": [\"email\"]} + * @return accessPolicy + **/ + @javax.annotation.Nullable + public String getAccessPolicy() { + return accessPolicy; + } + + + public void setAccessPolicy(String accessPolicy) { + this.accessPolicy = accessPolicy; + } + + /** + * 新用户注册策略(是否允许自动注册,注册验证方式等),1是,2否, + * @return regPolicy + **/ + @javax.annotation.Nullable + public String getRegPolicy() { + return regPolicy; + } + + + public void setRegPolicy(String regPolicy) { + this.regPolicy = regPolicy; + } + + /** + * 允许的登录身份提供商,格式为:{\"wechat_scan_qr\": 1, \"dingding_scan_qr\":2} + * @return allowedIdProvider + **/ + @javax.annotation.Nullable + public String getAllowedIdProvider() { + return allowedIdProvider; + } + + + public void setAllowedIdProvider(String allowedIdProvider) { + this.allowedIdProvider = allowedIdProvider; + } + + /** + * 是否允许SSO + * @return ssoEnabled + **/ + @javax.annotation.Nonnull + public Boolean getSsoEnabled() { + return ssoEnabled; + } + + + public void setSsoEnabled(Boolean ssoEnabled) { + this.ssoEnabled = ssoEnabled; + } + + /** + * 是否开启MFA + * @return mfaEnabled + **/ + @javax.annotation.Nullable + public Boolean getMfaEnabled() { + return mfaEnabled; + } + + + public void setMfaEnabled(Boolean mfaEnabled) { + this.mfaEnabled = mfaEnabled; + } + + /** + * Get mfaConfig + * @return mfaConfig + **/ + @javax.annotation.Nullable + public GetConfig200ResponseMfaConfig getMfaConfig() { + return mfaConfig; + } + + + public void setMfaConfig(GetConfig200ResponseMfaConfig mfaConfig) { + this.mfaConfig = mfaConfig; + } + + /** + * 创建时间 + * @return timeCreated + **/ + @javax.annotation.Nullable + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * 修改时间 + * @return timeModified + **/ + @javax.annotation.Nullable + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + /** + * 状态,1启用,0禁用 + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetConfig200Response getConfig200Response = (GetConfig200Response) o; + return Objects.equals(this.id, getConfig200Response.id) && + Objects.equals(this.appId, getConfig200Response.appId) && + Objects.equals(this.allowedLoginMethod, getConfig200Response.allowedLoginMethod) && + Objects.equals(this.defaultLoginMethod, getConfig200Response.defaultLoginMethod) && + Objects.equals(this.allowedRegMethod, getConfig200Response.allowedRegMethod) && + Objects.equals(this.defaultRegMethod, getConfig200Response.defaultRegMethod) && + Objects.equals(this.accessPolicy, getConfig200Response.accessPolicy) && + Objects.equals(this.regPolicy, getConfig200Response.regPolicy) && + Objects.equals(this.allowedIdProvider, getConfig200Response.allowedIdProvider) && + Objects.equals(this.ssoEnabled, getConfig200Response.ssoEnabled) && + Objects.equals(this.mfaEnabled, getConfig200Response.mfaEnabled) && + Objects.equals(this.mfaConfig, getConfig200Response.mfaConfig) && + Objects.equals(this.timeCreated, getConfig200Response.timeCreated) && + Objects.equals(this.timeModified, getConfig200Response.timeModified) && + Objects.equals(this.status, getConfig200Response.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, appId, allowedLoginMethod, defaultLoginMethod, allowedRegMethod, defaultRegMethod, accessPolicy, regPolicy, allowedIdProvider, ssoEnabled, mfaEnabled, mfaConfig, timeCreated, timeModified, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetConfig200Response {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); + sb.append(" allowedLoginMethod: ").append(toIndentedString(allowedLoginMethod)).append("\n"); + sb.append(" defaultLoginMethod: ").append(toIndentedString(defaultLoginMethod)).append("\n"); + sb.append(" allowedRegMethod: ").append(toIndentedString(allowedRegMethod)).append("\n"); + sb.append(" defaultRegMethod: ").append(toIndentedString(defaultRegMethod)).append("\n"); + sb.append(" accessPolicy: ").append(toIndentedString(accessPolicy)).append("\n"); + sb.append(" regPolicy: ").append(toIndentedString(regPolicy)).append("\n"); + sb.append(" allowedIdProvider: ").append(toIndentedString(allowedIdProvider)).append("\n"); + sb.append(" ssoEnabled: ").append(toIndentedString(ssoEnabled)).append("\n"); + sb.append(" mfaEnabled: ").append(toIndentedString(mfaEnabled)).append("\n"); + sb.append(" mfaConfig: ").append(toIndentedString(mfaConfig)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("app_id"); + openapiFields.add("allowed_login_method"); + openapiFields.add("default_login_method"); + openapiFields.add("allowed_reg_method"); + openapiFields.add("default_reg_method"); + openapiFields.add("access_policy"); + openapiFields.add("reg_policy"); + openapiFields.add("allowed_id_provider"); + openapiFields.add("sso_enabled"); + openapiFields.add("mfa_enabled"); + openapiFields.add("mfa_config"); + openapiFields.add("time_created"); + openapiFields.add("time_modified"); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("app_id"); + openapiRequiredFields.add("default_login_method"); + openapiRequiredFields.add("default_reg_method"); + openapiRequiredFields.add("sso_enabled"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetConfig200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetConfig200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetConfig200Response is not found in the empty JSON string", GetConfig200Response.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetConfig200Response.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("app_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `app_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("app_id").toString())); + } + if ((jsonObj.get("allowed_login_method") != null && !jsonObj.get("allowed_login_method").isJsonNull()) && !jsonObj.get("allowed_login_method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `allowed_login_method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("allowed_login_method").toString())); + } + if (!jsonObj.get("default_login_method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `default_login_method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_login_method").toString())); + } + if ((jsonObj.get("allowed_reg_method") != null && !jsonObj.get("allowed_reg_method").isJsonNull()) && !jsonObj.get("allowed_reg_method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `allowed_reg_method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("allowed_reg_method").toString())); + } + if (!jsonObj.get("default_reg_method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `default_reg_method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_reg_method").toString())); + } + if ((jsonObj.get("access_policy") != null && !jsonObj.get("access_policy").isJsonNull()) && !jsonObj.get("access_policy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `access_policy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_policy").toString())); + } + if ((jsonObj.get("reg_policy") != null && !jsonObj.get("reg_policy").isJsonNull()) && !jsonObj.get("reg_policy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `reg_policy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reg_policy").toString())); + } + if ((jsonObj.get("allowed_id_provider") != null && !jsonObj.get("allowed_id_provider").isJsonNull()) && !jsonObj.get("allowed_id_provider").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `allowed_id_provider` to be a primitive type in the JSON string but got `%s`", jsonObj.get("allowed_id_provider").toString())); + } + // validate the optional field `mfa_config` + if (jsonObj.get("mfa_config") != null && !jsonObj.get("mfa_config").isJsonNull()) { + GetConfig200ResponseMfaConfig.validateJsonElement(jsonObj.get("mfa_config")); + } + if ((jsonObj.get("time_created") != null && !jsonObj.get("time_created").isJsonNull()) && !jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if ((jsonObj.get("time_modified") != null && !jsonObj.get("time_modified").isJsonNull()) && !jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetConfig200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetConfig200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetConfig200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetConfig200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetConfig200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetConfig200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetConfig200Response + * @throws IOException if the JSON string is invalid with respect to GetConfig200Response + */ + public static GetConfig200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetConfig200Response.class); + } + + /** + * Convert an instance of GetConfig200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/GetConfig200ResponseMfaConfig.java b/src/main/java/com/idmesh/model/GetConfig200ResponseMfaConfig.java new file mode 100644 index 0000000..2fd687d --- /dev/null +++ b/src/main/java/com/idmesh/model/GetConfig200ResponseMfaConfig.java @@ -0,0 +1,252 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * 开启的MFA配置 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetConfig200ResponseMfaConfig { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_PROVIDER_TYPE = "provider_type"; + @SerializedName(SERIALIZED_NAME_PROVIDER_TYPE) + private String providerType; + + public static final String SERIALIZED_NAME_CONFIG_ID = "config_id"; + @SerializedName(SERIALIZED_NAME_CONFIG_ID) + private String configId; + + public GetConfig200ResponseMfaConfig() { + } + /** + * Get name + * @return name + **/ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + /** + * Get providerType + * @return providerType + **/ + @javax.annotation.Nonnull + public String getProviderType() { + return providerType; + } + + + public void setProviderType(String providerType) { + this.providerType = providerType; + } + + /** + * Get configId + * @return configId + **/ + @javax.annotation.Nonnull + public String getConfigId() { + return configId; + } + + + public void setConfigId(String configId) { + this.configId = configId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetConfig200ResponseMfaConfig getConfig200ResponseMfaConfig = (GetConfig200ResponseMfaConfig) o; + return Objects.equals(this.name, getConfig200ResponseMfaConfig.name) && + Objects.equals(this.providerType, getConfig200ResponseMfaConfig.providerType) && + Objects.equals(this.configId, getConfig200ResponseMfaConfig.configId); + } + + @Override + public int hashCode() { + return Objects.hash(name, providerType, configId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetConfig200ResponseMfaConfig {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" providerType: ").append(toIndentedString(providerType)).append("\n"); + sb.append(" configId: ").append(toIndentedString(configId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("provider_type"); + openapiFields.add("config_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("provider_type"); + openapiRequiredFields.add("config_id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetConfig200ResponseMfaConfig + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetConfig200ResponseMfaConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetConfig200ResponseMfaConfig is not found in the empty JSON string", GetConfig200ResponseMfaConfig.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetConfig200ResponseMfaConfig.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("provider_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `provider_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("provider_type").toString())); + } + if (!jsonObj.get("config_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `config_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("config_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetConfig200ResponseMfaConfig.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetConfig200ResponseMfaConfig' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetConfig200ResponseMfaConfig.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetConfig200ResponseMfaConfig value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetConfig200ResponseMfaConfig read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetConfig200ResponseMfaConfig given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetConfig200ResponseMfaConfig + * @throws IOException if the JSON string is invalid with respect to GetConfig200ResponseMfaConfig + */ + public static GetConfig200ResponseMfaConfig fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetConfig200ResponseMfaConfig.class); + } + + /** + * Convert an instance of GetConfig200ResponseMfaConfig to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/GetMembers200ResponseInner.java b/src/main/java/com/idmesh/model/GetMembers200ResponseInner.java new file mode 100644 index 0000000..2a33a0e --- /dev/null +++ b/src/main/java/com/idmesh/model/GetMembers200ResponseInner.java @@ -0,0 +1,494 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.TreeNode; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * GetMembers200ResponseInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetMembers200ResponseInner { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_NODE_ID = "node_id"; + @SerializedName(SERIALIZED_NAME_NODE_ID) + private String nodeId; + + public static final String SERIALIZED_NAME_USER_ID = "user_id"; + @SerializedName(SERIALIZED_NAME_USER_ID) + private String userId; + + public static final String SERIALIZED_NAME_PATH = "path"; + @SerializedName(SERIALIZED_NAME_PATH) + private String path; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + private String displayName; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + private String username; + + public static final String SERIALIZED_NAME_RELATION_TYPE = "relation_type"; + @SerializedName(SERIALIZED_NAME_RELATION_TYPE) + private String relationType; + + public static final String SERIALIZED_NAME_RELATION_DATA = "relation_data"; + @SerializedName(SERIALIZED_NAME_RELATION_DATA) + private String relationData; + + public static final String SERIALIZED_NAME_IS_DEFAULT = "is_default"; + @SerializedName(SERIALIZED_NAME_IS_DEFAULT) + private String isDefault; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private OffsetDateTime timeCreated; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private OffsetDateTime timeModified; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_TREE_NODE = "tree_node"; + @SerializedName(SERIALIZED_NAME_TREE_NODE) + private TreeNode treeNode; + + public GetMembers200ResponseInner() { + } + /** + * 全局唯一ID + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * 节点ID + * @return nodeId + **/ + @javax.annotation.Nonnull + public String getNodeId() { + return nodeId; + } + + + public void setNodeId(String nodeId) { + this.nodeId = nodeId; + } + + /** + * 用户ID + * @return userId + **/ + @javax.annotation.Nonnull + public String getUserId() { + return userId; + } + + + public void setUserId(String userId) { + this.userId = userId; + } + + /** + * 所属组织关系路径 + * @return path + **/ + @javax.annotation.Nonnull + public String getPath() { + return path; + } + + + public void setPath(String path) { + this.path = path; + } + + /** + * 显示名 + * @return displayName + **/ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + /** + * 用户名 + * @return username + **/ + @javax.annotation.Nonnull + public String getUsername() { + return username; + } + + + public void setUsername(String username) { + this.username = username; + } + + /** + * 关联类型(用于区分多重关联) + * @return relationType + **/ + @javax.annotation.Nullable + public String getRelationType() { + return relationType; + } + + + public void setRelationType(String relationType) { + this.relationType = relationType; + } + + /** + * 关联扩展信息 + * @return relationData + **/ + @javax.annotation.Nullable + public String getRelationData() { + return relationData; + } + + + public void setRelationData(String relationData) { + this.relationData = relationData; + } + + /** + * 是否默认关系 + * @return isDefault + **/ + @javax.annotation.Nullable + public String getIsDefault() { + return isDefault; + } + + + public void setIsDefault(String isDefault) { + this.isDefault = isDefault; + } + + /** + * 创建时间 + * @return timeCreated + **/ + @javax.annotation.Nonnull + public OffsetDateTime getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(OffsetDateTime timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * 修改时间 + * @return timeModified + **/ + @javax.annotation.Nonnull + public OffsetDateTime getTimeModified() { + return timeModified; + } + + + public void setTimeModified(OffsetDateTime timeModified) { + this.timeModified = timeModified; + } + + /** + * 状态 + * @return status + **/ + @javax.annotation.Nonnull + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + /** + * Get treeNode + * @return treeNode + **/ + @javax.annotation.Nonnull + public TreeNode getTreeNode() { + return treeNode; + } + + + public void setTreeNode(TreeNode treeNode) { + this.treeNode = treeNode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMembers200ResponseInner getMembers200ResponseInner = (GetMembers200ResponseInner) o; + return Objects.equals(this.id, getMembers200ResponseInner.id) && + Objects.equals(this.nodeId, getMembers200ResponseInner.nodeId) && + Objects.equals(this.userId, getMembers200ResponseInner.userId) && + Objects.equals(this.path, getMembers200ResponseInner.path) && + Objects.equals(this.displayName, getMembers200ResponseInner.displayName) && + Objects.equals(this.username, getMembers200ResponseInner.username) && + Objects.equals(this.relationType, getMembers200ResponseInner.relationType) && + Objects.equals(this.relationData, getMembers200ResponseInner.relationData) && + Objects.equals(this.isDefault, getMembers200ResponseInner.isDefault) && + Objects.equals(this.timeCreated, getMembers200ResponseInner.timeCreated) && + Objects.equals(this.timeModified, getMembers200ResponseInner.timeModified) && + Objects.equals(this.status, getMembers200ResponseInner.status) && + Objects.equals(this.treeNode, getMembers200ResponseInner.treeNode); + } + + @Override + public int hashCode() { + return Objects.hash(id, nodeId, userId, path, displayName, username, relationType, relationData, isDefault, timeCreated, timeModified, status, treeNode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetMembers200ResponseInner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" nodeId: ").append(toIndentedString(nodeId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" relationType: ").append(toIndentedString(relationType)).append("\n"); + sb.append(" relationData: ").append(toIndentedString(relationData)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" treeNode: ").append(toIndentedString(treeNode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("node_id"); + openapiFields.add("user_id"); + openapiFields.add("path"); + openapiFields.add("display_name"); + openapiFields.add("username"); + openapiFields.add("relation_type"); + openapiFields.add("relation_data"); + openapiFields.add("is_default"); + openapiFields.add("time_created"); + openapiFields.add("time_modified"); + openapiFields.add("status"); + openapiFields.add("tree_node"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("node_id"); + openapiRequiredFields.add("user_id"); + openapiRequiredFields.add("path"); + openapiRequiredFields.add("display_name"); + openapiRequiredFields.add("username"); + openapiRequiredFields.add("time_created"); + openapiRequiredFields.add("time_modified"); + openapiRequiredFields.add("status"); + openapiRequiredFields.add("tree_node"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetMembers200ResponseInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetMembers200ResponseInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetMembers200ResponseInner is not found in the empty JSON string", GetMembers200ResponseInner.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetMembers200ResponseInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("node_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `node_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("node_id").toString())); + } + if (!jsonObj.get("user_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_id").toString())); + } + if (!jsonObj.get("path").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); + } + if (!jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + if (!jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if ((jsonObj.get("relation_type") != null && !jsonObj.get("relation_type").isJsonNull()) && !jsonObj.get("relation_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `relation_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("relation_type").toString())); + } + if ((jsonObj.get("relation_data") != null && !jsonObj.get("relation_data").isJsonNull()) && !jsonObj.get("relation_data").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `relation_data` to be a primitive type in the JSON string but got `%s`", jsonObj.get("relation_data").toString())); + } + if ((jsonObj.get("is_default") != null && !jsonObj.get("is_default").isJsonNull()) && !jsonObj.get("is_default").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `is_default` to be a primitive type in the JSON string but got `%s`", jsonObj.get("is_default").toString())); + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + // validate the required field `tree_node` + TreeNode.validateJsonElement(jsonObj.get("tree_node")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetMembers200ResponseInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetMembers200ResponseInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetMembers200ResponseInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetMembers200ResponseInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetMembers200ResponseInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetMembers200ResponseInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetMembers200ResponseInner + * @throws IOException if the JSON string is invalid with respect to GetMembers200ResponseInner + */ + public static GetMembers200ResponseInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetMembers200ResponseInner.class); + } + + /** + * Convert an instance of GetMembers200ResponseInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/GetNodeMembers200Response.java b/src/main/java/com/idmesh/model/GetNodeMembers200Response.java new file mode 100644 index 0000000..19667eb --- /dev/null +++ b/src/main/java/com/idmesh/model/GetNodeMembers200Response.java @@ -0,0 +1,256 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.GetNodeMembers200ResponseDataInner; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * GetNodeMembers200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetNodeMembers200Response { + public static final String SERIALIZED_NAME_TOTAL_NUM = "total_num"; + @SerializedName(SERIALIZED_NAME_TOTAL_NUM) + private Integer totalNum; + + public static final String SERIALIZED_NAME_CURRENT_PAGE = "current_page"; + @SerializedName(SERIALIZED_NAME_CURRENT_PAGE) + private Integer currentPage; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = new ArrayList<>(); + + public GetNodeMembers200Response() { + } + /** + * 总数 + * @return totalNum + **/ + @javax.annotation.Nonnull + public Integer getTotalNum() { + return totalNum; + } + + + public void setTotalNum(Integer totalNum) { + this.totalNum = totalNum; + } + + /** + * 当前页码 + * @return currentPage + **/ + @javax.annotation.Nonnull + public Integer getCurrentPage() { + return currentPage; + } + + + public void setCurrentPage(Integer currentPage) { + this.currentPage = currentPage; + } + + /** + * 数据 + * @return data + **/ + @javax.annotation.Nonnull + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetNodeMembers200Response getNodeMembers200Response = (GetNodeMembers200Response) o; + return Objects.equals(this.totalNum, getNodeMembers200Response.totalNum) && + Objects.equals(this.currentPage, getNodeMembers200Response.currentPage) && + Objects.equals(this.data, getNodeMembers200Response.data); + } + + @Override + public int hashCode() { + return Objects.hash(totalNum, currentPage, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetNodeMembers200Response {\n"); + sb.append(" totalNum: ").append(toIndentedString(totalNum)).append("\n"); + sb.append(" currentPage: ").append(toIndentedString(currentPage)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("total_num"); + openapiFields.add("current_page"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("total_num"); + openapiRequiredFields.add("current_page"); + openapiRequiredFields.add("data"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetNodeMembers200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetNodeMembers200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetNodeMembers200Response is not found in the empty JSON string", GetNodeMembers200Response.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetNodeMembers200Response.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + // validate the required field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + GetNodeMembers200ResponseDataInner.validateJsonElement(jsonArraydata.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetNodeMembers200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetNodeMembers200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetNodeMembers200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetNodeMembers200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetNodeMembers200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetNodeMembers200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetNodeMembers200Response + * @throws IOException if the JSON string is invalid with respect to GetNodeMembers200Response + */ + public static GetNodeMembers200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetNodeMembers200Response.class); + } + + /** + * Convert an instance of GetNodeMembers200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/GetNodeMembers200ResponseDataInner.java b/src/main/java/com/idmesh/model/GetNodeMembers200ResponseDataInner.java new file mode 100644 index 0000000..a0aaeff --- /dev/null +++ b/src/main/java/com/idmesh/model/GetNodeMembers200ResponseDataInner.java @@ -0,0 +1,287 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.GetNodeMembers200ResponseDataInnerNodeInfoInner; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * GetNodeMembers200ResponseDataInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetNodeMembers200ResponseDataInner { + public static final String SERIALIZED_NAME_USER_ID = "user_id"; + @SerializedName(SERIALIZED_NAME_USER_ID) + private String userId; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + private String username; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + private String displayName; + + public static final String SERIALIZED_NAME_NODE_INFO = "node_info"; + @SerializedName(SERIALIZED_NAME_NODE_INFO) + private List nodeInfo = new ArrayList<>(); + + public GetNodeMembers200ResponseDataInner() { + } + /** + * 用户ID + * @return userId + **/ + @javax.annotation.Nonnull + public String getUserId() { + return userId; + } + + + public void setUserId(String userId) { + this.userId = userId; + } + + /** + * 用户名 + * @return username + **/ + @javax.annotation.Nonnull + public String getUsername() { + return username; + } + + + public void setUsername(String username) { + this.username = username; + } + + /** + * 用户显示名 + * @return displayName + **/ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + /** + * 用户节点信息 + * @return nodeInfo + **/ + @javax.annotation.Nonnull + public List getNodeInfo() { + return nodeInfo; + } + + + public void setNodeInfo(List nodeInfo) { + this.nodeInfo = nodeInfo; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetNodeMembers200ResponseDataInner getNodeMembers200ResponseDataInner = (GetNodeMembers200ResponseDataInner) o; + return Objects.equals(this.userId, getNodeMembers200ResponseDataInner.userId) && + Objects.equals(this.username, getNodeMembers200ResponseDataInner.username) && + Objects.equals(this.displayName, getNodeMembers200ResponseDataInner.displayName) && + Objects.equals(this.nodeInfo, getNodeMembers200ResponseDataInner.nodeInfo); + } + + @Override + public int hashCode() { + return Objects.hash(userId, username, displayName, nodeInfo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetNodeMembers200ResponseDataInner {\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" nodeInfo: ").append(toIndentedString(nodeInfo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("user_id"); + openapiFields.add("username"); + openapiFields.add("display_name"); + openapiFields.add("node_info"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("user_id"); + openapiRequiredFields.add("username"); + openapiRequiredFields.add("display_name"); + openapiRequiredFields.add("node_info"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetNodeMembers200ResponseDataInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetNodeMembers200ResponseDataInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetNodeMembers200ResponseDataInner is not found in the empty JSON string", GetNodeMembers200ResponseDataInner.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetNodeMembers200ResponseDataInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("user_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_id").toString())); + } + if (!jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if (!jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + // ensure the json data is an array + if (!jsonObj.get("node_info").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `node_info` to be an array in the JSON string but got `%s`", jsonObj.get("node_info").toString())); + } + + JsonArray jsonArraynodeInfo = jsonObj.getAsJsonArray("node_info"); + // validate the required field `node_info` (array) + for (int i = 0; i < jsonArraynodeInfo.size(); i++) { + GetNodeMembers200ResponseDataInnerNodeInfoInner.validateJsonElement(jsonArraynodeInfo.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetNodeMembers200ResponseDataInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetNodeMembers200ResponseDataInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetNodeMembers200ResponseDataInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetNodeMembers200ResponseDataInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetNodeMembers200ResponseDataInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetNodeMembers200ResponseDataInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetNodeMembers200ResponseDataInner + * @throws IOException if the JSON string is invalid with respect to GetNodeMembers200ResponseDataInner + */ + public static GetNodeMembers200ResponseDataInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetNodeMembers200ResponseDataInner.class); + } + + /** + * Convert an instance of GetNodeMembers200ResponseDataInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/GetNodeMembers200ResponseDataInnerNodeInfoInner.java b/src/main/java/com/idmesh/model/GetNodeMembers200ResponseDataInnerNodeInfoInner.java new file mode 100644 index 0000000..e62e3c2 --- /dev/null +++ b/src/main/java/com/idmesh/model/GetNodeMembers200ResponseDataInnerNodeInfoInner.java @@ -0,0 +1,469 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * GetNodeMembers200ResponseDataInnerNodeInfoInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetNodeMembers200ResponseDataInnerNodeInfoInner { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_NODE_ID = "node_id"; + @SerializedName(SERIALIZED_NAME_NODE_ID) + private String nodeId; + + public static final String SERIALIZED_NAME_USER_ID = "user_id"; + @SerializedName(SERIALIZED_NAME_USER_ID) + private String userId; + + public static final String SERIALIZED_NAME_PATH = "path"; + @SerializedName(SERIALIZED_NAME_PATH) + private String path; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + private String displayName; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + private String username; + + public static final String SERIALIZED_NAME_RELATION_TYPE = "relation_type"; + @SerializedName(SERIALIZED_NAME_RELATION_TYPE) + private String relationType; + + public static final String SERIALIZED_NAME_RELATION_DATA = "relation_data"; + @SerializedName(SERIALIZED_NAME_RELATION_DATA) + private String relationData; + + public static final String SERIALIZED_NAME_IS_DEFAULT = "is_default"; + @SerializedName(SERIALIZED_NAME_IS_DEFAULT) + private String isDefault; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private OffsetDateTime timeCreated; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private OffsetDateTime timeModified; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public GetNodeMembers200ResponseDataInnerNodeInfoInner() { + } + /** + * 全局唯一ID + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * 节点ID + * @return nodeId + **/ + @javax.annotation.Nonnull + public String getNodeId() { + return nodeId; + } + + + public void setNodeId(String nodeId) { + this.nodeId = nodeId; + } + + /** + * 用户ID + * @return userId + **/ + @javax.annotation.Nonnull + public String getUserId() { + return userId; + } + + + public void setUserId(String userId) { + this.userId = userId; + } + + /** + * 所属组织关系路径 + * @return path + **/ + @javax.annotation.Nonnull + public String getPath() { + return path; + } + + + public void setPath(String path) { + this.path = path; + } + + /** + * 显示名 + * @return displayName + **/ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + /** + * 用户名 + * @return username + **/ + @javax.annotation.Nonnull + public String getUsername() { + return username; + } + + + public void setUsername(String username) { + this.username = username; + } + + /** + * 关联类型(用于区分多重关联) + * @return relationType + **/ + @javax.annotation.Nullable + public String getRelationType() { + return relationType; + } + + + public void setRelationType(String relationType) { + this.relationType = relationType; + } + + /** + * 关联扩展信息 + * @return relationData + **/ + @javax.annotation.Nullable + public String getRelationData() { + return relationData; + } + + + public void setRelationData(String relationData) { + this.relationData = relationData; + } + + /** + * 是否默认关系 + * @return isDefault + **/ + @javax.annotation.Nullable + public String getIsDefault() { + return isDefault; + } + + + public void setIsDefault(String isDefault) { + this.isDefault = isDefault; + } + + /** + * 创建时间 + * @return timeCreated + **/ + @javax.annotation.Nonnull + public OffsetDateTime getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(OffsetDateTime timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * 修改时间 + * @return timeModified + **/ + @javax.annotation.Nonnull + public OffsetDateTime getTimeModified() { + return timeModified; + } + + + public void setTimeModified(OffsetDateTime timeModified) { + this.timeModified = timeModified; + } + + /** + * 状态 + * @return status + **/ + @javax.annotation.Nonnull + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetNodeMembers200ResponseDataInnerNodeInfoInner getNodeMembers200ResponseDataInnerNodeInfoInner = (GetNodeMembers200ResponseDataInnerNodeInfoInner) o; + return Objects.equals(this.id, getNodeMembers200ResponseDataInnerNodeInfoInner.id) && + Objects.equals(this.nodeId, getNodeMembers200ResponseDataInnerNodeInfoInner.nodeId) && + Objects.equals(this.userId, getNodeMembers200ResponseDataInnerNodeInfoInner.userId) && + Objects.equals(this.path, getNodeMembers200ResponseDataInnerNodeInfoInner.path) && + Objects.equals(this.displayName, getNodeMembers200ResponseDataInnerNodeInfoInner.displayName) && + Objects.equals(this.username, getNodeMembers200ResponseDataInnerNodeInfoInner.username) && + Objects.equals(this.relationType, getNodeMembers200ResponseDataInnerNodeInfoInner.relationType) && + Objects.equals(this.relationData, getNodeMembers200ResponseDataInnerNodeInfoInner.relationData) && + Objects.equals(this.isDefault, getNodeMembers200ResponseDataInnerNodeInfoInner.isDefault) && + Objects.equals(this.timeCreated, getNodeMembers200ResponseDataInnerNodeInfoInner.timeCreated) && + Objects.equals(this.timeModified, getNodeMembers200ResponseDataInnerNodeInfoInner.timeModified) && + Objects.equals(this.status, getNodeMembers200ResponseDataInnerNodeInfoInner.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, nodeId, userId, path, displayName, username, relationType, relationData, isDefault, timeCreated, timeModified, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetNodeMembers200ResponseDataInnerNodeInfoInner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" nodeId: ").append(toIndentedString(nodeId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" relationType: ").append(toIndentedString(relationType)).append("\n"); + sb.append(" relationData: ").append(toIndentedString(relationData)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("node_id"); + openapiFields.add("user_id"); + openapiFields.add("path"); + openapiFields.add("display_name"); + openapiFields.add("username"); + openapiFields.add("relation_type"); + openapiFields.add("relation_data"); + openapiFields.add("is_default"); + openapiFields.add("time_created"); + openapiFields.add("time_modified"); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("node_id"); + openapiRequiredFields.add("user_id"); + openapiRequiredFields.add("path"); + openapiRequiredFields.add("display_name"); + openapiRequiredFields.add("username"); + openapiRequiredFields.add("time_created"); + openapiRequiredFields.add("time_modified"); + openapiRequiredFields.add("status"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetNodeMembers200ResponseDataInnerNodeInfoInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetNodeMembers200ResponseDataInnerNodeInfoInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetNodeMembers200ResponseDataInnerNodeInfoInner is not found in the empty JSON string", GetNodeMembers200ResponseDataInnerNodeInfoInner.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetNodeMembers200ResponseDataInnerNodeInfoInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("node_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `node_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("node_id").toString())); + } + if (!jsonObj.get("user_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_id").toString())); + } + if (!jsonObj.get("path").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); + } + if (!jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + if (!jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if ((jsonObj.get("relation_type") != null && !jsonObj.get("relation_type").isJsonNull()) && !jsonObj.get("relation_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `relation_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("relation_type").toString())); + } + if ((jsonObj.get("relation_data") != null && !jsonObj.get("relation_data").isJsonNull()) && !jsonObj.get("relation_data").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `relation_data` to be a primitive type in the JSON string but got `%s`", jsonObj.get("relation_data").toString())); + } + if ((jsonObj.get("is_default") != null && !jsonObj.get("is_default").isJsonNull()) && !jsonObj.get("is_default").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `is_default` to be a primitive type in the JSON string but got `%s`", jsonObj.get("is_default").toString())); + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetNodeMembers200ResponseDataInnerNodeInfoInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetNodeMembers200ResponseDataInnerNodeInfoInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetNodeMembers200ResponseDataInnerNodeInfoInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetNodeMembers200ResponseDataInnerNodeInfoInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetNodeMembers200ResponseDataInnerNodeInfoInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetNodeMembers200ResponseDataInnerNodeInfoInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetNodeMembers200ResponseDataInnerNodeInfoInner + * @throws IOException if the JSON string is invalid with respect to GetNodeMembers200ResponseDataInnerNodeInfoInner + */ + public static GetNodeMembers200ResponseDataInnerNodeInfoInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetNodeMembers200ResponseDataInnerNodeInfoInner.class); + } + + /** + * Convert an instance of GetNodeMembers200ResponseDataInnerNodeInfoInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/GetOrganization200ResponseInner.java b/src/main/java/com/idmesh/model/GetOrganization200ResponseInner.java new file mode 100644 index 0000000..2095078 --- /dev/null +++ b/src/main/java/com/idmesh/model/GetOrganization200ResponseInner.java @@ -0,0 +1,394 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * GetOrganization200ResponseInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetOrganization200ResponseInner { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_OBJECT_DISPLAY_NAME = "object_display_name"; + @SerializedName(SERIALIZED_NAME_OBJECT_DISPLAY_NAME) + private String objectDisplayName; + + public static final String SERIALIZED_NAME_OBJECT_TYPE = "object_type"; + @SerializedName(SERIALIZED_NAME_OBJECT_TYPE) + private String objectType; + + public static final String SERIALIZED_NAME_OBJECT_CODE = "object_code"; + @SerializedName(SERIALIZED_NAME_OBJECT_CODE) + private String objectCode; + + public static final String SERIALIZED_NAME_OBJECT_PROPS = "object_props"; + @SerializedName(SERIALIZED_NAME_OBJECT_PROPS) + private Object objectProps; + + public static final String SERIALIZED_NAME_IS_DEFAULT = "is_default"; + @SerializedName(SERIALIZED_NAME_IS_DEFAULT) + private String isDefault; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public GetOrganization200ResponseInner() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * Get objectDisplayName + * @return objectDisplayName + **/ + @javax.annotation.Nonnull + public String getObjectDisplayName() { + return objectDisplayName; + } + + + public void setObjectDisplayName(String objectDisplayName) { + this.objectDisplayName = objectDisplayName; + } + + /** + * 固定值:tree + * @return objectType + **/ + @javax.annotation.Nonnull + public String getObjectType() { + return objectType; + } + + + public void setObjectType(String objectType) { + this.objectType = objectType; + } + + /** + * 唯一,不可改,外键关联引用 + * @return objectCode + **/ + @javax.annotation.Nonnull + public String getObjectCode() { + return objectCode; + } + + + public void setObjectCode(String objectCode) { + this.objectCode = objectCode; + } + + /** + * Get objectProps + * @return objectProps + **/ + @javax.annotation.Nullable + public Object getObjectProps() { + return objectProps; + } + + + public void setObjectProps(Object objectProps) { + this.objectProps = objectProps; + } + + /** + * 是否默认组织关系,1是,0否 + * @return isDefault + **/ + @javax.annotation.Nullable + public String getIsDefault() { + return isDefault; + } + + + public void setIsDefault(String isDefault) { + this.isDefault = isDefault; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + /** + * Get timeCreated + * @return timeCreated + **/ + @javax.annotation.Nullable + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * Get timeModified + * @return timeModified + **/ + @javax.annotation.Nullable + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOrganization200ResponseInner getOrganization200ResponseInner = (GetOrganization200ResponseInner) o; + return Objects.equals(this.id, getOrganization200ResponseInner.id) && + Objects.equals(this.objectDisplayName, getOrganization200ResponseInner.objectDisplayName) && + Objects.equals(this.objectType, getOrganization200ResponseInner.objectType) && + Objects.equals(this.objectCode, getOrganization200ResponseInner.objectCode) && + Objects.equals(this.objectProps, getOrganization200ResponseInner.objectProps) && + Objects.equals(this.isDefault, getOrganization200ResponseInner.isDefault) && + Objects.equals(this.status, getOrganization200ResponseInner.status) && + Objects.equals(this.timeCreated, getOrganization200ResponseInner.timeCreated) && + Objects.equals(this.timeModified, getOrganization200ResponseInner.timeModified); + } + + @Override + public int hashCode() { + return Objects.hash(id, objectDisplayName, objectType, objectCode, objectProps, isDefault, status, timeCreated, timeModified); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetOrganization200ResponseInner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" objectDisplayName: ").append(toIndentedString(objectDisplayName)).append("\n"); + sb.append(" objectType: ").append(toIndentedString(objectType)).append("\n"); + sb.append(" objectCode: ").append(toIndentedString(objectCode)).append("\n"); + sb.append(" objectProps: ").append(toIndentedString(objectProps)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("object_display_name"); + openapiFields.add("object_type"); + openapiFields.add("object_code"); + openapiFields.add("object_props"); + openapiFields.add("is_default"); + openapiFields.add("status"); + openapiFields.add("time_created"); + openapiFields.add("time_modified"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("object_display_name"); + openapiRequiredFields.add("object_type"); + openapiRequiredFields.add("object_code"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetOrganization200ResponseInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetOrganization200ResponseInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetOrganization200ResponseInner is not found in the empty JSON string", GetOrganization200ResponseInner.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetOrganization200ResponseInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("object_display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_display_name").toString())); + } + if (!jsonObj.get("object_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_type").toString())); + } + if (!jsonObj.get("object_code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_code").toString())); + } + if ((jsonObj.get("is_default") != null && !jsonObj.get("is_default").isJsonNull()) && !jsonObj.get("is_default").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `is_default` to be a primitive type in the JSON string but got `%s`", jsonObj.get("is_default").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("time_created") != null && !jsonObj.get("time_created").isJsonNull()) && !jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if ((jsonObj.get("time_modified") != null && !jsonObj.get("time_modified").isJsonNull()) && !jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetOrganization200ResponseInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetOrganization200ResponseInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetOrganization200ResponseInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetOrganization200ResponseInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetOrganization200ResponseInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetOrganization200ResponseInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetOrganization200ResponseInner + * @throws IOException if the JSON string is invalid with respect to GetOrganization200ResponseInner + */ + public static GetOrganization200ResponseInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetOrganization200ResponseInner.class); + } + + /** + * Convert an instance of GetOrganization200ResponseInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/GetOrganizations200ResponseInner.java b/src/main/java/com/idmesh/model/GetOrganizations200ResponseInner.java new file mode 100644 index 0000000..942d6f1 --- /dev/null +++ b/src/main/java/com/idmesh/model/GetOrganizations200ResponseInner.java @@ -0,0 +1,394 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * GetOrganizations200ResponseInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetOrganizations200ResponseInner { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_OBJECT_DISPLAY_NAME = "object_display_name"; + @SerializedName(SERIALIZED_NAME_OBJECT_DISPLAY_NAME) + private String objectDisplayName; + + public static final String SERIALIZED_NAME_OBJECT_TYPE = "object_type"; + @SerializedName(SERIALIZED_NAME_OBJECT_TYPE) + private String objectType; + + public static final String SERIALIZED_NAME_OBJECT_CODE = "object_code"; + @SerializedName(SERIALIZED_NAME_OBJECT_CODE) + private String objectCode; + + public static final String SERIALIZED_NAME_OBJECT_PROPS = "object_props"; + @SerializedName(SERIALIZED_NAME_OBJECT_PROPS) + private Object objectProps; + + public static final String SERIALIZED_NAME_IS_DEFAULT = "is_default"; + @SerializedName(SERIALIZED_NAME_IS_DEFAULT) + private String isDefault; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public GetOrganizations200ResponseInner() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * Get objectDisplayName + * @return objectDisplayName + **/ + @javax.annotation.Nonnull + public String getObjectDisplayName() { + return objectDisplayName; + } + + + public void setObjectDisplayName(String objectDisplayName) { + this.objectDisplayName = objectDisplayName; + } + + /** + * 固定值:tree + * @return objectType + **/ + @javax.annotation.Nonnull + public String getObjectType() { + return objectType; + } + + + public void setObjectType(String objectType) { + this.objectType = objectType; + } + + /** + * 唯一,不可改,外键关联引用 + * @return objectCode + **/ + @javax.annotation.Nonnull + public String getObjectCode() { + return objectCode; + } + + + public void setObjectCode(String objectCode) { + this.objectCode = objectCode; + } + + /** + * Get objectProps + * @return objectProps + **/ + @javax.annotation.Nullable + public Object getObjectProps() { + return objectProps; + } + + + public void setObjectProps(Object objectProps) { + this.objectProps = objectProps; + } + + /** + * 是否默认组织关系,1是,0否 + * @return isDefault + **/ + @javax.annotation.Nullable + public String getIsDefault() { + return isDefault; + } + + + public void setIsDefault(String isDefault) { + this.isDefault = isDefault; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + /** + * Get timeCreated + * @return timeCreated + **/ + @javax.annotation.Nullable + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * Get timeModified + * @return timeModified + **/ + @javax.annotation.Nullable + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOrganizations200ResponseInner getOrganizations200ResponseInner = (GetOrganizations200ResponseInner) o; + return Objects.equals(this.id, getOrganizations200ResponseInner.id) && + Objects.equals(this.objectDisplayName, getOrganizations200ResponseInner.objectDisplayName) && + Objects.equals(this.objectType, getOrganizations200ResponseInner.objectType) && + Objects.equals(this.objectCode, getOrganizations200ResponseInner.objectCode) && + Objects.equals(this.objectProps, getOrganizations200ResponseInner.objectProps) && + Objects.equals(this.isDefault, getOrganizations200ResponseInner.isDefault) && + Objects.equals(this.status, getOrganizations200ResponseInner.status) && + Objects.equals(this.timeCreated, getOrganizations200ResponseInner.timeCreated) && + Objects.equals(this.timeModified, getOrganizations200ResponseInner.timeModified); + } + + @Override + public int hashCode() { + return Objects.hash(id, objectDisplayName, objectType, objectCode, objectProps, isDefault, status, timeCreated, timeModified); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetOrganizations200ResponseInner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" objectDisplayName: ").append(toIndentedString(objectDisplayName)).append("\n"); + sb.append(" objectType: ").append(toIndentedString(objectType)).append("\n"); + sb.append(" objectCode: ").append(toIndentedString(objectCode)).append("\n"); + sb.append(" objectProps: ").append(toIndentedString(objectProps)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("object_display_name"); + openapiFields.add("object_type"); + openapiFields.add("object_code"); + openapiFields.add("object_props"); + openapiFields.add("is_default"); + openapiFields.add("status"); + openapiFields.add("time_created"); + openapiFields.add("time_modified"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("object_display_name"); + openapiRequiredFields.add("object_type"); + openapiRequiredFields.add("object_code"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetOrganizations200ResponseInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetOrganizations200ResponseInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetOrganizations200ResponseInner is not found in the empty JSON string", GetOrganizations200ResponseInner.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetOrganizations200ResponseInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("object_display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_display_name").toString())); + } + if (!jsonObj.get("object_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_type").toString())); + } + if (!jsonObj.get("object_code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_code").toString())); + } + if ((jsonObj.get("is_default") != null && !jsonObj.get("is_default").isJsonNull()) && !jsonObj.get("is_default").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `is_default` to be a primitive type in the JSON string but got `%s`", jsonObj.get("is_default").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("time_created") != null && !jsonObj.get("time_created").isJsonNull()) && !jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if ((jsonObj.get("time_modified") != null && !jsonObj.get("time_modified").isJsonNull()) && !jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetOrganizations200ResponseInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetOrganizations200ResponseInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetOrganizations200ResponseInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetOrganizations200ResponseInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetOrganizations200ResponseInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetOrganizations200ResponseInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetOrganizations200ResponseInner + * @throws IOException if the JSON string is invalid with respect to GetOrganizations200ResponseInner + */ + public static GetOrganizations200ResponseInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetOrganizations200ResponseInner.class); + } + + /** + * Convert an instance of GetOrganizations200ResponseInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/GetPrivileges200Response.java b/src/main/java/com/idmesh/model/GetPrivileges200Response.java new file mode 100644 index 0000000..093e8ee --- /dev/null +++ b/src/main/java/com/idmesh/model/GetPrivileges200Response.java @@ -0,0 +1,251 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.Privilege; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * GetPrivileges200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetPrivileges200Response { + public static final String SERIALIZED_NAME_TOTAL_NUM = "total_num"; + @SerializedName(SERIALIZED_NAME_TOTAL_NUM) + private BigDecimal totalNum; + + public static final String SERIALIZED_NAME_CURRENT_PAGE = "current_page"; + @SerializedName(SERIALIZED_NAME_CURRENT_PAGE) + private BigDecimal currentPage; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data; + + public GetPrivileges200Response() { + } + /** + * 数据总数 + * @return totalNum + **/ + @javax.annotation.Nullable + public BigDecimal getTotalNum() { + return totalNum; + } + + + public void setTotalNum(BigDecimal totalNum) { + this.totalNum = totalNum; + } + + /** + * 当前页数(废弃) + * @return currentPage + **/ + @javax.annotation.Nullable + public BigDecimal getCurrentPage() { + return currentPage; + } + + + public void setCurrentPage(BigDecimal currentPage) { + this.currentPage = currentPage; + } + + /** + * 数据列表 + * @return data + **/ + @javax.annotation.Nullable + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPrivileges200Response getPrivileges200Response = (GetPrivileges200Response) o; + return Objects.equals(this.totalNum, getPrivileges200Response.totalNum) && + Objects.equals(this.currentPage, getPrivileges200Response.currentPage) && + Objects.equals(this.data, getPrivileges200Response.data); + } + + @Override + public int hashCode() { + return Objects.hash(totalNum, currentPage, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetPrivileges200Response {\n"); + sb.append(" totalNum: ").append(toIndentedString(totalNum)).append("\n"); + sb.append(" currentPage: ").append(toIndentedString(currentPage)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("total_num"); + openapiFields.add("current_page"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetPrivileges200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetPrivileges200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetPrivileges200Response is not found in the empty JSON string", GetPrivileges200Response.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + Privilege.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetPrivileges200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetPrivileges200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetPrivileges200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetPrivileges200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetPrivileges200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetPrivileges200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetPrivileges200Response + * @throws IOException if the JSON string is invalid with respect to GetPrivileges200Response + */ + public static GetPrivileges200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetPrivileges200Response.class); + } + + /** + * Convert an instance of GetPrivileges200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/GetResource200Response.java b/src/main/java/com/idmesh/model/GetResource200Response.java new file mode 100644 index 0000000..76185bf --- /dev/null +++ b/src/main/java/com/idmesh/model/GetResource200Response.java @@ -0,0 +1,386 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * GetResource200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetResource200Response { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_DEVELOPER_ID = "developer_id"; + @SerializedName(SERIALIZED_NAME_DEVELOPER_ID) + private String developerId; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private String tenantId; + + public static final String SERIALIZED_NAME_APPLICATION_ID = "application_id"; + @SerializedName(SERIALIZED_NAME_APPLICATION_ID) + private String applicationId; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public GetResource200Response() { + } + /** + * 资源id + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * 开发者id + * @return developerId + **/ + @javax.annotation.Nullable + public String getDeveloperId() { + return developerId; + } + + + public void setDeveloperId(String developerId) { + this.developerId = developerId; + } + + /** + * 租户id + * @return tenantId + **/ + @javax.annotation.Nullable + public String getTenantId() { + return tenantId; + } + + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + /** + * 应用id + * @return applicationId + **/ + @javax.annotation.Nullable + public String getApplicationId() { + return applicationId; + } + + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * 描述 + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + /** + * 类型 + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * 代码 + * @return code + **/ + @javax.annotation.Nullable + public String getCode() { + return code; + } + + + public void setCode(String code) { + this.code = code; + } + + /** + * 修改时间 rfc3339 + * @return timeModified + **/ + @javax.annotation.Nullable + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + /** + * 创建时间 rfc3339 + * @return timeCreated + **/ + @javax.annotation.Nullable + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetResource200Response getResource200Response = (GetResource200Response) o; + return Objects.equals(this.id, getResource200Response.id) && + Objects.equals(this.developerId, getResource200Response.developerId) && + Objects.equals(this.tenantId, getResource200Response.tenantId) && + Objects.equals(this.applicationId, getResource200Response.applicationId) && + Objects.equals(this.description, getResource200Response.description) && + Objects.equals(this.type, getResource200Response.type) && + Objects.equals(this.code, getResource200Response.code) && + Objects.equals(this.timeModified, getResource200Response.timeModified) && + Objects.equals(this.timeCreated, getResource200Response.timeCreated); + } + + @Override + public int hashCode() { + return Objects.hash(id, developerId, tenantId, applicationId, description, type, code, timeModified, timeCreated); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetResource200Response {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" developerId: ").append(toIndentedString(developerId)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("developer_id"); + openapiFields.add("tenant_id"); + openapiFields.add("application_id"); + openapiFields.add("description"); + openapiFields.add("type"); + openapiFields.add("code"); + openapiFields.add("time_modified"); + openapiFields.add("time_created"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetResource200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetResource200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetResource200Response is not found in the empty JSON string", GetResource200Response.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("developer_id") != null && !jsonObj.get("developer_id").isJsonNull()) && !jsonObj.get("developer_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `developer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("developer_id").toString())); + } + if ((jsonObj.get("tenant_id") != null && !jsonObj.get("tenant_id").isJsonNull()) && !jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + if ((jsonObj.get("application_id") != null && !jsonObj.get("application_id").isJsonNull()) && !jsonObj.get("application_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `application_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("application_id").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if ((jsonObj.get("time_modified") != null && !jsonObj.get("time_modified").isJsonNull()) && !jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + if ((jsonObj.get("time_created") != null && !jsonObj.get("time_created").isJsonNull()) && !jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetResource200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetResource200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetResource200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetResource200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetResource200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetResource200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetResource200Response + * @throws IOException if the JSON string is invalid with respect to GetResource200Response + */ + public static GetResource200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetResource200Response.class); + } + + /** + * Convert an instance of GetResource200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/GetResourceMembers200Response.java b/src/main/java/com/idmesh/model/GetResourceMembers200Response.java new file mode 100644 index 0000000..b04fa05 --- /dev/null +++ b/src/main/java/com/idmesh/model/GetResourceMembers200Response.java @@ -0,0 +1,230 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.ResourceSetMember; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * GetResourceMembers200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetResourceMembers200Response { + public static final String SERIALIZED_NAME_TOTAL_NUM = "total_num"; + @SerializedName(SERIALIZED_NAME_TOTAL_NUM) + private BigDecimal totalNum; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data; + + public GetResourceMembers200Response() { + } + /** + * 数据总数 + * @return totalNum + **/ + @javax.annotation.Nullable + public BigDecimal getTotalNum() { + return totalNum; + } + + + public void setTotalNum(BigDecimal totalNum) { + this.totalNum = totalNum; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetResourceMembers200Response getResourceMembers200Response = (GetResourceMembers200Response) o; + return Objects.equals(this.totalNum, getResourceMembers200Response.totalNum) && + Objects.equals(this.data, getResourceMembers200Response.data); + } + + @Override + public int hashCode() { + return Objects.hash(totalNum, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetResourceMembers200Response {\n"); + sb.append(" totalNum: ").append(toIndentedString(totalNum)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("total_num"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetResourceMembers200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetResourceMembers200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetResourceMembers200Response is not found in the empty JSON string", GetResourceMembers200Response.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ResourceSetMember.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetResourceMembers200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetResourceMembers200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetResourceMembers200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetResourceMembers200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetResourceMembers200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetResourceMembers200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetResourceMembers200Response + * @throws IOException if the JSON string is invalid with respect to GetResourceMembers200Response + */ + public static GetResourceMembers200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetResourceMembers200Response.class); + } + + /** + * Convert an instance of GetResourceMembers200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/GetResourceSets200Response.java b/src/main/java/com/idmesh/model/GetResourceSets200Response.java new file mode 100644 index 0000000..1f50706 --- /dev/null +++ b/src/main/java/com/idmesh/model/GetResourceSets200Response.java @@ -0,0 +1,230 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.ResourceSet; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * GetResourceSets200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetResourceSets200Response { + public static final String SERIALIZED_NAME_TOTAL_NUM = "total_num"; + @SerializedName(SERIALIZED_NAME_TOTAL_NUM) + private BigDecimal totalNum; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data; + + public GetResourceSets200Response() { + } + /** + * 数据总数 + * @return totalNum + **/ + @javax.annotation.Nullable + public BigDecimal getTotalNum() { + return totalNum; + } + + + public void setTotalNum(BigDecimal totalNum) { + this.totalNum = totalNum; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetResourceSets200Response getResourceSets200Response = (GetResourceSets200Response) o; + return Objects.equals(this.totalNum, getResourceSets200Response.totalNum) && + Objects.equals(this.data, getResourceSets200Response.data); + } + + @Override + public int hashCode() { + return Objects.hash(totalNum, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetResourceSets200Response {\n"); + sb.append(" totalNum: ").append(toIndentedString(totalNum)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("total_num"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetResourceSets200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetResourceSets200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetResourceSets200Response is not found in the empty JSON string", GetResourceSets200Response.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ResourceSet.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetResourceSets200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetResourceSets200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetResourceSets200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetResourceSets200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetResourceSets200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetResourceSets200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetResourceSets200Response + * @throws IOException if the JSON string is invalid with respect to GetResourceSets200Response + */ + public static GetResourceSets200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetResourceSets200Response.class); + } + + /** + * Convert an instance of GetResourceSets200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/GetResources200Response.java b/src/main/java/com/idmesh/model/GetResources200Response.java new file mode 100644 index 0000000..19aa3b6 --- /dev/null +++ b/src/main/java/com/idmesh/model/GetResources200Response.java @@ -0,0 +1,230 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.GetResource200Response; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * GetResources200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetResources200Response { + public static final String SERIALIZED_NAME_TOTAL_NUM = "total_num"; + @SerializedName(SERIALIZED_NAME_TOTAL_NUM) + private BigDecimal totalNum; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data; + + public GetResources200Response() { + } + /** + * 数据总数 + * @return totalNum + **/ + @javax.annotation.Nullable + public BigDecimal getTotalNum() { + return totalNum; + } + + + public void setTotalNum(BigDecimal totalNum) { + this.totalNum = totalNum; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetResources200Response getResources200Response = (GetResources200Response) o; + return Objects.equals(this.totalNum, getResources200Response.totalNum) && + Objects.equals(this.data, getResources200Response.data); + } + + @Override + public int hashCode() { + return Objects.hash(totalNum, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetResources200Response {\n"); + sb.append(" totalNum: ").append(toIndentedString(totalNum)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("total_num"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetResources200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetResources200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetResources200Response is not found in the empty JSON string", GetResources200Response.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + GetResource200Response.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetResources200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetResources200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetResources200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetResources200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetResources200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetResources200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetResources200Response + * @throws IOException if the JSON string is invalid with respect to GetResources200Response + */ + public static GetResources200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetResources200Response.class); + } + + /** + * Convert an instance of GetResources200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/GetStoredCredentials200Response.java b/src/main/java/com/idmesh/model/GetStoredCredentials200Response.java new file mode 100644 index 0000000..a21c000 --- /dev/null +++ b/src/main/java/com/idmesh/model/GetStoredCredentials200Response.java @@ -0,0 +1,256 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.NullInner; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * GetStoredCredentials200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetStoredCredentials200Response { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = new ArrayList<>(); + + public static final String SERIALIZED_NAME_TOTAL_NUM = "total_num"; + @SerializedName(SERIALIZED_NAME_TOTAL_NUM) + private Integer totalNum; + + public static final String SERIALIZED_NAME_PAGE_NUM = "page_num"; + @SerializedName(SERIALIZED_NAME_PAGE_NUM) + private Integer pageNum; + + public GetStoredCredentials200Response() { + } + /** + * Get data + * @return data + **/ + @javax.annotation.Nonnull + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + /** + * Get totalNum + * @return totalNum + **/ + @javax.annotation.Nonnull + public Integer getTotalNum() { + return totalNum; + } + + + public void setTotalNum(Integer totalNum) { + this.totalNum = totalNum; + } + + /** + * Get pageNum + * @return pageNum + **/ + @javax.annotation.Nonnull + public Integer getPageNum() { + return pageNum; + } + + + public void setPageNum(Integer pageNum) { + this.pageNum = pageNum; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetStoredCredentials200Response getStoredCredentials200Response = (GetStoredCredentials200Response) o; + return Objects.equals(this.data, getStoredCredentials200Response.data) && + Objects.equals(this.totalNum, getStoredCredentials200Response.totalNum) && + Objects.equals(this.pageNum, getStoredCredentials200Response.pageNum); + } + + @Override + public int hashCode() { + return Objects.hash(data, totalNum, pageNum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetStoredCredentials200Response {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" totalNum: ").append(toIndentedString(totalNum)).append("\n"); + sb.append(" pageNum: ").append(toIndentedString(pageNum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("total_num"); + openapiFields.add("page_num"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("data"); + openapiRequiredFields.add("total_num"); + openapiRequiredFields.add("page_num"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetStoredCredentials200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetStoredCredentials200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetStoredCredentials200Response is not found in the empty JSON string", GetStoredCredentials200Response.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GetStoredCredentials200Response.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + // validate the required field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + NullInner.validateJsonElement(jsonArraydata.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetStoredCredentials200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetStoredCredentials200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetStoredCredentials200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetStoredCredentials200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetStoredCredentials200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetStoredCredentials200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetStoredCredentials200Response + * @throws IOException if the JSON string is invalid with respect to GetStoredCredentials200Response + */ + public static GetStoredCredentials200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetStoredCredentials200Response.class); + } + + /** + * Convert an instance of GetStoredCredentials200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/GetTemplate200Response.java b/src/main/java/com/idmesh/model/GetTemplate200Response.java new file mode 100644 index 0000000..5a87e63 --- /dev/null +++ b/src/main/java/com/idmesh/model/GetTemplate200Response.java @@ -0,0 +1,251 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.GetTemplate200ResponseDataInner; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * GetTemplate200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetTemplate200Response { + public static final String SERIALIZED_NAME_CURRENT_PAGE = "current_page"; + @SerializedName(SERIALIZED_NAME_CURRENT_PAGE) + private BigDecimal currentPage; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data; + + public static final String SERIALIZED_NAME_TOTAL_NUM = "total_num"; + @SerializedName(SERIALIZED_NAME_TOTAL_NUM) + private BigDecimal totalNum; + + public GetTemplate200Response() { + } + /** + * Get currentPage + * @return currentPage + **/ + @javax.annotation.Nullable + public BigDecimal getCurrentPage() { + return currentPage; + } + + + public void setCurrentPage(BigDecimal currentPage) { + this.currentPage = currentPage; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + /** + * Get totalNum + * @return totalNum + **/ + @javax.annotation.Nullable + public BigDecimal getTotalNum() { + return totalNum; + } + + + public void setTotalNum(BigDecimal totalNum) { + this.totalNum = totalNum; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTemplate200Response getTemplate200Response = (GetTemplate200Response) o; + return Objects.equals(this.currentPage, getTemplate200Response.currentPage) && + Objects.equals(this.data, getTemplate200Response.data) && + Objects.equals(this.totalNum, getTemplate200Response.totalNum); + } + + @Override + public int hashCode() { + return Objects.hash(currentPage, data, totalNum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetTemplate200Response {\n"); + sb.append(" currentPage: ").append(toIndentedString(currentPage)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" totalNum: ").append(toIndentedString(totalNum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("current_page"); + openapiFields.add("data"); + openapiFields.add("total_num"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetTemplate200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetTemplate200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetTemplate200Response is not found in the empty JSON string", GetTemplate200Response.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + GetTemplate200ResponseDataInner.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetTemplate200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetTemplate200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetTemplate200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetTemplate200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetTemplate200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetTemplate200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetTemplate200Response + * @throws IOException if the JSON string is invalid with respect to GetTemplate200Response + */ + public static GetTemplate200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetTemplate200Response.class); + } + + /** + * Convert an instance of GetTemplate200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/GetTemplate200ResponseDataInner.java b/src/main/java/com/idmesh/model/GetTemplate200ResponseDataInner.java new file mode 100644 index 0000000..cba2f46 --- /dev/null +++ b/src/main/java/com/idmesh/model/GetTemplate200ResponseDataInner.java @@ -0,0 +1,555 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.GetTemplate200ResponseDataInnerConfigProp; +import com.idmesh.model.GetTemplate200ResponseDataInnerProtocolProp; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * GetTemplate200ResponseDataInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetTemplate200ResponseDataInner { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_CATEGORY = "category"; + @SerializedName(SERIALIZED_NAME_CATEGORY) + private String category; + + public static final String SERIALIZED_NAME_DESCR = "descr"; + @SerializedName(SERIALIZED_NAME_DESCR) + private String descr; + + public static final String SERIALIZED_NAME_LOGO = "logo"; + @SerializedName(SERIALIZED_NAME_LOGO) + private String logo; + + public static final String SERIALIZED_NAME_LOGIN_URL = "login_url"; + @SerializedName(SERIALIZED_NAME_LOGIN_URL) + private String loginUrl; + + public static final String SERIALIZED_NAME_REDIRECT_URL = "redirect_url"; + @SerializedName(SERIALIZED_NAME_REDIRECT_URL) + private String redirectUrl; + + public static final String SERIALIZED_NAME_LOGOUT_URL = "logout_url"; + @SerializedName(SERIALIZED_NAME_LOGOUT_URL) + private String logoutUrl; + + public static final String SERIALIZED_NAME_SUB_ACCOUNT_POLICY = "sub_account_policy"; + @SerializedName(SERIALIZED_NAME_SUB_ACCOUNT_POLICY) + private String subAccountPolicy; + + public static final String SERIALIZED_NAME_PROP = "prop"; + @SerializedName(SERIALIZED_NAME_PROP) + private Object prop; + + public static final String SERIALIZED_NAME_PROTOCOL_PROP = "protocol_prop"; + @SerializedName(SERIALIZED_NAME_PROTOCOL_PROP) + private GetTemplate200ResponseDataInnerProtocolProp protocolProp; + + public static final String SERIALIZED_NAME_CONFIG_PROP = "config_prop"; + @SerializedName(SERIALIZED_NAME_CONFIG_PROP) + private GetTemplate200ResponseDataInnerConfigProp configProp; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public GetTemplate200ResponseDataInner() { + } + /** + * 唯一标识 + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * 应用名称 + * @return name + **/ + @javax.annotation.Nullable + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + /** + * 应用类型,1自建应用,2市场应用 + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * 应用分类 + * @return category + **/ + @javax.annotation.Nullable + public String getCategory() { + return category; + } + + + public void setCategory(String category) { + this.category = category; + } + + /** + * 应用描述 + * @return descr + **/ + @javax.annotation.Nullable + public String getDescr() { + return descr; + } + + + public void setDescr(String descr) { + this.descr = descr; + } + + /** + * logo路径 + * @return logo + **/ + @javax.annotation.Nullable + public String getLogo() { + return logo; + } + + + public void setLogo(String logo) { + this.logo = logo; + } + + /** + * 登录路径 + * @return loginUrl + **/ + @javax.annotation.Nullable + public String getLoginUrl() { + return loginUrl; + } + + + public void setLoginUrl(String loginUrl) { + this.loginUrl = loginUrl; + } + + /** + * 重定向路径 + * @return redirectUrl + **/ + @javax.annotation.Nullable + public String getRedirectUrl() { + return redirectUrl; + } + + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + /** + * 登出路径 + * @return logoutUrl + **/ + @javax.annotation.Nullable + public String getLogoutUrl() { + return logoutUrl; + } + + + public void setLogoutUrl(String logoutUrl) { + this.logoutUrl = logoutUrl; + } + + /** + * 子账号策略,1启用,2不启用 + * @return subAccountPolicy + **/ + @javax.annotation.Nullable + public String getSubAccountPolicy() { + return subAccountPolicy; + } + + + public void setSubAccountPolicy(String subAccountPolicy) { + this.subAccountPolicy = subAccountPolicy; + } + + /** + * 扩展属性 + * @return prop + **/ + @javax.annotation.Nullable + public Object getProp() { + return prop; + } + + + public void setProp(Object prop) { + this.prop = prop; + } + + /** + * Get protocolProp + * @return protocolProp + **/ + @javax.annotation.Nullable + public GetTemplate200ResponseDataInnerProtocolProp getProtocolProp() { + return protocolProp; + } + + + public void setProtocolProp(GetTemplate200ResponseDataInnerProtocolProp protocolProp) { + this.protocolProp = protocolProp; + } + + /** + * Get configProp + * @return configProp + **/ + @javax.annotation.Nullable + public GetTemplate200ResponseDataInnerConfigProp getConfigProp() { + return configProp; + } + + + public void setConfigProp(GetTemplate200ResponseDataInnerConfigProp configProp) { + this.configProp = configProp; + } + + /** + * 创建事件 + * @return timeCreated + **/ + @javax.annotation.Nullable + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * Get timeModified + * @return timeModified + **/ + @javax.annotation.Nullable + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTemplate200ResponseDataInner getTemplate200ResponseDataInner = (GetTemplate200ResponseDataInner) o; + return Objects.equals(this.id, getTemplate200ResponseDataInner.id) && + Objects.equals(this.name, getTemplate200ResponseDataInner.name) && + Objects.equals(this.type, getTemplate200ResponseDataInner.type) && + Objects.equals(this.category, getTemplate200ResponseDataInner.category) && + Objects.equals(this.descr, getTemplate200ResponseDataInner.descr) && + Objects.equals(this.logo, getTemplate200ResponseDataInner.logo) && + Objects.equals(this.loginUrl, getTemplate200ResponseDataInner.loginUrl) && + Objects.equals(this.redirectUrl, getTemplate200ResponseDataInner.redirectUrl) && + Objects.equals(this.logoutUrl, getTemplate200ResponseDataInner.logoutUrl) && + Objects.equals(this.subAccountPolicy, getTemplate200ResponseDataInner.subAccountPolicy) && + Objects.equals(this.prop, getTemplate200ResponseDataInner.prop) && + Objects.equals(this.protocolProp, getTemplate200ResponseDataInner.protocolProp) && + Objects.equals(this.configProp, getTemplate200ResponseDataInner.configProp) && + Objects.equals(this.timeCreated, getTemplate200ResponseDataInner.timeCreated) && + Objects.equals(this.timeModified, getTemplate200ResponseDataInner.timeModified) && + Objects.equals(this.status, getTemplate200ResponseDataInner.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, type, category, descr, logo, loginUrl, redirectUrl, logoutUrl, subAccountPolicy, prop, protocolProp, configProp, timeCreated, timeModified, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetTemplate200ResponseDataInner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" descr: ").append(toIndentedString(descr)).append("\n"); + sb.append(" logo: ").append(toIndentedString(logo)).append("\n"); + sb.append(" loginUrl: ").append(toIndentedString(loginUrl)).append("\n"); + sb.append(" redirectUrl: ").append(toIndentedString(redirectUrl)).append("\n"); + sb.append(" logoutUrl: ").append(toIndentedString(logoutUrl)).append("\n"); + sb.append(" subAccountPolicy: ").append(toIndentedString(subAccountPolicy)).append("\n"); + sb.append(" prop: ").append(toIndentedString(prop)).append("\n"); + sb.append(" protocolProp: ").append(toIndentedString(protocolProp)).append("\n"); + sb.append(" configProp: ").append(toIndentedString(configProp)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("type"); + openapiFields.add("category"); + openapiFields.add("descr"); + openapiFields.add("logo"); + openapiFields.add("login_url"); + openapiFields.add("redirect_url"); + openapiFields.add("logout_url"); + openapiFields.add("sub_account_policy"); + openapiFields.add("prop"); + openapiFields.add("protocol_prop"); + openapiFields.add("config_prop"); + openapiFields.add("time_created"); + openapiFields.add("time_modified"); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetTemplate200ResponseDataInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetTemplate200ResponseDataInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetTemplate200ResponseDataInner is not found in the empty JSON string", GetTemplate200ResponseDataInner.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("category") != null && !jsonObj.get("category").isJsonNull()) && !jsonObj.get("category").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); + } + if ((jsonObj.get("descr") != null && !jsonObj.get("descr").isJsonNull()) && !jsonObj.get("descr").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `descr` to be a primitive type in the JSON string but got `%s`", jsonObj.get("descr").toString())); + } + if ((jsonObj.get("logo") != null && !jsonObj.get("logo").isJsonNull()) && !jsonObj.get("logo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `logo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logo").toString())); + } + if ((jsonObj.get("login_url") != null && !jsonObj.get("login_url").isJsonNull()) && !jsonObj.get("login_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `login_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("login_url").toString())); + } + if ((jsonObj.get("redirect_url") != null && !jsonObj.get("redirect_url").isJsonNull()) && !jsonObj.get("redirect_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `redirect_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirect_url").toString())); + } + if ((jsonObj.get("logout_url") != null && !jsonObj.get("logout_url").isJsonNull()) && !jsonObj.get("logout_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `logout_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logout_url").toString())); + } + if ((jsonObj.get("sub_account_policy") != null && !jsonObj.get("sub_account_policy").isJsonNull()) && !jsonObj.get("sub_account_policy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sub_account_policy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sub_account_policy").toString())); + } + // validate the optional field `protocol_prop` + if (jsonObj.get("protocol_prop") != null && !jsonObj.get("protocol_prop").isJsonNull()) { + GetTemplate200ResponseDataInnerProtocolProp.validateJsonElement(jsonObj.get("protocol_prop")); + } + // validate the optional field `config_prop` + if (jsonObj.get("config_prop") != null && !jsonObj.get("config_prop").isJsonNull()) { + GetTemplate200ResponseDataInnerConfigProp.validateJsonElement(jsonObj.get("config_prop")); + } + if ((jsonObj.get("time_created") != null && !jsonObj.get("time_created").isJsonNull()) && !jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if ((jsonObj.get("time_modified") != null && !jsonObj.get("time_modified").isJsonNull()) && !jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetTemplate200ResponseDataInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetTemplate200ResponseDataInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetTemplate200ResponseDataInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetTemplate200ResponseDataInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetTemplate200ResponseDataInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetTemplate200ResponseDataInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetTemplate200ResponseDataInner + * @throws IOException if the JSON string is invalid with respect to GetTemplate200ResponseDataInner + */ + public static GetTemplate200ResponseDataInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetTemplate200ResponseDataInner.class); + } + + /** + * Convert an instance of GetTemplate200ResponseDataInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/GetTemplate200ResponseDataInnerConfigProp.java b/src/main/java/com/idmesh/model/GetTemplate200ResponseDataInnerConfigProp.java new file mode 100644 index 0000000..b2f96ae --- /dev/null +++ b/src/main/java/com/idmesh/model/GetTemplate200ResponseDataInnerConfigProp.java @@ -0,0 +1,480 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.CreateRequest1ConfigPropAccessPolicy; +import com.idmesh.model.CreateRequest1ConfigPropAllowedLoginMethod; +import com.idmesh.model.CreateRequest1ConfigPropAllowedSocialLoginProvider; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * 应用配置属性 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetTemplate200ResponseDataInnerConfigProp { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private String tenantId; + + public static final String SERIALIZED_NAME_MFA_CONFIG = "mfa_config"; + @SerializedName(SERIALIZED_NAME_MFA_CONFIG) + private Object mfaConfig; + + public static final String SERIALIZED_NAME_REG_POLICY = "reg_policy"; + @SerializedName(SERIALIZED_NAME_REG_POLICY) + private BigDecimal regPolicy; + + public static final String SERIALIZED_NAME_MFA_ENABLED = "mfa_enabled"; + @SerializedName(SERIALIZED_NAME_MFA_ENABLED) + private String mfaEnabled; + + public static final String SERIALIZED_NAME_SSO_ENABLED = "sso_enabled"; + @SerializedName(SERIALIZED_NAME_SSO_ENABLED) + private String ssoEnabled; + + public static final String SERIALIZED_NAME_DEVELOPER_ID = "developer_id"; + @SerializedName(SERIALIZED_NAME_DEVELOPER_ID) + private String developerId; + + public static final String SERIALIZED_NAME_ACCESS_POLICY = "access_policy"; + @SerializedName(SERIALIZED_NAME_ACCESS_POLICY) + private CreateRequest1ConfigPropAccessPolicy accessPolicy; + + public static final String SERIALIZED_NAME_ALLOWED_REG_METHOD = "allowed_reg_method"; + @SerializedName(SERIALIZED_NAME_ALLOWED_REG_METHOD) + private Object allowedRegMethod; + + public static final String SERIALIZED_NAME_DEFAULT_REG_METHOD = "default_reg_method"; + @SerializedName(SERIALIZED_NAME_DEFAULT_REG_METHOD) + private String defaultRegMethod; + + public static final String SERIALIZED_NAME_ALLOWED_LOGIN_METHOD = "allowed_login_method"; + @SerializedName(SERIALIZED_NAME_ALLOWED_LOGIN_METHOD) + private CreateRequest1ConfigPropAllowedLoginMethod allowedLoginMethod; + + public static final String SERIALIZED_NAME_DEFAULT_LOGIN_METHOD = "default_login_method"; + @SerializedName(SERIALIZED_NAME_DEFAULT_LOGIN_METHOD) + private String defaultLoginMethod; + + public static final String SERIALIZED_NAME_ALLOWED_ID_PROVIDER = "allowed_id_provider"; + @SerializedName(SERIALIZED_NAME_ALLOWED_ID_PROVIDER) + private CreateRequest1ConfigPropAllowedSocialLoginProvider allowedIdProvider; + + public GetTemplate200ResponseDataInnerConfigProp() { + } + /** + * Get status + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + /** + * Get tenantId + * @return tenantId + **/ + @javax.annotation.Nullable + public String getTenantId() { + return tenantId; + } + + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + /** + * Get mfaConfig + * @return mfaConfig + **/ + @javax.annotation.Nullable + public Object getMfaConfig() { + return mfaConfig; + } + + + public void setMfaConfig(Object mfaConfig) { + this.mfaConfig = mfaConfig; + } + + /** + * Get regPolicy + * @return regPolicy + **/ + @javax.annotation.Nullable + public BigDecimal getRegPolicy() { + return regPolicy; + } + + + public void setRegPolicy(BigDecimal regPolicy) { + this.regPolicy = regPolicy; + } + + /** + * Get mfaEnabled + * @return mfaEnabled + **/ + @javax.annotation.Nullable + public String getMfaEnabled() { + return mfaEnabled; + } + + + public void setMfaEnabled(String mfaEnabled) { + this.mfaEnabled = mfaEnabled; + } + + /** + * Get ssoEnabled + * @return ssoEnabled + **/ + @javax.annotation.Nullable + public String getSsoEnabled() { + return ssoEnabled; + } + + + public void setSsoEnabled(String ssoEnabled) { + this.ssoEnabled = ssoEnabled; + } + + /** + * Get developerId + * @return developerId + **/ + @javax.annotation.Nullable + public String getDeveloperId() { + return developerId; + } + + + public void setDeveloperId(String developerId) { + this.developerId = developerId; + } + + /** + * Get accessPolicy + * @return accessPolicy + **/ + @javax.annotation.Nullable + public CreateRequest1ConfigPropAccessPolicy getAccessPolicy() { + return accessPolicy; + } + + + public void setAccessPolicy(CreateRequest1ConfigPropAccessPolicy accessPolicy) { + this.accessPolicy = accessPolicy; + } + + /** + * Get allowedRegMethod + * @return allowedRegMethod + **/ + @javax.annotation.Nullable + public Object getAllowedRegMethod() { + return allowedRegMethod; + } + + + public void setAllowedRegMethod(Object allowedRegMethod) { + this.allowedRegMethod = allowedRegMethod; + } + + /** + * Get defaultRegMethod + * @return defaultRegMethod + **/ + @javax.annotation.Nullable + public String getDefaultRegMethod() { + return defaultRegMethod; + } + + + public void setDefaultRegMethod(String defaultRegMethod) { + this.defaultRegMethod = defaultRegMethod; + } + + /** + * Get allowedLoginMethod + * @return allowedLoginMethod + **/ + @javax.annotation.Nullable + public CreateRequest1ConfigPropAllowedLoginMethod getAllowedLoginMethod() { + return allowedLoginMethod; + } + + + public void setAllowedLoginMethod(CreateRequest1ConfigPropAllowedLoginMethod allowedLoginMethod) { + this.allowedLoginMethod = allowedLoginMethod; + } + + /** + * Get defaultLoginMethod + * @return defaultLoginMethod + **/ + @javax.annotation.Nullable + public String getDefaultLoginMethod() { + return defaultLoginMethod; + } + + + public void setDefaultLoginMethod(String defaultLoginMethod) { + this.defaultLoginMethod = defaultLoginMethod; + } + + /** + * Get allowedIdProvider + * @return allowedIdProvider + **/ + @javax.annotation.Nullable + public CreateRequest1ConfigPropAllowedSocialLoginProvider getAllowedIdProvider() { + return allowedIdProvider; + } + + + public void setAllowedIdProvider(CreateRequest1ConfigPropAllowedSocialLoginProvider allowedIdProvider) { + this.allowedIdProvider = allowedIdProvider; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTemplate200ResponseDataInnerConfigProp getTemplate200ResponseDataInnerConfigProp = (GetTemplate200ResponseDataInnerConfigProp) o; + return Objects.equals(this.status, getTemplate200ResponseDataInnerConfigProp.status) && + Objects.equals(this.tenantId, getTemplate200ResponseDataInnerConfigProp.tenantId) && + Objects.equals(this.mfaConfig, getTemplate200ResponseDataInnerConfigProp.mfaConfig) && + Objects.equals(this.regPolicy, getTemplate200ResponseDataInnerConfigProp.regPolicy) && + Objects.equals(this.mfaEnabled, getTemplate200ResponseDataInnerConfigProp.mfaEnabled) && + Objects.equals(this.ssoEnabled, getTemplate200ResponseDataInnerConfigProp.ssoEnabled) && + Objects.equals(this.developerId, getTemplate200ResponseDataInnerConfigProp.developerId) && + Objects.equals(this.accessPolicy, getTemplate200ResponseDataInnerConfigProp.accessPolicy) && + Objects.equals(this.allowedRegMethod, getTemplate200ResponseDataInnerConfigProp.allowedRegMethod) && + Objects.equals(this.defaultRegMethod, getTemplate200ResponseDataInnerConfigProp.defaultRegMethod) && + Objects.equals(this.allowedLoginMethod, getTemplate200ResponseDataInnerConfigProp.allowedLoginMethod) && + Objects.equals(this.defaultLoginMethod, getTemplate200ResponseDataInnerConfigProp.defaultLoginMethod) && + Objects.equals(this.allowedIdProvider, getTemplate200ResponseDataInnerConfigProp.allowedIdProvider); + } + + @Override + public int hashCode() { + return Objects.hash(status, tenantId, mfaConfig, regPolicy, mfaEnabled, ssoEnabled, developerId, accessPolicy, allowedRegMethod, defaultRegMethod, allowedLoginMethod, defaultLoginMethod, allowedIdProvider); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetTemplate200ResponseDataInnerConfigProp {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" mfaConfig: ").append(toIndentedString(mfaConfig)).append("\n"); + sb.append(" regPolicy: ").append(toIndentedString(regPolicy)).append("\n"); + sb.append(" mfaEnabled: ").append(toIndentedString(mfaEnabled)).append("\n"); + sb.append(" ssoEnabled: ").append(toIndentedString(ssoEnabled)).append("\n"); + sb.append(" developerId: ").append(toIndentedString(developerId)).append("\n"); + sb.append(" accessPolicy: ").append(toIndentedString(accessPolicy)).append("\n"); + sb.append(" allowedRegMethod: ").append(toIndentedString(allowedRegMethod)).append("\n"); + sb.append(" defaultRegMethod: ").append(toIndentedString(defaultRegMethod)).append("\n"); + sb.append(" allowedLoginMethod: ").append(toIndentedString(allowedLoginMethod)).append("\n"); + sb.append(" defaultLoginMethod: ").append(toIndentedString(defaultLoginMethod)).append("\n"); + sb.append(" allowedIdProvider: ").append(toIndentedString(allowedIdProvider)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("status"); + openapiFields.add("tenant_id"); + openapiFields.add("mfa_config"); + openapiFields.add("reg_policy"); + openapiFields.add("mfa_enabled"); + openapiFields.add("sso_enabled"); + openapiFields.add("developer_id"); + openapiFields.add("access_policy"); + openapiFields.add("allowed_reg_method"); + openapiFields.add("default_reg_method"); + openapiFields.add("allowed_login_method"); + openapiFields.add("default_login_method"); + openapiFields.add("allowed_id_provider"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetTemplate200ResponseDataInnerConfigProp + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetTemplate200ResponseDataInnerConfigProp.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetTemplate200ResponseDataInnerConfigProp is not found in the empty JSON string", GetTemplate200ResponseDataInnerConfigProp.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("tenant_id") != null && !jsonObj.get("tenant_id").isJsonNull()) && !jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + if ((jsonObj.get("mfa_enabled") != null && !jsonObj.get("mfa_enabled").isJsonNull()) && !jsonObj.get("mfa_enabled").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mfa_enabled` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mfa_enabled").toString())); + } + if ((jsonObj.get("sso_enabled") != null && !jsonObj.get("sso_enabled").isJsonNull()) && !jsonObj.get("sso_enabled").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sso_enabled` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sso_enabled").toString())); + } + if ((jsonObj.get("developer_id") != null && !jsonObj.get("developer_id").isJsonNull()) && !jsonObj.get("developer_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `developer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("developer_id").toString())); + } + // validate the optional field `access_policy` + if (jsonObj.get("access_policy") != null && !jsonObj.get("access_policy").isJsonNull()) { + CreateRequest1ConfigPropAccessPolicy.validateJsonElement(jsonObj.get("access_policy")); + } + if ((jsonObj.get("default_reg_method") != null && !jsonObj.get("default_reg_method").isJsonNull()) && !jsonObj.get("default_reg_method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `default_reg_method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_reg_method").toString())); + } + // validate the optional field `allowed_login_method` + if (jsonObj.get("allowed_login_method") != null && !jsonObj.get("allowed_login_method").isJsonNull()) { + CreateRequest1ConfigPropAllowedLoginMethod.validateJsonElement(jsonObj.get("allowed_login_method")); + } + if ((jsonObj.get("default_login_method") != null && !jsonObj.get("default_login_method").isJsonNull()) && !jsonObj.get("default_login_method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `default_login_method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_login_method").toString())); + } + // validate the optional field `allowed_id_provider` + if (jsonObj.get("allowed_id_provider") != null && !jsonObj.get("allowed_id_provider").isJsonNull()) { + CreateRequest1ConfigPropAllowedSocialLoginProvider.validateJsonElement(jsonObj.get("allowed_id_provider")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetTemplate200ResponseDataInnerConfigProp.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetTemplate200ResponseDataInnerConfigProp' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetTemplate200ResponseDataInnerConfigProp.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetTemplate200ResponseDataInnerConfigProp value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetTemplate200ResponseDataInnerConfigProp read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetTemplate200ResponseDataInnerConfigProp given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetTemplate200ResponseDataInnerConfigProp + * @throws IOException if the JSON string is invalid with respect to GetTemplate200ResponseDataInnerConfigProp + */ + public static GetTemplate200ResponseDataInnerConfigProp fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetTemplate200ResponseDataInnerConfigProp.class); + } + + /** + * Convert an instance of GetTemplate200ResponseDataInnerConfigProp to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/GetTemplate200ResponseDataInnerProtocolProp.java b/src/main/java/com/idmesh/model/GetTemplate200ResponseDataInnerProtocolProp.java new file mode 100644 index 0000000..7bcb08e --- /dev/null +++ b/src/main/java/com/idmesh/model/GetTemplate200ResponseDataInnerProtocolProp.java @@ -0,0 +1,446 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.CreateRequest1ProtocolPropResponseAttrInner; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * 单点登录协议属性 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetTemplate200ResponseDataInnerProtocolProp { + public static final String SERIALIZED_NAME_ACS_URL = "acs_url"; + @SerializedName(SERIALIZED_NAME_ACS_URL) + private String acsUrl; + + public static final String SERIALIZED_NAME_SP_ENTITY = "sp_entity"; + @SerializedName(SERIALIZED_NAME_SP_ENTITY) + private String spEntity; + + public static final String SERIALIZED_NAME_RESPONSE_ATTR = "response_attr"; + @SerializedName(SERIALIZED_NAME_RESPONSE_ATTR) + private List responseAttr; + + public static final String SERIALIZED_NAME_DIGEST_ALGORITHM = "digest_algorithm"; + @SerializedName(SERIALIZED_NAME_DIGEST_ALGORITHM) + private String digestAlgorithm; + + public static final String SERIALIZED_NAME_LIFETIME_IN_SECONDS = "lifetime_in_seconds"; + @SerializedName(SERIALIZED_NAME_LIFETIME_IN_SECONDS) + private BigDecimal lifetimeInSeconds; + + public static final String SERIALIZED_NAME_SIGNATURE_ALGORITHM = "signature_algorithm"; + @SerializedName(SERIALIZED_NAME_SIGNATURE_ALGORITHM) + private String signatureAlgorithm; + + public static final String SERIALIZED_NAME_NAME_IDENTIFIER_FORMAT = "name_identifier_format"; + @SerializedName(SERIALIZED_NAME_NAME_IDENTIFIER_FORMAT) + private String nameIdentifierFormat; + + public static final String SERIALIZED_NAME_AUTHN_CONTEXT_CLASS_REF = "authn_context_class_ref"; + @SerializedName(SERIALIZED_NAME_AUTHN_CONTEXT_CLASS_REF) + private String authnContextClassRef; + + public static final String SERIALIZED_NAME_SAML_RESPONSE_SIGNING_KEY = "saml_response_signing_key"; + @SerializedName(SERIALIZED_NAME_SAML_RESPONSE_SIGNING_KEY) + private String samlResponseSigningKey; + + public static final String SERIALIZED_NAME_SAML_RESPONSE_SIGNING_CERT = "saml_response_signing_cert"; + @SerializedName(SERIALIZED_NAME_SAML_RESPONSE_SIGNING_CERT) + private String samlResponseSigningCert; + + public static final String SERIALIZED_NAME_SAML_RESPONSE_SIGNING_CERT_FINGERPRINT = "saml_response_signing_cert_fingerprint"; + @SerializedName(SERIALIZED_NAME_SAML_RESPONSE_SIGNING_CERT_FINGERPRINT) + private String samlResponseSigningCertFingerprint; + + public GetTemplate200ResponseDataInnerProtocolProp() { + } + /** + * Get acsUrl + * @return acsUrl + **/ + @javax.annotation.Nullable + public String getAcsUrl() { + return acsUrl; + } + + + public void setAcsUrl(String acsUrl) { + this.acsUrl = acsUrl; + } + + /** + * Get spEntity + * @return spEntity + **/ + @javax.annotation.Nullable + public String getSpEntity() { + return spEntity; + } + + + public void setSpEntity(String spEntity) { + this.spEntity = spEntity; + } + + /** + * Get responseAttr + * @return responseAttr + **/ + @javax.annotation.Nullable + public List getResponseAttr() { + return responseAttr; + } + + + public void setResponseAttr(List responseAttr) { + this.responseAttr = responseAttr; + } + + /** + * Get digestAlgorithm + * @return digestAlgorithm + **/ + @javax.annotation.Nullable + public String getDigestAlgorithm() { + return digestAlgorithm; + } + + + public void setDigestAlgorithm(String digestAlgorithm) { + this.digestAlgorithm = digestAlgorithm; + } + + /** + * Get lifetimeInSeconds + * @return lifetimeInSeconds + **/ + @javax.annotation.Nullable + public BigDecimal getLifetimeInSeconds() { + return lifetimeInSeconds; + } + + + public void setLifetimeInSeconds(BigDecimal lifetimeInSeconds) { + this.lifetimeInSeconds = lifetimeInSeconds; + } + + /** + * Get signatureAlgorithm + * @return signatureAlgorithm + **/ + @javax.annotation.Nullable + public String getSignatureAlgorithm() { + return signatureAlgorithm; + } + + + public void setSignatureAlgorithm(String signatureAlgorithm) { + this.signatureAlgorithm = signatureAlgorithm; + } + + /** + * Get nameIdentifierFormat + * @return nameIdentifierFormat + **/ + @javax.annotation.Nullable + public String getNameIdentifierFormat() { + return nameIdentifierFormat; + } + + + public void setNameIdentifierFormat(String nameIdentifierFormat) { + this.nameIdentifierFormat = nameIdentifierFormat; + } + + /** + * Get authnContextClassRef + * @return authnContextClassRef + **/ + @javax.annotation.Nullable + public String getAuthnContextClassRef() { + return authnContextClassRef; + } + + + public void setAuthnContextClassRef(String authnContextClassRef) { + this.authnContextClassRef = authnContextClassRef; + } + + /** + * Get samlResponseSigningKey + * @return samlResponseSigningKey + **/ + @javax.annotation.Nullable + public String getSamlResponseSigningKey() { + return samlResponseSigningKey; + } + + + public void setSamlResponseSigningKey(String samlResponseSigningKey) { + this.samlResponseSigningKey = samlResponseSigningKey; + } + + /** + * Get samlResponseSigningCert + * @return samlResponseSigningCert + **/ + @javax.annotation.Nullable + public String getSamlResponseSigningCert() { + return samlResponseSigningCert; + } + + + public void setSamlResponseSigningCert(String samlResponseSigningCert) { + this.samlResponseSigningCert = samlResponseSigningCert; + } + + /** + * Get samlResponseSigningCertFingerprint + * @return samlResponseSigningCertFingerprint + **/ + @javax.annotation.Nullable + public String getSamlResponseSigningCertFingerprint() { + return samlResponseSigningCertFingerprint; + } + + + public void setSamlResponseSigningCertFingerprint(String samlResponseSigningCertFingerprint) { + this.samlResponseSigningCertFingerprint = samlResponseSigningCertFingerprint; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTemplate200ResponseDataInnerProtocolProp getTemplate200ResponseDataInnerProtocolProp = (GetTemplate200ResponseDataInnerProtocolProp) o; + return Objects.equals(this.acsUrl, getTemplate200ResponseDataInnerProtocolProp.acsUrl) && + Objects.equals(this.spEntity, getTemplate200ResponseDataInnerProtocolProp.spEntity) && + Objects.equals(this.responseAttr, getTemplate200ResponseDataInnerProtocolProp.responseAttr) && + Objects.equals(this.digestAlgorithm, getTemplate200ResponseDataInnerProtocolProp.digestAlgorithm) && + Objects.equals(this.lifetimeInSeconds, getTemplate200ResponseDataInnerProtocolProp.lifetimeInSeconds) && + Objects.equals(this.signatureAlgorithm, getTemplate200ResponseDataInnerProtocolProp.signatureAlgorithm) && + Objects.equals(this.nameIdentifierFormat, getTemplate200ResponseDataInnerProtocolProp.nameIdentifierFormat) && + Objects.equals(this.authnContextClassRef, getTemplate200ResponseDataInnerProtocolProp.authnContextClassRef) && + Objects.equals(this.samlResponseSigningKey, getTemplate200ResponseDataInnerProtocolProp.samlResponseSigningKey) && + Objects.equals(this.samlResponseSigningCert, getTemplate200ResponseDataInnerProtocolProp.samlResponseSigningCert) && + Objects.equals(this.samlResponseSigningCertFingerprint, getTemplate200ResponseDataInnerProtocolProp.samlResponseSigningCertFingerprint); + } + + @Override + public int hashCode() { + return Objects.hash(acsUrl, spEntity, responseAttr, digestAlgorithm, lifetimeInSeconds, signatureAlgorithm, nameIdentifierFormat, authnContextClassRef, samlResponseSigningKey, samlResponseSigningCert, samlResponseSigningCertFingerprint); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetTemplate200ResponseDataInnerProtocolProp {\n"); + sb.append(" acsUrl: ").append(toIndentedString(acsUrl)).append("\n"); + sb.append(" spEntity: ").append(toIndentedString(spEntity)).append("\n"); + sb.append(" responseAttr: ").append(toIndentedString(responseAttr)).append("\n"); + sb.append(" digestAlgorithm: ").append(toIndentedString(digestAlgorithm)).append("\n"); + sb.append(" lifetimeInSeconds: ").append(toIndentedString(lifetimeInSeconds)).append("\n"); + sb.append(" signatureAlgorithm: ").append(toIndentedString(signatureAlgorithm)).append("\n"); + sb.append(" nameIdentifierFormat: ").append(toIndentedString(nameIdentifierFormat)).append("\n"); + sb.append(" authnContextClassRef: ").append(toIndentedString(authnContextClassRef)).append("\n"); + sb.append(" samlResponseSigningKey: ").append(toIndentedString(samlResponseSigningKey)).append("\n"); + sb.append(" samlResponseSigningCert: ").append(toIndentedString(samlResponseSigningCert)).append("\n"); + sb.append(" samlResponseSigningCertFingerprint: ").append(toIndentedString(samlResponseSigningCertFingerprint)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("acs_url"); + openapiFields.add("sp_entity"); + openapiFields.add("response_attr"); + openapiFields.add("digest_algorithm"); + openapiFields.add("lifetime_in_seconds"); + openapiFields.add("signature_algorithm"); + openapiFields.add("name_identifier_format"); + openapiFields.add("authn_context_class_ref"); + openapiFields.add("saml_response_signing_key"); + openapiFields.add("saml_response_signing_cert"); + openapiFields.add("saml_response_signing_cert_fingerprint"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetTemplate200ResponseDataInnerProtocolProp + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetTemplate200ResponseDataInnerProtocolProp.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetTemplate200ResponseDataInnerProtocolProp is not found in the empty JSON string", GetTemplate200ResponseDataInnerProtocolProp.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("acs_url") != null && !jsonObj.get("acs_url").isJsonNull()) && !jsonObj.get("acs_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `acs_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acs_url").toString())); + } + if ((jsonObj.get("sp_entity") != null && !jsonObj.get("sp_entity").isJsonNull()) && !jsonObj.get("sp_entity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sp_entity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sp_entity").toString())); + } + if (jsonObj.get("response_attr") != null && !jsonObj.get("response_attr").isJsonNull()) { + JsonArray jsonArrayresponseAttr = jsonObj.getAsJsonArray("response_attr"); + if (jsonArrayresponseAttr != null) { + // ensure the json data is an array + if (!jsonObj.get("response_attr").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `response_attr` to be an array in the JSON string but got `%s`", jsonObj.get("response_attr").toString())); + } + + // validate the optional field `response_attr` (array) + for (int i = 0; i < jsonArrayresponseAttr.size(); i++) { + CreateRequest1ProtocolPropResponseAttrInner.validateJsonElement(jsonArrayresponseAttr.get(i)); + }; + } + } + if ((jsonObj.get("digest_algorithm") != null && !jsonObj.get("digest_algorithm").isJsonNull()) && !jsonObj.get("digest_algorithm").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `digest_algorithm` to be a primitive type in the JSON string but got `%s`", jsonObj.get("digest_algorithm").toString())); + } + if ((jsonObj.get("signature_algorithm") != null && !jsonObj.get("signature_algorithm").isJsonNull()) && !jsonObj.get("signature_algorithm").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signature_algorithm` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature_algorithm").toString())); + } + if ((jsonObj.get("name_identifier_format") != null && !jsonObj.get("name_identifier_format").isJsonNull()) && !jsonObj.get("name_identifier_format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name_identifier_format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name_identifier_format").toString())); + } + if ((jsonObj.get("authn_context_class_ref") != null && !jsonObj.get("authn_context_class_ref").isJsonNull()) && !jsonObj.get("authn_context_class_ref").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `authn_context_class_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authn_context_class_ref").toString())); + } + if ((jsonObj.get("saml_response_signing_key") != null && !jsonObj.get("saml_response_signing_key").isJsonNull()) && !jsonObj.get("saml_response_signing_key").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `saml_response_signing_key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("saml_response_signing_key").toString())); + } + if ((jsonObj.get("saml_response_signing_cert") != null && !jsonObj.get("saml_response_signing_cert").isJsonNull()) && !jsonObj.get("saml_response_signing_cert").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `saml_response_signing_cert` to be a primitive type in the JSON string but got `%s`", jsonObj.get("saml_response_signing_cert").toString())); + } + if ((jsonObj.get("saml_response_signing_cert_fingerprint") != null && !jsonObj.get("saml_response_signing_cert_fingerprint").isJsonNull()) && !jsonObj.get("saml_response_signing_cert_fingerprint").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `saml_response_signing_cert_fingerprint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("saml_response_signing_cert_fingerprint").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetTemplate200ResponseDataInnerProtocolProp.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetTemplate200ResponseDataInnerProtocolProp' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetTemplate200ResponseDataInnerProtocolProp.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetTemplate200ResponseDataInnerProtocolProp value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetTemplate200ResponseDataInnerProtocolProp read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetTemplate200ResponseDataInnerProtocolProp given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetTemplate200ResponseDataInnerProtocolProp + * @throws IOException if the JSON string is invalid with respect to GetTemplate200ResponseDataInnerProtocolProp + */ + public static GetTemplate200ResponseDataInnerProtocolProp fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetTemplate200ResponseDataInnerProtocolProp.class); + } + + /** + * Convert an instance of GetTemplate200ResponseDataInnerProtocolProp to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/IdentityObj.java b/src/main/java/com/idmesh/model/IdentityObj.java new file mode 100644 index 0000000..60a4fda --- /dev/null +++ b/src/main/java/com/idmesh/model/IdentityObj.java @@ -0,0 +1,252 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * IdentityObj + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class IdentityObj { + public static final String SERIALIZED_NAME_IDENTITY_ID = "identity_id"; + @SerializedName(SERIALIZED_NAME_IDENTITY_ID) + private String identityId; + + public static final String SERIALIZED_NAME_IDENTITY_NAME = "identity_name"; + @SerializedName(SERIALIZED_NAME_IDENTITY_NAME) + private String identityName; + + public static final String SERIALIZED_NAME_IDENTITY_TYPE = "identity_type"; + @SerializedName(SERIALIZED_NAME_IDENTITY_TYPE) + private String identityType; + + public IdentityObj() { + } + /** + * Get identityId + * @return identityId + **/ + @javax.annotation.Nonnull + public String getIdentityId() { + return identityId; + } + + + public void setIdentityId(String identityId) { + this.identityId = identityId; + } + + /** + * Get identityName + * @return identityName + **/ + @javax.annotation.Nonnull + public String getIdentityName() { + return identityName; + } + + + public void setIdentityName(String identityName) { + this.identityName = identityName; + } + + /** + * user 用户 ,programmer 编程者,node 组织/自定义关系 + * @return identityType + **/ + @javax.annotation.Nonnull + public String getIdentityType() { + return identityType; + } + + + public void setIdentityType(String identityType) { + this.identityType = identityType; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IdentityObj identityObj = (IdentityObj) o; + return Objects.equals(this.identityId, identityObj.identityId) && + Objects.equals(this.identityName, identityObj.identityName) && + Objects.equals(this.identityType, identityObj.identityType); + } + + @Override + public int hashCode() { + return Objects.hash(identityId, identityName, identityType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IdentityObj {\n"); + sb.append(" identityId: ").append(toIndentedString(identityId)).append("\n"); + sb.append(" identityName: ").append(toIndentedString(identityName)).append("\n"); + sb.append(" identityType: ").append(toIndentedString(identityType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identity_id"); + openapiFields.add("identity_name"); + openapiFields.add("identity_type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identity_id"); + openapiRequiredFields.add("identity_name"); + openapiRequiredFields.add("identity_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to IdentityObj + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!IdentityObj.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in IdentityObj is not found in the empty JSON string", IdentityObj.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : IdentityObj.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("identity_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identity_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identity_id").toString())); + } + if (!jsonObj.get("identity_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identity_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identity_name").toString())); + } + if (!jsonObj.get("identity_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identity_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identity_type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!IdentityObj.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IdentityObj' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IdentityObj.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, IdentityObj value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public IdentityObj read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of IdentityObj given an JSON string + * + * @param jsonString JSON string + * @return An instance of IdentityObj + * @throws IOException if the JSON string is invalid with respect to IdentityObj + */ + public static IdentityObj fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IdentityObj.class); + } + + /** + * Convert an instance of IdentityObj to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/Injection.java b/src/main/java/com/idmesh/model/Injection.java new file mode 100644 index 0000000..f1b3658 --- /dev/null +++ b/src/main/java/com/idmesh/model/Injection.java @@ -0,0 +1,251 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * Injection + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Injection { + public static final String SERIALIZED_NAME_KEY = "key"; + @SerializedName(SERIALIZED_NAME_KEY) + private String key; + + public static final String SERIALIZED_NAME_ALIAS = "alias"; + @SerializedName(SERIALIZED_NAME_ALIAS) + private String alias; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private String value; + + public Injection() { + } + /** + * Get key + * @return key + **/ + @javax.annotation.Nonnull + public String getKey() { + return key; + } + + + public void setKey(String key) { + this.key = key; + } + + /** + * 注入时的别名,为空则为 key + * @return alias + **/ + @javax.annotation.Nullable + public String getAlias() { + return alias; + } + + + public void setAlias(String alias) { + this.alias = alias; + } + + /** + * Get value + * @return value + **/ + @javax.annotation.Nonnull + public String getValue() { + return value; + } + + + public void setValue(String value) { + this.value = value; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Injection injection = (Injection) o; + return Objects.equals(this.key, injection.key) && + Objects.equals(this.alias, injection.alias) && + Objects.equals(this.value, injection.value); + } + + @Override + public int hashCode() { + return Objects.hash(key, alias, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Injection {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" alias: ").append(toIndentedString(alias)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("key"); + openapiFields.add("alias"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("key"); + openapiRequiredFields.add("value"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Injection + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Injection.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Injection is not found in the empty JSON string", Injection.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Injection.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); + } + if ((jsonObj.get("alias") != null && !jsonObj.get("alias").isJsonNull()) && !jsonObj.get("alias").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `alias` to be a primitive type in the JSON string but got `%s`", jsonObj.get("alias").toString())); + } + if (!jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Injection.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Injection' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Injection.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Injection value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Injection read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Injection given an JSON string + * + * @param jsonString JSON string + * @return An instance of Injection + * @throws IOException if the JSON string is invalid with respect to Injection + */ + public static Injection fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Injection.class); + } + + /** + * Convert an instance of Injection to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/Job.java b/src/main/java/com/idmesh/model/Job.java new file mode 100644 index 0000000..59aa09d --- /dev/null +++ b/src/main/java/com/idmesh/model/Job.java @@ -0,0 +1,496 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * Job + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Job { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private Integer id; + + public static final String SERIALIZED_NAME_CRON_JOB_ID = "cron_job_id"; + @SerializedName(SERIALIZED_NAME_CRON_JOB_ID) + private String cronJobId; + + public static final String SERIALIZED_NAME_CRON_JOB_KIND = "cron_job_kind"; + @SerializedName(SERIALIZED_NAME_CRON_JOB_KIND) + private String cronJobKind; + + public static final String SERIALIZED_NAME_CRON_JOB_NAME = "cron_job_name"; + @SerializedName(SERIALIZED_NAME_CRON_JOB_NAME) + private String cronJobName; + + public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; + @SerializedName(SERIALIZED_NAME_NAMESPACE) + private String namespace; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_START_TIME = "start_time"; + @SerializedName(SERIALIZED_NAME_START_TIME) + private String startTime; + + public static final String SERIALIZED_NAME_COMPLETION_TIME = "completion_time"; + @SerializedName(SERIALIZED_NAME_COMPLETION_TIME) + private String completionTime; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_TIME_STARTED = "time_started"; + @SerializedName(SERIALIZED_NAME_TIME_STARTED) + private String timeStarted; + + public static final String SERIALIZED_NAME_TIME_COMPLETED = "time_completed"; + @SerializedName(SERIALIZED_NAME_TIME_COMPLETED) + private String timeCompleted; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public Job() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public Integer getId() { + return id; + } + + + public void setId(Integer id) { + this.id = id; + } + + /** + * Get cronJobId + * @return cronJobId + **/ + @javax.annotation.Nonnull + public String getCronJobId() { + return cronJobId; + } + + + public void setCronJobId(String cronJobId) { + this.cronJobId = cronJobId; + } + + /** + * Get cronJobKind + * @return cronJobKind + **/ + @javax.annotation.Nonnull + public String getCronJobKind() { + return cronJobKind; + } + + + public void setCronJobKind(String cronJobKind) { + this.cronJobKind = cronJobKind; + } + + /** + * Get cronJobName + * @return cronJobName + **/ + @javax.annotation.Nonnull + public String getCronJobName() { + return cronJobName; + } + + + public void setCronJobName(String cronJobName) { + this.cronJobName = cronJobName; + } + + /** + * Get namespace + * @return namespace + **/ + @javax.annotation.Nonnull + public String getNamespace() { + return namespace; + } + + + public void setNamespace(String namespace) { + this.namespace = namespace; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + /** + * 任务开始执行时间,rfc3339格式 + * @return startTime + **/ + @javax.annotation.Nonnull + public String getStartTime() { + return startTime; + } + + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + /** + * 任务结束执行时间,rfc3339格式 + * @return completionTime + **/ + @javax.annotation.Nullable + public String getCompletionTime() { + return completionTime; + } + + + public void setCompletionTime(String completionTime) { + this.completionTime = completionTime; + } + + /** + * - running 执行中 - failed 执行失败 - success 执行成功 + * @return status + **/ + @javax.annotation.Nonnull + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + /** + * rfc3339 + * @return timeStarted + **/ + @javax.annotation.Nullable + public String getTimeStarted() { + return timeStarted; + } + + + public void setTimeStarted(String timeStarted) { + this.timeStarted = timeStarted; + } + + /** + * rfc3339 + * @return timeCompleted + **/ + @javax.annotation.Nullable + public String getTimeCompleted() { + return timeCompleted; + } + + + public void setTimeCompleted(String timeCompleted) { + this.timeCompleted = timeCompleted; + } + + /** + * rfc3339 + * @return timeCreated + **/ + @javax.annotation.Nonnull + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * rfc3339 + * @return timeModified + **/ + @javax.annotation.Nonnull + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Job job = (Job) o; + return Objects.equals(this.id, job.id) && + Objects.equals(this.cronJobId, job.cronJobId) && + Objects.equals(this.cronJobKind, job.cronJobKind) && + Objects.equals(this.cronJobName, job.cronJobName) && + Objects.equals(this.namespace, job.namespace) && + Objects.equals(this.name, job.name) && + Objects.equals(this.startTime, job.startTime) && + Objects.equals(this.completionTime, job.completionTime) && + Objects.equals(this.status, job.status) && + Objects.equals(this.timeStarted, job.timeStarted) && + Objects.equals(this.timeCompleted, job.timeCompleted) && + Objects.equals(this.timeCreated, job.timeCreated) && + Objects.equals(this.timeModified, job.timeModified); + } + + @Override + public int hashCode() { + return Objects.hash(id, cronJobId, cronJobKind, cronJobName, namespace, name, startTime, completionTime, status, timeStarted, timeCompleted, timeCreated, timeModified); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Job {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" cronJobId: ").append(toIndentedString(cronJobId)).append("\n"); + sb.append(" cronJobKind: ").append(toIndentedString(cronJobKind)).append("\n"); + sb.append(" cronJobName: ").append(toIndentedString(cronJobName)).append("\n"); + sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); + sb.append(" completionTime: ").append(toIndentedString(completionTime)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" timeStarted: ").append(toIndentedString(timeStarted)).append("\n"); + sb.append(" timeCompleted: ").append(toIndentedString(timeCompleted)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("cron_job_id"); + openapiFields.add("cron_job_kind"); + openapiFields.add("cron_job_name"); + openapiFields.add("namespace"); + openapiFields.add("name"); + openapiFields.add("start_time"); + openapiFields.add("completion_time"); + openapiFields.add("status"); + openapiFields.add("time_started"); + openapiFields.add("time_completed"); + openapiFields.add("time_created"); + openapiFields.add("time_modified"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("cron_job_id"); + openapiRequiredFields.add("cron_job_kind"); + openapiRequiredFields.add("cron_job_name"); + openapiRequiredFields.add("namespace"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("start_time"); + openapiRequiredFields.add("status"); + openapiRequiredFields.add("time_created"); + openapiRequiredFields.add("time_modified"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Job + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Job.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Job is not found in the empty JSON string", Job.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Job.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("cron_job_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cron_job_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cron_job_id").toString())); + } + if (!jsonObj.get("cron_job_kind").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cron_job_kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cron_job_kind").toString())); + } + if (!jsonObj.get("cron_job_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cron_job_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cron_job_name").toString())); + } + if (!jsonObj.get("namespace").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `namespace` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("start_time").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `start_time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("start_time").toString())); + } + if ((jsonObj.get("completion_time") != null && !jsonObj.get("completion_time").isJsonNull()) && !jsonObj.get("completion_time").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `completion_time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("completion_time").toString())); + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("time_started") != null && !jsonObj.get("time_started").isJsonNull()) && !jsonObj.get("time_started").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_started` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_started").toString())); + } + if ((jsonObj.get("time_completed") != null && !jsonObj.get("time_completed").isJsonNull()) && !jsonObj.get("time_completed").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_completed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_completed").toString())); + } + if (!jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if (!jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Job.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Job' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Job.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Job value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Job read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Job given an JSON string + * + * @param jsonString JSON string + * @return An instance of Job + * @throws IOException if the JSON string is invalid with respect to Job + */ + public static Job fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Job.class); + } + + /** + * Convert an instance of Job to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/List200Response.java b/src/main/java/com/idmesh/model/List200Response.java new file mode 100644 index 0000000..afccb92 --- /dev/null +++ b/src/main/java/com/idmesh/model/List200Response.java @@ -0,0 +1,251 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.List200ResponseDataInner; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * List200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class List200Response { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data; + + public static final String SERIALIZED_NAME_TOTAL_NUM = "total_num"; + @SerializedName(SERIALIZED_NAME_TOTAL_NUM) + private BigDecimal totalNum; + + public static final String SERIALIZED_NAME_PAGE_NUM = "page_num"; + @SerializedName(SERIALIZED_NAME_PAGE_NUM) + private BigDecimal pageNum; + + public List200Response() { + } + /** + * 返回用户列表 + * @return data + **/ + @javax.annotation.Nullable + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + /** + * 总数 + * @return totalNum + **/ + @javax.annotation.Nullable + public BigDecimal getTotalNum() { + return totalNum; + } + + + public void setTotalNum(BigDecimal totalNum) { + this.totalNum = totalNum; + } + + /** + * 当前页 + * @return pageNum + **/ + @javax.annotation.Nullable + public BigDecimal getPageNum() { + return pageNum; + } + + + public void setPageNum(BigDecimal pageNum) { + this.pageNum = pageNum; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + List200Response list200Response = (List200Response) o; + return Objects.equals(this.data, list200Response.data) && + Objects.equals(this.totalNum, list200Response.totalNum) && + Objects.equals(this.pageNum, list200Response.pageNum); + } + + @Override + public int hashCode() { + return Objects.hash(data, totalNum, pageNum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class List200Response {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" totalNum: ").append(toIndentedString(totalNum)).append("\n"); + sb.append(" pageNum: ").append(toIndentedString(pageNum)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("total_num"); + openapiFields.add("page_num"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to List200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!List200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in List200Response is not found in the empty JSON string", List200Response.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + List200ResponseDataInner.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!List200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'List200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(List200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, List200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public List200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of List200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of List200Response + * @throws IOException if the JSON string is invalid with respect to List200Response + */ + public static List200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, List200Response.class); + } + + /** + * Convert an instance of List200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/List200Response1.java b/src/main/java/com/idmesh/model/List200Response1.java new file mode 100644 index 0000000..834da5d --- /dev/null +++ b/src/main/java/com/idmesh/model/List200Response1.java @@ -0,0 +1,251 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.List200Response1DataInner; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * List200Response1 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class List200Response1 { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data; + + public static final String SERIALIZED_NAME_TOTAL_NUM = "total_num"; + @SerializedName(SERIALIZED_NAME_TOTAL_NUM) + private BigDecimal totalNum; + + public static final String SERIALIZED_NAME_CURRENT_PAGE = "current_page"; + @SerializedName(SERIALIZED_NAME_CURRENT_PAGE) + private BigDecimal currentPage; + + public List200Response1() { + } + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + /** + * Get totalNum + * @return totalNum + **/ + @javax.annotation.Nullable + public BigDecimal getTotalNum() { + return totalNum; + } + + + public void setTotalNum(BigDecimal totalNum) { + this.totalNum = totalNum; + } + + /** + * Get currentPage + * @return currentPage + **/ + @javax.annotation.Nullable + public BigDecimal getCurrentPage() { + return currentPage; + } + + + public void setCurrentPage(BigDecimal currentPage) { + this.currentPage = currentPage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + List200Response1 list200Response1 = (List200Response1) o; + return Objects.equals(this.data, list200Response1.data) && + Objects.equals(this.totalNum, list200Response1.totalNum) && + Objects.equals(this.currentPage, list200Response1.currentPage); + } + + @Override + public int hashCode() { + return Objects.hash(data, totalNum, currentPage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class List200Response1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" totalNum: ").append(toIndentedString(totalNum)).append("\n"); + sb.append(" currentPage: ").append(toIndentedString(currentPage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("total_num"); + openapiFields.add("current_page"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to List200Response1 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!List200Response1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in List200Response1 is not found in the empty JSON string", List200Response1.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + List200Response1DataInner.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!List200Response1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'List200Response1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(List200Response1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, List200Response1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public List200Response1 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of List200Response1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of List200Response1 + * @throws IOException if the JSON string is invalid with respect to List200Response1 + */ + public static List200Response1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, List200Response1.class); + } + + /** + * Convert an instance of List200Response1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/List200Response1DataInner.java b/src/main/java/com/idmesh/model/List200Response1DataInner.java new file mode 100644 index 0000000..045a12d --- /dev/null +++ b/src/main/java/com/idmesh/model/List200Response1DataInner.java @@ -0,0 +1,667 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.List200Response1DataInnerAllowedProviderIdInner; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * List200Response1DataInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class List200Response1DataInner { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_DEVELOPER_ID = "developer_id"; + @SerializedName(SERIALIZED_NAME_DEVELOPER_ID) + private String developerId; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private String tenantId; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_APP_ID = "app_id"; + @SerializedName(SERIALIZED_NAME_APP_ID) + private String appId; + + public static final String SERIALIZED_NAME_CATEGORY = "category"; + @SerializedName(SERIALIZED_NAME_CATEGORY) + private String category; + + public static final String SERIALIZED_NAME_APP_SECRET = "app_secret"; + @SerializedName(SERIALIZED_NAME_APP_SECRET) + private String appSecret; + + public static final String SERIALIZED_NAME_DESCR = "descr"; + @SerializedName(SERIALIZED_NAME_DESCR) + private String descr; + + public static final String SERIALIZED_NAME_LOGO = "logo"; + @SerializedName(SERIALIZED_NAME_LOGO) + private String logo; + + public static final String SERIALIZED_NAME_LOGIN_URL = "login_url"; + @SerializedName(SERIALIZED_NAME_LOGIN_URL) + private String loginUrl; + + public static final String SERIALIZED_NAME_DOMAIN = "domain"; + @SerializedName(SERIALIZED_NAME_DOMAIN) + private String domain; + + public static final String SERIALIZED_NAME_REDIRECT_URL = "redirect_url"; + @SerializedName(SERIALIZED_NAME_REDIRECT_URL) + private String redirectUrl; + + public static final String SERIALIZED_NAME_LOGOUT_URL = "logout_url"; + @SerializedName(SERIALIZED_NAME_LOGOUT_URL) + private String logoutUrl; + + public static final String SERIALIZED_NAME_SUB_ACCOUNT_POLICY = "sub_account_policy"; + @SerializedName(SERIALIZED_NAME_SUB_ACCOUNT_POLICY) + private Integer subAccountPolicy; + + public static final String SERIALIZED_NAME_PROP = "prop"; + @SerializedName(SERIALIZED_NAME_PROP) + private Object prop; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_ALLOWED_PROVIDER_ID = "allowed_provider_id"; + @SerializedName(SERIALIZED_NAME_ALLOWED_PROVIDER_ID) + private List allowedProviderId; + + public List200Response1DataInner() { + } + /** + * 唯一标识 + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * 开发者ID + * @return developerId + **/ + @javax.annotation.Nonnull + public String getDeveloperId() { + return developerId; + } + + + public void setDeveloperId(String developerId) { + this.developerId = developerId; + } + + /** + * 租户ID + * @return tenantId + **/ + @javax.annotation.Nonnull + public String getTenantId() { + return tenantId; + } + + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + /** + * 应用名称 + * @return name + **/ + @javax.annotation.Nullable + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + /** + * 应用类型,1自建应用,2市场应用 + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * APPID + * @return appId + **/ + @javax.annotation.Nullable + public String getAppId() { + return appId; + } + + + public void setAppId(String appId) { + this.appId = appId; + } + + /** + * 应用分类,1 标准web应用,2单页web应用,3客户端应用,4后端服务 + * @return category + **/ + @javax.annotation.Nullable + public String getCategory() { + return category; + } + + + public void setCategory(String category) { + this.category = category; + } + + /** + * APPSEC,开发者用户调用返回 + * @return appSecret + **/ + @javax.annotation.Nullable + public String getAppSecret() { + return appSecret; + } + + + public void setAppSecret(String appSecret) { + this.appSecret = appSecret; + } + + /** + * 应用描述 + * @return descr + **/ + @javax.annotation.Nullable + public String getDescr() { + return descr; + } + + + public void setDescr(String descr) { + this.descr = descr; + } + + /** + * logo路径 + * @return logo + **/ + @javax.annotation.Nullable + public String getLogo() { + return logo; + } + + + public void setLogo(String logo) { + this.logo = logo; + } + + /** + * 登录路径 + * @return loginUrl + **/ + @javax.annotation.Nullable + public String getLoginUrl() { + return loginUrl; + } + + + public void setLoginUrl(String loginUrl) { + this.loginUrl = loginUrl; + } + + /** + * 应用绑定的唯一域名 + * @return domain + **/ + @javax.annotation.Nullable + public String getDomain() { + return domain; + } + + + public void setDomain(String domain) { + this.domain = domain; + } + + /** + * 重定向url + * @return redirectUrl + **/ + @javax.annotation.Nullable + public String getRedirectUrl() { + return redirectUrl; + } + + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + /** + * 登出url + * @return logoutUrl + **/ + @javax.annotation.Nullable + public String getLogoutUrl() { + return logoutUrl; + } + + + public void setLogoutUrl(String logoutUrl) { + this.logoutUrl = logoutUrl; + } + + /** + * 子账号策略 + * @return subAccountPolicy + **/ + @javax.annotation.Nullable + public Integer getSubAccountPolicy() { + return subAccountPolicy; + } + + + public void setSubAccountPolicy(Integer subAccountPolicy) { + this.subAccountPolicy = subAccountPolicy; + } + + /** + * 扩展属性 + * @return prop + **/ + @javax.annotation.Nullable + public Object getProp() { + return prop; + } + + + public void setProp(Object prop) { + this.prop = prop; + } + + /** + * 创建时间 + * @return timeCreated + **/ + @javax.annotation.Nullable + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * 更新时间 + * @return timeModified + **/ + @javax.annotation.Nullable + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + /** + * 状态,1启用,0禁用 + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + /** + * Get allowedProviderId + * @return allowedProviderId + **/ + @javax.annotation.Nullable + public List getAllowedProviderId() { + return allowedProviderId; + } + + + public void setAllowedProviderId(List allowedProviderId) { + this.allowedProviderId = allowedProviderId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + List200Response1DataInner list200Response1DataInner = (List200Response1DataInner) o; + return Objects.equals(this.id, list200Response1DataInner.id) && + Objects.equals(this.developerId, list200Response1DataInner.developerId) && + Objects.equals(this.tenantId, list200Response1DataInner.tenantId) && + Objects.equals(this.name, list200Response1DataInner.name) && + Objects.equals(this.type, list200Response1DataInner.type) && + Objects.equals(this.appId, list200Response1DataInner.appId) && + Objects.equals(this.category, list200Response1DataInner.category) && + Objects.equals(this.appSecret, list200Response1DataInner.appSecret) && + Objects.equals(this.descr, list200Response1DataInner.descr) && + Objects.equals(this.logo, list200Response1DataInner.logo) && + Objects.equals(this.loginUrl, list200Response1DataInner.loginUrl) && + Objects.equals(this.domain, list200Response1DataInner.domain) && + Objects.equals(this.redirectUrl, list200Response1DataInner.redirectUrl) && + Objects.equals(this.logoutUrl, list200Response1DataInner.logoutUrl) && + Objects.equals(this.subAccountPolicy, list200Response1DataInner.subAccountPolicy) && + Objects.equals(this.prop, list200Response1DataInner.prop) && + Objects.equals(this.timeCreated, list200Response1DataInner.timeCreated) && + Objects.equals(this.timeModified, list200Response1DataInner.timeModified) && + Objects.equals(this.status, list200Response1DataInner.status) && + Objects.equals(this.allowedProviderId, list200Response1DataInner.allowedProviderId); + } + + @Override + public int hashCode() { + return Objects.hash(id, developerId, tenantId, name, type, appId, category, appSecret, descr, logo, loginUrl, domain, redirectUrl, logoutUrl, subAccountPolicy, prop, timeCreated, timeModified, status, allowedProviderId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class List200Response1DataInner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" developerId: ").append(toIndentedString(developerId)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" appSecret: ").append(toIndentedString(appSecret)).append("\n"); + sb.append(" descr: ").append(toIndentedString(descr)).append("\n"); + sb.append(" logo: ").append(toIndentedString(logo)).append("\n"); + sb.append(" loginUrl: ").append(toIndentedString(loginUrl)).append("\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" redirectUrl: ").append(toIndentedString(redirectUrl)).append("\n"); + sb.append(" logoutUrl: ").append(toIndentedString(logoutUrl)).append("\n"); + sb.append(" subAccountPolicy: ").append(toIndentedString(subAccountPolicy)).append("\n"); + sb.append(" prop: ").append(toIndentedString(prop)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" allowedProviderId: ").append(toIndentedString(allowedProviderId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("developer_id"); + openapiFields.add("tenant_id"); + openapiFields.add("name"); + openapiFields.add("type"); + openapiFields.add("app_id"); + openapiFields.add("category"); + openapiFields.add("app_secret"); + openapiFields.add("descr"); + openapiFields.add("logo"); + openapiFields.add("login_url"); + openapiFields.add("domain"); + openapiFields.add("redirect_url"); + openapiFields.add("logout_url"); + openapiFields.add("sub_account_policy"); + openapiFields.add("prop"); + openapiFields.add("time_created"); + openapiFields.add("time_modified"); + openapiFields.add("status"); + openapiFields.add("allowed_provider_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("developer_id"); + openapiRequiredFields.add("tenant_id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to List200Response1DataInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!List200Response1DataInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in List200Response1DataInner is not found in the empty JSON string", List200Response1DataInner.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : List200Response1DataInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("developer_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `developer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("developer_id").toString())); + } + if (!jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("app_id") != null && !jsonObj.get("app_id").isJsonNull()) && !jsonObj.get("app_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `app_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("app_id").toString())); + } + if ((jsonObj.get("category") != null && !jsonObj.get("category").isJsonNull()) && !jsonObj.get("category").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); + } + if ((jsonObj.get("app_secret") != null && !jsonObj.get("app_secret").isJsonNull()) && !jsonObj.get("app_secret").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `app_secret` to be a primitive type in the JSON string but got `%s`", jsonObj.get("app_secret").toString())); + } + if ((jsonObj.get("descr") != null && !jsonObj.get("descr").isJsonNull()) && !jsonObj.get("descr").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `descr` to be a primitive type in the JSON string but got `%s`", jsonObj.get("descr").toString())); + } + if ((jsonObj.get("logo") != null && !jsonObj.get("logo").isJsonNull()) && !jsonObj.get("logo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `logo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logo").toString())); + } + if ((jsonObj.get("login_url") != null && !jsonObj.get("login_url").isJsonNull()) && !jsonObj.get("login_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `login_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("login_url").toString())); + } + if ((jsonObj.get("domain") != null && !jsonObj.get("domain").isJsonNull()) && !jsonObj.get("domain").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `domain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("domain").toString())); + } + if ((jsonObj.get("redirect_url") != null && !jsonObj.get("redirect_url").isJsonNull()) && !jsonObj.get("redirect_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `redirect_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirect_url").toString())); + } + if ((jsonObj.get("logout_url") != null && !jsonObj.get("logout_url").isJsonNull()) && !jsonObj.get("logout_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `logout_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logout_url").toString())); + } + if ((jsonObj.get("time_created") != null && !jsonObj.get("time_created").isJsonNull()) && !jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if ((jsonObj.get("time_modified") != null && !jsonObj.get("time_modified").isJsonNull()) && !jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if (jsonObj.get("allowed_provider_id") != null && !jsonObj.get("allowed_provider_id").isJsonNull()) { + JsonArray jsonArrayallowedProviderId = jsonObj.getAsJsonArray("allowed_provider_id"); + if (jsonArrayallowedProviderId != null) { + // ensure the json data is an array + if (!jsonObj.get("allowed_provider_id").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `allowed_provider_id` to be an array in the JSON string but got `%s`", jsonObj.get("allowed_provider_id").toString())); + } + + // validate the optional field `allowed_provider_id` (array) + for (int i = 0; i < jsonArrayallowedProviderId.size(); i++) { + List200Response1DataInnerAllowedProviderIdInner.validateJsonElement(jsonArrayallowedProviderId.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!List200Response1DataInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'List200Response1DataInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(List200Response1DataInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, List200Response1DataInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public List200Response1DataInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of List200Response1DataInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of List200Response1DataInner + * @throws IOException if the JSON string is invalid with respect to List200Response1DataInner + */ + public static List200Response1DataInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, List200Response1DataInner.class); + } + + /** + * Convert an instance of List200Response1DataInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/List200Response1DataInnerAllowedProviderIdInner.java b/src/main/java/com/idmesh/model/List200Response1DataInnerAllowedProviderIdInner.java new file mode 100644 index 0000000..ceabbaa --- /dev/null +++ b/src/main/java/com/idmesh/model/List200Response1DataInnerAllowedProviderIdInner.java @@ -0,0 +1,252 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * List200Response1DataInnerAllowedProviderIdInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class List200Response1DataInnerAllowedProviderIdInner { + public static final String SERIALIZED_NAME_CONFIG_ID = "config_id"; + @SerializedName(SERIALIZED_NAME_CONFIG_ID) + private String configId; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_PROVIDER_TYPE = "provider_type"; + @SerializedName(SERIALIZED_NAME_PROVIDER_TYPE) + private String providerType; + + public List200Response1DataInnerAllowedProviderIdInner() { + } + /** + * Get configId + * @return configId + **/ + @javax.annotation.Nonnull + public String getConfigId() { + return configId; + } + + + public void setConfigId(String configId) { + this.configId = configId; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + /** + * Get providerType + * @return providerType + **/ + @javax.annotation.Nonnull + public String getProviderType() { + return providerType; + } + + + public void setProviderType(String providerType) { + this.providerType = providerType; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + List200Response1DataInnerAllowedProviderIdInner list200Response1DataInnerAllowedProviderIdInner = (List200Response1DataInnerAllowedProviderIdInner) o; + return Objects.equals(this.configId, list200Response1DataInnerAllowedProviderIdInner.configId) && + Objects.equals(this.name, list200Response1DataInnerAllowedProviderIdInner.name) && + Objects.equals(this.providerType, list200Response1DataInnerAllowedProviderIdInner.providerType); + } + + @Override + public int hashCode() { + return Objects.hash(configId, name, providerType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class List200Response1DataInnerAllowedProviderIdInner {\n"); + sb.append(" configId: ").append(toIndentedString(configId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" providerType: ").append(toIndentedString(providerType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("config_id"); + openapiFields.add("name"); + openapiFields.add("provider_type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("config_id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("provider_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to List200Response1DataInnerAllowedProviderIdInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!List200Response1DataInnerAllowedProviderIdInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in List200Response1DataInnerAllowedProviderIdInner is not found in the empty JSON string", List200Response1DataInnerAllowedProviderIdInner.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : List200Response1DataInnerAllowedProviderIdInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("config_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `config_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("config_id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("provider_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `provider_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("provider_type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!List200Response1DataInnerAllowedProviderIdInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'List200Response1DataInnerAllowedProviderIdInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(List200Response1DataInnerAllowedProviderIdInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, List200Response1DataInnerAllowedProviderIdInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public List200Response1DataInnerAllowedProviderIdInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of List200Response1DataInnerAllowedProviderIdInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of List200Response1DataInnerAllowedProviderIdInner + * @throws IOException if the JSON string is invalid with respect to List200Response1DataInnerAllowedProviderIdInner + */ + public static List200Response1DataInnerAllowedProviderIdInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, List200Response1DataInnerAllowedProviderIdInner.class); + } + + /** + * Convert an instance of List200Response1DataInnerAllowedProviderIdInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/List200ResponseDataInner.java b/src/main/java/com/idmesh/model/List200ResponseDataInner.java new file mode 100644 index 0000000..042eba5 --- /dev/null +++ b/src/main/java/com/idmesh/model/List200ResponseDataInner.java @@ -0,0 +1,840 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * List200ResponseDataInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class List200ResponseDataInner { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private BigDecimal id; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + private String username; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + @SerializedName(SERIALIZED_NAME_PASSWORD) + private String password; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + private String displayName; + + public static final String SERIALIZED_NAME_FIRSTNAME = "firstname"; + @SerializedName(SERIALIZED_NAME_FIRSTNAME) + private String firstname; + + public static final String SERIALIZED_NAME_LASTNAME = "lastname"; + @SerializedName(SERIALIZED_NAME_LASTNAME) + private String lastname; + + public static final String SERIALIZED_NAME_REALNAME = "realname"; + @SerializedName(SERIALIZED_NAME_REALNAME) + private String realname; + + public static final String SERIALIZED_NAME_PINYIN = "pinyin"; + @SerializedName(SERIALIZED_NAME_PINYIN) + private String pinyin; + + public static final String SERIALIZED_NAME_NICKNAME = "nickname"; + @SerializedName(SERIALIZED_NAME_NICKNAME) + private String nickname; + + public static final String SERIALIZED_NAME_USER_TYPE = "user_type"; + @SerializedName(SERIALIZED_NAME_USER_TYPE) + private String userType; + + public static final String SERIALIZED_NAME_MOBILE = "mobile"; + @SerializedName(SERIALIZED_NAME_MOBILE) + private String mobile; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_GENDER = "gender"; + @SerializedName(SERIALIZED_NAME_GENDER) + private String gender; + + public static final String SERIALIZED_NAME_CERT_TYPE = "cert_type"; + @SerializedName(SERIALIZED_NAME_CERT_TYPE) + private String certType; + + public static final String SERIALIZED_NAME_CERT_NUMBER = "cert_number"; + @SerializedName(SERIALIZED_NAME_CERT_NUMBER) + private String certNumber; + + public static final String SERIALIZED_NAME_REGION = "region"; + @SerializedName(SERIALIZED_NAME_REGION) + private String region; + + public static final String SERIALIZED_NAME_WORK_TIME = "work_time"; + @SerializedName(SERIALIZED_NAME_WORK_TIME) + private String workTime; + + public static final String SERIALIZED_NAME_WORK_TITLE = "work_title"; + @SerializedName(SERIALIZED_NAME_WORK_TITLE) + private String workTitle; + + public static final String SERIALIZED_NAME_EXT_PROP = "ext_prop"; + @SerializedName(SERIALIZED_NAME_EXT_PROP) + private Object extProp; + + public static final String SERIALIZED_NAME_ARN = "arn"; + @SerializedName(SERIALIZED_NAME_ARN) + private String arn; + + public static final String SERIALIZED_NAME_ID_PROVIDER_CONNECTION = "id_provider_connection"; + @SerializedName(SERIALIZED_NAME_ID_PROVIDER_CONNECTION) + private BigDecimal idProviderConnection; + + public static final String SERIALIZED_NAME_DEVELOPER_ID = "developer_id"; + @SerializedName(SERIALIZED_NAME_DEVELOPER_ID) + private BigDecimal developerId; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private BigDecimal tenantId; + + public static final String SERIALIZED_NAME_LAST_LOGIN_IPADDR = "last_login_ipaddr"; + @SerializedName(SERIALIZED_NAME_LAST_LOGIN_IPADDR) + private String lastLoginIpaddr; + + public static final String SERIALIZED_NAME_LAST_LOGIN_TIME = "last_login_time"; + @SerializedName(SERIALIZED_NAME_LAST_LOGIN_TIME) + private String lastLoginTime; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public List200ResponseDataInner() { + } + /** + * 用户id标识 + * @return id + **/ + @javax.annotation.Nullable + public BigDecimal getId() { + return id; + } + + + public void setId(BigDecimal id) { + this.id = id; + } + + /** + * 用户名,唯一 + * @return username + **/ + @javax.annotation.Nonnull + public String getUsername() { + return username; + } + + + public void setUsername(String username) { + this.username = username; + } + + /** + * 密码 + * @return password + **/ + @javax.annotation.Nonnull + public String getPassword() { + return password; + } + + + public void setPassword(String password) { + this.password = password; + } + + /** + * 显示名称 + * @return displayName + **/ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + /** + * 名 + * @return firstname + **/ + @javax.annotation.Nullable + public String getFirstname() { + return firstname; + } + + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + + /** + * 姓 + * @return lastname + **/ + @javax.annotation.Nullable + public String getLastname() { + return lastname; + } + + + public void setLastname(String lastname) { + this.lastname = lastname; + } + + /** + * 真实姓名 + * @return realname + **/ + @javax.annotation.Nullable + public String getRealname() { + return realname; + } + + + public void setRealname(String realname) { + this.realname = realname; + } + + /** + * 拼音 + * @return pinyin + **/ + @javax.annotation.Nullable + public String getPinyin() { + return pinyin; + } + + + public void setPinyin(String pinyin) { + this.pinyin = pinyin; + } + + /** + * 昵称 + * @return nickname + **/ + @javax.annotation.Nullable + public String getNickname() { + return nickname; + } + + + public void setNickname(String nickname) { + this.nickname = nickname; + } + + /** + * 用户类型 + * @return userType + **/ + @javax.annotation.Nonnull + public String getUserType() { + return userType; + } + + + public void setUserType(String userType) { + this.userType = userType; + } + + /** + * 手机 + * @return mobile + **/ + @javax.annotation.Nullable + public String getMobile() { + return mobile; + } + + + public void setMobile(String mobile) { + this.mobile = mobile; + } + + /** + * 邮箱 + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + + public void setEmail(String email) { + this.email = email; + } + + /** + * 性别 + * @return gender + **/ + @javax.annotation.Nullable + public String getGender() { + return gender; + } + + + public void setGender(String gender) { + this.gender = gender; + } + + /** + * 证件类型 + * @return certType + **/ + @javax.annotation.Nullable + public String getCertType() { + return certType; + } + + + public void setCertType(String certType) { + this.certType = certType; + } + + /** + * 证件号 + * @return certNumber + **/ + @javax.annotation.Nullable + public String getCertNumber() { + return certNumber; + } + + + public void setCertNumber(String certNumber) { + this.certNumber = certNumber; + } + + /** + * 区域 + * @return region + **/ + @javax.annotation.Nullable + public String getRegion() { + return region; + } + + + public void setRegion(String region) { + this.region = region; + } + + /** + * 加入时间 + * @return workTime + **/ + @javax.annotation.Nullable + public String getWorkTime() { + return workTime; + } + + + public void setWorkTime(String workTime) { + this.workTime = workTime; + } + + /** + * 职位 + * @return workTitle + **/ + @javax.annotation.Nullable + public String getWorkTitle() { + return workTitle; + } + + + public void setWorkTitle(String workTitle) { + this.workTitle = workTitle; + } + + /** + * 扩展信息,json对象{\"age\": 18, \"love\": \"足球\"} + * @return extProp + **/ + @javax.annotation.Nullable + public Object getExtProp() { + return extProp; + } + + + public void setExtProp(Object extProp) { + this.extProp = extProp; + } + + /** + * arn + * @return arn + **/ + @javax.annotation.Nullable + public String getArn() { + return arn; + } + + + public void setArn(String arn) { + this.arn = arn; + } + + /** + * 身份源ID + * @return idProviderConnection + **/ + @javax.annotation.Nonnull + public BigDecimal getIdProviderConnection() { + return idProviderConnection; + } + + + public void setIdProviderConnection(BigDecimal idProviderConnection) { + this.idProviderConnection = idProviderConnection; + } + + /** + * 开发者id + * @return developerId + **/ + @javax.annotation.Nullable + public BigDecimal getDeveloperId() { + return developerId; + } + + + public void setDeveloperId(BigDecimal developerId) { + this.developerId = developerId; + } + + /** + * 租户id + * @return tenantId + **/ + @javax.annotation.Nullable + public BigDecimal getTenantId() { + return tenantId; + } + + + public void setTenantId(BigDecimal tenantId) { + this.tenantId = tenantId; + } + + /** + * 上次登录IP + * @return lastLoginIpaddr + **/ + @javax.annotation.Nullable + public String getLastLoginIpaddr() { + return lastLoginIpaddr; + } + + + public void setLastLoginIpaddr(String lastLoginIpaddr) { + this.lastLoginIpaddr = lastLoginIpaddr; + } + + /** + * 上次登录时间 + * @return lastLoginTime + **/ + @javax.annotation.Nullable + public String getLastLoginTime() { + return lastLoginTime; + } + + + public void setLastLoginTime(String lastLoginTime) { + this.lastLoginTime = lastLoginTime; + } + + /** + * 创建时间 + * @return timeCreated + **/ + @javax.annotation.Nullable + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * 修改时间 + * @return timeModified + **/ + @javax.annotation.Nullable + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + /** + * 状态:1正常,0禁用 + * @return status + **/ + @javax.annotation.Nonnull + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + List200ResponseDataInner list200ResponseDataInner = (List200ResponseDataInner) o; + return Objects.equals(this.id, list200ResponseDataInner.id) && + Objects.equals(this.username, list200ResponseDataInner.username) && + Objects.equals(this.password, list200ResponseDataInner.password) && + Objects.equals(this.displayName, list200ResponseDataInner.displayName) && + Objects.equals(this.firstname, list200ResponseDataInner.firstname) && + Objects.equals(this.lastname, list200ResponseDataInner.lastname) && + Objects.equals(this.realname, list200ResponseDataInner.realname) && + Objects.equals(this.pinyin, list200ResponseDataInner.pinyin) && + Objects.equals(this.nickname, list200ResponseDataInner.nickname) && + Objects.equals(this.userType, list200ResponseDataInner.userType) && + Objects.equals(this.mobile, list200ResponseDataInner.mobile) && + Objects.equals(this.email, list200ResponseDataInner.email) && + Objects.equals(this.gender, list200ResponseDataInner.gender) && + Objects.equals(this.certType, list200ResponseDataInner.certType) && + Objects.equals(this.certNumber, list200ResponseDataInner.certNumber) && + Objects.equals(this.region, list200ResponseDataInner.region) && + Objects.equals(this.workTime, list200ResponseDataInner.workTime) && + Objects.equals(this.workTitle, list200ResponseDataInner.workTitle) && + Objects.equals(this.extProp, list200ResponseDataInner.extProp) && + Objects.equals(this.arn, list200ResponseDataInner.arn) && + Objects.equals(this.idProviderConnection, list200ResponseDataInner.idProviderConnection) && + Objects.equals(this.developerId, list200ResponseDataInner.developerId) && + Objects.equals(this.tenantId, list200ResponseDataInner.tenantId) && + Objects.equals(this.lastLoginIpaddr, list200ResponseDataInner.lastLoginIpaddr) && + Objects.equals(this.lastLoginTime, list200ResponseDataInner.lastLoginTime) && + Objects.equals(this.timeCreated, list200ResponseDataInner.timeCreated) && + Objects.equals(this.timeModified, list200ResponseDataInner.timeModified) && + Objects.equals(this.status, list200ResponseDataInner.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, password, displayName, firstname, lastname, realname, pinyin, nickname, userType, mobile, email, gender, certType, certNumber, region, workTime, workTitle, extProp, arn, idProviderConnection, developerId, tenantId, lastLoginIpaddr, lastLoginTime, timeCreated, timeModified, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class List200ResponseDataInner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" firstname: ").append(toIndentedString(firstname)).append("\n"); + sb.append(" lastname: ").append(toIndentedString(lastname)).append("\n"); + sb.append(" realname: ").append(toIndentedString(realname)).append("\n"); + sb.append(" pinyin: ").append(toIndentedString(pinyin)).append("\n"); + sb.append(" nickname: ").append(toIndentedString(nickname)).append("\n"); + sb.append(" userType: ").append(toIndentedString(userType)).append("\n"); + sb.append(" mobile: ").append(toIndentedString(mobile)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" certType: ").append(toIndentedString(certType)).append("\n"); + sb.append(" certNumber: ").append(toIndentedString(certNumber)).append("\n"); + sb.append(" region: ").append(toIndentedString(region)).append("\n"); + sb.append(" workTime: ").append(toIndentedString(workTime)).append("\n"); + sb.append(" workTitle: ").append(toIndentedString(workTitle)).append("\n"); + sb.append(" extProp: ").append(toIndentedString(extProp)).append("\n"); + sb.append(" arn: ").append(toIndentedString(arn)).append("\n"); + sb.append(" idProviderConnection: ").append(toIndentedString(idProviderConnection)).append("\n"); + sb.append(" developerId: ").append(toIndentedString(developerId)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" lastLoginIpaddr: ").append(toIndentedString(lastLoginIpaddr)).append("\n"); + sb.append(" lastLoginTime: ").append(toIndentedString(lastLoginTime)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("username"); + openapiFields.add("password"); + openapiFields.add("display_name"); + openapiFields.add("firstname"); + openapiFields.add("lastname"); + openapiFields.add("realname"); + openapiFields.add("pinyin"); + openapiFields.add("nickname"); + openapiFields.add("user_type"); + openapiFields.add("mobile"); + openapiFields.add("email"); + openapiFields.add("gender"); + openapiFields.add("cert_type"); + openapiFields.add("cert_number"); + openapiFields.add("region"); + openapiFields.add("work_time"); + openapiFields.add("work_title"); + openapiFields.add("ext_prop"); + openapiFields.add("arn"); + openapiFields.add("id_provider_connection"); + openapiFields.add("developer_id"); + openapiFields.add("tenant_id"); + openapiFields.add("last_login_ipaddr"); + openapiFields.add("last_login_time"); + openapiFields.add("time_created"); + openapiFields.add("time_modified"); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("username"); + openapiRequiredFields.add("password"); + openapiRequiredFields.add("user_type"); + openapiRequiredFields.add("id_provider_connection"); + openapiRequiredFields.add("status"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to List200ResponseDataInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!List200ResponseDataInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in List200ResponseDataInner is not found in the empty JSON string", List200ResponseDataInner.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : List200ResponseDataInner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if (!jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } + if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) && !jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + if ((jsonObj.get("firstname") != null && !jsonObj.get("firstname").isJsonNull()) && !jsonObj.get("firstname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `firstname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstname").toString())); + } + if ((jsonObj.get("lastname") != null && !jsonObj.get("lastname").isJsonNull()) && !jsonObj.get("lastname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lastname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastname").toString())); + } + if ((jsonObj.get("realname") != null && !jsonObj.get("realname").isJsonNull()) && !jsonObj.get("realname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `realname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("realname").toString())); + } + if ((jsonObj.get("pinyin") != null && !jsonObj.get("pinyin").isJsonNull()) && !jsonObj.get("pinyin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `pinyin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pinyin").toString())); + } + if ((jsonObj.get("nickname") != null && !jsonObj.get("nickname").isJsonNull()) && !jsonObj.get("nickname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nickname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nickname").toString())); + } + if (!jsonObj.get("user_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_type").toString())); + } + if ((jsonObj.get("mobile") != null && !jsonObj.get("mobile").isJsonNull()) && !jsonObj.get("mobile").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mobile` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mobile").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("gender") != null && !jsonObj.get("gender").isJsonNull()) && !jsonObj.get("gender").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `gender` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gender").toString())); + } + if ((jsonObj.get("cert_type") != null && !jsonObj.get("cert_type").isJsonNull()) && !jsonObj.get("cert_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cert_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cert_type").toString())); + } + if ((jsonObj.get("cert_number") != null && !jsonObj.get("cert_number").isJsonNull()) && !jsonObj.get("cert_number").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cert_number` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cert_number").toString())); + } + if ((jsonObj.get("region") != null && !jsonObj.get("region").isJsonNull()) && !jsonObj.get("region").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `region` to be a primitive type in the JSON string but got `%s`", jsonObj.get("region").toString())); + } + if ((jsonObj.get("work_time") != null && !jsonObj.get("work_time").isJsonNull()) && !jsonObj.get("work_time").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `work_time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("work_time").toString())); + } + if ((jsonObj.get("work_title") != null && !jsonObj.get("work_title").isJsonNull()) && !jsonObj.get("work_title").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `work_title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("work_title").toString())); + } + if ((jsonObj.get("arn") != null && !jsonObj.get("arn").isJsonNull()) && !jsonObj.get("arn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `arn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("arn").toString())); + } + if ((jsonObj.get("last_login_ipaddr") != null && !jsonObj.get("last_login_ipaddr").isJsonNull()) && !jsonObj.get("last_login_ipaddr").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `last_login_ipaddr` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_login_ipaddr").toString())); + } + if ((jsonObj.get("last_login_time") != null && !jsonObj.get("last_login_time").isJsonNull()) && !jsonObj.get("last_login_time").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `last_login_time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_login_time").toString())); + } + if ((jsonObj.get("time_created") != null && !jsonObj.get("time_created").isJsonNull()) && !jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if ((jsonObj.get("time_modified") != null && !jsonObj.get("time_modified").isJsonNull()) && !jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!List200ResponseDataInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'List200ResponseDataInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(List200ResponseDataInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, List200ResponseDataInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public List200ResponseDataInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of List200ResponseDataInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of List200ResponseDataInner + * @throws IOException if the JSON string is invalid with respect to List200ResponseDataInner + */ + public static List200ResponseDataInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, List200ResponseDataInner.class); + } + + /** + * Convert an instance of List200ResponseDataInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/MFA.java b/src/main/java/com/idmesh/model/MFA.java new file mode 100644 index 0000000..3f9e6ab --- /dev/null +++ b/src/main/java/com/idmesh/model/MFA.java @@ -0,0 +1,282 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * MFA + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class MFA { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_PROVIDER_TYPE = "provider_type"; + @SerializedName(SERIALIZED_NAME_PROVIDER_TYPE) + private String providerType; + + public static final String SERIALIZED_NAME_CONFIG_ID = "config_id"; + @SerializedName(SERIALIZED_NAME_CONFIG_ID) + private String configId; + + public static final String SERIALIZED_NAME_SCENARIOS = "scenarios"; + @SerializedName(SERIALIZED_NAME_SCENARIOS) + private List scenarios = new ArrayList<>(); + + public MFA() { + } + /** + * Get name + * @return name + **/ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + /** + * Get providerType + * @return providerType + **/ + @javax.annotation.Nonnull + public String getProviderType() { + return providerType; + } + + + public void setProviderType(String providerType) { + this.providerType = providerType; + } + + /** + * Get configId + * @return configId + **/ + @javax.annotation.Nonnull + public String getConfigId() { + return configId; + } + + + public void setConfigId(String configId) { + this.configId = configId; + } + + /** + * Get scenarios + * @return scenarios + **/ + @javax.annotation.Nonnull + public List getScenarios() { + return scenarios; + } + + + public void setScenarios(List scenarios) { + this.scenarios = scenarios; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MFA ___MFA__ = (MFA) o; + return Objects.equals(this.name, ___MFA__.name) && + Objects.equals(this.providerType, ___MFA__.providerType) && + Objects.equals(this.configId, ___MFA__.configId) && + Objects.equals(this.scenarios, ___MFA__.scenarios); + } + + @Override + public int hashCode() { + return Objects.hash(name, providerType, configId, scenarios); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MFA {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" providerType: ").append(toIndentedString(providerType)).append("\n"); + sb.append(" configId: ").append(toIndentedString(configId)).append("\n"); + sb.append(" scenarios: ").append(toIndentedString(scenarios)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("provider_type"); + openapiFields.add("config_id"); + openapiFields.add("scenarios"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("provider_type"); + openapiRequiredFields.add("config_id"); + openapiRequiredFields.add("scenarios"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MFA + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MFA.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MFA is not found in the empty JSON string", MFA.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : MFA.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("provider_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `provider_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("provider_type").toString())); + } + if (!jsonObj.get("config_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `config_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("config_id").toString())); + } + // ensure the required json array is present + if (jsonObj.get("scenarios") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("scenarios").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `scenarios` to be an array in the JSON string but got `%s`", jsonObj.get("scenarios").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MFA.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MFA' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MFA.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MFA value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MFA read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MFA given an JSON string + * + * @param jsonString JSON string + * @return An instance of MFA + * @throws IOException if the JSON string is invalid with respect to MFA + */ + public static MFA fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MFA.class); + } + + /** + * Convert an instance of MFA to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/ModelObject.java b/src/main/java/com/idmesh/model/ModelObject.java new file mode 100644 index 0000000..f2d96f8 --- /dev/null +++ b/src/main/java/com/idmesh/model/ModelObject.java @@ -0,0 +1,302 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * ModelObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ModelObject { + public static final String SERIALIZED_NAME_BUCKET = "bucket"; + @SerializedName(SERIALIZED_NAME_BUCKET) + private String bucket; + + public static final String SERIALIZED_NAME_KEY = "key"; + @SerializedName(SERIALIZED_NAME_KEY) + private String key; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private String value; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + private String updatedAt; + + public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private String createdAt; + + public ModelObject() { + } + /** + * Get bucket + * @return bucket + **/ + @javax.annotation.Nonnull + public String getBucket() { + return bucket; + } + + + public void setBucket(String bucket) { + this.bucket = bucket; + } + + /** + * Get key + * @return key + **/ + @javax.annotation.Nonnull + public String getKey() { + return key; + } + + + public void setKey(String key) { + this.key = key; + } + + /** + * Get value + * @return value + **/ + @javax.annotation.Nonnull + public String getValue() { + return value; + } + + + public void setValue(String value) { + this.value = value; + } + + /** + * rfc3339 + * @return updatedAt + **/ + @javax.annotation.Nonnull + public String getUpdatedAt() { + return updatedAt; + } + + + public void setUpdatedAt(String updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * rfc3339 + * @return createdAt + **/ + @javax.annotation.Nonnull + public String getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelObject _object = (ModelObject) o; + return Objects.equals(this.bucket, _object.bucket) && + Objects.equals(this.key, _object.key) && + Objects.equals(this.value, _object.value) && + Objects.equals(this.updatedAt, _object.updatedAt) && + Objects.equals(this.createdAt, _object.createdAt); + } + + @Override + public int hashCode() { + return Objects.hash(bucket, key, value, updatedAt, createdAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelObject {\n"); + sb.append(" bucket: ").append(toIndentedString(bucket)).append("\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("bucket"); + openapiFields.add("key"); + openapiFields.add("value"); + openapiFields.add("updated_at"); + openapiFields.add("created_at"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("bucket"); + openapiRequiredFields.add("key"); + openapiRequiredFields.add("value"); + openapiRequiredFields.add("updated_at"); + openapiRequiredFields.add("created_at"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ModelObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ModelObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ModelObject is not found in the empty JSON string", ModelObject.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ModelObject.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("bucket").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `bucket` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bucket").toString())); + } + if (!jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); + } + if (!jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + if (!jsonObj.get("updated_at").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `updated_at` to be a primitive type in the JSON string but got `%s`", jsonObj.get("updated_at").toString())); + } + if (!jsonObj.get("created_at").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `created_at` to be a primitive type in the JSON string but got `%s`", jsonObj.get("created_at").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ModelObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ModelObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ModelObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ModelObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ModelObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ModelObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of ModelObject + * @throws IOException if the JSON string is invalid with respect to ModelObject + */ + public static ModelObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ModelObject.class); + } + + /** + * Convert an instance of ModelObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/Modify200Response.java b/src/main/java/com/idmesh/model/Modify200Response.java new file mode 100644 index 0000000..5ccea2a --- /dev/null +++ b/src/main/java/com/idmesh/model/Modify200Response.java @@ -0,0 +1,268 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * Modify200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Modify200Response { + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private BigDecimal code; + + public static final String SERIALIZED_NAME_ERRNO = "errno"; + @SerializedName(SERIALIZED_NAME_ERRNO) + private BigDecimal errno; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private Object data; + + public Modify200Response() { + } + /** + * http状态码,成功不显示 + * @return code + **/ + @javax.annotation.Nullable + public BigDecimal getCode() { + return code; + } + + + public void setCode(BigDecimal code) { + this.code = code; + } + + /** + * 返回错误码 + * @return errno + **/ + @javax.annotation.Nonnull + public BigDecimal getErrno() { + return errno; + } + + + public void setErrno(BigDecimal errno) { + this.errno = errno; + } + + /** + * 返回描述 + * @return message + **/ + @javax.annotation.Nonnull + public String getMessage() { + return message; + } + + + public void setMessage(String message) { + this.message = message; + } + + /** + * 返回用户id + * @return data + **/ + @javax.annotation.Nonnull + public Object getData() { + return data; + } + + + public void setData(Object data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Modify200Response modify200Response = (Modify200Response) o; + return Objects.equals(this.code, modify200Response.code) && + Objects.equals(this.errno, modify200Response.errno) && + Objects.equals(this.message, modify200Response.message) && + Objects.equals(this.data, modify200Response.data); + } + + @Override + public int hashCode() { + return Objects.hash(code, errno, message, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Modify200Response {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" errno: ").append(toIndentedString(errno)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("code"); + openapiFields.add("errno"); + openapiFields.add("message"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("errno"); + openapiRequiredFields.add("message"); + openapiRequiredFields.add("data"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Modify200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Modify200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Modify200Response is not found in the empty JSON string", Modify200Response.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Modify200Response.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Modify200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Modify200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Modify200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Modify200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Modify200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Modify200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of Modify200Response + * @throws IOException if the JSON string is invalid with respect to Modify200Response + */ + public static Modify200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Modify200Response.class); + } + + /** + * Convert an instance of Modify200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/Modify200Response1.java b/src/main/java/com/idmesh/model/Modify200Response1.java new file mode 100644 index 0000000..c20ec26 --- /dev/null +++ b/src/main/java/com/idmesh/model/Modify200Response1.java @@ -0,0 +1,216 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * Modify200Response1 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Modify200Response1 { + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private BigDecimal data; + + public Modify200Response1() { + } + /** + * Get message + * @return message + **/ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + + public void setMessage(String message) { + this.message = message; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + public BigDecimal getData() { + return data; + } + + + public void setData(BigDecimal data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Modify200Response1 modify200Response1 = (Modify200Response1) o; + return Objects.equals(this.message, modify200Response1.message) && + Objects.equals(this.data, modify200Response1.data); + } + + @Override + public int hashCode() { + return Objects.hash(message, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Modify200Response1 {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("message"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Modify200Response1 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Modify200Response1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Modify200Response1 is not found in the empty JSON string", Modify200Response1.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Modify200Response1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Modify200Response1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Modify200Response1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Modify200Response1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Modify200Response1 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Modify200Response1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of Modify200Response1 + * @throws IOException if the JSON string is invalid with respect to Modify200Response1 + */ + public static Modify200Response1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Modify200Response1.class); + } + + /** + * Convert an instance of Modify200Response1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/ModifyAccountRequest.java b/src/main/java/com/idmesh/model/ModifyAccountRequest.java new file mode 100644 index 0000000..049471e --- /dev/null +++ b/src/main/java/com/idmesh/model/ModifyAccountRequest.java @@ -0,0 +1,380 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * ModifyAccountRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ModifyAccountRequest { + public static final String SERIALIZED_NAME_USER_ID = "user_id"; + @SerializedName(SERIALIZED_NAME_USER_ID) + private String userId; + + public static final String SERIALIZED_NAME_APP_ID = "app_id"; + @SerializedName(SERIALIZED_NAME_APP_ID) + private String appId; + + public static final String SERIALIZED_NAME_ACC_NAME = "acc_name"; + @SerializedName(SERIALIZED_NAME_ACC_NAME) + private String accName; + + public static final String SERIALIZED_NAME_ACC_NAME_DISPLAYED = "acc_name_displayed"; + @SerializedName(SERIALIZED_NAME_ACC_NAME_DISPLAYED) + private String accNameDisplayed; + + public static final String SERIALIZED_NAME_ACC_SOURCE = "acc_source"; + @SerializedName(SERIALIZED_NAME_ACC_SOURCE) + private String accSource; + + public static final String SERIALIZED_NAME_ACC_PASSWORD = "acc_password"; + @SerializedName(SERIALIZED_NAME_ACC_PASSWORD) + private String accPassword; + + public static final String SERIALIZED_NAME_ACC_STATUS = "acc_status"; + @SerializedName(SERIALIZED_NAME_ACC_STATUS) + private String accStatus; + + public static final String SERIALIZED_NAME_SYS_EXT_PROPS = "sys_ext_props"; + @SerializedName(SERIALIZED_NAME_SYS_EXT_PROPS) + private Object sysExtProps; + + public static final String SERIALIZED_NAME_FREE_EXT_PROPS = "free_ext_props"; + @SerializedName(SERIALIZED_NAME_FREE_EXT_PROPS) + private Object freeExtProps; + + public ModifyAccountRequest() { + } + /** + * Get userId + * @return userId + **/ + @javax.annotation.Nullable + public String getUserId() { + return userId; + } + + + public void setUserId(String userId) { + this.userId = userId; + } + + /** + * Get appId + * @return appId + **/ + @javax.annotation.Nullable + public String getAppId() { + return appId; + } + + + public void setAppId(String appId) { + this.appId = appId; + } + + /** + * Get accName + * @return accName + **/ + @javax.annotation.Nullable + public String getAccName() { + return accName; + } + + + public void setAccName(String accName) { + this.accName = accName; + } + + /** + * Get accNameDisplayed + * @return accNameDisplayed + **/ + @javax.annotation.Nullable + public String getAccNameDisplayed() { + return accNameDisplayed; + } + + + public void setAccNameDisplayed(String accNameDisplayed) { + this.accNameDisplayed = accNameDisplayed; + } + + /** + * Get accSource + * @return accSource + **/ + @javax.annotation.Nullable + public String getAccSource() { + return accSource; + } + + + public void setAccSource(String accSource) { + this.accSource = accSource; + } + + /** + * Get accPassword + * @return accPassword + **/ + @javax.annotation.Nullable + public String getAccPassword() { + return accPassword; + } + + + public void setAccPassword(String accPassword) { + this.accPassword = accPassword; + } + + /** + * 1启用,0禁用 + * @return accStatus + **/ + @javax.annotation.Nullable + public String getAccStatus() { + return accStatus; + } + + + public void setAccStatus(String accStatus) { + this.accStatus = accStatus; + } + + /** + * Get sysExtProps + * @return sysExtProps + **/ + @javax.annotation.Nullable + public Object getSysExtProps() { + return sysExtProps; + } + + + public void setSysExtProps(Object sysExtProps) { + this.sysExtProps = sysExtProps; + } + + /** + * Get freeExtProps + * @return freeExtProps + **/ + @javax.annotation.Nullable + public Object getFreeExtProps() { + return freeExtProps; + } + + + public void setFreeExtProps(Object freeExtProps) { + this.freeExtProps = freeExtProps; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModifyAccountRequest modifyAccountRequest = (ModifyAccountRequest) o; + return Objects.equals(this.userId, modifyAccountRequest.userId) && + Objects.equals(this.appId, modifyAccountRequest.appId) && + Objects.equals(this.accName, modifyAccountRequest.accName) && + Objects.equals(this.accNameDisplayed, modifyAccountRequest.accNameDisplayed) && + Objects.equals(this.accSource, modifyAccountRequest.accSource) && + Objects.equals(this.accPassword, modifyAccountRequest.accPassword) && + Objects.equals(this.accStatus, modifyAccountRequest.accStatus) && + Objects.equals(this.sysExtProps, modifyAccountRequest.sysExtProps) && + Objects.equals(this.freeExtProps, modifyAccountRequest.freeExtProps); + } + + @Override + public int hashCode() { + return Objects.hash(userId, appId, accName, accNameDisplayed, accSource, accPassword, accStatus, sysExtProps, freeExtProps); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModifyAccountRequest {\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); + sb.append(" accName: ").append(toIndentedString(accName)).append("\n"); + sb.append(" accNameDisplayed: ").append(toIndentedString(accNameDisplayed)).append("\n"); + sb.append(" accSource: ").append(toIndentedString(accSource)).append("\n"); + sb.append(" accPassword: ").append(toIndentedString(accPassword)).append("\n"); + sb.append(" accStatus: ").append(toIndentedString(accStatus)).append("\n"); + sb.append(" sysExtProps: ").append(toIndentedString(sysExtProps)).append("\n"); + sb.append(" freeExtProps: ").append(toIndentedString(freeExtProps)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("user_id"); + openapiFields.add("app_id"); + openapiFields.add("acc_name"); + openapiFields.add("acc_name_displayed"); + openapiFields.add("acc_source"); + openapiFields.add("acc_password"); + openapiFields.add("acc_status"); + openapiFields.add("sys_ext_props"); + openapiFields.add("free_ext_props"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ModifyAccountRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ModifyAccountRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ModifyAccountRequest is not found in the empty JSON string", ModifyAccountRequest.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("user_id") != null && !jsonObj.get("user_id").isJsonNull()) && !jsonObj.get("user_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_id").toString())); + } + if ((jsonObj.get("app_id") != null && !jsonObj.get("app_id").isJsonNull()) && !jsonObj.get("app_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `app_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("app_id").toString())); + } + if ((jsonObj.get("acc_name") != null && !jsonObj.get("acc_name").isJsonNull()) && !jsonObj.get("acc_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `acc_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acc_name").toString())); + } + if ((jsonObj.get("acc_name_displayed") != null && !jsonObj.get("acc_name_displayed").isJsonNull()) && !jsonObj.get("acc_name_displayed").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `acc_name_displayed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acc_name_displayed").toString())); + } + if ((jsonObj.get("acc_source") != null && !jsonObj.get("acc_source").isJsonNull()) && !jsonObj.get("acc_source").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `acc_source` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acc_source").toString())); + } + if ((jsonObj.get("acc_password") != null && !jsonObj.get("acc_password").isJsonNull()) && !jsonObj.get("acc_password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `acc_password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acc_password").toString())); + } + if ((jsonObj.get("acc_status") != null && !jsonObj.get("acc_status").isJsonNull()) && !jsonObj.get("acc_status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `acc_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acc_status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ModifyAccountRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ModifyAccountRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ModifyAccountRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ModifyAccountRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ModifyAccountRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ModifyAccountRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ModifyAccountRequest + * @throws IOException if the JSON string is invalid with respect to ModifyAccountRequest + */ + public static ModifyAccountRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ModifyAccountRequest.class); + } + + /** + * Convert an instance of ModifyAccountRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/ModifyConfigRequest.java b/src/main/java/com/idmesh/model/ModifyConfigRequest.java new file mode 100644 index 0000000..1ed4a24 --- /dev/null +++ b/src/main/java/com/idmesh/model/ModifyConfigRequest.java @@ -0,0 +1,341 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * ModifyConfigRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ModifyConfigRequest { + public static final String SERIALIZED_NAME_ALLOWED_LOGIN_METHOD = "allowed_login_method"; + @SerializedName(SERIALIZED_NAME_ALLOWED_LOGIN_METHOD) + private String allowedLoginMethod; + + public static final String SERIALIZED_NAME_DEFAULT_LOGIN_METHOD = "default_login_method"; + @SerializedName(SERIALIZED_NAME_DEFAULT_LOGIN_METHOD) + private String defaultLoginMethod; + + public static final String SERIALIZED_NAME_ALLOWED_REG_METHOD = "allowed_reg_method"; + @SerializedName(SERIALIZED_NAME_ALLOWED_REG_METHOD) + private String allowedRegMethod; + + public static final String SERIALIZED_NAME_DEFAULT_REG_METHOD = "default_reg_method"; + @SerializedName(SERIALIZED_NAME_DEFAULT_REG_METHOD) + private String defaultRegMethod; + + public static final String SERIALIZED_NAME_DEFAULT_PROTOCOL = "default_protocol"; + @SerializedName(SERIALIZED_NAME_DEFAULT_PROTOCOL) + private String defaultProtocol; + + public static final String SERIALIZED_NAME_ACCESS_POLICY = "access_policy"; + @SerializedName(SERIALIZED_NAME_ACCESS_POLICY) + private String accessPolicy; + + public static final String SERIALIZED_NAME_REG_POLICY = "reg_policy"; + @SerializedName(SERIALIZED_NAME_REG_POLICY) + private List regPolicy; + + public ModifyConfigRequest() { + } + /** + * 允许的登录方式,格式为:[\"password\", \"vercode\"] + * @return allowedLoginMethod + **/ + @javax.annotation.Nullable + public String getAllowedLoginMethod() { + return allowedLoginMethod; + } + + + public void setAllowedLoginMethod(String allowedLoginMethod) { + this.allowedLoginMethod = allowedLoginMethod; + } + + /** + * 默认登录方式,格式为:password + * @return defaultLoginMethod + **/ + @javax.annotation.Nullable + public String getDefaultLoginMethod() { + return defaultLoginMethod; + } + + + public void setDefaultLoginMethod(String defaultLoginMethod) { + this.defaultLoginMethod = defaultLoginMethod; + } + + /** + * 允许注册方式,格式为:[\"mobile\", \"email\"] + * @return allowedRegMethod + **/ + @javax.annotation.Nullable + public String getAllowedRegMethod() { + return allowedRegMethod; + } + + + public void setAllowedRegMethod(String allowedRegMethod) { + this.allowedRegMethod = allowedRegMethod; + } + + /** + * 默认注册方式,格式为:mobile + * @return defaultRegMethod + **/ + @javax.annotation.Nullable + public String getDefaultRegMethod() { + return defaultRegMethod; + } + + + public void setDefaultRegMethod(String defaultRegMethod) { + this.defaultRegMethod = defaultRegMethod; + } + + /** + * 默认登录协议 + * @return defaultProtocol + **/ + @javax.annotation.Nullable + public String getDefaultProtocol() { + return defaultProtocol; + } + + + public void setDefaultProtocol(String defaultProtocol) { + this.defaultProtocol = defaultProtocol; + } + + /** + * 应用级访问控制权限,all: 所有人可访问 permitted: 拒绝未授权访问 + * @return accessPolicy + **/ + @javax.annotation.Nullable + public String getAccessPolicy() { + return accessPolicy; + } + + + public void setAccessPolicy(String accessPolicy) { + this.accessPolicy = accessPolicy; + } + + /** + * 新用户注册策略(是否允许自动注册,注册验证方式等),1是,2否, + * @return regPolicy + **/ + @javax.annotation.Nullable + public List getRegPolicy() { + return regPolicy; + } + + + public void setRegPolicy(List regPolicy) { + this.regPolicy = regPolicy; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModifyConfigRequest modifyConfigRequest = (ModifyConfigRequest) o; + return Objects.equals(this.allowedLoginMethod, modifyConfigRequest.allowedLoginMethod) && + Objects.equals(this.defaultLoginMethod, modifyConfigRequest.defaultLoginMethod) && + Objects.equals(this.allowedRegMethod, modifyConfigRequest.allowedRegMethod) && + Objects.equals(this.defaultRegMethod, modifyConfigRequest.defaultRegMethod) && + Objects.equals(this.defaultProtocol, modifyConfigRequest.defaultProtocol) && + Objects.equals(this.accessPolicy, modifyConfigRequest.accessPolicy) && + Objects.equals(this.regPolicy, modifyConfigRequest.regPolicy); + } + + @Override + public int hashCode() { + return Objects.hash(allowedLoginMethod, defaultLoginMethod, allowedRegMethod, defaultRegMethod, defaultProtocol, accessPolicy, regPolicy); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModifyConfigRequest {\n"); + sb.append(" allowedLoginMethod: ").append(toIndentedString(allowedLoginMethod)).append("\n"); + sb.append(" defaultLoginMethod: ").append(toIndentedString(defaultLoginMethod)).append("\n"); + sb.append(" allowedRegMethod: ").append(toIndentedString(allowedRegMethod)).append("\n"); + sb.append(" defaultRegMethod: ").append(toIndentedString(defaultRegMethod)).append("\n"); + sb.append(" defaultProtocol: ").append(toIndentedString(defaultProtocol)).append("\n"); + sb.append(" accessPolicy: ").append(toIndentedString(accessPolicy)).append("\n"); + sb.append(" regPolicy: ").append(toIndentedString(regPolicy)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("allowed_login_method"); + openapiFields.add("default_login_method"); + openapiFields.add("allowed_reg_method"); + openapiFields.add("default_reg_method"); + openapiFields.add("default_protocol"); + openapiFields.add("access_policy"); + openapiFields.add("reg_policy"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ModifyConfigRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ModifyConfigRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ModifyConfigRequest is not found in the empty JSON string", ModifyConfigRequest.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("allowed_login_method") != null && !jsonObj.get("allowed_login_method").isJsonNull()) && !jsonObj.get("allowed_login_method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `allowed_login_method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("allowed_login_method").toString())); + } + if ((jsonObj.get("default_login_method") != null && !jsonObj.get("default_login_method").isJsonNull()) && !jsonObj.get("default_login_method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `default_login_method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_login_method").toString())); + } + if ((jsonObj.get("allowed_reg_method") != null && !jsonObj.get("allowed_reg_method").isJsonNull()) && !jsonObj.get("allowed_reg_method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `allowed_reg_method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("allowed_reg_method").toString())); + } + if ((jsonObj.get("default_reg_method") != null && !jsonObj.get("default_reg_method").isJsonNull()) && !jsonObj.get("default_reg_method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `default_reg_method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_reg_method").toString())); + } + if ((jsonObj.get("default_protocol") != null && !jsonObj.get("default_protocol").isJsonNull()) && !jsonObj.get("default_protocol").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `default_protocol` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_protocol").toString())); + } + if ((jsonObj.get("access_policy") != null && !jsonObj.get("access_policy").isJsonNull()) && !jsonObj.get("access_policy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `access_policy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_policy").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("reg_policy") != null && !jsonObj.get("reg_policy").isJsonNull() && !jsonObj.get("reg_policy").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `reg_policy` to be an array in the JSON string but got `%s`", jsonObj.get("reg_policy").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ModifyConfigRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ModifyConfigRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ModifyConfigRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ModifyConfigRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ModifyConfigRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ModifyConfigRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ModifyConfigRequest + * @throws IOException if the JSON string is invalid with respect to ModifyConfigRequest + */ + public static ModifyConfigRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ModifyConfigRequest.class); + } + + /** + * Convert an instance of ModifyConfigRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/ModifyRequest.java b/src/main/java/com/idmesh/model/ModifyRequest.java new file mode 100644 index 0000000..7928c85 --- /dev/null +++ b/src/main/java/com/idmesh/model/ModifyRequest.java @@ -0,0 +1,620 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * ModifyRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ModifyRequest { + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + private String username; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + private String displayName; + + public static final String SERIALIZED_NAME_FIRSTNAME = "firstname"; + @SerializedName(SERIALIZED_NAME_FIRSTNAME) + private String firstname; + + public static final String SERIALIZED_NAME_LASTNAME = "lastname"; + @SerializedName(SERIALIZED_NAME_LASTNAME) + private String lastname; + + public static final String SERIALIZED_NAME_REALNAME = "realname"; + @SerializedName(SERIALIZED_NAME_REALNAME) + private String realname; + + public static final String SERIALIZED_NAME_PINYIN = "pinyin"; + @SerializedName(SERIALIZED_NAME_PINYIN) + private String pinyin; + + public static final String SERIALIZED_NAME_NICKNAME = "nickname"; + @SerializedName(SERIALIZED_NAME_NICKNAME) + private String nickname; + + public static final String SERIALIZED_NAME_MOBILE = "mobile"; + @SerializedName(SERIALIZED_NAME_MOBILE) + private String mobile; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_GENDER = "gender"; + @SerializedName(SERIALIZED_NAME_GENDER) + private String gender; + + public static final String SERIALIZED_NAME_CERT_TYPE = "cert_type"; + @SerializedName(SERIALIZED_NAME_CERT_TYPE) + private String certType; + + public static final String SERIALIZED_NAME_CERT_NUMBER = "cert_number"; + @SerializedName(SERIALIZED_NAME_CERT_NUMBER) + private String certNumber; + + public static final String SERIALIZED_NAME_REGION = "region"; + @SerializedName(SERIALIZED_NAME_REGION) + private String region; + + public static final String SERIALIZED_NAME_WORK_TIME = "work_time"; + @SerializedName(SERIALIZED_NAME_WORK_TIME) + private String workTime; + + public static final String SERIALIZED_NAME_WORK_TITLE = "work_title"; + @SerializedName(SERIALIZED_NAME_WORK_TITLE) + private String workTitle; + + public static final String SERIALIZED_NAME_LAST_LOGIN_IPADDR = "last_login_ipaddr"; + @SerializedName(SERIALIZED_NAME_LAST_LOGIN_IPADDR) + private String lastLoginIpaddr; + + public static final String SERIALIZED_NAME_LAST_LOGIN_TIME = "last_login_time"; + @SerializedName(SERIALIZED_NAME_LAST_LOGIN_TIME) + private String lastLoginTime; + + public static final String SERIALIZED_NAME_SYS_EXT_PROPS = "sys_ext_props"; + @SerializedName(SERIALIZED_NAME_SYS_EXT_PROPS) + private Object sysExtProps; + + public static final String SERIALIZED_NAME_FREE_EXT_PROPS = "free_ext_props"; + @SerializedName(SERIALIZED_NAME_FREE_EXT_PROPS) + private Object freeExtProps; + + public ModifyRequest() { + } + /** + * 用户名,验证唯一 + * @return username + **/ + @javax.annotation.Nullable + public String getUsername() { + return username; + } + + + public void setUsername(String username) { + this.username = username; + } + + /** + * 显示名称 + * @return displayName + **/ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + /** + * 名 + * @return firstname + **/ + @javax.annotation.Nullable + public String getFirstname() { + return firstname; + } + + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + + /** + * 姓 + * @return lastname + **/ + @javax.annotation.Nullable + public String getLastname() { + return lastname; + } + + + public void setLastname(String lastname) { + this.lastname = lastname; + } + + /** + * 真实姓名 + * @return realname + **/ + @javax.annotation.Nullable + public String getRealname() { + return realname; + } + + + public void setRealname(String realname) { + this.realname = realname; + } + + /** + * 拼音 + * @return pinyin + **/ + @javax.annotation.Nullable + public String getPinyin() { + return pinyin; + } + + + public void setPinyin(String pinyin) { + this.pinyin = pinyin; + } + + /** + * 昵称 + * @return nickname + **/ + @javax.annotation.Nullable + public String getNickname() { + return nickname; + } + + + public void setNickname(String nickname) { + this.nickname = nickname; + } + + /** + * 手机 + * @return mobile + **/ + @javax.annotation.Nullable + public String getMobile() { + return mobile; + } + + + public void setMobile(String mobile) { + this.mobile = mobile; + } + + /** + * 邮箱 + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + + public void setEmail(String email) { + this.email = email; + } + + /** + * 性别:1男,0女 + * @return gender + **/ + @javax.annotation.Nullable + public String getGender() { + return gender; + } + + + public void setGender(String gender) { + this.gender = gender; + } + + /** + * 证件类型 + * @return certType + **/ + @javax.annotation.Nullable + public String getCertType() { + return certType; + } + + + public void setCertType(String certType) { + this.certType = certType; + } + + /** + * 证件号 + * @return certNumber + **/ + @javax.annotation.Nullable + public String getCertNumber() { + return certNumber; + } + + + public void setCertNumber(String certNumber) { + this.certNumber = certNumber; + } + + /** + * 区域 + * @return region + **/ + @javax.annotation.Nullable + public String getRegion() { + return region; + } + + + public void setRegion(String region) { + this.region = region; + } + + /** + * 加入时间 + * @return workTime + **/ + @javax.annotation.Nullable + public String getWorkTime() { + return workTime; + } + + + public void setWorkTime(String workTime) { + this.workTime = workTime; + } + + /** + * 职位 + * @return workTitle + **/ + @javax.annotation.Nullable + public String getWorkTitle() { + return workTitle; + } + + + public void setWorkTitle(String workTitle) { + this.workTitle = workTitle; + } + + /** + * 上次登录IP + * @return lastLoginIpaddr + **/ + @javax.annotation.Nullable + public String getLastLoginIpaddr() { + return lastLoginIpaddr; + } + + + public void setLastLoginIpaddr(String lastLoginIpaddr) { + this.lastLoginIpaddr = lastLoginIpaddr; + } + + /** + * 上次登录时间 + * @return lastLoginTime + **/ + @javax.annotation.Nullable + public String getLastLoginTime() { + return lastLoginTime; + } + + + public void setLastLoginTime(String lastLoginTime) { + this.lastLoginTime = lastLoginTime; + } + + /** + * 系统扩展信息,json对象{\"age\": 18, \"love\": \"足球\"} + * @return sysExtProps + **/ + @javax.annotation.Nullable + public Object getSysExtProps() { + return sysExtProps; + } + + + public void setSysExtProps(Object sysExtProps) { + this.sysExtProps = sysExtProps; + } + + /** + * 自由扩展属性,json对象 + * @return freeExtProps + **/ + @javax.annotation.Nullable + public Object getFreeExtProps() { + return freeExtProps; + } + + + public void setFreeExtProps(Object freeExtProps) { + this.freeExtProps = freeExtProps; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModifyRequest modifyRequest = (ModifyRequest) o; + return Objects.equals(this.username, modifyRequest.username) && + Objects.equals(this.displayName, modifyRequest.displayName) && + Objects.equals(this.firstname, modifyRequest.firstname) && + Objects.equals(this.lastname, modifyRequest.lastname) && + Objects.equals(this.realname, modifyRequest.realname) && + Objects.equals(this.pinyin, modifyRequest.pinyin) && + Objects.equals(this.nickname, modifyRequest.nickname) && + Objects.equals(this.mobile, modifyRequest.mobile) && + Objects.equals(this.email, modifyRequest.email) && + Objects.equals(this.gender, modifyRequest.gender) && + Objects.equals(this.certType, modifyRequest.certType) && + Objects.equals(this.certNumber, modifyRequest.certNumber) && + Objects.equals(this.region, modifyRequest.region) && + Objects.equals(this.workTime, modifyRequest.workTime) && + Objects.equals(this.workTitle, modifyRequest.workTitle) && + Objects.equals(this.lastLoginIpaddr, modifyRequest.lastLoginIpaddr) && + Objects.equals(this.lastLoginTime, modifyRequest.lastLoginTime) && + Objects.equals(this.sysExtProps, modifyRequest.sysExtProps) && + Objects.equals(this.freeExtProps, modifyRequest.freeExtProps); + } + + @Override + public int hashCode() { + return Objects.hash(username, displayName, firstname, lastname, realname, pinyin, nickname, mobile, email, gender, certType, certNumber, region, workTime, workTitle, lastLoginIpaddr, lastLoginTime, sysExtProps, freeExtProps); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModifyRequest {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" firstname: ").append(toIndentedString(firstname)).append("\n"); + sb.append(" lastname: ").append(toIndentedString(lastname)).append("\n"); + sb.append(" realname: ").append(toIndentedString(realname)).append("\n"); + sb.append(" pinyin: ").append(toIndentedString(pinyin)).append("\n"); + sb.append(" nickname: ").append(toIndentedString(nickname)).append("\n"); + sb.append(" mobile: ").append(toIndentedString(mobile)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" certType: ").append(toIndentedString(certType)).append("\n"); + sb.append(" certNumber: ").append(toIndentedString(certNumber)).append("\n"); + sb.append(" region: ").append(toIndentedString(region)).append("\n"); + sb.append(" workTime: ").append(toIndentedString(workTime)).append("\n"); + sb.append(" workTitle: ").append(toIndentedString(workTitle)).append("\n"); + sb.append(" lastLoginIpaddr: ").append(toIndentedString(lastLoginIpaddr)).append("\n"); + sb.append(" lastLoginTime: ").append(toIndentedString(lastLoginTime)).append("\n"); + sb.append(" sysExtProps: ").append(toIndentedString(sysExtProps)).append("\n"); + sb.append(" freeExtProps: ").append(toIndentedString(freeExtProps)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("username"); + openapiFields.add("display_name"); + openapiFields.add("firstname"); + openapiFields.add("lastname"); + openapiFields.add("realname"); + openapiFields.add("pinyin"); + openapiFields.add("nickname"); + openapiFields.add("mobile"); + openapiFields.add("email"); + openapiFields.add("gender"); + openapiFields.add("cert_type"); + openapiFields.add("cert_number"); + openapiFields.add("region"); + openapiFields.add("work_time"); + openapiFields.add("work_title"); + openapiFields.add("last_login_ipaddr"); + openapiFields.add("last_login_time"); + openapiFields.add("sys_ext_props"); + openapiFields.add("free_ext_props"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ModifyRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ModifyRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ModifyRequest is not found in the empty JSON string", ModifyRequest.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) && !jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + if ((jsonObj.get("firstname") != null && !jsonObj.get("firstname").isJsonNull()) && !jsonObj.get("firstname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `firstname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstname").toString())); + } + if ((jsonObj.get("lastname") != null && !jsonObj.get("lastname").isJsonNull()) && !jsonObj.get("lastname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lastname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastname").toString())); + } + if ((jsonObj.get("realname") != null && !jsonObj.get("realname").isJsonNull()) && !jsonObj.get("realname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `realname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("realname").toString())); + } + if ((jsonObj.get("pinyin") != null && !jsonObj.get("pinyin").isJsonNull()) && !jsonObj.get("pinyin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `pinyin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pinyin").toString())); + } + if ((jsonObj.get("nickname") != null && !jsonObj.get("nickname").isJsonNull()) && !jsonObj.get("nickname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nickname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nickname").toString())); + } + if ((jsonObj.get("mobile") != null && !jsonObj.get("mobile").isJsonNull()) && !jsonObj.get("mobile").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mobile` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mobile").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("gender") != null && !jsonObj.get("gender").isJsonNull()) && !jsonObj.get("gender").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `gender` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gender").toString())); + } + if ((jsonObj.get("cert_type") != null && !jsonObj.get("cert_type").isJsonNull()) && !jsonObj.get("cert_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cert_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cert_type").toString())); + } + if ((jsonObj.get("cert_number") != null && !jsonObj.get("cert_number").isJsonNull()) && !jsonObj.get("cert_number").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cert_number` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cert_number").toString())); + } + if ((jsonObj.get("region") != null && !jsonObj.get("region").isJsonNull()) && !jsonObj.get("region").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `region` to be a primitive type in the JSON string but got `%s`", jsonObj.get("region").toString())); + } + if ((jsonObj.get("work_time") != null && !jsonObj.get("work_time").isJsonNull()) && !jsonObj.get("work_time").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `work_time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("work_time").toString())); + } + if ((jsonObj.get("work_title") != null && !jsonObj.get("work_title").isJsonNull()) && !jsonObj.get("work_title").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `work_title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("work_title").toString())); + } + if ((jsonObj.get("last_login_ipaddr") != null && !jsonObj.get("last_login_ipaddr").isJsonNull()) && !jsonObj.get("last_login_ipaddr").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `last_login_ipaddr` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_login_ipaddr").toString())); + } + if ((jsonObj.get("last_login_time") != null && !jsonObj.get("last_login_time").isJsonNull()) && !jsonObj.get("last_login_time").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `last_login_time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_login_time").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ModifyRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ModifyRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ModifyRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ModifyRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ModifyRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ModifyRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ModifyRequest + * @throws IOException if the JSON string is invalid with respect to ModifyRequest + */ + public static ModifyRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ModifyRequest.class); + } + + /** + * Convert an instance of ModifyRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/ModifyRequest1.java b/src/main/java/com/idmesh/model/ModifyRequest1.java new file mode 100644 index 0000000..e209b4c --- /dev/null +++ b/src/main/java/com/idmesh/model/ModifyRequest1.java @@ -0,0 +1,524 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * ModifyRequest1 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ModifyRequest1 { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DOMAIN_SN = "domain_sn"; + @SerializedName(SERIALIZED_NAME_DOMAIN_SN) + private String domainSn; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_APP_ID = "app_id"; + @SerializedName(SERIALIZED_NAME_APP_ID) + private String appId; + + public static final String SERIALIZED_NAME_APP_SECRET = "app_secret"; + @SerializedName(SERIALIZED_NAME_APP_SECRET) + private String appSecret; + + public static final String SERIALIZED_NAME_CATEGORY = "category"; + @SerializedName(SERIALIZED_NAME_CATEGORY) + private String category; + + public static final String SERIALIZED_NAME_DESCR = "descr"; + @SerializedName(SERIALIZED_NAME_DESCR) + private String descr; + + public static final String SERIALIZED_NAME_LOGO = "logo"; + @SerializedName(SERIALIZED_NAME_LOGO) + private String logo; + + public static final String SERIALIZED_NAME_LOGIN_URL = "login_url"; + @SerializedName(SERIALIZED_NAME_LOGIN_URL) + private String loginUrl; + + public static final String SERIALIZED_NAME_REDIRECT_URL = "redirect_url"; + @SerializedName(SERIALIZED_NAME_REDIRECT_URL) + private String redirectUrl; + + public static final String SERIALIZED_NAME_LOGOUT_URL = "logout_url"; + @SerializedName(SERIALIZED_NAME_LOGOUT_URL) + private String logoutUrl; + + public static final String SERIALIZED_NAME_SUB_ACCOUNT_POLICY = "sub_account_policy"; + @SerializedName(SERIALIZED_NAME_SUB_ACCOUNT_POLICY) + private String subAccountPolicy; + + public static final String SERIALIZED_NAME_SYS_EXT_PROPS = "sys_ext_props"; + @SerializedName(SERIALIZED_NAME_SYS_EXT_PROPS) + private Object sysExtProps; + + public static final String SERIALIZED_NAME_FREE_EXT_PROPS = "free_ext_props"; + @SerializedName(SERIALIZED_NAME_FREE_EXT_PROPS) + private Object freeExtProps; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public ModifyRequest1() { + } + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + /** + * Get domainSn + * @return domainSn + **/ + @javax.annotation.Nullable + public String getDomainSn() { + return domainSn; + } + + + public void setDomainSn(String domainSn) { + this.domainSn = domainSn; + } + + /** + * 1自建应用,2市场应用 + * @return type + **/ + @javax.annotation.Nullable + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * Get appId + * @return appId + **/ + @javax.annotation.Nullable + public String getAppId() { + return appId; + } + + + public void setAppId(String appId) { + this.appId = appId; + } + + /** + * Get appSecret + * @return appSecret + **/ + @javax.annotation.Nullable + public String getAppSecret() { + return appSecret; + } + + + public void setAppSecret(String appSecret) { + this.appSecret = appSecret; + } + + /** + * Get category + * @return category + **/ + @javax.annotation.Nullable + public String getCategory() { + return category; + } + + + public void setCategory(String category) { + this.category = category; + } + + /** + * Get descr + * @return descr + **/ + @javax.annotation.Nullable + public String getDescr() { + return descr; + } + + + public void setDescr(String descr) { + this.descr = descr; + } + + /** + * Get logo + * @return logo + **/ + @javax.annotation.Nullable + public String getLogo() { + return logo; + } + + + public void setLogo(String logo) { + this.logo = logo; + } + + /** + * Get loginUrl + * @return loginUrl + **/ + @javax.annotation.Nullable + public String getLoginUrl() { + return loginUrl; + } + + + public void setLoginUrl(String loginUrl) { + this.loginUrl = loginUrl; + } + + /** + * Get redirectUrl + * @return redirectUrl + **/ + @javax.annotation.Nullable + public String getRedirectUrl() { + return redirectUrl; + } + + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + /** + * Get logoutUrl + * @return logoutUrl + **/ + @javax.annotation.Nullable + public String getLogoutUrl() { + return logoutUrl; + } + + + public void setLogoutUrl(String logoutUrl) { + this.logoutUrl = logoutUrl; + } + + /** + * Get subAccountPolicy + * @return subAccountPolicy + **/ + @javax.annotation.Nullable + public String getSubAccountPolicy() { + return subAccountPolicy; + } + + + public void setSubAccountPolicy(String subAccountPolicy) { + this.subAccountPolicy = subAccountPolicy; + } + + /** + * Get sysExtProps + * @return sysExtProps + **/ + @javax.annotation.Nullable + public Object getSysExtProps() { + return sysExtProps; + } + + + public void setSysExtProps(Object sysExtProps) { + this.sysExtProps = sysExtProps; + } + + /** + * Get freeExtProps + * @return freeExtProps + **/ + @javax.annotation.Nullable + public Object getFreeExtProps() { + return freeExtProps; + } + + + public void setFreeExtProps(Object freeExtProps) { + this.freeExtProps = freeExtProps; + } + + /** + * 状态,0禁用,1启用 + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModifyRequest1 modifyRequest1 = (ModifyRequest1) o; + return Objects.equals(this.name, modifyRequest1.name) && + Objects.equals(this.domainSn, modifyRequest1.domainSn) && + Objects.equals(this.type, modifyRequest1.type) && + Objects.equals(this.appId, modifyRequest1.appId) && + Objects.equals(this.appSecret, modifyRequest1.appSecret) && + Objects.equals(this.category, modifyRequest1.category) && + Objects.equals(this.descr, modifyRequest1.descr) && + Objects.equals(this.logo, modifyRequest1.logo) && + Objects.equals(this.loginUrl, modifyRequest1.loginUrl) && + Objects.equals(this.redirectUrl, modifyRequest1.redirectUrl) && + Objects.equals(this.logoutUrl, modifyRequest1.logoutUrl) && + Objects.equals(this.subAccountPolicy, modifyRequest1.subAccountPolicy) && + Objects.equals(this.sysExtProps, modifyRequest1.sysExtProps) && + Objects.equals(this.freeExtProps, modifyRequest1.freeExtProps) && + Objects.equals(this.status, modifyRequest1.status); + } + + @Override + public int hashCode() { + return Objects.hash(name, domainSn, type, appId, appSecret, category, descr, logo, loginUrl, redirectUrl, logoutUrl, subAccountPolicy, sysExtProps, freeExtProps, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModifyRequest1 {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" domainSn: ").append(toIndentedString(domainSn)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); + sb.append(" appSecret: ").append(toIndentedString(appSecret)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" descr: ").append(toIndentedString(descr)).append("\n"); + sb.append(" logo: ").append(toIndentedString(logo)).append("\n"); + sb.append(" loginUrl: ").append(toIndentedString(loginUrl)).append("\n"); + sb.append(" redirectUrl: ").append(toIndentedString(redirectUrl)).append("\n"); + sb.append(" logoutUrl: ").append(toIndentedString(logoutUrl)).append("\n"); + sb.append(" subAccountPolicy: ").append(toIndentedString(subAccountPolicy)).append("\n"); + sb.append(" sysExtProps: ").append(toIndentedString(sysExtProps)).append("\n"); + sb.append(" freeExtProps: ").append(toIndentedString(freeExtProps)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("domain_sn"); + openapiFields.add("type"); + openapiFields.add("app_id"); + openapiFields.add("app_secret"); + openapiFields.add("category"); + openapiFields.add("descr"); + openapiFields.add("logo"); + openapiFields.add("login_url"); + openapiFields.add("redirect_url"); + openapiFields.add("logout_url"); + openapiFields.add("sub_account_policy"); + openapiFields.add("sys_ext_props"); + openapiFields.add("free_ext_props"); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ModifyRequest1 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ModifyRequest1.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ModifyRequest1 is not found in the empty JSON string", ModifyRequest1.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("domain_sn") != null && !jsonObj.get("domain_sn").isJsonNull()) && !jsonObj.get("domain_sn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `domain_sn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("domain_sn").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("app_id") != null && !jsonObj.get("app_id").isJsonNull()) && !jsonObj.get("app_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `app_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("app_id").toString())); + } + if ((jsonObj.get("app_secret") != null && !jsonObj.get("app_secret").isJsonNull()) && !jsonObj.get("app_secret").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `app_secret` to be a primitive type in the JSON string but got `%s`", jsonObj.get("app_secret").toString())); + } + if ((jsonObj.get("category") != null && !jsonObj.get("category").isJsonNull()) && !jsonObj.get("category").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); + } + if ((jsonObj.get("descr") != null && !jsonObj.get("descr").isJsonNull()) && !jsonObj.get("descr").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `descr` to be a primitive type in the JSON string but got `%s`", jsonObj.get("descr").toString())); + } + if ((jsonObj.get("logo") != null && !jsonObj.get("logo").isJsonNull()) && !jsonObj.get("logo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `logo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logo").toString())); + } + if ((jsonObj.get("login_url") != null && !jsonObj.get("login_url").isJsonNull()) && !jsonObj.get("login_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `login_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("login_url").toString())); + } + if ((jsonObj.get("redirect_url") != null && !jsonObj.get("redirect_url").isJsonNull()) && !jsonObj.get("redirect_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `redirect_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirect_url").toString())); + } + if ((jsonObj.get("logout_url") != null && !jsonObj.get("logout_url").isJsonNull()) && !jsonObj.get("logout_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `logout_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logout_url").toString())); + } + if ((jsonObj.get("sub_account_policy") != null && !jsonObj.get("sub_account_policy").isJsonNull()) && !jsonObj.get("sub_account_policy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sub_account_policy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sub_account_policy").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ModifyRequest1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ModifyRequest1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ModifyRequest1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ModifyRequest1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ModifyRequest1 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ModifyRequest1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ModifyRequest1 + * @throws IOException if the JSON string is invalid with respect to ModifyRequest1 + */ + public static ModifyRequest1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ModifyRequest1.class); + } + + /** + * Convert an instance of ModifyRequest1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/NullInner.java b/src/main/java/com/idmesh/model/NullInner.java new file mode 100644 index 0000000..58fecf7 --- /dev/null +++ b/src/main/java/com/idmesh/model/NullInner.java @@ -0,0 +1,866 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * NullInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NullInner { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private Integer id; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + private String username; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + @SerializedName(SERIALIZED_NAME_PASSWORD) + private String password; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + private String displayName; + + public static final String SERIALIZED_NAME_FIRSTNAME = "firstname"; + @SerializedName(SERIALIZED_NAME_FIRSTNAME) + private String firstname; + + public static final String SERIALIZED_NAME_LASTNAME = "lastname"; + @SerializedName(SERIALIZED_NAME_LASTNAME) + private String lastname; + + public static final String SERIALIZED_NAME_REALNAME = "realname"; + @SerializedName(SERIALIZED_NAME_REALNAME) + private String realname; + + public static final String SERIALIZED_NAME_PINYIN = "pinyin"; + @SerializedName(SERIALIZED_NAME_PINYIN) + private String pinyin; + + public static final String SERIALIZED_NAME_NICKNAME = "nickname"; + @SerializedName(SERIALIZED_NAME_NICKNAME) + private String nickname; + + public static final String SERIALIZED_NAME_AVATAR = "avatar"; + @SerializedName(SERIALIZED_NAME_AVATAR) + private Object avatar; + + public static final String SERIALIZED_NAME_USER_TYPE = "user_type"; + @SerializedName(SERIALIZED_NAME_USER_TYPE) + private String userType; + + public static final String SERIALIZED_NAME_MOBILE = "mobile"; + @SerializedName(SERIALIZED_NAME_MOBILE) + private String mobile; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_GENDER = "gender"; + @SerializedName(SERIALIZED_NAME_GENDER) + private String gender; + + public static final String SERIALIZED_NAME_CERT_TYPE = "cert_type"; + @SerializedName(SERIALIZED_NAME_CERT_TYPE) + private String certType; + + public static final String SERIALIZED_NAME_CERT_NUMBER = "cert_number"; + @SerializedName(SERIALIZED_NAME_CERT_NUMBER) + private String certNumber; + + public static final String SERIALIZED_NAME_REGION = "region"; + @SerializedName(SERIALIZED_NAME_REGION) + private String region; + + public static final String SERIALIZED_NAME_WORK_TIME = "work_time"; + @SerializedName(SERIALIZED_NAME_WORK_TIME) + private String workTime; + + public static final String SERIALIZED_NAME_WORK_TITLE = "work_title"; + @SerializedName(SERIALIZED_NAME_WORK_TITLE) + private String workTitle; + + public static final String SERIALIZED_NAME_ARN = "arn"; + @SerializedName(SERIALIZED_NAME_ARN) + private String arn; + + public static final String SERIALIZED_NAME_IDP_CONFIG_ID = "idp_config_id"; + @SerializedName(SERIALIZED_NAME_IDP_CONFIG_ID) + private Integer idpConfigId; + + public static final String SERIALIZED_NAME_DEVELOPER_ID = "developer_id"; + @SerializedName(SERIALIZED_NAME_DEVELOPER_ID) + private Integer developerId; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private Integer tenantId; + + public static final String SERIALIZED_NAME_LAST_LOGIN_IPADDR = "last_login_ipaddr"; + @SerializedName(SERIALIZED_NAME_LAST_LOGIN_IPADDR) + private String lastLoginIpaddr; + + public static final String SERIALIZED_NAME_LAST_LOGIN_TIME = "last_login_time"; + @SerializedName(SERIALIZED_NAME_LAST_LOGIN_TIME) + private String lastLoginTime; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private Integer timeModified; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_SYS_EXT_PROPS = "sys_ext_props"; + @SerializedName(SERIALIZED_NAME_SYS_EXT_PROPS) + private Object sysExtProps; + + public static final String SERIALIZED_NAME_FREE_EXT_PROPS = "free_ext_props"; + @SerializedName(SERIALIZED_NAME_FREE_EXT_PROPS) + private Object freeExtProps; + + public NullInner() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + public Integer getId() { + return id; + } + + + public void setId(Integer id) { + this.id = id; + } + + /** + * Get username + * @return username + **/ + @javax.annotation.Nullable + public String getUsername() { + return username; + } + + + public void setUsername(String username) { + this.username = username; + } + + /** + * Get password + * @return password + **/ + @javax.annotation.Nullable + public String getPassword() { + return password; + } + + + public void setPassword(String password) { + this.password = password; + } + + /** + * Get displayName + * @return displayName + **/ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + /** + * Get firstname + * @return firstname + **/ + @javax.annotation.Nullable + public String getFirstname() { + return firstname; + } + + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + + /** + * Get lastname + * @return lastname + **/ + @javax.annotation.Nullable + public String getLastname() { + return lastname; + } + + + public void setLastname(String lastname) { + this.lastname = lastname; + } + + /** + * Get realname + * @return realname + **/ + @javax.annotation.Nullable + public String getRealname() { + return realname; + } + + + public void setRealname(String realname) { + this.realname = realname; + } + + /** + * Get pinyin + * @return pinyin + **/ + @javax.annotation.Nullable + public String getPinyin() { + return pinyin; + } + + + public void setPinyin(String pinyin) { + this.pinyin = pinyin; + } + + /** + * Get nickname + * @return nickname + **/ + @javax.annotation.Nullable + public String getNickname() { + return nickname; + } + + + public void setNickname(String nickname) { + this.nickname = nickname; + } + + /** + * json对象 + * @return avatar + **/ + @javax.annotation.Nullable + public Object getAvatar() { + return avatar; + } + + + public void setAvatar(Object avatar) { + this.avatar = avatar; + } + + /** + * Get userType + * @return userType + **/ + @javax.annotation.Nullable + public String getUserType() { + return userType; + } + + + public void setUserType(String userType) { + this.userType = userType; + } + + /** + * Get mobile + * @return mobile + **/ + @javax.annotation.Nullable + public String getMobile() { + return mobile; + } + + + public void setMobile(String mobile) { + this.mobile = mobile; + } + + /** + * Get email + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + + public void setEmail(String email) { + this.email = email; + } + + /** + * Get gender + * @return gender + **/ + @javax.annotation.Nullable + public String getGender() { + return gender; + } + + + public void setGender(String gender) { + this.gender = gender; + } + + /** + * Get certType + * @return certType + **/ + @javax.annotation.Nullable + public String getCertType() { + return certType; + } + + + public void setCertType(String certType) { + this.certType = certType; + } + + /** + * Get certNumber + * @return certNumber + **/ + @javax.annotation.Nullable + public String getCertNumber() { + return certNumber; + } + + + public void setCertNumber(String certNumber) { + this.certNumber = certNumber; + } + + /** + * Get region + * @return region + **/ + @javax.annotation.Nullable + public String getRegion() { + return region; + } + + + public void setRegion(String region) { + this.region = region; + } + + /** + * Get workTime + * @return workTime + **/ + @javax.annotation.Nullable + public String getWorkTime() { + return workTime; + } + + + public void setWorkTime(String workTime) { + this.workTime = workTime; + } + + /** + * Get workTitle + * @return workTitle + **/ + @javax.annotation.Nullable + public String getWorkTitle() { + return workTitle; + } + + + public void setWorkTitle(String workTitle) { + this.workTitle = workTitle; + } + + /** + * Get arn + * @return arn + **/ + @javax.annotation.Nullable + public String getArn() { + return arn; + } + + + public void setArn(String arn) { + this.arn = arn; + } + + /** + * Get idpConfigId + * @return idpConfigId + **/ + @javax.annotation.Nullable + public Integer getIdpConfigId() { + return idpConfigId; + } + + + public void setIdpConfigId(Integer idpConfigId) { + this.idpConfigId = idpConfigId; + } + + /** + * Get developerId + * @return developerId + **/ + @javax.annotation.Nullable + public Integer getDeveloperId() { + return developerId; + } + + + public void setDeveloperId(Integer developerId) { + this.developerId = developerId; + } + + /** + * Get tenantId + * @return tenantId + **/ + @javax.annotation.Nullable + public Integer getTenantId() { + return tenantId; + } + + + public void setTenantId(Integer tenantId) { + this.tenantId = tenantId; + } + + /** + * Get lastLoginIpaddr + * @return lastLoginIpaddr + **/ + @javax.annotation.Nullable + public String getLastLoginIpaddr() { + return lastLoginIpaddr; + } + + + public void setLastLoginIpaddr(String lastLoginIpaddr) { + this.lastLoginIpaddr = lastLoginIpaddr; + } + + /** + * Get lastLoginTime + * @return lastLoginTime + **/ + @javax.annotation.Nullable + public String getLastLoginTime() { + return lastLoginTime; + } + + + public void setLastLoginTime(String lastLoginTime) { + this.lastLoginTime = lastLoginTime; + } + + /** + * Get timeCreated + * @return timeCreated + **/ + @javax.annotation.Nullable + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * Get timeModified + * @return timeModified + **/ + @javax.annotation.Nullable + public Integer getTimeModified() { + return timeModified; + } + + + public void setTimeModified(Integer timeModified) { + this.timeModified = timeModified; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + /** + * json对象 + * @return sysExtProps + **/ + @javax.annotation.Nullable + public Object getSysExtProps() { + return sysExtProps; + } + + + public void setSysExtProps(Object sysExtProps) { + this.sysExtProps = sysExtProps; + } + + /** + * json对象 + * @return freeExtProps + **/ + @javax.annotation.Nullable + public Object getFreeExtProps() { + return freeExtProps; + } + + + public void setFreeExtProps(Object freeExtProps) { + this.freeExtProps = freeExtProps; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NullInner nullInner = (NullInner) o; + return Objects.equals(this.id, nullInner.id) && + Objects.equals(this.username, nullInner.username) && + Objects.equals(this.password, nullInner.password) && + Objects.equals(this.displayName, nullInner.displayName) && + Objects.equals(this.firstname, nullInner.firstname) && + Objects.equals(this.lastname, nullInner.lastname) && + Objects.equals(this.realname, nullInner.realname) && + Objects.equals(this.pinyin, nullInner.pinyin) && + Objects.equals(this.nickname, nullInner.nickname) && + Objects.equals(this.avatar, nullInner.avatar) && + Objects.equals(this.userType, nullInner.userType) && + Objects.equals(this.mobile, nullInner.mobile) && + Objects.equals(this.email, nullInner.email) && + Objects.equals(this.gender, nullInner.gender) && + Objects.equals(this.certType, nullInner.certType) && + Objects.equals(this.certNumber, nullInner.certNumber) && + Objects.equals(this.region, nullInner.region) && + Objects.equals(this.workTime, nullInner.workTime) && + Objects.equals(this.workTitle, nullInner.workTitle) && + Objects.equals(this.arn, nullInner.arn) && + Objects.equals(this.idpConfigId, nullInner.idpConfigId) && + Objects.equals(this.developerId, nullInner.developerId) && + Objects.equals(this.tenantId, nullInner.tenantId) && + Objects.equals(this.lastLoginIpaddr, nullInner.lastLoginIpaddr) && + Objects.equals(this.lastLoginTime, nullInner.lastLoginTime) && + Objects.equals(this.timeCreated, nullInner.timeCreated) && + Objects.equals(this.timeModified, nullInner.timeModified) && + Objects.equals(this.status, nullInner.status) && + Objects.equals(this.sysExtProps, nullInner.sysExtProps) && + Objects.equals(this.freeExtProps, nullInner.freeExtProps); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, password, displayName, firstname, lastname, realname, pinyin, nickname, avatar, userType, mobile, email, gender, certType, certNumber, region, workTime, workTitle, arn, idpConfigId, developerId, tenantId, lastLoginIpaddr, lastLoginTime, timeCreated, timeModified, status, sysExtProps, freeExtProps); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NullInner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" firstname: ").append(toIndentedString(firstname)).append("\n"); + sb.append(" lastname: ").append(toIndentedString(lastname)).append("\n"); + sb.append(" realname: ").append(toIndentedString(realname)).append("\n"); + sb.append(" pinyin: ").append(toIndentedString(pinyin)).append("\n"); + sb.append(" nickname: ").append(toIndentedString(nickname)).append("\n"); + sb.append(" avatar: ").append(toIndentedString(avatar)).append("\n"); + sb.append(" userType: ").append(toIndentedString(userType)).append("\n"); + sb.append(" mobile: ").append(toIndentedString(mobile)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" certType: ").append(toIndentedString(certType)).append("\n"); + sb.append(" certNumber: ").append(toIndentedString(certNumber)).append("\n"); + sb.append(" region: ").append(toIndentedString(region)).append("\n"); + sb.append(" workTime: ").append(toIndentedString(workTime)).append("\n"); + sb.append(" workTitle: ").append(toIndentedString(workTitle)).append("\n"); + sb.append(" arn: ").append(toIndentedString(arn)).append("\n"); + sb.append(" idpConfigId: ").append(toIndentedString(idpConfigId)).append("\n"); + sb.append(" developerId: ").append(toIndentedString(developerId)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" lastLoginIpaddr: ").append(toIndentedString(lastLoginIpaddr)).append("\n"); + sb.append(" lastLoginTime: ").append(toIndentedString(lastLoginTime)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" sysExtProps: ").append(toIndentedString(sysExtProps)).append("\n"); + sb.append(" freeExtProps: ").append(toIndentedString(freeExtProps)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("username"); + openapiFields.add("password"); + openapiFields.add("display_name"); + openapiFields.add("firstname"); + openapiFields.add("lastname"); + openapiFields.add("realname"); + openapiFields.add("pinyin"); + openapiFields.add("nickname"); + openapiFields.add("avatar"); + openapiFields.add("user_type"); + openapiFields.add("mobile"); + openapiFields.add("email"); + openapiFields.add("gender"); + openapiFields.add("cert_type"); + openapiFields.add("cert_number"); + openapiFields.add("region"); + openapiFields.add("work_time"); + openapiFields.add("work_title"); + openapiFields.add("arn"); + openapiFields.add("idp_config_id"); + openapiFields.add("developer_id"); + openapiFields.add("tenant_id"); + openapiFields.add("last_login_ipaddr"); + openapiFields.add("last_login_time"); + openapiFields.add("time_created"); + openapiFields.add("time_modified"); + openapiFields.add("status"); + openapiFields.add("sys_ext_props"); + openapiFields.add("free_ext_props"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NullInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NullInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in NullInner is not found in the empty JSON string", NullInner.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } + if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) && !jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + if ((jsonObj.get("firstname") != null && !jsonObj.get("firstname").isJsonNull()) && !jsonObj.get("firstname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `firstname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstname").toString())); + } + if ((jsonObj.get("lastname") != null && !jsonObj.get("lastname").isJsonNull()) && !jsonObj.get("lastname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lastname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastname").toString())); + } + if ((jsonObj.get("realname") != null && !jsonObj.get("realname").isJsonNull()) && !jsonObj.get("realname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `realname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("realname").toString())); + } + if ((jsonObj.get("pinyin") != null && !jsonObj.get("pinyin").isJsonNull()) && !jsonObj.get("pinyin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `pinyin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pinyin").toString())); + } + if ((jsonObj.get("nickname") != null && !jsonObj.get("nickname").isJsonNull()) && !jsonObj.get("nickname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nickname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nickname").toString())); + } + if ((jsonObj.get("user_type") != null && !jsonObj.get("user_type").isJsonNull()) && !jsonObj.get("user_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_type").toString())); + } + if ((jsonObj.get("mobile") != null && !jsonObj.get("mobile").isJsonNull()) && !jsonObj.get("mobile").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mobile` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mobile").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("gender") != null && !jsonObj.get("gender").isJsonNull()) && !jsonObj.get("gender").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `gender` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gender").toString())); + } + if ((jsonObj.get("cert_type") != null && !jsonObj.get("cert_type").isJsonNull()) && !jsonObj.get("cert_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cert_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cert_type").toString())); + } + if ((jsonObj.get("cert_number") != null && !jsonObj.get("cert_number").isJsonNull()) && !jsonObj.get("cert_number").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cert_number` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cert_number").toString())); + } + if ((jsonObj.get("region") != null && !jsonObj.get("region").isJsonNull()) && !jsonObj.get("region").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `region` to be a primitive type in the JSON string but got `%s`", jsonObj.get("region").toString())); + } + if ((jsonObj.get("work_time") != null && !jsonObj.get("work_time").isJsonNull()) && !jsonObj.get("work_time").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `work_time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("work_time").toString())); + } + if ((jsonObj.get("work_title") != null && !jsonObj.get("work_title").isJsonNull()) && !jsonObj.get("work_title").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `work_title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("work_title").toString())); + } + if ((jsonObj.get("arn") != null && !jsonObj.get("arn").isJsonNull()) && !jsonObj.get("arn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `arn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("arn").toString())); + } + if ((jsonObj.get("last_login_ipaddr") != null && !jsonObj.get("last_login_ipaddr").isJsonNull()) && !jsonObj.get("last_login_ipaddr").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `last_login_ipaddr` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_login_ipaddr").toString())); + } + if ((jsonObj.get("last_login_time") != null && !jsonObj.get("last_login_time").isJsonNull()) && !jsonObj.get("last_login_time").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `last_login_time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_login_time").toString())); + } + if ((jsonObj.get("time_created") != null && !jsonObj.get("time_created").isJsonNull()) && !jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NullInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NullInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NullInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NullInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public NullInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of NullInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of NullInner + * @throws IOException if the JSON string is invalid with respect to NullInner + */ + public static NullInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NullInner.class); + } + + /** + * Convert an instance of NullInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/Privilege.java b/src/main/java/com/idmesh/model/Privilege.java new file mode 100644 index 0000000..9c65c31 --- /dev/null +++ b/src/main/java/com/idmesh/model/Privilege.java @@ -0,0 +1,450 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * Privilege + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Privilege { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private BigDecimal id; + + public static final String SERIALIZED_NAME_IDENTITY_TYPE = "identity_type"; + @SerializedName(SERIALIZED_NAME_IDENTITY_TYPE) + private String identityType; + + public static final String SERIALIZED_NAME_IDENTITY_ID = "identity_id"; + @SerializedName(SERIALIZED_NAME_IDENTITY_ID) + private String identityId; + + public static final String SERIALIZED_NAME_AUTH_UNIT_RULE_ID = "auth_unit_rule_id"; + @SerializedName(SERIALIZED_NAME_AUTH_UNIT_RULE_ID) + private String authUnitRuleId; + + public static final String SERIALIZED_NAME_APPLICATION_ID = "application_id"; + @SerializedName(SERIALIZED_NAME_APPLICATION_ID) + private String applicationId; + + public static final String SERIALIZED_NAME_OBJECT_TYPE = "object_type"; + @SerializedName(SERIALIZED_NAME_OBJECT_TYPE) + private String objectType; + + public static final String SERIALIZED_NAME_OBJECT_CODE = "object_code"; + @SerializedName(SERIALIZED_NAME_OBJECT_CODE) + private String objectCode; + + public static final String SERIALIZED_NAME_AFFECT_SCOPE = "affect_scope"; + @SerializedName(SERIALIZED_NAME_AFFECT_SCOPE) + private String affectScope; + + public static final String SERIALIZED_NAME_AFFECT = "affect"; + @SerializedName(SERIALIZED_NAME_AFFECT) + private String affect; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public Privilege() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public BigDecimal getId() { + return id; + } + + + public void setId(BigDecimal id) { + this.id = id; + } + + /** + * Get identityType + * @return identityType + **/ + @javax.annotation.Nonnull + public String getIdentityType() { + return identityType; + } + + + public void setIdentityType(String identityType) { + this.identityType = identityType; + } + + /** + * Get identityId + * @return identityId + **/ + @javax.annotation.Nonnull + public String getIdentityId() { + return identityId; + } + + + public void setIdentityId(String identityId) { + this.identityId = identityId; + } + + /** + * Get authUnitRuleId + * @return authUnitRuleId + **/ + @javax.annotation.Nonnull + public String getAuthUnitRuleId() { + return authUnitRuleId; + } + + + public void setAuthUnitRuleId(String authUnitRuleId) { + this.authUnitRuleId = authUnitRuleId; + } + + /** + * Get applicationId + * @return applicationId + **/ + @javax.annotation.Nonnull + public String getApplicationId() { + return applicationId; + } + + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Get objectType + * @return objectType + **/ + @javax.annotation.Nonnull + public String getObjectType() { + return objectType; + } + + + public void setObjectType(String objectType) { + this.objectType = objectType; + } + + /** + * Get objectCode + * @return objectCode + **/ + @javax.annotation.Nonnull + public String getObjectCode() { + return objectCode; + } + + + public void setObjectCode(String objectCode) { + this.objectCode = objectCode; + } + + /** + * Get affectScope + * @return affectScope + **/ + @javax.annotation.Nonnull + public String getAffectScope() { + return affectScope; + } + + + public void setAffectScope(String affectScope) { + this.affectScope = affectScope; + } + + /** + * Get affect + * @return affect + **/ + @javax.annotation.Nonnull + public String getAffect() { + return affect; + } + + + public void setAffect(String affect) { + this.affect = affect; + } + + /** + * Get timeCreated + * @return timeCreated + **/ + @javax.annotation.Nonnull + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * Get timeModified + * @return timeModified + **/ + @javax.annotation.Nonnull + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Privilege privilege = (Privilege) o; + return Objects.equals(this.id, privilege.id) && + Objects.equals(this.identityType, privilege.identityType) && + Objects.equals(this.identityId, privilege.identityId) && + Objects.equals(this.authUnitRuleId, privilege.authUnitRuleId) && + Objects.equals(this.applicationId, privilege.applicationId) && + Objects.equals(this.objectType, privilege.objectType) && + Objects.equals(this.objectCode, privilege.objectCode) && + Objects.equals(this.affectScope, privilege.affectScope) && + Objects.equals(this.affect, privilege.affect) && + Objects.equals(this.timeCreated, privilege.timeCreated) && + Objects.equals(this.timeModified, privilege.timeModified); + } + + @Override + public int hashCode() { + return Objects.hash(id, identityType, identityId, authUnitRuleId, applicationId, objectType, objectCode, affectScope, affect, timeCreated, timeModified); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Privilege {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" identityType: ").append(toIndentedString(identityType)).append("\n"); + sb.append(" identityId: ").append(toIndentedString(identityId)).append("\n"); + sb.append(" authUnitRuleId: ").append(toIndentedString(authUnitRuleId)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" objectType: ").append(toIndentedString(objectType)).append("\n"); + sb.append(" objectCode: ").append(toIndentedString(objectCode)).append("\n"); + sb.append(" affectScope: ").append(toIndentedString(affectScope)).append("\n"); + sb.append(" affect: ").append(toIndentedString(affect)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("identity_type"); + openapiFields.add("identity_id"); + openapiFields.add("auth_unit_rule_id"); + openapiFields.add("application_id"); + openapiFields.add("object_type"); + openapiFields.add("object_code"); + openapiFields.add("affect_scope"); + openapiFields.add("affect"); + openapiFields.add("time_created"); + openapiFields.add("time_modified"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("identity_type"); + openapiRequiredFields.add("identity_id"); + openapiRequiredFields.add("auth_unit_rule_id"); + openapiRequiredFields.add("application_id"); + openapiRequiredFields.add("object_type"); + openapiRequiredFields.add("object_code"); + openapiRequiredFields.add("affect_scope"); + openapiRequiredFields.add("affect"); + openapiRequiredFields.add("time_created"); + openapiRequiredFields.add("time_modified"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Privilege + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Privilege.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Privilege is not found in the empty JSON string", Privilege.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Privilege.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("identity_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identity_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identity_type").toString())); + } + if (!jsonObj.get("identity_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identity_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identity_id").toString())); + } + if (!jsonObj.get("auth_unit_rule_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `auth_unit_rule_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("auth_unit_rule_id").toString())); + } + if (!jsonObj.get("application_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `application_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("application_id").toString())); + } + if (!jsonObj.get("object_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_type").toString())); + } + if (!jsonObj.get("object_code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_code").toString())); + } + if (!jsonObj.get("affect_scope").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `affect_scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("affect_scope").toString())); + } + if (!jsonObj.get("affect").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `affect` to be a primitive type in the JSON string but got `%s`", jsonObj.get("affect").toString())); + } + if (!jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if (!jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Privilege.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Privilege' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Privilege.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Privilege value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Privilege read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Privilege given an JSON string + * + * @param jsonString JSON string + * @return An instance of Privilege + * @throws IOException if the JSON string is invalid with respect to Privilege + */ + public static Privilege fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Privilege.class); + } + + /** + * Convert an instance of Privilege to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/Resource.java b/src/main/java/com/idmesh/model/Resource.java new file mode 100644 index 0000000..36c5996 --- /dev/null +++ b/src/main/java/com/idmesh/model/Resource.java @@ -0,0 +1,473 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * Resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Resource { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_DEVELOPER_ID = "developer_id"; + @SerializedName(SERIALIZED_NAME_DEVELOPER_ID) + private String developerId; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private String tenantId; + + public static final String SERIALIZED_NAME_APPLICATION_ID = "application_id"; + @SerializedName(SERIALIZED_NAME_APPLICATION_ID) + private String applicationId; + + public static final String SERIALIZED_NAME_APPLICATIOIN_NAME = "applicatioin_name"; + @SerializedName(SERIALIZED_NAME_APPLICATIOIN_NAME) + private String applicatioinName; + + public static final String SERIALIZED_NAME_IS_GLOBAL = "is_global"; + @SerializedName(SERIALIZED_NAME_IS_GLOBAL) + private Boolean isGlobal; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_URI = "uri"; + @SerializedName(SERIALIZED_NAME_URI) + private String uri; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public Resource() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * Get developerId + * @return developerId + **/ + @javax.annotation.Nonnull + public String getDeveloperId() { + return developerId; + } + + + public void setDeveloperId(String developerId) { + this.developerId = developerId; + } + + /** + * Get tenantId + * @return tenantId + **/ + @javax.annotation.Nonnull + public String getTenantId() { + return tenantId; + } + + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + /** + * Get applicationId + * @return applicationId + **/ + @javax.annotation.Nonnull + public String getApplicationId() { + return applicationId; + } + + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Get applicatioinName + * @return applicatioinName + **/ + @javax.annotation.Nonnull + public String getApplicatioinName() { + return applicatioinName; + } + + + public void setApplicatioinName(String applicatioinName) { + this.applicatioinName = applicatioinName; + } + + /** + * Get isGlobal + * @return isGlobal + **/ + @javax.annotation.Nonnull + public Boolean getIsGlobal() { + return isGlobal; + } + + + public void setIsGlobal(Boolean isGlobal) { + this.isGlobal = isGlobal; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * Get code + * @return code + **/ + @javax.annotation.Nonnull + public String getCode() { + return code; + } + + + public void setCode(String code) { + this.code = code; + } + + /** + * Get uri + * @return uri + **/ + @javax.annotation.Nullable + public String getUri() { + return uri; + } + + + public void setUri(String uri) { + this.uri = uri; + } + + /** + * Get timeModified + * @return timeModified + **/ + @javax.annotation.Nonnull + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + /** + * Get timeCreated + * @return timeCreated + **/ + @javax.annotation.Nonnull + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Resource resource = (Resource) o; + return Objects.equals(this.id, resource.id) && + Objects.equals(this.developerId, resource.developerId) && + Objects.equals(this.tenantId, resource.tenantId) && + Objects.equals(this.applicationId, resource.applicationId) && + Objects.equals(this.applicatioinName, resource.applicatioinName) && + Objects.equals(this.isGlobal, resource.isGlobal) && + Objects.equals(this.description, resource.description) && + Objects.equals(this.type, resource.type) && + Objects.equals(this.code, resource.code) && + Objects.equals(this.uri, resource.uri) && + Objects.equals(this.timeModified, resource.timeModified) && + Objects.equals(this.timeCreated, resource.timeCreated); + } + + @Override + public int hashCode() { + return Objects.hash(id, developerId, tenantId, applicationId, applicatioinName, isGlobal, description, type, code, uri, timeModified, timeCreated); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Resource {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" developerId: ").append(toIndentedString(developerId)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" applicatioinName: ").append(toIndentedString(applicatioinName)).append("\n"); + sb.append(" isGlobal: ").append(toIndentedString(isGlobal)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" uri: ").append(toIndentedString(uri)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("developer_id"); + openapiFields.add("tenant_id"); + openapiFields.add("application_id"); + openapiFields.add("applicatioin_name"); + openapiFields.add("is_global"); + openapiFields.add("description"); + openapiFields.add("type"); + openapiFields.add("code"); + openapiFields.add("uri"); + openapiFields.add("time_modified"); + openapiFields.add("time_created"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("developer_id"); + openapiRequiredFields.add("tenant_id"); + openapiRequiredFields.add("application_id"); + openapiRequiredFields.add("applicatioin_name"); + openapiRequiredFields.add("is_global"); + openapiRequiredFields.add("description"); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("code"); + openapiRequiredFields.add("time_modified"); + openapiRequiredFields.add("time_created"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Resource + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Resource is not found in the empty JSON string", Resource.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Resource.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("developer_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `developer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("developer_id").toString())); + } + if (!jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + if (!jsonObj.get("application_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `application_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("application_id").toString())); + } + if (!jsonObj.get("applicatioin_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `applicatioin_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicatioin_name").toString())); + } + if (!jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if (!jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if ((jsonObj.get("uri") != null && !jsonObj.get("uri").isJsonNull()) && !jsonObj.get("uri").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uri").toString())); + } + if (!jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + if (!jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Resource read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of Resource + * @throws IOException if the JSON string is invalid with respect to Resource + */ + public static Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Resource.class); + } + + /** + * Convert an instance of Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/ResourceSet.java b/src/main/java/com/idmesh/model/ResourceSet.java new file mode 100644 index 0000000..b703443 --- /dev/null +++ b/src/main/java/com/idmesh/model/ResourceSet.java @@ -0,0 +1,359 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * ResourceSet + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ResourceSet { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_APPLICATION_ID = "application_id"; + @SerializedName(SERIALIZED_NAME_APPLICATION_ID) + private String applicationId; + + public static final String SERIALIZED_NAME_APPLICATION_NAME = "application_name"; + @SerializedName(SERIALIZED_NAME_APPLICATION_NAME) + private String applicationName; + + public static final String SERIALIZED_NAME_IS_GLOBAL = "is_global"; + @SerializedName(SERIALIZED_NAME_IS_GLOBAL) + private Boolean isGlobal; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public ResourceSet() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * Get applicationId + * @return applicationId + **/ + @javax.annotation.Nullable + public String getApplicationId() { + return applicationId; + } + + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Get applicationName + * @return applicationName + **/ + @javax.annotation.Nullable + public String getApplicationName() { + return applicationName; + } + + + public void setApplicationName(String applicationName) { + this.applicationName = applicationName; + } + + /** + * Get isGlobal + * @return isGlobal + **/ + @javax.annotation.Nullable + public Boolean getIsGlobal() { + return isGlobal; + } + + + public void setIsGlobal(Boolean isGlobal) { + this.isGlobal = isGlobal; + } + + /** + * Get code + * @return code + **/ + @javax.annotation.Nullable + public String getCode() { + return code; + } + + + public void setCode(String code) { + this.code = code; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + /** + * Get timeModified + * @return timeModified + **/ + @javax.annotation.Nullable + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + /** + * Get timeCreated + * @return timeCreated + **/ + @javax.annotation.Nullable + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceSet resourceSet = (ResourceSet) o; + return Objects.equals(this.id, resourceSet.id) && + Objects.equals(this.applicationId, resourceSet.applicationId) && + Objects.equals(this.applicationName, resourceSet.applicationName) && + Objects.equals(this.isGlobal, resourceSet.isGlobal) && + Objects.equals(this.code, resourceSet.code) && + Objects.equals(this.description, resourceSet.description) && + Objects.equals(this.timeModified, resourceSet.timeModified) && + Objects.equals(this.timeCreated, resourceSet.timeCreated); + } + + @Override + public int hashCode() { + return Objects.hash(id, applicationId, applicationName, isGlobal, code, description, timeModified, timeCreated); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceSet {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" applicationName: ").append(toIndentedString(applicationName)).append("\n"); + sb.append(" isGlobal: ").append(toIndentedString(isGlobal)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("application_id"); + openapiFields.add("application_name"); + openapiFields.add("is_global"); + openapiFields.add("code"); + openapiFields.add("description"); + openapiFields.add("time_modified"); + openapiFields.add("time_created"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResourceSet + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResourceSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResourceSet is not found in the empty JSON string", ResourceSet.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("application_id") != null && !jsonObj.get("application_id").isJsonNull()) && !jsonObj.get("application_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `application_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("application_id").toString())); + } + if ((jsonObj.get("application_name") != null && !jsonObj.get("application_name").isJsonNull()) && !jsonObj.get("application_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `application_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("application_name").toString())); + } + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("time_modified") != null && !jsonObj.get("time_modified").isJsonNull()) && !jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + if ((jsonObj.get("time_created") != null && !jsonObj.get("time_created").isJsonNull()) && !jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResourceSet.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResourceSet' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResourceSet.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResourceSet value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ResourceSet read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ResourceSet given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResourceSet + * @throws IOException if the JSON string is invalid with respect to ResourceSet + */ + public static ResourceSet fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResourceSet.class); + } + + /** + * Convert an instance of ResourceSet to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/ResourceSetMember.java b/src/main/java/com/idmesh/model/ResourceSetMember.java new file mode 100644 index 0000000..0c7f5fc --- /dev/null +++ b/src/main/java/com/idmesh/model/ResourceSetMember.java @@ -0,0 +1,561 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.ResourceSetMemberResourceActions; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * ResourceSetMember + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ResourceSetMember { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_SET_ID = "set_id"; + @SerializedName(SERIALIZED_NAME_SET_ID) + private String setId; + + public static final String SERIALIZED_NAME_DEVELOPER_ID = "developer_id"; + @SerializedName(SERIALIZED_NAME_DEVELOPER_ID) + private String developerId; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private String tenantId; + + public static final String SERIALIZED_NAME_RESOURCE_ID = "resource_id"; + @SerializedName(SERIALIZED_NAME_RESOURCE_ID) + private String resourceId; + + public static final String SERIALIZED_NAME_APPLICATION_ID = "application_id"; + @SerializedName(SERIALIZED_NAME_APPLICATION_ID) + private String applicationId; + + public static final String SERIALIZED_NAME_APPLICATION_NAME = "application_name"; + @SerializedName(SERIALIZED_NAME_APPLICATION_NAME) + private String applicationName; + + public static final String SERIALIZED_NAME_IS_GLOBAL = "is_global"; + @SerializedName(SERIALIZED_NAME_IS_GLOBAL) + private Boolean isGlobal; + + public static final String SERIALIZED_NAME_RESOURCE_TYPE = "resource_type"; + @SerializedName(SERIALIZED_NAME_RESOURCE_TYPE) + private String resourceType; + + public static final String SERIALIZED_NAME_RESOURCE_CODE = "resource_code"; + @SerializedName(SERIALIZED_NAME_RESOURCE_CODE) + private String resourceCode; + + public static final String SERIALIZED_NAME_RESOURCE_SCOPE = "resource_scope"; + @SerializedName(SERIALIZED_NAME_RESOURCE_SCOPE) + private String resourceScope; + + public static final String SERIALIZED_NAME_RESOURCE_ACTIONS = "resource_actions"; + @SerializedName(SERIALIZED_NAME_RESOURCE_ACTIONS) + private ResourceSetMemberResourceActions resourceActions; + + public static final String SERIALIZED_NAME_SELECTED_RESOURCE_ACTIONS = "selected_resource_actions"; + @SerializedName(SERIALIZED_NAME_SELECTED_RESOURCE_ACTIONS) + private List selectedResourceActions; + + public static final String SERIALIZED_NAME_MATCH_ALL_RESOURCE_ACTIONS = "match_all_resource_actions"; + @SerializedName(SERIALIZED_NAME_MATCH_ALL_RESOURCE_ACTIONS) + private Boolean matchAllResourceActions; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public ResourceSetMember() { + } + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * Get setId + * @return setId + **/ + @javax.annotation.Nullable + public String getSetId() { + return setId; + } + + + public void setSetId(String setId) { + this.setId = setId; + } + + /** + * Get developerId + * @return developerId + **/ + @javax.annotation.Nullable + public String getDeveloperId() { + return developerId; + } + + + public void setDeveloperId(String developerId) { + this.developerId = developerId; + } + + /** + * Get tenantId + * @return tenantId + **/ + @javax.annotation.Nullable + public String getTenantId() { + return tenantId; + } + + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + /** + * Get resourceId + * @return resourceId + **/ + @javax.annotation.Nullable + public String getResourceId() { + return resourceId; + } + + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + /** + * Get applicationId + * @return applicationId + **/ + @javax.annotation.Nullable + public String getApplicationId() { + return applicationId; + } + + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Get applicationName + * @return applicationName + **/ + @javax.annotation.Nullable + public String getApplicationName() { + return applicationName; + } + + + public void setApplicationName(String applicationName) { + this.applicationName = applicationName; + } + + /** + * Get isGlobal + * @return isGlobal + **/ + @javax.annotation.Nullable + public Boolean getIsGlobal() { + return isGlobal; + } + + + public void setIsGlobal(Boolean isGlobal) { + this.isGlobal = isGlobal; + } + + /** + * Get resourceType + * @return resourceType + **/ + @javax.annotation.Nullable + public String getResourceType() { + return resourceType; + } + + + public void setResourceType(String resourceType) { + this.resourceType = resourceType; + } + + /** + * Get resourceCode + * @return resourceCode + **/ + @javax.annotation.Nullable + public String getResourceCode() { + return resourceCode; + } + + + public void setResourceCode(String resourceCode) { + this.resourceCode = resourceCode; + } + + /** + * Get resourceScope + * @return resourceScope + **/ + @javax.annotation.Nullable + public String getResourceScope() { + return resourceScope; + } + + + public void setResourceScope(String resourceScope) { + this.resourceScope = resourceScope; + } + + /** + * Get resourceActions + * @return resourceActions + **/ + @javax.annotation.Nullable + public ResourceSetMemberResourceActions getResourceActions() { + return resourceActions; + } + + + public void setResourceActions(ResourceSetMemberResourceActions resourceActions) { + this.resourceActions = resourceActions; + } + + /** + * Get selectedResourceActions + * @return selectedResourceActions + **/ + @javax.annotation.Nullable + public List getSelectedResourceActions() { + return selectedResourceActions; + } + + + public void setSelectedResourceActions(List selectedResourceActions) { + this.selectedResourceActions = selectedResourceActions; + } + + /** + * Get matchAllResourceActions + * @return matchAllResourceActions + **/ + @javax.annotation.Nonnull + public Boolean getMatchAllResourceActions() { + return matchAllResourceActions; + } + + + public void setMatchAllResourceActions(Boolean matchAllResourceActions) { + this.matchAllResourceActions = matchAllResourceActions; + } + + /** + * Get timeModified + * @return timeModified + **/ + @javax.annotation.Nullable + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + /** + * Get timeCreated + * @return timeCreated + **/ + @javax.annotation.Nullable + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceSetMember resourceSetMember = (ResourceSetMember) o; + return Objects.equals(this.id, resourceSetMember.id) && + Objects.equals(this.setId, resourceSetMember.setId) && + Objects.equals(this.developerId, resourceSetMember.developerId) && + Objects.equals(this.tenantId, resourceSetMember.tenantId) && + Objects.equals(this.resourceId, resourceSetMember.resourceId) && + Objects.equals(this.applicationId, resourceSetMember.applicationId) && + Objects.equals(this.applicationName, resourceSetMember.applicationName) && + Objects.equals(this.isGlobal, resourceSetMember.isGlobal) && + Objects.equals(this.resourceType, resourceSetMember.resourceType) && + Objects.equals(this.resourceCode, resourceSetMember.resourceCode) && + Objects.equals(this.resourceScope, resourceSetMember.resourceScope) && + Objects.equals(this.resourceActions, resourceSetMember.resourceActions) && + Objects.equals(this.selectedResourceActions, resourceSetMember.selectedResourceActions) && + Objects.equals(this.matchAllResourceActions, resourceSetMember.matchAllResourceActions) && + Objects.equals(this.timeModified, resourceSetMember.timeModified) && + Objects.equals(this.timeCreated, resourceSetMember.timeCreated); + } + + @Override + public int hashCode() { + return Objects.hash(id, setId, developerId, tenantId, resourceId, applicationId, applicationName, isGlobal, resourceType, resourceCode, resourceScope, resourceActions, selectedResourceActions, matchAllResourceActions, timeModified, timeCreated); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceSetMember {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" setId: ").append(toIndentedString(setId)).append("\n"); + sb.append(" developerId: ").append(toIndentedString(developerId)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" applicationName: ").append(toIndentedString(applicationName)).append("\n"); + sb.append(" isGlobal: ").append(toIndentedString(isGlobal)).append("\n"); + sb.append(" resourceType: ").append(toIndentedString(resourceType)).append("\n"); + sb.append(" resourceCode: ").append(toIndentedString(resourceCode)).append("\n"); + sb.append(" resourceScope: ").append(toIndentedString(resourceScope)).append("\n"); + sb.append(" resourceActions: ").append(toIndentedString(resourceActions)).append("\n"); + sb.append(" selectedResourceActions: ").append(toIndentedString(selectedResourceActions)).append("\n"); + sb.append(" matchAllResourceActions: ").append(toIndentedString(matchAllResourceActions)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("set_id"); + openapiFields.add("developer_id"); + openapiFields.add("tenant_id"); + openapiFields.add("resource_id"); + openapiFields.add("application_id"); + openapiFields.add("application_name"); + openapiFields.add("is_global"); + openapiFields.add("resource_type"); + openapiFields.add("resource_code"); + openapiFields.add("resource_scope"); + openapiFields.add("resource_actions"); + openapiFields.add("selected_resource_actions"); + openapiFields.add("match_all_resource_actions"); + openapiFields.add("time_modified"); + openapiFields.add("time_created"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("match_all_resource_actions"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResourceSetMember + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResourceSetMember.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResourceSetMember is not found in the empty JSON string", ResourceSetMember.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResourceSetMember.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("set_id") != null && !jsonObj.get("set_id").isJsonNull()) && !jsonObj.get("set_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `set_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("set_id").toString())); + } + if ((jsonObj.get("developer_id") != null && !jsonObj.get("developer_id").isJsonNull()) && !jsonObj.get("developer_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `developer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("developer_id").toString())); + } + if ((jsonObj.get("tenant_id") != null && !jsonObj.get("tenant_id").isJsonNull()) && !jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + if ((jsonObj.get("resource_id") != null && !jsonObj.get("resource_id").isJsonNull()) && !jsonObj.get("resource_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `resource_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("resource_id").toString())); + } + if ((jsonObj.get("application_id") != null && !jsonObj.get("application_id").isJsonNull()) && !jsonObj.get("application_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `application_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("application_id").toString())); + } + if ((jsonObj.get("application_name") != null && !jsonObj.get("application_name").isJsonNull()) && !jsonObj.get("application_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `application_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("application_name").toString())); + } + if ((jsonObj.get("resource_type") != null && !jsonObj.get("resource_type").isJsonNull()) && !jsonObj.get("resource_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `resource_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("resource_type").toString())); + } + if ((jsonObj.get("resource_code") != null && !jsonObj.get("resource_code").isJsonNull()) && !jsonObj.get("resource_code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `resource_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("resource_code").toString())); + } + if ((jsonObj.get("resource_scope") != null && !jsonObj.get("resource_scope").isJsonNull()) && !jsonObj.get("resource_scope").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `resource_scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("resource_scope").toString())); + } + // validate the optional field `resource_actions` + if (jsonObj.get("resource_actions") != null && !jsonObj.get("resource_actions").isJsonNull()) { + ResourceSetMemberResourceActions.validateJsonElement(jsonObj.get("resource_actions")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("selected_resource_actions") != null && !jsonObj.get("selected_resource_actions").isJsonNull() && !jsonObj.get("selected_resource_actions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `selected_resource_actions` to be an array in the JSON string but got `%s`", jsonObj.get("selected_resource_actions").toString())); + } + if ((jsonObj.get("time_modified") != null && !jsonObj.get("time_modified").isJsonNull()) && !jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + if ((jsonObj.get("time_created") != null && !jsonObj.get("time_created").isJsonNull()) && !jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResourceSetMember.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResourceSetMember' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResourceSetMember.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResourceSetMember value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ResourceSetMember read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ResourceSetMember given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResourceSetMember + * @throws IOException if the JSON string is invalid with respect to ResourceSetMember + */ + public static ResourceSetMember fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResourceSetMember.class); + } + + /** + * Convert an instance of ResourceSetMember to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/ResourceSetMemberResourceActions.java b/src/main/java/com/idmesh/model/ResourceSetMemberResourceActions.java new file mode 100644 index 0000000..0198866 --- /dev/null +++ b/src/main/java/com/idmesh/model/ResourceSetMemberResourceActions.java @@ -0,0 +1,226 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * ResourceSetMemberResourceActions + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ResourceSetMemberResourceActions { + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public ResourceSetMemberResourceActions() { + } + /** + * Get code + * @return code + **/ + @javax.annotation.Nonnull + public String getCode() { + return code; + } + + + public void setCode(String code) { + this.code = code; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceSetMemberResourceActions resourceSetMemberResourceActions = (ResourceSetMemberResourceActions) o; + return Objects.equals(this.code, resourceSetMemberResourceActions.code) && + Objects.equals(this.description, resourceSetMemberResourceActions.description); + } + + @Override + public int hashCode() { + return Objects.hash(code, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceSetMemberResourceActions {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("code"); + openapiFields.add("description"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("code"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ResourceSetMemberResourceActions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResourceSetMemberResourceActions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResourceSetMemberResourceActions is not found in the empty JSON string", ResourceSetMemberResourceActions.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ResourceSetMemberResourceActions.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResourceSetMemberResourceActions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResourceSetMemberResourceActions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResourceSetMemberResourceActions.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResourceSetMemberResourceActions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ResourceSetMemberResourceActions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ResourceSetMemberResourceActions given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResourceSetMemberResourceActions + * @throws IOException if the JSON string is invalid with respect to ResourceSetMemberResourceActions + */ + public static ResourceSetMemberResourceActions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResourceSetMemberResourceActions.class); + } + + /** + * Convert an instance of ResourceSetMemberResourceActions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/SaveObjectRequest.java b/src/main/java/com/idmesh/model/SaveObjectRequest.java new file mode 100644 index 0000000..3a9b9b1 --- /dev/null +++ b/src/main/java/com/idmesh/model/SaveObjectRequest.java @@ -0,0 +1,227 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * SaveObjectRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SaveObjectRequest { + public static final String SERIALIZED_NAME_KEY = "key"; + @SerializedName(SERIALIZED_NAME_KEY) + private String key; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private String value; + + public SaveObjectRequest() { + } + /** + * Get key + * @return key + **/ + @javax.annotation.Nonnull + public String getKey() { + return key; + } + + + public void setKey(String key) { + this.key = key; + } + + /** + * Get value + * @return value + **/ + @javax.annotation.Nonnull + public String getValue() { + return value; + } + + + public void setValue(String value) { + this.value = value; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SaveObjectRequest saveObjectRequest = (SaveObjectRequest) o; + return Objects.equals(this.key, saveObjectRequest.key) && + Objects.equals(this.value, saveObjectRequest.value); + } + + @Override + public int hashCode() { + return Objects.hash(key, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SaveObjectRequest {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("key"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("key"); + openapiRequiredFields.add("value"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SaveObjectRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SaveObjectRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SaveObjectRequest is not found in the empty JSON string", SaveObjectRequest.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SaveObjectRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); + } + if (!jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SaveObjectRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SaveObjectRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SaveObjectRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SaveObjectRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SaveObjectRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SaveObjectRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SaveObjectRequest + * @throws IOException if the JSON string is invalid with respect to SaveObjectRequest + */ + public static SaveObjectRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SaveObjectRequest.class); + } + + /** + * Convert an instance of SaveObjectRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/TreeNode.java b/src/main/java/com/idmesh/model/TreeNode.java new file mode 100644 index 0000000..63c3d1d --- /dev/null +++ b/src/main/java/com/idmesh/model/TreeNode.java @@ -0,0 +1,724 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * TreeNode + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TreeNode { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_DEVELOPER_ID = "developer_id"; + @SerializedName(SERIALIZED_NAME_DEVELOPER_ID) + private String developerId; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private String tenantId; + + public static final String SERIALIZED_NAME_ARN = "arn"; + @SerializedName(SERIALIZED_NAME_ARN) + private String arn; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_TAG = "tag"; + @SerializedName(SERIALIZED_NAME_TAG) + private String tag; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_IS_POINTER = "is_pointer"; + @SerializedName(SERIALIZED_NAME_IS_POINTER) + private String isPointer; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_PERM_NAMESPACE_ARN = "perm_namespace_arn"; + @SerializedName(SERIALIZED_NAME_PERM_NAMESPACE_ARN) + private String permNamespaceArn; + + public static final String SERIALIZED_NAME_CONDITION = "condition"; + @SerializedName(SERIALIZED_NAME_CONDITION) + private String condition; + + public static final String SERIALIZED_NAME_IS_DYNAMIC = "is_dynamic"; + @SerializedName(SERIALIZED_NAME_IS_DYNAMIC) + private String isDynamic; + + public static final String SERIALIZED_NAME_SYS_CODE = "sys_code"; + @SerializedName(SERIALIZED_NAME_SYS_CODE) + private String sysCode; + + public static final String SERIALIZED_NAME_OPERATOR_ID = "operator_id"; + @SerializedName(SERIALIZED_NAME_OPERATOR_ID) + private String operatorId; + + public static final String SERIALIZED_NAME_POINTER_ID = "pointer_id"; + @SerializedName(SERIALIZED_NAME_POINTER_ID) + private String pointerId; + + public static final String SERIALIZED_NAME_SEQ = "seq"; + @SerializedName(SERIALIZED_NAME_SEQ) + private Integer seq; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public static final String SERIALIZED_NAME_OBJECT_CODE = "object_code"; + @SerializedName(SERIALIZED_NAME_OBJECT_CODE) + private String objectCode; + + public static final String SERIALIZED_NAME_PARENT_ID = "parent_id"; + @SerializedName(SERIALIZED_NAME_PARENT_ID) + private String parentId; + + public static final String SERIALIZED_NAME_SYS_EXT_PROPS = "sys_ext_props"; + @SerializedName(SERIALIZED_NAME_SYS_EXT_PROPS) + private Object sysExtProps; + + public static final String SERIALIZED_NAME_FREE_EXT_PROPS = "free_ext_props"; + @SerializedName(SERIALIZED_NAME_FREE_EXT_PROPS) + private Object freeExtProps; + + public TreeNode() { + } + /** + * 节点ID + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * 开发者ID + * @return developerId + **/ + @javax.annotation.Nullable + public String getDeveloperId() { + return developerId; + } + + + public void setDeveloperId(String developerId) { + this.developerId = developerId; + } + + /** + * 租户ID + * @return tenantId + **/ + @javax.annotation.Nullable + public String getTenantId() { + return tenantId; + } + + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + /** + * Get arn + * @return arn + **/ + @javax.annotation.Nullable + public String getArn() { + return arn; + } + + + public void setArn(String arn) { + this.arn = arn; + } + + /** + * 创建时间 + * @return timeCreated + **/ + @javax.annotation.Nullable + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * 用于定义节点类型,目前支持:org(组织),role(角色),position(岗位),group(组) + * @return tag + **/ + @javax.annotation.Nullable + public String getTag() { + return tag; + } + + + public void setTag(String tag) { + this.tag = tag; + } + + /** + * 状态 + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + /** + * 是否指针类型 + * @return isPointer + **/ + @javax.annotation.Nullable + public String getIsPointer() { + return isPointer; + } + + + public void setIsPointer(String isPointer) { + this.isPointer = isPointer; + } + + /** + * 节点code + * @return code + **/ + @javax.annotation.Nonnull + public String getCode() { + return code; + } + + + public void setCode(String code) { + this.code = code; + } + + /** + * 节点名字 + * @return name + **/ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + /** + * 抽象权限容器的ARN + * @return permNamespaceArn + **/ + @javax.annotation.Nullable + public String getPermNamespaceArn() { + return permNamespaceArn; + } + + + public void setPermNamespaceArn(String permNamespaceArn) { + this.permNamespaceArn = permNamespaceArn; + } + + /** + * Get condition + * @return condition + **/ + @javax.annotation.Nullable + public String getCondition() { + return condition; + } + + + public void setCondition(String condition) { + this.condition = condition; + } + + /** + * 是否动态节点(0普通结点,1动态结点) + * @return isDynamic + **/ + @javax.annotation.Nullable + public String getIsDynamic() { + return isDynamic; + } + + + public void setIsDynamic(String isDynamic) { + this.isDynamic = isDynamic; + } + + /** + * 系统code + * @return sysCode + **/ + @javax.annotation.Nonnull + public String getSysCode() { + return sysCode; + } + + + public void setSysCode(String sysCode) { + this.sysCode = sysCode; + } + + /** + * 操作者id + * @return operatorId + **/ + @javax.annotation.Nullable + public String getOperatorId() { + return operatorId; + } + + + public void setOperatorId(String operatorId) { + this.operatorId = operatorId; + } + + /** + * 指针指向的实体节点 + * @return pointerId + **/ + @javax.annotation.Nullable + public String getPointerId() { + return pointerId; + } + + + public void setPointerId(String pointerId) { + this.pointerId = pointerId; + } + + /** + * 序号 + * @return seq + **/ + @javax.annotation.Nullable + public Integer getSeq() { + return seq; + } + + + public void setSeq(Integer seq) { + this.seq = seq; + } + + /** + * 描述 + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + /** + * 最后修改时间 + * @return timeModified + **/ + @javax.annotation.Nullable + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + /** + * OBJ_ID,组织,角色,岗位,职级等 + * @return objectCode + **/ + @javax.annotation.Nonnull + public String getObjectCode() { + return objectCode; + } + + + public void setObjectCode(String objectCode) { + this.objectCode = objectCode; + } + + /** + * 父节点id + * @return parentId + **/ + @javax.annotation.Nullable + public String getParentId() { + return parentId; + } + + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + /** + * 额外属性,需要先定义schema + * @return sysExtProps + **/ + @javax.annotation.Nullable + public Object getSysExtProps() { + return sysExtProps; + } + + + public void setSysExtProps(Object sysExtProps) { + this.sysExtProps = sysExtProps; + } + + /** + * 可以自由扩展 + * @return freeExtProps + **/ + @javax.annotation.Nullable + public Object getFreeExtProps() { + return freeExtProps; + } + + + public void setFreeExtProps(Object freeExtProps) { + this.freeExtProps = freeExtProps; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TreeNode treeNode = (TreeNode) o; + return Objects.equals(this.id, treeNode.id) && + Objects.equals(this.developerId, treeNode.developerId) && + Objects.equals(this.tenantId, treeNode.tenantId) && + Objects.equals(this.arn, treeNode.arn) && + Objects.equals(this.timeCreated, treeNode.timeCreated) && + Objects.equals(this.tag, treeNode.tag) && + Objects.equals(this.status, treeNode.status) && + Objects.equals(this.isPointer, treeNode.isPointer) && + Objects.equals(this.code, treeNode.code) && + Objects.equals(this.name, treeNode.name) && + Objects.equals(this.permNamespaceArn, treeNode.permNamespaceArn) && + Objects.equals(this.condition, treeNode.condition) && + Objects.equals(this.isDynamic, treeNode.isDynamic) && + Objects.equals(this.sysCode, treeNode.sysCode) && + Objects.equals(this.operatorId, treeNode.operatorId) && + Objects.equals(this.pointerId, treeNode.pointerId) && + Objects.equals(this.seq, treeNode.seq) && + Objects.equals(this.description, treeNode.description) && + Objects.equals(this.timeModified, treeNode.timeModified) && + Objects.equals(this.objectCode, treeNode.objectCode) && + Objects.equals(this.parentId, treeNode.parentId) && + Objects.equals(this.sysExtProps, treeNode.sysExtProps) && + Objects.equals(this.freeExtProps, treeNode.freeExtProps); + } + + @Override + public int hashCode() { + return Objects.hash(id, developerId, tenantId, arn, timeCreated, tag, status, isPointer, code, name, permNamespaceArn, condition, isDynamic, sysCode, operatorId, pointerId, seq, description, timeModified, objectCode, parentId, sysExtProps, freeExtProps); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TreeNode {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" developerId: ").append(toIndentedString(developerId)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" arn: ").append(toIndentedString(arn)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" isPointer: ").append(toIndentedString(isPointer)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" permNamespaceArn: ").append(toIndentedString(permNamespaceArn)).append("\n"); + sb.append(" condition: ").append(toIndentedString(condition)).append("\n"); + sb.append(" isDynamic: ").append(toIndentedString(isDynamic)).append("\n"); + sb.append(" sysCode: ").append(toIndentedString(sysCode)).append("\n"); + sb.append(" operatorId: ").append(toIndentedString(operatorId)).append("\n"); + sb.append(" pointerId: ").append(toIndentedString(pointerId)).append("\n"); + sb.append(" seq: ").append(toIndentedString(seq)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" objectCode: ").append(toIndentedString(objectCode)).append("\n"); + sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); + sb.append(" sysExtProps: ").append(toIndentedString(sysExtProps)).append("\n"); + sb.append(" freeExtProps: ").append(toIndentedString(freeExtProps)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("developer_id"); + openapiFields.add("tenant_id"); + openapiFields.add("arn"); + openapiFields.add("time_created"); + openapiFields.add("tag"); + openapiFields.add("status"); + openapiFields.add("is_pointer"); + openapiFields.add("code"); + openapiFields.add("name"); + openapiFields.add("perm_namespace_arn"); + openapiFields.add("condition"); + openapiFields.add("is_dynamic"); + openapiFields.add("sys_code"); + openapiFields.add("operator_id"); + openapiFields.add("pointer_id"); + openapiFields.add("seq"); + openapiFields.add("description"); + openapiFields.add("time_modified"); + openapiFields.add("object_code"); + openapiFields.add("parent_id"); + openapiFields.add("sys_ext_props"); + openapiFields.add("free_ext_props"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("code"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("sys_code"); + openapiRequiredFields.add("object_code"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TreeNode + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TreeNode.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in TreeNode is not found in the empty JSON string", TreeNode.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : TreeNode.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("developer_id") != null && !jsonObj.get("developer_id").isJsonNull()) && !jsonObj.get("developer_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `developer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("developer_id").toString())); + } + if ((jsonObj.get("tenant_id") != null && !jsonObj.get("tenant_id").isJsonNull()) && !jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + if ((jsonObj.get("arn") != null && !jsonObj.get("arn").isJsonNull()) && !jsonObj.get("arn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `arn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("arn").toString())); + } + if ((jsonObj.get("time_created") != null && !jsonObj.get("time_created").isJsonNull()) && !jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("is_pointer") != null && !jsonObj.get("is_pointer").isJsonNull()) && !jsonObj.get("is_pointer").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `is_pointer` to be a primitive type in the JSON string but got `%s`", jsonObj.get("is_pointer").toString())); + } + if (!jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("perm_namespace_arn") != null && !jsonObj.get("perm_namespace_arn").isJsonNull()) && !jsonObj.get("perm_namespace_arn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `perm_namespace_arn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("perm_namespace_arn").toString())); + } + if ((jsonObj.get("condition") != null && !jsonObj.get("condition").isJsonNull()) && !jsonObj.get("condition").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `condition` to be a primitive type in the JSON string but got `%s`", jsonObj.get("condition").toString())); + } + if ((jsonObj.get("is_dynamic") != null && !jsonObj.get("is_dynamic").isJsonNull()) && !jsonObj.get("is_dynamic").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `is_dynamic` to be a primitive type in the JSON string but got `%s`", jsonObj.get("is_dynamic").toString())); + } + if (!jsonObj.get("sys_code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sys_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sys_code").toString())); + } + if ((jsonObj.get("operator_id") != null && !jsonObj.get("operator_id").isJsonNull()) && !jsonObj.get("operator_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `operator_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator_id").toString())); + } + if ((jsonObj.get("pointer_id") != null && !jsonObj.get("pointer_id").isJsonNull()) && !jsonObj.get("pointer_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `pointer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pointer_id").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("time_modified") != null && !jsonObj.get("time_modified").isJsonNull()) && !jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + if (!jsonObj.get("object_code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_code").toString())); + } + if ((jsonObj.get("parent_id") != null && !jsonObj.get("parent_id").isJsonNull()) && !jsonObj.get("parent_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `parent_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parent_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TreeNode.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TreeNode' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TreeNode.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TreeNode value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TreeNode read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of TreeNode given an JSON string + * + * @param jsonString JSON string + * @return An instance of TreeNode + * @throws IOException if the JSON string is invalid with respect to TreeNode + */ + public static TreeNode fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TreeNode.class); + } + + /** + * Convert an instance of TreeNode to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/TreeUser.java b/src/main/java/com/idmesh/model/TreeUser.java new file mode 100644 index 0000000..0a992f3 --- /dev/null +++ b/src/main/java/com/idmesh/model/TreeUser.java @@ -0,0 +1,519 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * 核心-树型对象(组织、角色等)用户关系表 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TreeUser { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_DEVELOPER_ID = "developer_id"; + @SerializedName(SERIALIZED_NAME_DEVELOPER_ID) + private String developerId; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private String tenantId; + + public static final String SERIALIZED_NAME_NODE_ID = "node_id"; + @SerializedName(SERIALIZED_NAME_NODE_ID) + private String nodeId; + + public static final String SERIALIZED_NAME_USER_ID = "user_id"; + @SerializedName(SERIALIZED_NAME_USER_ID) + private String userId; + + public static final String SERIALIZED_NAME_PATH = "path"; + @SerializedName(SERIALIZED_NAME_PATH) + private String path; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + private String displayName; + + public static final String SERIALIZED_NAME_USERNAME = "username"; + @SerializedName(SERIALIZED_NAME_USERNAME) + private String username; + + public static final String SERIALIZED_NAME_RELATION_TYPE = "relation_type"; + @SerializedName(SERIALIZED_NAME_RELATION_TYPE) + private String relationType; + + public static final String SERIALIZED_NAME_RELATION_DATA = "relation_data"; + @SerializedName(SERIALIZED_NAME_RELATION_DATA) + private String relationData; + + public static final String SERIALIZED_NAME_IS_DEFAULT = "is_default"; + @SerializedName(SERIALIZED_NAME_IS_DEFAULT) + private String isDefault; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private OffsetDateTime timeCreated; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private OffsetDateTime timeModified; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public TreeUser() { + } + /** + * 全局唯一ID + * @return id + **/ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + /** + * 开发者ID + * @return developerId + **/ + @javax.annotation.Nonnull + public String getDeveloperId() { + return developerId; + } + + + public void setDeveloperId(String developerId) { + this.developerId = developerId; + } + + /** + * 租户ID + * @return tenantId + **/ + @javax.annotation.Nonnull + public String getTenantId() { + return tenantId; + } + + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + /** + * 节点ID + * @return nodeId + **/ + @javax.annotation.Nonnull + public String getNodeId() { + return nodeId; + } + + + public void setNodeId(String nodeId) { + this.nodeId = nodeId; + } + + /** + * 用户ID + * @return userId + **/ + @javax.annotation.Nonnull + public String getUserId() { + return userId; + } + + + public void setUserId(String userId) { + this.userId = userId; + } + + /** + * 所属组织关系路径 + * @return path + **/ + @javax.annotation.Nonnull + public String getPath() { + return path; + } + + + public void setPath(String path) { + this.path = path; + } + + /** + * 显示名 + * @return displayName + **/ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + /** + * 用户名 + * @return username + **/ + @javax.annotation.Nonnull + public String getUsername() { + return username; + } + + + public void setUsername(String username) { + this.username = username; + } + + /** + * 关联类型(用于区分多重关联) + * @return relationType + **/ + @javax.annotation.Nullable + public String getRelationType() { + return relationType; + } + + + public void setRelationType(String relationType) { + this.relationType = relationType; + } + + /** + * 关联扩展信息 + * @return relationData + **/ + @javax.annotation.Nullable + public String getRelationData() { + return relationData; + } + + + public void setRelationData(String relationData) { + this.relationData = relationData; + } + + /** + * 是否默认关系 + * @return isDefault + **/ + @javax.annotation.Nullable + public String getIsDefault() { + return isDefault; + } + + + public void setIsDefault(String isDefault) { + this.isDefault = isDefault; + } + + /** + * 创建时间 + * @return timeCreated + **/ + @javax.annotation.Nonnull + public OffsetDateTime getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(OffsetDateTime timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * 修改时间 + * @return timeModified + **/ + @javax.annotation.Nonnull + public OffsetDateTime getTimeModified() { + return timeModified; + } + + + public void setTimeModified(OffsetDateTime timeModified) { + this.timeModified = timeModified; + } + + /** + * 状态 + * @return status + **/ + @javax.annotation.Nonnull + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TreeUser treeUser = (TreeUser) o; + return Objects.equals(this.id, treeUser.id) && + Objects.equals(this.developerId, treeUser.developerId) && + Objects.equals(this.tenantId, treeUser.tenantId) && + Objects.equals(this.nodeId, treeUser.nodeId) && + Objects.equals(this.userId, treeUser.userId) && + Objects.equals(this.path, treeUser.path) && + Objects.equals(this.displayName, treeUser.displayName) && + Objects.equals(this.username, treeUser.username) && + Objects.equals(this.relationType, treeUser.relationType) && + Objects.equals(this.relationData, treeUser.relationData) && + Objects.equals(this.isDefault, treeUser.isDefault) && + Objects.equals(this.timeCreated, treeUser.timeCreated) && + Objects.equals(this.timeModified, treeUser.timeModified) && + Objects.equals(this.status, treeUser.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, developerId, tenantId, nodeId, userId, path, displayName, username, relationType, relationData, isDefault, timeCreated, timeModified, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TreeUser {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" developerId: ").append(toIndentedString(developerId)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" nodeId: ").append(toIndentedString(nodeId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" relationType: ").append(toIndentedString(relationType)).append("\n"); + sb.append(" relationData: ").append(toIndentedString(relationData)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("developer_id"); + openapiFields.add("tenant_id"); + openapiFields.add("node_id"); + openapiFields.add("user_id"); + openapiFields.add("path"); + openapiFields.add("display_name"); + openapiFields.add("username"); + openapiFields.add("relation_type"); + openapiFields.add("relation_data"); + openapiFields.add("is_default"); + openapiFields.add("time_created"); + openapiFields.add("time_modified"); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("developer_id"); + openapiRequiredFields.add("tenant_id"); + openapiRequiredFields.add("node_id"); + openapiRequiredFields.add("user_id"); + openapiRequiredFields.add("path"); + openapiRequiredFields.add("display_name"); + openapiRequiredFields.add("username"); + openapiRequiredFields.add("time_created"); + openapiRequiredFields.add("time_modified"); + openapiRequiredFields.add("status"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TreeUser + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TreeUser.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in TreeUser is not found in the empty JSON string", TreeUser.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : TreeUser.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("developer_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `developer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("developer_id").toString())); + } + if (!jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + if (!jsonObj.get("node_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `node_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("node_id").toString())); + } + if (!jsonObj.get("user_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_id").toString())); + } + if (!jsonObj.get("path").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); + } + if (!jsonObj.get("display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString())); + } + if (!jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if ((jsonObj.get("relation_type") != null && !jsonObj.get("relation_type").isJsonNull()) && !jsonObj.get("relation_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `relation_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("relation_type").toString())); + } + if ((jsonObj.get("relation_data") != null && !jsonObj.get("relation_data").isJsonNull()) && !jsonObj.get("relation_data").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `relation_data` to be a primitive type in the JSON string but got `%s`", jsonObj.get("relation_data").toString())); + } + if ((jsonObj.get("is_default") != null && !jsonObj.get("is_default").isJsonNull()) && !jsonObj.get("is_default").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `is_default` to be a primitive type in the JSON string but got `%s`", jsonObj.get("is_default").toString())); + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TreeUser.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TreeUser' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TreeUser.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TreeUser value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TreeUser read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of TreeUser given an JSON string + * + * @param jsonString JSON string + * @return An instance of TreeUser + * @throws IOException if the JSON string is invalid with respect to TreeUser + */ + public static TreeUser fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TreeUser.class); + } + + /** + * Convert an instance of TreeUser to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/UpdateMemberRequest.java b/src/main/java/com/idmesh/model/UpdateMemberRequest.java new file mode 100644 index 0000000..fa8533b --- /dev/null +++ b/src/main/java/com/idmesh/model/UpdateMemberRequest.java @@ -0,0 +1,274 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * UpdateMemberRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateMemberRequest { + public static final String SERIALIZED_NAME_ACTION = "action"; + @SerializedName(SERIALIZED_NAME_ACTION) + private String action; + + public static final String SERIALIZED_NAME_IS_DEFAULT = "is_default"; + @SerializedName(SERIALIZED_NAME_IS_DEFAULT) + private String isDefault; + + public static final String SERIALIZED_NAME_SOURCE_NODE_ID = "source_node_id"; + @SerializedName(SERIALIZED_NAME_SOURCE_NODE_ID) + private String sourceNodeId; + + public static final String SERIALIZED_NAME_DEST_NODE_ID = "dest_node_id"; + @SerializedName(SERIALIZED_NAME_DEST_NODE_ID) + private String destNodeId; + + public UpdateMemberRequest() { + } + /** + * 移动节点move, 设置为默认关系as-default + * @return action + **/ + @javax.annotation.Nonnull + public String getAction() { + return action; + } + + + public void setAction(String action) { + this.action = action; + } + + /** + * 1是,0否 + * @return isDefault + **/ + @javax.annotation.Nullable + public String getIsDefault() { + return isDefault; + } + + + public void setIsDefault(String isDefault) { + this.isDefault = isDefault; + } + + /** + * 移动前节点ID + * @return sourceNodeId + **/ + @javax.annotation.Nullable + public String getSourceNodeId() { + return sourceNodeId; + } + + + public void setSourceNodeId(String sourceNodeId) { + this.sourceNodeId = sourceNodeId; + } + + /** + * 移动后节点ID + * @return destNodeId + **/ + @javax.annotation.Nullable + public String getDestNodeId() { + return destNodeId; + } + + + public void setDestNodeId(String destNodeId) { + this.destNodeId = destNodeId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateMemberRequest updateMemberRequest = (UpdateMemberRequest) o; + return Objects.equals(this.action, updateMemberRequest.action) && + Objects.equals(this.isDefault, updateMemberRequest.isDefault) && + Objects.equals(this.sourceNodeId, updateMemberRequest.sourceNodeId) && + Objects.equals(this.destNodeId, updateMemberRequest.destNodeId); + } + + @Override + public int hashCode() { + return Objects.hash(action, isDefault, sourceNodeId, destNodeId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateMemberRequest {\n"); + sb.append(" action: ").append(toIndentedString(action)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append(" sourceNodeId: ").append(toIndentedString(sourceNodeId)).append("\n"); + sb.append(" destNodeId: ").append(toIndentedString(destNodeId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("action"); + openapiFields.add("is_default"); + openapiFields.add("source_node_id"); + openapiFields.add("dest_node_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("action"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateMemberRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateMemberRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateMemberRequest is not found in the empty JSON string", UpdateMemberRequest.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateMemberRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("action").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `action` to be a primitive type in the JSON string but got `%s`", jsonObj.get("action").toString())); + } + if ((jsonObj.get("is_default") != null && !jsonObj.get("is_default").isJsonNull()) && !jsonObj.get("is_default").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `is_default` to be a primitive type in the JSON string but got `%s`", jsonObj.get("is_default").toString())); + } + if ((jsonObj.get("source_node_id") != null && !jsonObj.get("source_node_id").isJsonNull()) && !jsonObj.get("source_node_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `source_node_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source_node_id").toString())); + } + if ((jsonObj.get("dest_node_id") != null && !jsonObj.get("dest_node_id").isJsonNull()) && !jsonObj.get("dest_node_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `dest_node_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dest_node_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateMemberRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateMemberRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateMemberRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateMemberRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateMemberRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateMemberRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateMemberRequest + * @throws IOException if the JSON string is invalid with respect to UpdateMemberRequest + */ + public static UpdateMemberRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateMemberRequest.class); + } + + /** + * Convert an instance of UpdateMemberRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/UpdateNode200Response.java b/src/main/java/com/idmesh/model/UpdateNode200Response.java new file mode 100644 index 0000000..6352df7 --- /dev/null +++ b/src/main/java/com/idmesh/model/UpdateNode200Response.java @@ -0,0 +1,540 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * UpdateNode200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateNode200Response { + public static final String SERIALIZED_NAME_SYS_CODE = "sys_code"; + @SerializedName(SERIALIZED_NAME_SYS_CODE) + private String sysCode; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_IS_POINTER = "is_pointer"; + @SerializedName(SERIALIZED_NAME_IS_POINTER) + private String isPointer; + + public static final String SERIALIZED_NAME_OPERATOR_ID = "operator_id"; + @SerializedName(SERIALIZED_NAME_OPERATOR_ID) + private BigDecimal operatorId; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_PERM_NAMESPACE_ARN = "perm_namespace_arn"; + @SerializedName(SERIALIZED_NAME_PERM_NAMESPACE_ARN) + private String permNamespaceArn; + + public static final String SERIALIZED_NAME_POINTER_ID = "pointer_id"; + @SerializedName(SERIALIZED_NAME_POINTER_ID) + private BigDecimal pointerId; + + public static final String SERIALIZED_NAME_CONDITION = "condition"; + @SerializedName(SERIALIZED_NAME_CONDITION) + private String condition; + + public static final String SERIALIZED_NAME_SOURCE_PARENT_ID = "source_parent_id"; + @SerializedName(SERIALIZED_NAME_SOURCE_PARENT_ID) + private BigDecimal sourceParentId; + + public static final String SERIALIZED_NAME_DEST_PARENT_ID = "dest_parent_id"; + @SerializedName(SERIALIZED_NAME_DEST_PARENT_ID) + private BigDecimal destParentId; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_IS_DYNAMIC = "is_dynamic"; + @SerializedName(SERIALIZED_NAME_IS_DYNAMIC) + private String isDynamic; + + public static final String SERIALIZED_NAME_OBJECT_CODE = "object_code"; + @SerializedName(SERIALIZED_NAME_OBJECT_CODE) + private String objectCode; + + public static final String SERIALIZED_NAME_ARN = "arn"; + @SerializedName(SERIALIZED_NAME_ARN) + private String arn; + + public static final String SERIALIZED_NAME_SEQ = "seq"; + @SerializedName(SERIALIZED_NAME_SEQ) + private BigDecimal seq; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public UpdateNode200Response() { + } + /** + * 系统分配的用于处理树型关系的编码 + * @return sysCode + **/ + @javax.annotation.Nullable + public String getSysCode() { + return sysCode; + } + + + public void setSysCode(String sysCode) { + this.sysCode = sysCode; + } + + /** + * 节点代码 + * @return code + **/ + @javax.annotation.Nullable + public String getCode() { + return code; + } + + + public void setCode(String code) { + this.code = code; + } + + /** + * 是否指针节点(0普通结点,1指针结点) + * @return isPointer + **/ + @javax.annotation.Nullable + public String getIsPointer() { + return isPointer; + } + + + public void setIsPointer(String isPointer) { + this.isPointer = isPointer; + } + + /** + * 操作人ID + * @return operatorId + **/ + @javax.annotation.Nullable + public BigDecimal getOperatorId() { + return operatorId; + } + + + public void setOperatorId(BigDecimal operatorId) { + this.operatorId = operatorId; + } + + /** + * 备注 + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + /** + * 抽象权限容器的ARN + * @return permNamespaceArn + **/ + @javax.annotation.Nullable + public String getPermNamespaceArn() { + return permNamespaceArn; + } + + + public void setPermNamespaceArn(String permNamespaceArn) { + this.permNamespaceArn = permNamespaceArn; + } + + /** + * 指针指向的实体节点 + * @return pointerId + **/ + @javax.annotation.Nullable + public BigDecimal getPointerId() { + return pointerId; + } + + + public void setPointerId(BigDecimal pointerId) { + this.pointerId = pointerId; + } + + /** + * 动态节点的条件(如满足某后缀表达式) + * @return condition + **/ + @javax.annotation.Nullable + public String getCondition() { + return condition; + } + + + public void setCondition(String condition) { + this.condition = condition; + } + + /** + * 源上级节点ID(根为0) + * @return sourceParentId + **/ + @javax.annotation.Nullable + public BigDecimal getSourceParentId() { + return sourceParentId; + } + + + public void setSourceParentId(BigDecimal sourceParentId) { + this.sourceParentId = sourceParentId; + } + + /** + * 目标上级节点ID(根为0) + * @return destParentId + **/ + @javax.annotation.Nullable + public BigDecimal getDestParentId() { + return destParentId; + } + + + public void setDestParentId(BigDecimal destParentId) { + this.destParentId = destParentId; + } + + /** + * 节点名称 + * @return name + **/ + @javax.annotation.Nullable + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + /** + * 是否动态节点(0普通结点,1动态结点) + * @return isDynamic + **/ + @javax.annotation.Nullable + public String getIsDynamic() { + return isDynamic; + } + + + public void setIsDynamic(String isDynamic) { + this.isDynamic = isDynamic; + } + + /** + * 节点类型(OBJ_ID,组织,角色,岗位,职级等) + * @return objectCode + **/ + @javax.annotation.Nullable + public String getObjectCode() { + return objectCode; + } + + + public void setObjectCode(String objectCode) { + this.objectCode = objectCode; + } + + /** + * ARN + * @return arn + **/ + @javax.annotation.Nullable + public String getArn() { + return arn; + } + + + public void setArn(String arn) { + this.arn = arn; + } + + /** + * 显示顺序 + * @return seq + **/ + @javax.annotation.Nullable + public BigDecimal getSeq() { + return seq; + } + + + public void setSeq(BigDecimal seq) { + this.seq = seq; + } + + /** + * 状态 + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateNode200Response updateNode200Response = (UpdateNode200Response) o; + return Objects.equals(this.sysCode, updateNode200Response.sysCode) && + Objects.equals(this.code, updateNode200Response.code) && + Objects.equals(this.isPointer, updateNode200Response.isPointer) && + Objects.equals(this.operatorId, updateNode200Response.operatorId) && + Objects.equals(this.description, updateNode200Response.description) && + Objects.equals(this.permNamespaceArn, updateNode200Response.permNamespaceArn) && + Objects.equals(this.pointerId, updateNode200Response.pointerId) && + Objects.equals(this.condition, updateNode200Response.condition) && + Objects.equals(this.sourceParentId, updateNode200Response.sourceParentId) && + Objects.equals(this.destParentId, updateNode200Response.destParentId) && + Objects.equals(this.name, updateNode200Response.name) && + Objects.equals(this.isDynamic, updateNode200Response.isDynamic) && + Objects.equals(this.objectCode, updateNode200Response.objectCode) && + Objects.equals(this.arn, updateNode200Response.arn) && + Objects.equals(this.seq, updateNode200Response.seq) && + Objects.equals(this.status, updateNode200Response.status); + } + + @Override + public int hashCode() { + return Objects.hash(sysCode, code, isPointer, operatorId, description, permNamespaceArn, pointerId, condition, sourceParentId, destParentId, name, isDynamic, objectCode, arn, seq, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateNode200Response {\n"); + sb.append(" sysCode: ").append(toIndentedString(sysCode)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" isPointer: ").append(toIndentedString(isPointer)).append("\n"); + sb.append(" operatorId: ").append(toIndentedString(operatorId)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" permNamespaceArn: ").append(toIndentedString(permNamespaceArn)).append("\n"); + sb.append(" pointerId: ").append(toIndentedString(pointerId)).append("\n"); + sb.append(" condition: ").append(toIndentedString(condition)).append("\n"); + sb.append(" sourceParentId: ").append(toIndentedString(sourceParentId)).append("\n"); + sb.append(" destParentId: ").append(toIndentedString(destParentId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" isDynamic: ").append(toIndentedString(isDynamic)).append("\n"); + sb.append(" objectCode: ").append(toIndentedString(objectCode)).append("\n"); + sb.append(" arn: ").append(toIndentedString(arn)).append("\n"); + sb.append(" seq: ").append(toIndentedString(seq)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("sys_code"); + openapiFields.add("code"); + openapiFields.add("is_pointer"); + openapiFields.add("operator_id"); + openapiFields.add("description"); + openapiFields.add("perm_namespace_arn"); + openapiFields.add("pointer_id"); + openapiFields.add("condition"); + openapiFields.add("source_parent_id"); + openapiFields.add("dest_parent_id"); + openapiFields.add("name"); + openapiFields.add("is_dynamic"); + openapiFields.add("object_code"); + openapiFields.add("arn"); + openapiFields.add("seq"); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateNode200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateNode200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateNode200Response is not found in the empty JSON string", UpdateNode200Response.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("sys_code") != null && !jsonObj.get("sys_code").isJsonNull()) && !jsonObj.get("sys_code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sys_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sys_code").toString())); + } + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if ((jsonObj.get("is_pointer") != null && !jsonObj.get("is_pointer").isJsonNull()) && !jsonObj.get("is_pointer").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `is_pointer` to be a primitive type in the JSON string but got `%s`", jsonObj.get("is_pointer").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("perm_namespace_arn") != null && !jsonObj.get("perm_namespace_arn").isJsonNull()) && !jsonObj.get("perm_namespace_arn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `perm_namespace_arn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("perm_namespace_arn").toString())); + } + if ((jsonObj.get("condition") != null && !jsonObj.get("condition").isJsonNull()) && !jsonObj.get("condition").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `condition` to be a primitive type in the JSON string but got `%s`", jsonObj.get("condition").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("is_dynamic") != null && !jsonObj.get("is_dynamic").isJsonNull()) && !jsonObj.get("is_dynamic").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `is_dynamic` to be a primitive type in the JSON string but got `%s`", jsonObj.get("is_dynamic").toString())); + } + if ((jsonObj.get("object_code") != null && !jsonObj.get("object_code").isJsonNull()) && !jsonObj.get("object_code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_code").toString())); + } + if ((jsonObj.get("arn") != null && !jsonObj.get("arn").isJsonNull()) && !jsonObj.get("arn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `arn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("arn").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateNode200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateNode200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateNode200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateNode200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateNode200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateNode200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateNode200Response + * @throws IOException if the JSON string is invalid with respect to UpdateNode200Response + */ + public static UpdateNode200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateNode200Response.class); + } + + /** + * Convert an instance of UpdateNode200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/UpdateNodeRequest.java b/src/main/java/com/idmesh/model/UpdateNodeRequest.java new file mode 100644 index 0000000..964b8d7 --- /dev/null +++ b/src/main/java/com/idmesh/model/UpdateNodeRequest.java @@ -0,0 +1,700 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * UpdateNodeRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateNodeRequest { + public static final String SERIALIZED_NAME_DEVELOPER_ID = "developer_id"; + @SerializedName(SERIALIZED_NAME_DEVELOPER_ID) + private String developerId; + + public static final String SERIALIZED_NAME_TENANT_ID = "tenant_id"; + @SerializedName(SERIALIZED_NAME_TENANT_ID) + private String tenantId; + + public static final String SERIALIZED_NAME_ARN = "arn"; + @SerializedName(SERIALIZED_NAME_ARN) + private String arn; + + public static final String SERIALIZED_NAME_TIME_CREATED = "time_created"; + @SerializedName(SERIALIZED_NAME_TIME_CREATED) + private String timeCreated; + + public static final String SERIALIZED_NAME_TAG = "tag"; + @SerializedName(SERIALIZED_NAME_TAG) + private String tag; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_IS_POINTER = "is_pointer"; + @SerializedName(SERIALIZED_NAME_IS_POINTER) + private String isPointer; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_PERM_NAMESPACE_ARN = "perm_namespace_arn"; + @SerializedName(SERIALIZED_NAME_PERM_NAMESPACE_ARN) + private String permNamespaceArn; + + public static final String SERIALIZED_NAME_CONDITION = "condition"; + @SerializedName(SERIALIZED_NAME_CONDITION) + private String condition; + + public static final String SERIALIZED_NAME_IS_DYNAMIC = "is_dynamic"; + @SerializedName(SERIALIZED_NAME_IS_DYNAMIC) + private String isDynamic; + + public static final String SERIALIZED_NAME_SYS_CODE = "sys_code"; + @SerializedName(SERIALIZED_NAME_SYS_CODE) + private String sysCode; + + public static final String SERIALIZED_NAME_OPERATOR_ID = "operator_id"; + @SerializedName(SERIALIZED_NAME_OPERATOR_ID) + private String operatorId; + + public static final String SERIALIZED_NAME_POINTER_ID = "pointer_id"; + @SerializedName(SERIALIZED_NAME_POINTER_ID) + private String pointerId; + + public static final String SERIALIZED_NAME_SEQ = "seq"; + @SerializedName(SERIALIZED_NAME_SEQ) + private Integer seq; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_TIME_MODIFIED = "time_modified"; + @SerializedName(SERIALIZED_NAME_TIME_MODIFIED) + private String timeModified; + + public static final String SERIALIZED_NAME_OBJECT_CODE = "object_code"; + @SerializedName(SERIALIZED_NAME_OBJECT_CODE) + private String objectCode; + + public static final String SERIALIZED_NAME_PARENT_ID = "parent_id"; + @SerializedName(SERIALIZED_NAME_PARENT_ID) + private String parentId; + + public static final String SERIALIZED_NAME_SYS_EXT_PROPS = "sys_ext_props"; + @SerializedName(SERIALIZED_NAME_SYS_EXT_PROPS) + private Object sysExtProps; + + public static final String SERIALIZED_NAME_FREE_EXT_PROPS = "free_ext_props"; + @SerializedName(SERIALIZED_NAME_FREE_EXT_PROPS) + private Object freeExtProps; + + public UpdateNodeRequest() { + } + /** + * 开发者ID + * @return developerId + **/ + @javax.annotation.Nullable + public String getDeveloperId() { + return developerId; + } + + + public void setDeveloperId(String developerId) { + this.developerId = developerId; + } + + /** + * 租户ID + * @return tenantId + **/ + @javax.annotation.Nullable + public String getTenantId() { + return tenantId; + } + + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + /** + * Get arn + * @return arn + **/ + @javax.annotation.Nullable + public String getArn() { + return arn; + } + + + public void setArn(String arn) { + this.arn = arn; + } + + /** + * 创建时间 + * @return timeCreated + **/ + @javax.annotation.Nullable + public String getTimeCreated() { + return timeCreated; + } + + + public void setTimeCreated(String timeCreated) { + this.timeCreated = timeCreated; + } + + /** + * 用于定义节点类型,目前支持:org(组织),role(角色),position(岗位),group(组) + * @return tag + **/ + @javax.annotation.Nullable + public String getTag() { + return tag; + } + + + public void setTag(String tag) { + this.tag = tag; + } + + /** + * 状态 + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + /** + * 是否指针类型 + * @return isPointer + **/ + @javax.annotation.Nullable + public String getIsPointer() { + return isPointer; + } + + + public void setIsPointer(String isPointer) { + this.isPointer = isPointer; + } + + /** + * 节点code + * @return code + **/ + @javax.annotation.Nonnull + public String getCode() { + return code; + } + + + public void setCode(String code) { + this.code = code; + } + + /** + * 节点名字 + * @return name + **/ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + /** + * 抽象权限容器的ARN + * @return permNamespaceArn + **/ + @javax.annotation.Nullable + public String getPermNamespaceArn() { + return permNamespaceArn; + } + + + public void setPermNamespaceArn(String permNamespaceArn) { + this.permNamespaceArn = permNamespaceArn; + } + + /** + * Get condition + * @return condition + **/ + @javax.annotation.Nullable + public String getCondition() { + return condition; + } + + + public void setCondition(String condition) { + this.condition = condition; + } + + /** + * 是否动态节点(0普通结点,1动态结点) + * @return isDynamic + **/ + @javax.annotation.Nullable + public String getIsDynamic() { + return isDynamic; + } + + + public void setIsDynamic(String isDynamic) { + this.isDynamic = isDynamic; + } + + /** + * 系统code + * @return sysCode + **/ + @javax.annotation.Nonnull + public String getSysCode() { + return sysCode; + } + + + public void setSysCode(String sysCode) { + this.sysCode = sysCode; + } + + /** + * 操作者id + * @return operatorId + **/ + @javax.annotation.Nullable + public String getOperatorId() { + return operatorId; + } + + + public void setOperatorId(String operatorId) { + this.operatorId = operatorId; + } + + /** + * 指针指向的实体节点 + * @return pointerId + **/ + @javax.annotation.Nullable + public String getPointerId() { + return pointerId; + } + + + public void setPointerId(String pointerId) { + this.pointerId = pointerId; + } + + /** + * 序号 + * @return seq + **/ + @javax.annotation.Nullable + public Integer getSeq() { + return seq; + } + + + public void setSeq(Integer seq) { + this.seq = seq; + } + + /** + * 描述 + * @return description + **/ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + /** + * 最后修改时间 + * @return timeModified + **/ + @javax.annotation.Nullable + public String getTimeModified() { + return timeModified; + } + + + public void setTimeModified(String timeModified) { + this.timeModified = timeModified; + } + + /** + * OBJ_ID,组织,角色,岗位,职级等 + * @return objectCode + **/ + @javax.annotation.Nonnull + public String getObjectCode() { + return objectCode; + } + + + public void setObjectCode(String objectCode) { + this.objectCode = objectCode; + } + + /** + * 父节点id + * @return parentId + **/ + @javax.annotation.Nullable + public String getParentId() { + return parentId; + } + + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + /** + * 额外属性,需要先定义schema + * @return sysExtProps + **/ + @javax.annotation.Nullable + public Object getSysExtProps() { + return sysExtProps; + } + + + public void setSysExtProps(Object sysExtProps) { + this.sysExtProps = sysExtProps; + } + + /** + * 可以自由扩展 + * @return freeExtProps + **/ + @javax.annotation.Nullable + public Object getFreeExtProps() { + return freeExtProps; + } + + + public void setFreeExtProps(Object freeExtProps) { + this.freeExtProps = freeExtProps; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateNodeRequest updateNodeRequest = (UpdateNodeRequest) o; + return Objects.equals(this.developerId, updateNodeRequest.developerId) && + Objects.equals(this.tenantId, updateNodeRequest.tenantId) && + Objects.equals(this.arn, updateNodeRequest.arn) && + Objects.equals(this.timeCreated, updateNodeRequest.timeCreated) && + Objects.equals(this.tag, updateNodeRequest.tag) && + Objects.equals(this.status, updateNodeRequest.status) && + Objects.equals(this.isPointer, updateNodeRequest.isPointer) && + Objects.equals(this.code, updateNodeRequest.code) && + Objects.equals(this.name, updateNodeRequest.name) && + Objects.equals(this.permNamespaceArn, updateNodeRequest.permNamespaceArn) && + Objects.equals(this.condition, updateNodeRequest.condition) && + Objects.equals(this.isDynamic, updateNodeRequest.isDynamic) && + Objects.equals(this.sysCode, updateNodeRequest.sysCode) && + Objects.equals(this.operatorId, updateNodeRequest.operatorId) && + Objects.equals(this.pointerId, updateNodeRequest.pointerId) && + Objects.equals(this.seq, updateNodeRequest.seq) && + Objects.equals(this.description, updateNodeRequest.description) && + Objects.equals(this.timeModified, updateNodeRequest.timeModified) && + Objects.equals(this.objectCode, updateNodeRequest.objectCode) && + Objects.equals(this.parentId, updateNodeRequest.parentId) && + Objects.equals(this.sysExtProps, updateNodeRequest.sysExtProps) && + Objects.equals(this.freeExtProps, updateNodeRequest.freeExtProps); + } + + @Override + public int hashCode() { + return Objects.hash(developerId, tenantId, arn, timeCreated, tag, status, isPointer, code, name, permNamespaceArn, condition, isDynamic, sysCode, operatorId, pointerId, seq, description, timeModified, objectCode, parentId, sysExtProps, freeExtProps); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateNodeRequest {\n"); + sb.append(" developerId: ").append(toIndentedString(developerId)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" arn: ").append(toIndentedString(arn)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" isPointer: ").append(toIndentedString(isPointer)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" permNamespaceArn: ").append(toIndentedString(permNamespaceArn)).append("\n"); + sb.append(" condition: ").append(toIndentedString(condition)).append("\n"); + sb.append(" isDynamic: ").append(toIndentedString(isDynamic)).append("\n"); + sb.append(" sysCode: ").append(toIndentedString(sysCode)).append("\n"); + sb.append(" operatorId: ").append(toIndentedString(operatorId)).append("\n"); + sb.append(" pointerId: ").append(toIndentedString(pointerId)).append("\n"); + sb.append(" seq: ").append(toIndentedString(seq)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" timeModified: ").append(toIndentedString(timeModified)).append("\n"); + sb.append(" objectCode: ").append(toIndentedString(objectCode)).append("\n"); + sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); + sb.append(" sysExtProps: ").append(toIndentedString(sysExtProps)).append("\n"); + sb.append(" freeExtProps: ").append(toIndentedString(freeExtProps)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("developer_id"); + openapiFields.add("tenant_id"); + openapiFields.add("arn"); + openapiFields.add("time_created"); + openapiFields.add("tag"); + openapiFields.add("status"); + openapiFields.add("is_pointer"); + openapiFields.add("code"); + openapiFields.add("name"); + openapiFields.add("perm_namespace_arn"); + openapiFields.add("condition"); + openapiFields.add("is_dynamic"); + openapiFields.add("sys_code"); + openapiFields.add("operator_id"); + openapiFields.add("pointer_id"); + openapiFields.add("seq"); + openapiFields.add("description"); + openapiFields.add("time_modified"); + openapiFields.add("object_code"); + openapiFields.add("parent_id"); + openapiFields.add("sys_ext_props"); + openapiFields.add("free_ext_props"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("code"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("sys_code"); + openapiRequiredFields.add("object_code"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateNodeRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateNodeRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateNodeRequest is not found in the empty JSON string", UpdateNodeRequest.openapiRequiredFields.toString())); + } + } + + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateNodeRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("developer_id") != null && !jsonObj.get("developer_id").isJsonNull()) && !jsonObj.get("developer_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `developer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("developer_id").toString())); + } + if ((jsonObj.get("tenant_id") != null && !jsonObj.get("tenant_id").isJsonNull()) && !jsonObj.get("tenant_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tenant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tenant_id").toString())); + } + if ((jsonObj.get("arn") != null && !jsonObj.get("arn").isJsonNull()) && !jsonObj.get("arn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `arn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("arn").toString())); + } + if ((jsonObj.get("time_created") != null && !jsonObj.get("time_created").isJsonNull()) && !jsonObj.get("time_created").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_created").toString())); + } + if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("is_pointer") != null && !jsonObj.get("is_pointer").isJsonNull()) && !jsonObj.get("is_pointer").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `is_pointer` to be a primitive type in the JSON string but got `%s`", jsonObj.get("is_pointer").toString())); + } + if (!jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("perm_namespace_arn") != null && !jsonObj.get("perm_namespace_arn").isJsonNull()) && !jsonObj.get("perm_namespace_arn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `perm_namespace_arn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("perm_namespace_arn").toString())); + } + if ((jsonObj.get("condition") != null && !jsonObj.get("condition").isJsonNull()) && !jsonObj.get("condition").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `condition` to be a primitive type in the JSON string but got `%s`", jsonObj.get("condition").toString())); + } + if ((jsonObj.get("is_dynamic") != null && !jsonObj.get("is_dynamic").isJsonNull()) && !jsonObj.get("is_dynamic").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `is_dynamic` to be a primitive type in the JSON string but got `%s`", jsonObj.get("is_dynamic").toString())); + } + if (!jsonObj.get("sys_code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sys_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sys_code").toString())); + } + if ((jsonObj.get("operator_id") != null && !jsonObj.get("operator_id").isJsonNull()) && !jsonObj.get("operator_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `operator_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator_id").toString())); + } + if ((jsonObj.get("pointer_id") != null && !jsonObj.get("pointer_id").isJsonNull()) && !jsonObj.get("pointer_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `pointer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pointer_id").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("time_modified") != null && !jsonObj.get("time_modified").isJsonNull()) && !jsonObj.get("time_modified").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time_modified` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time_modified").toString())); + } + if (!jsonObj.get("object_code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_code").toString())); + } + if ((jsonObj.get("parent_id") != null && !jsonObj.get("parent_id").isJsonNull()) && !jsonObj.get("parent_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `parent_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parent_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateNodeRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateNodeRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateNodeRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateNodeRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateNodeRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateNodeRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateNodeRequest + * @throws IOException if the JSON string is invalid with respect to UpdateNodeRequest + */ + public static UpdateNodeRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateNodeRequest.class); + } + + /** + * Convert an instance of UpdateNodeRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/idmesh/model/UpdateOrganizationRequest.java b/src/main/java/com/idmesh/model/UpdateOrganizationRequest.java new file mode 100644 index 0000000..ef143a9 --- /dev/null +++ b/src/main/java/com/idmesh/model/UpdateOrganizationRequest.java @@ -0,0 +1,290 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.idmesh.JSON; + +/** + * UpdateOrganizationRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateOrganizationRequest { + public static final String SERIALIZED_NAME_OBJECT_DISPLAY_NAME = "object_display_name"; + @SerializedName(SERIALIZED_NAME_OBJECT_DISPLAY_NAME) + private String objectDisplayName; + + public static final String SERIALIZED_NAME_OBJECT_TYPE = "object_type"; + @SerializedName(SERIALIZED_NAME_OBJECT_TYPE) + private String objectType; + + public static final String SERIALIZED_NAME_OBJECT_PROPS = "object_props"; + @SerializedName(SERIALIZED_NAME_OBJECT_PROPS) + private String objectProps; + + public static final String SERIALIZED_NAME_IS_DEFAULT = "is_default"; + @SerializedName(SERIALIZED_NAME_IS_DEFAULT) + private String isDefault; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public UpdateOrganizationRequest() { + } + /** + * Get objectDisplayName + * @return objectDisplayName + **/ + @javax.annotation.Nullable + public String getObjectDisplayName() { + return objectDisplayName; + } + + + public void setObjectDisplayName(String objectDisplayName) { + this.objectDisplayName = objectDisplayName; + } + + /** + * 固定值:tree + * @return objectType + **/ + @javax.annotation.Nullable + public String getObjectType() { + return objectType; + } + + + public void setObjectType(String objectType) { + this.objectType = objectType; + } + + /** + * Get objectProps + * @return objectProps + **/ + @javax.annotation.Nullable + public String getObjectProps() { + return objectProps; + } + + + public void setObjectProps(String objectProps) { + this.objectProps = objectProps; + } + + /** + * 是否默认组织关系,1是,0否 + * @return isDefault + **/ + @javax.annotation.Nullable + public String getIsDefault() { + return isDefault; + } + + + public void setIsDefault(String isDefault) { + this.isDefault = isDefault; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateOrganizationRequest updateOrganizationRequest = (UpdateOrganizationRequest) o; + return Objects.equals(this.objectDisplayName, updateOrganizationRequest.objectDisplayName) && + Objects.equals(this.objectType, updateOrganizationRequest.objectType) && + Objects.equals(this.objectProps, updateOrganizationRequest.objectProps) && + Objects.equals(this.isDefault, updateOrganizationRequest.isDefault) && + Objects.equals(this.status, updateOrganizationRequest.status); + } + + @Override + public int hashCode() { + return Objects.hash(objectDisplayName, objectType, objectProps, isDefault, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateOrganizationRequest {\n"); + sb.append(" objectDisplayName: ").append(toIndentedString(objectDisplayName)).append("\n"); + sb.append(" objectType: ").append(toIndentedString(objectType)).append("\n"); + sb.append(" objectProps: ").append(toIndentedString(objectProps)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("object_display_name"); + openapiFields.add("object_type"); + openapiFields.add("object_props"); + openapiFields.add("is_default"); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateOrganizationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateOrganizationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateOrganizationRequest is not found in the empty JSON string", UpdateOrganizationRequest.openapiRequiredFields.toString())); + } + } + + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("object_display_name") != null && !jsonObj.get("object_display_name").isJsonNull()) && !jsonObj.get("object_display_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_display_name").toString())); + } + if ((jsonObj.get("object_type") != null && !jsonObj.get("object_type").isJsonNull()) && !jsonObj.get("object_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_type").toString())); + } + if ((jsonObj.get("object_props") != null && !jsonObj.get("object_props").isJsonNull()) && !jsonObj.get("object_props").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `object_props` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_props").toString())); + } + if ((jsonObj.get("is_default") != null && !jsonObj.get("is_default").isJsonNull()) && !jsonObj.get("is_default").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `is_default` to be a primitive type in the JSON string but got `%s`", jsonObj.get("is_default").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateOrganizationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateOrganizationRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateOrganizationRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateOrganizationRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateOrganizationRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateOrganizationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateOrganizationRequest + * @throws IOException if the JSON string is invalid with respect to UpdateOrganizationRequest + */ + public static UpdateOrganizationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateOrganizationRequest.class); + } + + /** + * Convert an instance of UpdateOrganizationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/test/java/com/idmesh/api/AppApiTest.java b/src/test/java/com/idmesh/api/AppApiTest.java new file mode 100644 index 0000000..64268fb --- /dev/null +++ b/src/test/java/com/idmesh/api/AppApiTest.java @@ -0,0 +1,601 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.api; + +import com.idmesh.ApiException; +import com.idmesh.model.AppDetail; +import com.idmesh.model.AppSubAccount; +import com.idmesh.model.Create200Response; +import com.idmesh.model.CreateAccountRequest; +import com.idmesh.model.CreateRequest1; +import com.idmesh.model.CreateSecrets200Response; +import com.idmesh.model.Delete200Response1; +import com.idmesh.model.Disable200Response; +import com.idmesh.model.EmptyObject; +import com.idmesh.model.EmptyObject1; +import com.idmesh.model.Enable200Response; +import com.idmesh.model.Get400Response; +import com.idmesh.model.GetAccountsByApp200Response; +import com.idmesh.model.GetConfig200Response; +import com.idmesh.model.GetTemplate200Response; +import com.idmesh.model.List200Response1; +import com.idmesh.model.Modify200Response1; +import com.idmesh.model.ModifyAccountRequest; +import com.idmesh.model.ModifyConfigRequest; +import com.idmesh.model.ModifyRequest1; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for AppApi + */ +@Disabled +public class AppApiTest { + + private final AppApi api = new AppApi(); + + /** + * 查询应用列表 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void callListTest() throws ApiException { + String name = null; + String type = null; + String pageSort = null; + String types = null; + List200Response1 response = api.callList() + .name(name) + .type(type) + .pageSort(pageSort) + .types(types) + .execute(); + // TODO: test validations + } + + /** + * 创建应用 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void createTest() throws ApiException { + String contentType = null; + CreateRequest1 createRequest1 = null; + Create200Response response = api.create(contentType) + .createRequest1(createRequest1) + .execute(); + // TODO: test validations + } + + /** + * 创建应用子账号 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void createAccountTest() throws ApiException { + String id = null; + String contentType = null; + CreateAccountRequest createAccountRequest = null; + Modify200Response1 response = api.createAccount(id, contentType) + .createAccountRequest(createAccountRequest) + .execute(); + // TODO: test validations + } + + /** + * 创建应用认证源 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void createIDPTest() throws ApiException { + String id = null; + String contentType = null; + EmptyObject emptyObject = null; + Object response = api.createIDP(id, contentType) + .emptyObject(emptyObject) + .execute(); + // TODO: test validations + } + + /** + * 启用应用多因素认证配置 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void createMFATest() throws ApiException { + String id = null; + String contentType = null; + EmptyObject emptyObject = null; + Object response = api.createMFA(id, contentType) + .emptyObject(emptyObject) + .execute(); + // TODO: test validations + } + + /** + * 刷新应用安全码 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void createSecretsTest() throws ApiException { + String id = null; + String contentType = null; + CreateSecrets200Response response = api.createSecrets(id, contentType) + .execute(); + // TODO: test validations + } + + /** + * 删除应用 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteTest() throws ApiException { + String id = null; + String contentType = null; + Delete200Response1 response = api.delete(id, contentType) + .execute(); + // TODO: test validations + } + + /** + * 删除应用子账号 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteAccountTest() throws ApiException { + String appId = null; + String id = null; + String contentType = null; + Object response = api.deleteAccount(appId, id, contentType) + .execute(); + // TODO: test validations + } + + /** + * 删除应用认证源 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteIDPConfigTest() throws ApiException { + String appId = null; + String configId = null; + String contentType = null; + Object response = api.deleteIDPConfig(appId, configId, contentType) + .execute(); + // TODO: test validations + } + + /** + * 禁用应用多因素认证配置 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteMFATest() throws ApiException { + String appId = null; + String configId = null; + String contentType = null; + Object response = api.deleteMFA(appId, configId, contentType) + .execute(); + // TODO: test validations + } + + /** + * 禁用应用 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void disableTest() throws ApiException { + String id = null; + String contentType = null; + Disable200Response response = api.disable(id, contentType) + .execute(); + // TODO: test validations + } + + /** + * 禁用应用子账号 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void disableAccountTest() throws ApiException { + String appId = null; + String id = null; + String contentType = null; + Object response = api.disableAccount(appId, id, contentType) + .execute(); + // TODO: test validations + } + + /** + * 禁用应用认证协议 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void disableProtocolTest() throws ApiException { + String appId = null; + String protocolType = null; + String contentType = null; + Object response = api.disableProtocol(appId, protocolType, contentType) + .execute(); + // TODO: test validations + } + + /** + * 禁用应用单点登录 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void disableSSOTest() throws ApiException { + String id = null; + Object response = api.disableSSO(id) + .execute(); + // TODO: test validations + } + + /** + * 启用应用 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void enableTest() throws ApiException { + String id = null; + String contentType = null; + Enable200Response response = api.enable(id, contentType) + .execute(); + // TODO: test validations + } + + /** + * 启用应用子账号 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void enableAccountTest() throws ApiException { + String appId = null; + String id = null; + String id2 = null; + String contentType = null; + Object response = api.enableAccount(appId, id, id2, contentType) + .execute(); + // TODO: test validations + } + + /** + * 启用应用认证协议 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void enableProtocolTest() throws ApiException { + String appId = null; + String protocolType = null; + String contentType = null; + Modify200Response1 response = api.enableProtocol(appId, protocolType, contentType) + .execute(); + // TODO: test validations + } + + /** + * 启用应用单点登录 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void enableSSOTest() throws ApiException { + String id = null; + Object response = api.enableSSO(id) + .execute(); + // TODO: test validations + } + + /** + * 按 ID 查询应用 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getTest() throws ApiException { + String id = null; + AppDetail response = api.get(id) + .execute(); + // TODO: test validations + } + + /** + * 按 ID 查询应用子账号 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getAccountTest() throws ApiException { + String appId = null; + String id = null; + AppSubAccount response = api.getAccount(appId, id) + .execute(); + // TODO: test validations + } + + /** + * 查询应用子账号列表 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getAccountsTest() throws ApiException { + String appId = null; + String userId = null; + String accStatus = null; + String accName = null; + Integer pageNum = null; + Integer pageSize = null; + String pageSort = null; + GetAccountsByApp200Response response = api.getAccounts() + .appId(appId) + .userId(userId) + .accStatus(accStatus) + .accName(accName) + .pageNum(pageNum) + .pageSize(pageSize) + .pageSort(pageSort) + .execute(); + // TODO: test validations + } + + /** + * 按 APP ID 查询应用子账号列表 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getAccountsByAppTest() throws ApiException { + String appId = null; + String userId = null; + String accStatus = null; + String accName = null; + Integer pageNum = null; + Integer pageSize = null; + String pageSort = null; + GetAccountsByApp200Response response = api.getAccountsByApp(appId) + .userId(userId) + .accStatus(accStatus) + .accName(accName) + .pageNum(pageNum) + .pageSize(pageSize) + .pageSort(pageSort) + .execute(); + // TODO: test validations + } + + /** + * 按条件查询应用 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getByDomainTest() throws ApiException { + String domain = null; + String domainSn = null; + AppDetail response = api.getByDomain() + .domain(domain) + .domainSn(domainSn) + .execute(); + // TODO: test validations + } + + /** + * 查询应用配置信息 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getConfigTest() throws ApiException { + String id = null; + GetConfig200Response response = api.getConfig(id) + .execute(); + // TODO: test validations + } + + /** + * 查询应用认证协议 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getProtocolTest() throws ApiException { + String appId = null; + String protocolType = null; + Object response = api.getProtocol(appId, protocolType) + .execute(); + // TODO: test validations + } + + /** + * 查询应用认证协议列表 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getProtocolsTest() throws ApiException { + String id = null; + String status = null; + List response = api.getProtocols(id) + .status(status) + .execute(); + // TODO: test validations + } + + /** + * 查询应用模板列表 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getTemplateTest() throws ApiException { + String name = null; + GetTemplate200Response response = api.getTemplate(name) + .execute(); + // TODO: test validations + } + + /** + * 更新应用基本信息 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void modifyTest() throws ApiException { + String id = null; + String contentType = null; + ModifyRequest1 modifyRequest1 = null; + Modify200Response1 response = api.modify(id, contentType) + .modifyRequest1(modifyRequest1) + .execute(); + // TODO: test validations + } + + /** + * 更新应用子账号 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void modifyAccountTest() throws ApiException { + String appId = null; + String id = null; + String contentType = null; + ModifyAccountRequest modifyAccountRequest = null; + Modify200Response1 response = api.modifyAccount(appId, id, contentType) + .modifyAccountRequest(modifyAccountRequest) + .execute(); + // TODO: test validations + } + + /** + * 更新应用配置 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void modifyConfigTest() throws ApiException { + String id = null; + String contentType = null; + ModifyConfigRequest modifyConfigRequest = null; + Modify200Response1 response = api.modifyConfig(id, contentType) + .modifyConfigRequest(modifyConfigRequest) + .execute(); + // TODO: test validations + } + + /** + * 更新应用认证协议 + * + * 具体入参参考:[https://thoughts.teambition.com/workspaces/607401bc94422600473bb8a7/docs/62207129fb49bf000106a046](https://thoughts.teambition.com/workspaces/607401bc94422600473bb8a7/docs/62207129fb49bf000106a046) + * + * @throws ApiException if the Api call fails + */ + @Test + public void modifyProtocolTest() throws ApiException { + String appId = null; + String protocolType = null; + String contentType = null; + EmptyObject1 emptyObject1 = null; + Object response = api.modifyProtocol(appId, protocolType, contentType) + .emptyObject1(emptyObject1) + .execute(); + // TODO: test validations + } + +} diff --git a/src/test/java/com/idmesh/api/OrganizationApiTest.java b/src/test/java/com/idmesh/api/OrganizationApiTest.java new file mode 100644 index 0000000..76cec22 --- /dev/null +++ b/src/test/java/com/idmesh/api/OrganizationApiTest.java @@ -0,0 +1,336 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.api; + +import com.idmesh.ApiException; +import com.idmesh.model.CreateNodeRequest; +import com.idmesh.model.CreateOrganization200Response; +import com.idmesh.model.CreateOrganizationRequest; +import com.idmesh.model.DeleteMembersRequest; +import com.idmesh.model.DeleteNode200Response; +import com.idmesh.model.DeleteOrganization200Response; +import com.idmesh.model.EmptyObject13; +import com.idmesh.model.Get400Response; +import com.idmesh.model.GetMembers200ResponseInner; +import com.idmesh.model.GetNodeMembers200Response; +import com.idmesh.model.GetOrganization200ResponseInner; +import com.idmesh.model.GetOrganizations200ResponseInner; +import com.idmesh.model.TreeNode; +import com.idmesh.model.UpdateMemberRequest; +import com.idmesh.model.UpdateNode200Response; +import com.idmesh.model.UpdateNodeRequest; +import com.idmesh.model.UpdateOrganizationRequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for OrganizationApi + */ +@Disabled +public class OrganizationApiTest { + + private final OrganizationApi api = new OrganizationApi(); + + /** + * 创建节点 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void createNodeTest() throws ApiException { + String contentType = null; + CreateNodeRequest createNodeRequest = null; + DeleteOrganization200Response response = api.createNode(contentType) + .createNodeRequest(createNodeRequest) + .execute(); + // TODO: test validations + } + + /** + * 创建组织关系 + * + * 创建组织关系的元数据,同时创建根节点 + * + * @throws ApiException if the Api call fails + */ + @Test + public void createOrganizationTest() throws ApiException { + String contentType = null; + CreateOrganizationRequest createOrganizationRequest = null; + CreateOrganization200Response response = api.createOrganization(contentType) + .createOrganizationRequest(createOrganizationRequest) + .execute(); + // TODO: test validations + } + + /** + * 从节点移除用户 + * + * 移除用户,uri参数中的ID和json中的参数,至少有其一 + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteMembersTest() throws ApiException { + String contentType = null; + DeleteMembersRequest deleteMembersRequest = null; + DeleteOrganization200Response response = api.deleteMembers(contentType) + .deleteMembersRequest(deleteMembersRequest) + .execute(); + // TODO: test validations + } + + /** + * 删除节点 + * + * 如果该节点有子节点则不可删除,需要先删除所有子节点。 + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteNodeTest() throws ApiException { + String id = null; + String objectCode = null; + String contentType = null; + DeleteNode200Response response = api.deleteNode(id, objectCode, contentType) + .execute(); + // TODO: test validations + } + + /** + * 删除组织关系 + * + * 如果该组织关系有子节点则不可删 + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteOrganizationTest() throws ApiException { + String id = null; + String contentType = null; + DeleteOrganization200Response response = api.deleteOrganization(id, contentType) + .execute(); + // TODO: test validations + } + + /** + * 获取子节点列表 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getChildrenNodesTest() throws ApiException { + String id = null; + String mode = null; + String objectCode = null; + List response = api.getChildrenNodes(id, mode, objectCode) + .execute(); + // TODO: test validations + } + + /** + * 获取与用户关联的组织关系列表 + * + * 根据用户id获取与用户关联的组织关系列表 + * + * @throws ApiException if the Api call fails + */ + @Test + public void getMembersTest() throws ApiException { + String userId = null; + List response = api.getMembers(userId) + .execute(); + // TODO: test validations + } + + /** + * 查询节点信息 + * + * 根据ID查询节点信息 + * + * @throws ApiException if the Api call fails + */ + @Test + public void getNodeTest() throws ApiException { + String id = null; + TreeNode response = api.getNode(id) + .execute(); + // TODO: test validations + } + + /** + * 获取成员信息列表 + * + * 根据组织节点ID获取成员信息列表 + * + * @throws ApiException if the Api call fails + */ + @Test + public void getNodeMembersTest() throws ApiException { + String id = null; + String relationType = null; + String isDefault = null; + String displayName = null; + String username = null; + String mode = null; + Integer pageNum = null; + Integer pageSize = null; + String pageSort = null; + GetNodeMembers200Response response = api.getNodeMembers(id) + .relationType(relationType) + .isDefault(isDefault) + .displayName(displayName) + .username(username) + .mode(mode) + .pageNum(pageNum) + .pageSize(pageSize) + .pageSort(pageSort) + .execute(); + // TODO: test validations + } + + /** + * 查询父节点 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getNodeParentTest() throws ApiException { + String id = null; + List response = api.getNodeParent(id) + .execute(); + // TODO: test validations + } + + /** + * 查询节点信息列表 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getNodesTest() throws ApiException { + String objectCode = null; + String name = null; + String code = null; + String tag = null; + String timeModifiedFrom = null; + String timeModifiedTo = null; + List response = api.getNodes(objectCode) + .name(name) + .code(code) + .tag(tag) + .timeModifiedFrom(timeModifiedFrom) + .timeModifiedTo(timeModifiedTo) + .execute(); + // TODO: test validations + } + + /** + * 获取组织关系基本信息 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOrganizationTest() throws ApiException { + String id = null; + String code = null; + List response = api.getOrganization(id, code) + .execute(); + // TODO: test validations + } + + /** + * 获取组织关系列表 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOrganizationsTest() throws ApiException { + List response = api.getOrganizations() + .execute(); + // TODO: test validations + } + + /** + * 更新用户节点 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateMemberTest() throws ApiException { + String id = null; + String contentType = null; + UpdateMemberRequest updateMemberRequest = null; + EmptyObject13 response = api.updateMember(id, contentType) + .updateMemberRequest(updateMemberRequest) + .execute(); + // TODO: test validations + } + + /** + * 编辑节点 + * + * 移动节点修改parent_id + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateNodeTest() throws ApiException { + String id = null; + String contentType = null; + UpdateNodeRequest updateNodeRequest = null; + UpdateNode200Response response = api.updateNode(id, contentType) + .updateNodeRequest(updateNodeRequest) + .execute(); + // TODO: test validations + } + + /** + * 修改组织关系基本信息 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateOrganizationTest() throws ApiException { + String id = null; + String contentType = null; + UpdateOrganizationRequest updateOrganizationRequest = null; + DeleteOrganization200Response response = api.updateOrganization(id, contentType) + .updateOrganizationRequest(updateOrganizationRequest) + .execute(); + // TODO: test validations + } + +} diff --git a/src/test/java/com/idmesh/api/PermissionApiTest.java b/src/test/java/com/idmesh/api/PermissionApiTest.java new file mode 100644 index 0000000..d18f7b5 --- /dev/null +++ b/src/test/java/com/idmesh/api/PermissionApiTest.java @@ -0,0 +1,537 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.api; + +import com.idmesh.ApiException; +import com.idmesh.model.Au; +import com.idmesh.model.AuthUnit; +import com.idmesh.model.AuthorizeApplicationsRequest; +import com.idmesh.model.AuthzApp; +import com.idmesh.model.DeleteAuthUnitRulesRequest; +import com.idmesh.model.DeleteResourcesRequest; +import com.idmesh.model.EmptyObject10; +import com.idmesh.model.EmptyObject11; +import com.idmesh.model.EmptyObject12; +import com.idmesh.model.EmptyObject2; +import com.idmesh.model.EmptyObject3; +import com.idmesh.model.EmptyObject4; +import com.idmesh.model.EmptyObject5; +import com.idmesh.model.EmptyObject6; +import com.idmesh.model.EmptyObject7; +import com.idmesh.model.EmptyObject8; +import com.idmesh.model.EmptyObject9; +import com.idmesh.model.Get400Response; +import com.idmesh.model.GetAuthUnits200Response; +import com.idmesh.model.GetPrivileges200Response; +import com.idmesh.model.GetResource200Response; +import com.idmesh.model.GetResourceMembers200Response; +import com.idmesh.model.GetResourceSets200Response; +import com.idmesh.model.GetResources200Response; +import com.idmesh.model.ResourceSet; +import com.idmesh.model.ResourceSetMember; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for PermissionApi + */ +@Disabled +public class PermissionApiTest { + + private final PermissionApi api = new PermissionApi(); + + /** + * 授权应用 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void authorizeApplicationsTest() throws ApiException { + String xTenantId = null; + AuthorizeApplicationsRequest authorizeApplicationsRequest = null; + Object response = api.authorizeApplications(xTenantId) + .authorizeApplicationsRequest(authorizeApplicationsRequest) + .execute(); + // TODO: test validations + } + + /** + * 批量创建授权规则 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void createAuthUnitRulesTest() throws ApiException { + String contentType = null; + EmptyObject2 emptyObject2 = null; + Object response = api.createAuthUnitRules(contentType) + .emptyObject2(emptyObject2) + .execute(); + // TODO: test validations + } + + /** + * 创建资源 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void createResourceTest() throws ApiException { + String contentType = null; + EmptyObject5 emptyObject5 = null; + EmptyObject6 response = api.createResource(contentType) + .emptyObject5(emptyObject5) + .execute(); + // TODO: test validations + } + + /** + * 创建资源集合 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void createResourceSetTest() throws ApiException { + String contentType = null; + String xTenantId = null; + EmptyObject8 emptyObject8 = null; + EmptyObject9 response = api.createResourceSet(contentType, xTenantId) + .emptyObject8(emptyObject8) + .execute(); + // TODO: test validations + } + + /** + * 创建资源集合成员 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void createResourceSetMemberTest() throws ApiException { + String id = null; + String contentType = null; + EmptyObject10 emptyObject10 = null; + EmptyObject11 response = api.createResourceSetMember(id, contentType) + .emptyObject10(emptyObject10) + .execute(); + // TODO: test validations + } + + /** + * 批量删除授权规则 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteAuthUnitRulesTest() throws ApiException { + String contentType = null; + DeleteAuthUnitRulesRequest deleteAuthUnitRulesRequest = null; + Object response = api.deleteAuthUnitRules(contentType) + .deleteAuthUnitRulesRequest(deleteAuthUnitRulesRequest) + .execute(); + // TODO: test validations + } + + /** + * 删除资源 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteResourcesTest() throws ApiException { + String contentType = null; + DeleteResourcesRequest deleteResourcesRequest = null; + Object response = api.deleteResources(contentType) + .deleteResourcesRequest(deleteResourcesRequest) + .execute(); + // TODO: test validations + } + + /** + * 按 ID 查询授权单元 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getAuthUnitTest() throws ApiException { + String id = null; + AuthUnit response = api.getAuthUnit(id) + .execute(); + // TODO: test validations + } + + /** + * 获取授权单元列表 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getAuthUnitsTest() throws ApiException { + String identityId = null; + String identityType = null; + String identityName = null; + String pageNum = null; + String pageSize = null; + String pageSort = null; + GetAuthUnits200Response response = api.getAuthUnits() + .identityId(identityId) + .identityType(identityType) + .identityName(identityName) + .pageNum(pageNum) + .pageSize(pageSize) + .pageSort(pageSort) + .execute(); + // TODO: test validations + } + + /** + * 查询授权单元下的授权规则列表 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getAuthUnitsRulesTest() throws ApiException { + String rid = null; + String applicationId = null; + String type = null; + String code = null; + String selfOnly = null; + String resourceId = null; + String resourceMatchAllResources = null; + String resourceMatchAllActions = null; + String resourceSetId = null; + List response = api.getAuthUnitsRules(rid) + .applicationId(applicationId) + .type(type) + .code(code) + .selfOnly(selfOnly) + .resourceId(resourceId) + .resourceMatchAllResources(resourceMatchAllResources) + .resourceMatchAllActions(resourceMatchAllActions) + .resourceSetId(resourceSetId) + .execute(); + // TODO: test validations + } + + /** + * 获取权限列表 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getPrivilegesTest() throws ApiException { + String applicationId = null; + String identityId = null; + String identityType = null; + String identityName = null; + String objectType = null; + String objectCode = null; + String affect = null; + String pageNum = null; + String pageSize = null; + String pageSort = null; + GetPrivileges200Response response = api.getPrivileges(applicationId) + .identityId(identityId) + .identityType(identityType) + .identityName(identityName) + .objectType(objectType) + .objectCode(objectCode) + .affect(affect) + .pageNum(pageNum) + .pageSize(pageSize) + .pageSort(pageSort) + .execute(); + // TODO: test validations + } + + /** + * 按 ID 查询资源 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getResourceTest() throws ApiException { + String id = null; + String applicationId = null; + GetResource200Response response = api.getResource(id, applicationId) + .execute(); + // TODO: test validations + } + + /** + * 按 ID 查询资源集合成员 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getResourceMemberTest() throws ApiException { + String sid = null; + String mid = null; + ResourceSetMember response = api.getResourceMember(sid, mid) + .execute(); + // TODO: test validations + } + + /** + * 查询资源集合成员列表 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getResourceMembersTest() throws ApiException { + String sid = null; + String resourceCode = null; + String resourceType = null; + String pageNum = null; + String pageSize = null; + String pageSort = null; + GetResourceMembers200Response response = api.getResourceMembers(sid) + .resourceCode(resourceCode) + .resourceType(resourceType) + .pageNum(pageNum) + .pageSize(pageSize) + .pageSort(pageSort) + .execute(); + // TODO: test validations + } + + /** + * 按 ID 查询资源集合 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getResourceSetTest() throws ApiException { + String id = null; + ResourceSet response = api.getResourceSet(id) + .execute(); + // TODO: test validations + } + + /** + * 查询资源集合列表 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getResourceSetsTest() throws ApiException { + String applicationId = null; + String code = null; + String includeGlobal = null; + String pageNum = null; + String pageSize = null; + String pageSort = null; + GetResourceSets200Response response = api.getResourceSets(applicationId) + .code(code) + .includeGlobal(includeGlobal) + .pageNum(pageNum) + .pageSize(pageSize) + .pageSort(pageSort) + .execute(); + // TODO: test validations + } + + /** + * 查询资源列表 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getResourcesTest() throws ApiException { + String applicationId = null; + String type = null; + String code = null; + String includeGlobal = null; + String pageNum = null; + String pageSize = null; + String pageSort = null; + GetResources200Response response = api.getResources(applicationId) + .type(type) + .code(code) + .includeGlobal(includeGlobal) + .pageNum(pageNum) + .pageSize(pageSize) + .pageSort(pageSort) + .execute(); + // TODO: test validations + } + + /** + * 查询已授权应用列表 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void listAuthorizedApplicationsTest() throws ApiException { + String identityId = null; + String identityType = null; + String xTenantId = null; + String type = null; + List response = api.listAuthorizedApplications(identityId, identityType, xTenantId) + .type(type) + .execute(); + // TODO: test validations + } + + /** + * 更新授权规则 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void modifyAuthUnitTest() throws ApiException { + String rid = null; + String tid = null; + String contentType = null; + EmptyObject4 emptyObject4 = null; + Object response = api.modifyAuthUnit(rid, tid, contentType) + .emptyObject4(emptyObject4) + .execute(); + // TODO: test validations + } + + /** + * 更新资源 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void modifyResourceTest() throws ApiException { + String id = null; + String contentType = null; + EmptyObject3 emptyObject3 = null; + Object response = api.modifyResource(id, contentType) + .emptyObject3(emptyObject3) + .execute(); + // TODO: test validations + } + + /** + * 更新资源集合 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void modifyResourceSetTest() throws ApiException { + String id = null; + String contentType = null; + String xTenantId = null; + EmptyObject7 emptyObject7 = null; + Object response = api.modifyResourceSet(id, contentType, xTenantId) + .emptyObject7(emptyObject7) + .execute(); + // TODO: test validations + } + + /** + * 更新资源集合成员 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void modifyResourceSetMemberTest() throws ApiException { + String sid = null; + String mid = null; + String contentType = null; + EmptyObject12 emptyObject12 = null; + Object response = api.modifyResourceSetMember(sid, mid, contentType) + .emptyObject12(emptyObject12) + .execute(); + // TODO: test validations + } + + /** + * 查询授权规则列表 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void queryAuthUnitsRulesTest() throws ApiException { + String identityId = null; + String identityType = null; + String applicationId = null; + String type = null; + String code = null; + String identityName = null; + String selfOnly = null; + String resourceId = null; + String resourceMatchAllResources = null; + String resourceMatchAllActions = null; + String resourceSetId = null; + List response = api.queryAuthUnitsRules(identityId, identityType) + .applicationId(applicationId) + .type(type) + .code(code) + .identityName(identityName) + .selfOnly(selfOnly) + .resourceId(resourceId) + .resourceMatchAllResources(resourceMatchAllResources) + .resourceMatchAllActions(resourceMatchAllActions) + .resourceSetId(resourceSetId) + .execute(); + // TODO: test validations + } + +} diff --git a/src/test/java/com/idmesh/api/StorageApiTest.java b/src/test/java/com/idmesh/api/StorageApiTest.java new file mode 100644 index 0000000..81267e9 --- /dev/null +++ b/src/test/java/com/idmesh/api/StorageApiTest.java @@ -0,0 +1,155 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.api; + +import com.idmesh.ApiException; +import com.idmesh.model.Bucket; +import com.idmesh.model.Get400Response; +import com.idmesh.model.ModelObject; +import com.idmesh.model.SaveObjectRequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for StorageApi + */ +@Disabled +public class StorageApiTest { + + private final StorageApi api = new StorageApi(); + + /** + * 删除 Bucket + * + * 删除bucket会间接删掉bucket下所有object + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteBucketTest() throws ApiException { + String bucket = null; + Object response = api.deleteBucket(bucket) + .execute(); + // TODO: test validations + } + + /** + * 删除 Object + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteObjectTest() throws ApiException { + String bucket = null; + String key = null; + String keyAsPrefix = null; + ModelObject response = api.deleteObject(bucket, key) + .keyAsPrefix(keyAsPrefix) + .execute(); + // TODO: test validations + } + + /** + * 获取 Bucket 详情 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getBucketTest() throws ApiException { + String bucket = null; + Bucket response = api.getBucket(bucket) + .execute(); + // TODO: test validations + } + + /** + * 获取 Bucket 列表 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getBucketsTest() throws ApiException { + String last = null; + Integer limit = null; + List response = api.getBuckets() + .last(last) + .limit(limit) + .execute(); + // TODO: test validations + } + + /** + * 获取 Object 详情 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getObjectTest() throws ApiException { + String bucket = null; + String key = null; + ModelObject response = api.getObject(bucket, key) + .execute(); + // TODO: test validations + } + + /** + * 获取 Object 列表 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getObjectsTest() throws ApiException { + String bucket = null; + String last = null; + Integer limit = null; + List response = api.getObjects(bucket) + .last(last) + .limit(limit) + .execute(); + // TODO: test validations + } + + /** + * 创建 Object + * + * - 如果path中的bucket没有创建,会默认创建 - 如果key已经存在,会更新原有的值 + * + * @throws ApiException if the Api call fails + */ + @Test + public void saveObjectTest() throws ApiException { + String bucket = null; + SaveObjectRequest saveObjectRequest = null; + Object response = api.saveObject(bucket) + .saveObjectRequest(saveObjectRequest) + .execute(); + // TODO: test validations + } + +} diff --git a/src/test/java/com/idmesh/api/UserApiTest.java b/src/test/java/com/idmesh/api/UserApiTest.java new file mode 100644 index 0000000..2fcdd38 --- /dev/null +++ b/src/test/java/com/idmesh/api/UserApiTest.java @@ -0,0 +1,190 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.api; + +import com.idmesh.ApiException; +import java.math.BigDecimal; +import com.idmesh.model.CreateRequest; +import com.idmesh.model.CreateStoreCredential200Response; +import com.idmesh.model.CreateStoreCredentialRequest; +import com.idmesh.model.Delete200Response; +import com.idmesh.model.Get200Response; +import com.idmesh.model.Get400Response; +import com.idmesh.model.GetStoredCredentials200Response; +import com.idmesh.model.List200Response; +import com.idmesh.model.Modify200Response; +import com.idmesh.model.ModifyRequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for UserApi + */ +@Disabled +public class UserApiTest { + + private final UserApi api = new UserApi(); + + /** + * 查询用户列表 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void callListTest() throws ApiException { + Integer pageSize = null; + Integer pageNum = null; + String searchType = null; + String keyword = null; + String timeModifiedFrom = null; + String timeModifiedTo = null; + List200Response response = api.callList() + .pageSize(pageSize) + .pageNum(pageNum) + .searchType(searchType) + .keyword(keyword) + .timeModifiedFrom(timeModifiedFrom) + .timeModifiedTo(timeModifiedTo) + .execute(); + // TODO: test validations + } + + /** + * 创建用户 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void createTest() throws ApiException { + String contentType = null; + CreateRequest createRequest = null; + Modify200Response response = api.create(contentType) + .createRequest(createRequest) + .execute(); + // TODO: test validations + } + + /** + * 创建用户存储凭证 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void createStoreCredentialTest() throws ApiException { + String contentType = null; + CreateStoreCredentialRequest createStoreCredentialRequest = null; + CreateStoreCredential200Response response = api.createStoreCredential(contentType) + .createStoreCredentialRequest(createStoreCredentialRequest) + .execute(); + // TODO: test validations + } + + /** + * 删除用户 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteTest() throws ApiException { + String id = null; + String contentType = null; + Delete200Response response = api.delete(id, contentType) + .execute(); + // TODO: test validations + } + + /** + * 查询用户详情 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getTest() throws ApiException { + String id = null; + Get200Response response = api.get(id) + .execute(); + // TODO: test validations + } + + /** + * 查询用户存储凭证列表 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void getStoredCredentialsTest() throws ApiException { + String contentType = null; + BigDecimal userId = null; + String providerCode = null; + BigDecimal idpConfigId = null; + String id1 = null; + String id2 = null; + String metadata = null; + String status = null; + String username = null; + String displayName = null; + Integer pageSize = null; + Integer pageNum = null; + GetStoredCredentials200Response response = api.getStoredCredentials(contentType) + .userId(userId) + .providerCode(providerCode) + .idpConfigId(idpConfigId) + .id1(id1) + .id2(id2) + .metadata(metadata) + .status(status) + .username(username) + .displayName(displayName) + .pageSize(pageSize) + .pageNum(pageNum) + .execute(); + // TODO: test validations + } + + /** + * 编辑用户 + * + * + * + * @throws ApiException if the Api call fails + */ + @Test + public void modifyTest() throws ApiException { + String id = null; + String contentType = null; + ModifyRequest modifyRequest = null; + Modify200Response response = api.modify(id, contentType) + .modifyRequest(modifyRequest) + .execute(); + // TODO: test validations + } + +} diff --git a/src/test/java/com/idmesh/model/AppConfigAllowedIdProviderTest.java b/src/test/java/com/idmesh/model/AppConfigAllowedIdProviderTest.java new file mode 100644 index 0000000..eeeca5f --- /dev/null +++ b/src/test/java/com/idmesh/model/AppConfigAllowedIdProviderTest.java @@ -0,0 +1,80 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AppConfigAllowedIdProvider + */ +public class AppConfigAllowedIdProviderTest { + private final AppConfigAllowedIdProvider model = new AppConfigAllowedIdProvider(); + + /** + * Model tests for AppConfigAllowedIdProvider + */ + @Test + public void testAppConfigAllowedIdProvider() { + // TODO: test AppConfigAllowedIdProvider + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'idpCode' + */ + @Test + public void idpCodeTest() { + // TODO: test idpCode + } + + /** + * Test the property 'idpConfigId' + */ + @Test + public void idpConfigIdTest() { + // TODO: test idpConfigId + } + + /** + * Test the property 'authMethodCode' + */ + @Test + public void authMethodCodeTest() { + // TODO: test authMethodCode + } + + /** + * Test the property 'authMethodDisplayName' + */ + @Test + public void authMethodDisplayNameTest() { + // TODO: test authMethodDisplayName + } + +} diff --git a/src/test/java/com/idmesh/model/AppConfigTest.java b/src/test/java/com/idmesh/model/AppConfigTest.java new file mode 100644 index 0000000..48dcbc0 --- /dev/null +++ b/src/test/java/com/idmesh/model/AppConfigTest.java @@ -0,0 +1,170 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.AppConfigAllowedIdProvider; +import com.idmesh.model.MFA; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AppConfig + */ +public class AppConfigTest { + private final AppConfig model = new AppConfig(); + + /** + * Model tests for AppConfig + */ + @Test + public void testAppConfig() { + // TODO: test AppConfig + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'appId' + */ + @Test + public void appIdTest() { + // TODO: test appId + } + + /** + * Test the property 'allowedLoginMethod' + */ + @Test + public void allowedLoginMethodTest() { + // TODO: test allowedLoginMethod + } + + /** + * Test the property 'defaultLoginMethod' + */ + @Test + public void defaultLoginMethodTest() { + // TODO: test defaultLoginMethod + } + + /** + * Test the property 'allowedRegMethod' + */ + @Test + public void allowedRegMethodTest() { + // TODO: test allowedRegMethod + } + + /** + * Test the property 'defaultRegMethod' + */ + @Test + public void defaultRegMethodTest() { + // TODO: test defaultRegMethod + } + + /** + * Test the property 'accessPolicy' + */ + @Test + public void accessPolicyTest() { + // TODO: test accessPolicy + } + + /** + * Test the property 'regPolicy' + */ + @Test + public void regPolicyTest() { + // TODO: test regPolicy + } + + /** + * Test the property 'allowedIdProvider' + */ + @Test + public void allowedIdProviderTest() { + // TODO: test allowedIdProvider + } + + /** + * Test the property 'ssoEnabled' + */ + @Test + public void ssoEnabledTest() { + // TODO: test ssoEnabled + } + + /** + * Test the property 'mfaEnabled' + */ + @Test + public void mfaEnabledTest() { + // TODO: test mfaEnabled + } + + /** + * Test the property 'mfaConfig' + */ + @Test + public void mfaConfigTest() { + // TODO: test mfaConfig + } + + /** + * Test the property 'accessControlEnabled' + */ + @Test + public void accessControlEnabledTest() { + // TODO: test accessControlEnabled + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/src/test/java/com/idmesh/model/AppDetailTest.java b/src/test/java/com/idmesh/model/AppDetailTest.java new file mode 100644 index 0000000..8b81fb7 --- /dev/null +++ b/src/test/java/com/idmesh/model/AppDetailTest.java @@ -0,0 +1,218 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AppDetail + */ +public class AppDetailTest { + private final AppDetail model = new AppDetail(); + + /** + * Model tests for AppDetail + */ + @Test + public void testAppDetail() { + // TODO: test AppDetail + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'developerId' + */ + @Test + public void developerIdTest() { + // TODO: test developerId + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'appId' + */ + @Test + public void appIdTest() { + // TODO: test appId + } + + /** + * Test the property 'category' + */ + @Test + public void categoryTest() { + // TODO: test category + } + + /** + * Test the property 'appSecret' + */ + @Test + public void appSecretTest() { + // TODO: test appSecret + } + + /** + * Test the property 'descr' + */ + @Test + public void descrTest() { + // TODO: test descr + } + + /** + * Test the property 'logo' + */ + @Test + public void logoTest() { + // TODO: test logo + } + + /** + * Test the property 'loginUrl' + */ + @Test + public void loginUrlTest() { + // TODO: test loginUrl + } + + /** + * Test the property 'domain' + */ + @Test + public void domainTest() { + // TODO: test domain + } + + /** + * Test the property 'domainSn' + */ + @Test + public void domainSnTest() { + // TODO: test domainSn + } + + /** + * Test the property 'redirectUrl' + */ + @Test + public void redirectUrlTest() { + // TODO: test redirectUrl + } + + /** + * Test the property 'logoutUrl' + */ + @Test + public void logoutUrlTest() { + // TODO: test logoutUrl + } + + /** + * Test the property 'subAccountPolicy' + */ + @Test + public void subAccountPolicyTest() { + // TODO: test subAccountPolicy + } + + /** + * Test the property 'prop' + */ + @Test + public void propTest() { + // TODO: test prop + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'config' + */ + @Test + public void configTest() { + // TODO: test config + } + + /** + * Test the property 'protocols' + */ + @Test + public void protocolsTest() { + // TODO: test protocols + } + +} diff --git a/src/test/java/com/idmesh/model/AppSubAccountTest.java b/src/test/java/com/idmesh/model/AppSubAccountTest.java new file mode 100644 index 0000000..520f794 --- /dev/null +++ b/src/test/java/com/idmesh/model/AppSubAccountTest.java @@ -0,0 +1,168 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AppSubAccount + */ +public class AppSubAccountTest { + private final AppSubAccount model = new AppSubAccount(); + + /** + * Model tests for AppSubAccount + */ + @Test + public void testAppSubAccount() { + // TODO: test AppSubAccount + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'appId' + */ + @Test + public void appIdTest() { + // TODO: test appId + } + + /** + * Test the property 'appName' + */ + @Test + public void appNameTest() { + // TODO: test appName + } + + /** + * Test the property 'accName' + */ + @Test + public void accNameTest() { + // TODO: test accName + } + + /** + * Test the property 'accNameDisplayed' + */ + @Test + public void accNameDisplayedTest() { + // TODO: test accNameDisplayed + } + + /** + * Test the property 'accSource' + */ + @Test + public void accSourceTest() { + // TODO: test accSource + } + + /** + * Test the property 'developerId' + */ + @Test + public void developerIdTest() { + // TODO: test developerId + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'accPassword' + */ + @Test + public void accPasswordTest() { + // TODO: test accPassword + } + + /** + * Test the property 'accStatus' + */ + @Test + public void accStatusTest() { + // TODO: test accStatus + } + + /** + * Test the property 'accSyncStatus' + */ + @Test + public void accSyncStatusTest() { + // TODO: test accSyncStatus + } + + /** + * Test the property 'accProp' + */ + @Test + public void accPropTest() { + // TODO: test accProp + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + +} diff --git a/src/test/java/com/idmesh/model/AppTest.java b/src/test/java/com/idmesh/model/AppTest.java new file mode 100644 index 0000000..f924aa9 --- /dev/null +++ b/src/test/java/com/idmesh/model/AppTest.java @@ -0,0 +1,192 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for App + */ +public class AppTest { + private final App model = new App(); + + /** + * Model tests for App + */ + @Test + public void testApp() { + // TODO: test App + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'developerId' + */ + @Test + public void developerIdTest() { + // TODO: test developerId + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'appId' + */ + @Test + public void appIdTest() { + // TODO: test appId + } + + /** + * Test the property 'category' + */ + @Test + public void categoryTest() { + // TODO: test category + } + + /** + * Test the property 'appSecret' + */ + @Test + public void appSecretTest() { + // TODO: test appSecret + } + + /** + * Test the property 'descr' + */ + @Test + public void descrTest() { + // TODO: test descr + } + + /** + * Test the property 'logo' + */ + @Test + public void logoTest() { + // TODO: test logo + } + + /** + * Test the property 'loginUrl' + */ + @Test + public void loginUrlTest() { + // TODO: test loginUrl + } + + /** + * Test the property 'domain' + */ + @Test + public void domainTest() { + // TODO: test domain + } + + /** + * Test the property 'redirectUrl' + */ + @Test + public void redirectUrlTest() { + // TODO: test redirectUrl + } + + /** + * Test the property 'logoutUrl' + */ + @Test + public void logoutUrlTest() { + // TODO: test logoutUrl + } + + /** + * Test the property 'subAccountPolicy' + */ + @Test + public void subAccountPolicyTest() { + // TODO: test subAccountPolicy + } + + /** + * Test the property 'prop' + */ + @Test + public void propTest() { + // TODO: test prop + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/src/test/java/com/idmesh/model/AuResourceSetTest.java b/src/test/java/com/idmesh/model/AuResourceSetTest.java new file mode 100644 index 0000000..e1a1dde --- /dev/null +++ b/src/test/java/com/idmesh/model/AuResourceSetTest.java @@ -0,0 +1,123 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.ResourceSetMember; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AuResourceSet + */ +public class AuResourceSetTest { + private final AuResourceSet model = new AuResourceSet(); + + /** + * Model tests for AuResourceSet + */ + @Test + public void testAuResourceSet() { + // TODO: test AuResourceSet + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'applicationId' + */ + @Test + public void applicationIdTest() { + // TODO: test applicationId + } + + /** + * Test the property 'applicationName' + */ + @Test + public void applicationNameTest() { + // TODO: test applicationName + } + + /** + * Test the property 'isGlobal' + */ + @Test + public void isGlobalTest() { + // TODO: test isGlobal + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'members' + */ + @Test + public void membersTest() { + // TODO: test members + } + + /** + * Test the property 'matchAllResources' + */ + @Test + public void matchAllResourcesTest() { + // TODO: test matchAllResources + } + +} diff --git a/src/test/java/com/idmesh/model/AuTest.java b/src/test/java/com/idmesh/model/AuTest.java new file mode 100644 index 0000000..83e2e93 --- /dev/null +++ b/src/test/java/com/idmesh/model/AuTest.java @@ -0,0 +1,145 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.AuResourceSet; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Au + */ +public class AuTest { + private final Au model = new Au(); + + /** + * Model tests for Au + */ + @Test + public void testAu() { + // TODO: test Au + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'authUnitId' + */ + @Test + public void authUnitIdTest() { + // TODO: test authUnitId + } + + /** + * Test the property 'resource' + */ + @Test + public void resourceTest() { + // TODO: test resource + } + + /** + * Test the property 'resourceSet' + */ + @Test + public void resourceSetTest() { + // TODO: test resourceSet + } + + /** + * Test the property 'affect' + */ + @Test + public void affectTest() { + // TODO: test affect + } + + /** + * Test the property 'resourceType' + */ + @Test + public void resourceTypeTest() { + // TODO: test resourceType + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'applicationName' + */ + @Test + public void applicationNameTest() { + // TODO: test applicationName + } + + /** + * Test the property 'identityId' + */ + @Test + public void identityIdTest() { + // TODO: test identityId + } + + /** + * Test the property 'identityType' + */ + @Test + public void identityTypeTest() { + // TODO: test identityType + } + + /** + * Test the property 'identityName' + */ + @Test + public void identityNameTest() { + // TODO: test identityName + } + + /** + * Test the property 'inherited' + */ + @Test + public void inheritedTest() { + // TODO: test inherited + } + +} diff --git a/src/test/java/com/idmesh/model/AuthRuleArgTest.java b/src/test/java/com/idmesh/model/AuthRuleArgTest.java new file mode 100644 index 0000000..8624244 --- /dev/null +++ b/src/test/java/com/idmesh/model/AuthRuleArgTest.java @@ -0,0 +1,84 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.EmptyObject4Application; +import com.idmesh.model.EmptyObject4Resource; +import com.idmesh.model.EmptyObject4ResourceSet; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AuthRuleArg + */ +public class AuthRuleArgTest { + private final AuthRuleArg model = new AuthRuleArg(); + + /** + * Model tests for AuthRuleArg + */ + @Test + public void testAuthRuleArg() { + // TODO: test AuthRuleArg + } + + /** + * Test the property 'resource' + */ + @Test + public void resourceTest() { + // TODO: test resource + } + + /** + * Test the property 'resourceSet' + */ + @Test + public void resourceSetTest() { + // TODO: test resourceSet + } + + /** + * Test the property 'application' + */ + @Test + public void applicationTest() { + // TODO: test application + } + + /** + * Test the property 'affect' + */ + @Test + public void affectTest() { + // TODO: test affect + } + + /** + * Test the property 'ownerAppId' + */ + @Test + public void ownerAppIdTest() { + // TODO: test ownerAppId + } + +} diff --git a/src/test/java/com/idmesh/model/AuthUnitResouceTest.java b/src/test/java/com/idmesh/model/AuthUnitResouceTest.java new file mode 100644 index 0000000..5f95a5d --- /dev/null +++ b/src/test/java/com/idmesh/model/AuthUnitResouceTest.java @@ -0,0 +1,171 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AuthUnitResouce + */ +public class AuthUnitResouceTest { + private final AuthUnitResouce model = new AuthUnitResouce(); + + /** + * Model tests for AuthUnitResouce + */ + @Test + public void testAuthUnitResouce() { + // TODO: test AuthUnitResouce + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'developerId' + */ + @Test + public void developerIdTest() { + // TODO: test developerId + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'applicationId' + */ + @Test + public void applicationIdTest() { + // TODO: test applicationId + } + + /** + * Test the property 'applicatioinName' + */ + @Test + public void applicatioinNameTest() { + // TODO: test applicatioinName + } + + /** + * Test the property 'isGlobal' + */ + @Test + public void isGlobalTest() { + // TODO: test isGlobal + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'uri' + */ + @Test + public void uriTest() { + // TODO: test uri + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'scope' + */ + @Test + public void scopeTest() { + // TODO: test scope + } + + /** + * Test the property 'selectedActions' + */ + @Test + public void selectedActionsTest() { + // TODO: test selectedActions + } + + /** + * Test the property 'matchAllActions' + */ + @Test + public void matchAllActionsTest() { + // TODO: test matchAllActions + } + + /** + * Test the property 'matchAllResources' + */ + @Test + public void matchAllResourcesTest() { + // TODO: test matchAllResources + } + +} diff --git a/src/test/java/com/idmesh/model/AuthUnitResourceSetTest.java b/src/test/java/com/idmesh/model/AuthUnitResourceSetTest.java new file mode 100644 index 0000000..323e0d5 --- /dev/null +++ b/src/test/java/com/idmesh/model/AuthUnitResourceSetTest.java @@ -0,0 +1,123 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.ResourceSetMember; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AuthUnitResourceSet + */ +public class AuthUnitResourceSetTest { + private final AuthUnitResourceSet model = new AuthUnitResourceSet(); + + /** + * Model tests for AuthUnitResourceSet + */ + @Test + public void testAuthUnitResourceSet() { + // TODO: test AuthUnitResourceSet + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'applicationId' + */ + @Test + public void applicationIdTest() { + // TODO: test applicationId + } + + /** + * Test the property 'applicationName' + */ + @Test + public void applicationNameTest() { + // TODO: test applicationName + } + + /** + * Test the property 'isGlobal' + */ + @Test + public void isGlobalTest() { + // TODO: test isGlobal + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'members' + */ + @Test + public void membersTest() { + // TODO: test members + } + + /** + * Test the property 'matchAllResources' + */ + @Test + public void matchAllResourcesTest() { + // TODO: test matchAllResources + } + +} diff --git a/src/test/java/com/idmesh/model/AuthUnitTest.java b/src/test/java/com/idmesh/model/AuthUnitTest.java new file mode 100644 index 0000000..3983221 --- /dev/null +++ b/src/test/java/com/idmesh/model/AuthUnitTest.java @@ -0,0 +1,99 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.Au; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AuthUnit + */ +public class AuthUnitTest { + private final AuthUnit model = new AuthUnit(); + + /** + * Model tests for AuthUnit + */ + @Test + public void testAuthUnit() { + // TODO: test AuthUnit + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'identityId' + */ + @Test + public void identityIdTest() { + // TODO: test identityId + } + + /** + * Test the property 'identityName' + */ + @Test + public void identityNameTest() { + // TODO: test identityName + } + + /** + * Test the property 'identityType' + */ + @Test + public void identityTypeTest() { + // TODO: test identityType + } + + /** + * Test the property 'rules' + */ + @Test + public void rulesTest() { + // TODO: test rules + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + +} diff --git a/src/test/java/com/idmesh/model/AuthorizeApplicationsRequestTest.java b/src/test/java/com/idmesh/model/AuthorizeApplicationsRequestTest.java new file mode 100644 index 0000000..c5dfa95 --- /dev/null +++ b/src/test/java/com/idmesh/model/AuthorizeApplicationsRequestTest.java @@ -0,0 +1,67 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.IdentityObj; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AuthorizeApplicationsRequest + */ +public class AuthorizeApplicationsRequestTest { + private final AuthorizeApplicationsRequest model = new AuthorizeApplicationsRequest(); + + /** + * Model tests for AuthorizeApplicationsRequest + */ + @Test + public void testAuthorizeApplicationsRequest() { + // TODO: test AuthorizeApplicationsRequest + } + + /** + * Test the property 'identities' + */ + @Test + public void identitiesTest() { + // TODO: test identities + } + + /** + * Test the property 'applicationId' + */ + @Test + public void applicationIdTest() { + // TODO: test applicationId + } + + /** + * Test the property 'affect' + */ + @Test + public void affectTest() { + // TODO: test affect + } + +} diff --git a/src/test/java/com/idmesh/model/AuthzAppTest.java b/src/test/java/com/idmesh/model/AuthzAppTest.java new file mode 100644 index 0000000..7386687 --- /dev/null +++ b/src/test/java/com/idmesh/model/AuthzAppTest.java @@ -0,0 +1,138 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AuthzApp + */ +public class AuthzAppTest { + private final AuthzApp model = new AuthzApp(); + + /** + * Model tests for AuthzApp + */ + @Test + public void testAuthzApp() { + // TODO: test AuthzApp + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'developerId' + */ + @Test + public void developerIdTest() { + // TODO: test developerId + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'accessPolicy' + */ + @Test + public void accessPolicyTest() { + // TODO: test accessPolicy + } + + /** + * Test the property 'decr' + */ + @Test + public void decrTest() { + // TODO: test decr + } + + /** + * Test the property 'logo' + */ + @Test + public void logoTest() { + // TODO: test logo + } + + /** + * Test the property 'accessUrl' + */ + @Test + public void accessUrlTest() { + // TODO: test accessUrl + } + + /** + * Test the property 'enabledProtocols' + */ + @Test + public void enabledProtocolsTest() { + // TODO: test enabledProtocols + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + +} diff --git a/src/test/java/com/idmesh/model/BucketTest.java b/src/test/java/com/idmesh/model/BucketTest.java new file mode 100644 index 0000000..5d41042 --- /dev/null +++ b/src/test/java/com/idmesh/model/BucketTest.java @@ -0,0 +1,64 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Bucket + */ +public class BucketTest { + private final Bucket model = new Bucket(); + + /** + * Model tests for Bucket + */ + @Test + public void testBucket() { + // TODO: test Bucket + } + + /** + * Test the property 'bucket' + */ + @Test + public void bucketTest() { + // TODO: test bucket + } + + /** + * Test the property 'dataSize' + */ + @Test + public void dataSizeTest() { + // TODO: test dataSize + } + + /** + * Test the property 'objectCount' + */ + @Test + public void objectCountTest() { + // TODO: test objectCount + } + +} diff --git a/src/test/java/com/idmesh/model/CoreObjectTest.java b/src/test/java/com/idmesh/model/CoreObjectTest.java new file mode 100644 index 0000000..d236c17 --- /dev/null +++ b/src/test/java/com/idmesh/model/CoreObjectTest.java @@ -0,0 +1,128 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CoreObject + */ +public class CoreObjectTest { + private final CoreObject model = new CoreObject(); + + /** + * Model tests for CoreObject + */ + @Test + public void testCoreObject() { + // TODO: test CoreObject + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'objectDisplayName' + */ + @Test + public void objectDisplayNameTest() { + // TODO: test objectDisplayName + } + + /** + * Test the property 'objectType' + */ + @Test + public void objectTypeTest() { + // TODO: test objectType + } + + /** + * Test the property 'objectCode' + */ + @Test + public void objectCodeTest() { + // TODO: test objectCode + } + + /** + * Test the property 'objectProps' + */ + @Test + public void objectPropsTest() { + // TODO: test objectProps + } + + /** + * Test the property 'isDefault' + */ + @Test + public void isDefaultTest() { + // TODO: test isDefault + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'developerId' + */ + @Test + public void developerIdTest() { + // TODO: test developerId + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + +} diff --git a/src/test/java/com/idmesh/model/Create200ResponseTest.java b/src/test/java/com/idmesh/model/Create200ResponseTest.java new file mode 100644 index 0000000..1c5cd5b --- /dev/null +++ b/src/test/java/com/idmesh/model/Create200ResponseTest.java @@ -0,0 +1,48 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Create200Response + */ +public class Create200ResponseTest { + private final Create200Response model = new Create200Response(); + + /** + * Model tests for Create200Response + */ + @Test + public void testCreate200Response() { + // TODO: test Create200Response + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/com/idmesh/model/CreateAccountRequestTest.java b/src/test/java/com/idmesh/model/CreateAccountRequestTest.java new file mode 100644 index 0000000..716b1e9 --- /dev/null +++ b/src/test/java/com/idmesh/model/CreateAccountRequestTest.java @@ -0,0 +1,120 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateAccountRequest + */ +public class CreateAccountRequestTest { + private final CreateAccountRequest model = new CreateAccountRequest(); + + /** + * Model tests for CreateAccountRequest + */ + @Test + public void testCreateAccountRequest() { + // TODO: test CreateAccountRequest + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'appId' + */ + @Test + public void appIdTest() { + // TODO: test appId + } + + /** + * Test the property 'accName' + */ + @Test + public void accNameTest() { + // TODO: test accName + } + + /** + * Test the property 'accNameDisplayed' + */ + @Test + public void accNameDisplayedTest() { + // TODO: test accNameDisplayed + } + + /** + * Test the property 'accSource' + */ + @Test + public void accSourceTest() { + // TODO: test accSource + } + + /** + * Test the property 'accPassword' + */ + @Test + public void accPasswordTest() { + // TODO: test accPassword + } + + /** + * Test the property 'accStatus' + */ + @Test + public void accStatusTest() { + // TODO: test accStatus + } + + /** + * Test the property 'sysExtProps' + */ + @Test + public void sysExtPropsTest() { + // TODO: test sysExtProps + } + + /** + * Test the property 'freeExtProps' + */ + @Test + public void freeExtPropsTest() { + // TODO: test freeExtProps + } + +} diff --git a/src/test/java/com/idmesh/model/CreateNodeRequestTest.java b/src/test/java/com/idmesh/model/CreateNodeRequestTest.java new file mode 100644 index 0000000..7368d4d --- /dev/null +++ b/src/test/java/com/idmesh/model/CreateNodeRequestTest.java @@ -0,0 +1,208 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateNodeRequest + */ +public class CreateNodeRequestTest { + private final CreateNodeRequest model = new CreateNodeRequest(); + + /** + * Model tests for CreateNodeRequest + */ + @Test + public void testCreateNodeRequest() { + // TODO: test CreateNodeRequest + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'arn' + */ + @Test + public void arnTest() { + // TODO: test arn + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'tag' + */ + @Test + public void tagTest() { + // TODO: test tag + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'isPointer' + */ + @Test + public void isPointerTest() { + // TODO: test isPointer + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'permNamespaceArn' + */ + @Test + public void permNamespaceArnTest() { + // TODO: test permNamespaceArn + } + + /** + * Test the property 'condition' + */ + @Test + public void conditionTest() { + // TODO: test condition + } + + /** + * Test the property 'isDynamic' + */ + @Test + public void isDynamicTest() { + // TODO: test isDynamic + } + + /** + * Test the property 'sysCode' + */ + @Test + public void sysCodeTest() { + // TODO: test sysCode + } + + /** + * Test the property 'operatorId' + */ + @Test + public void operatorIdTest() { + // TODO: test operatorId + } + + /** + * Test the property 'pointerId' + */ + @Test + public void pointerIdTest() { + // TODO: test pointerId + } + + /** + * Test the property 'seq' + */ + @Test + public void seqTest() { + // TODO: test seq + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'objectCode' + */ + @Test + public void objectCodeTest() { + // TODO: test objectCode + } + + /** + * Test the property 'parentId' + */ + @Test + public void parentIdTest() { + // TODO: test parentId + } + + /** + * Test the property 'sysExtProps' + */ + @Test + public void sysExtPropsTest() { + // TODO: test sysExtProps + } + + /** + * Test the property 'freeExtProps' + */ + @Test + public void freeExtPropsTest() { + // TODO: test freeExtProps + } + +} diff --git a/src/test/java/com/idmesh/model/CreateOrganization200ResponseTest.java b/src/test/java/com/idmesh/model/CreateOrganization200ResponseTest.java new file mode 100644 index 0000000..044ee5c --- /dev/null +++ b/src/test/java/com/idmesh/model/CreateOrganization200ResponseTest.java @@ -0,0 +1,48 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateOrganization200Response + */ +public class CreateOrganization200ResponseTest { + private final CreateOrganization200Response model = new CreateOrganization200Response(); + + /** + * Model tests for CreateOrganization200Response + */ + @Test + public void testCreateOrganization200Response() { + // TODO: test CreateOrganization200Response + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/com/idmesh/model/CreateOrganizationRequestTest.java b/src/test/java/com/idmesh/model/CreateOrganizationRequestTest.java new file mode 100644 index 0000000..8ae0237 --- /dev/null +++ b/src/test/java/com/idmesh/model/CreateOrganizationRequestTest.java @@ -0,0 +1,88 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateOrganizationRequest + */ +public class CreateOrganizationRequestTest { + private final CreateOrganizationRequest model = new CreateOrganizationRequest(); + + /** + * Model tests for CreateOrganizationRequest + */ + @Test + public void testCreateOrganizationRequest() { + // TODO: test CreateOrganizationRequest + } + + /** + * Test the property 'objectDisplayName' + */ + @Test + public void objectDisplayNameTest() { + // TODO: test objectDisplayName + } + + /** + * Test the property 'objectType' + */ + @Test + public void objectTypeTest() { + // TODO: test objectType + } + + /** + * Test the property 'objectCode' + */ + @Test + public void objectCodeTest() { + // TODO: test objectCode + } + + /** + * Test the property 'objectProps' + */ + @Test + public void objectPropsTest() { + // TODO: test objectProps + } + + /** + * Test the property 'isDefault' + */ + @Test + public void isDefaultTest() { + // TODO: test isDefault + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/src/test/java/com/idmesh/model/CreateRequest1ConfigPropAccessPolicyTest.java b/src/test/java/com/idmesh/model/CreateRequest1ConfigPropAccessPolicyTest.java new file mode 100644 index 0000000..f5b2ecf --- /dev/null +++ b/src/test/java/com/idmesh/model/CreateRequest1ConfigPropAccessPolicyTest.java @@ -0,0 +1,50 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateRequest1ConfigPropAccessPolicy + */ +public class CreateRequest1ConfigPropAccessPolicyTest { + private final CreateRequest1ConfigPropAccessPolicy model = new CreateRequest1ConfigPropAccessPolicy(); + + /** + * Model tests for CreateRequest1ConfigPropAccessPolicy + */ + @Test + public void testCreateRequest1ConfigPropAccessPolicy() { + // TODO: test CreateRequest1ConfigPropAccessPolicy + } + + /** + * Test the property 'forgetPassword' + */ + @Test + public void forgetPasswordTest() { + // TODO: test forgetPassword + } + +} diff --git a/src/test/java/com/idmesh/model/CreateRequest1ConfigPropAllowedLoginMethodTest.java b/src/test/java/com/idmesh/model/CreateRequest1ConfigPropAllowedLoginMethodTest.java new file mode 100644 index 0000000..56a11ce --- /dev/null +++ b/src/test/java/com/idmesh/model/CreateRequest1ConfigPropAllowedLoginMethodTest.java @@ -0,0 +1,48 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateRequest1ConfigPropAllowedLoginMethod + */ +public class CreateRequest1ConfigPropAllowedLoginMethodTest { + private final CreateRequest1ConfigPropAllowedLoginMethod model = new CreateRequest1ConfigPropAllowedLoginMethod(); + + /** + * Model tests for CreateRequest1ConfigPropAllowedLoginMethod + */ + @Test + public void testCreateRequest1ConfigPropAllowedLoginMethod() { + // TODO: test CreateRequest1ConfigPropAllowedLoginMethod + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/src/test/java/com/idmesh/model/CreateRequest1ConfigPropAllowedSocialLoginProviderTest.java b/src/test/java/com/idmesh/model/CreateRequest1ConfigPropAllowedSocialLoginProviderTest.java new file mode 100644 index 0000000..6ffa9f4 --- /dev/null +++ b/src/test/java/com/idmesh/model/CreateRequest1ConfigPropAllowedSocialLoginProviderTest.java @@ -0,0 +1,57 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateRequest1ConfigPropAllowedSocialLoginProvider + */ +public class CreateRequest1ConfigPropAllowedSocialLoginProviderTest { + private final CreateRequest1ConfigPropAllowedSocialLoginProvider model = new CreateRequest1ConfigPropAllowedSocialLoginProvider(); + + /** + * Model tests for CreateRequest1ConfigPropAllowedSocialLoginProvider + */ + @Test + public void testCreateRequest1ConfigPropAllowedSocialLoginProvider() { + // TODO: test CreateRequest1ConfigPropAllowedSocialLoginProvider + } + + /** + * Test the property 'wechatScanQr' + */ + @Test + public void wechatScanQrTest() { + // TODO: test wechatScanQr + } + + /** + * Test the property 'dingdingScanQr' + */ + @Test + public void dingdingScanQrTest() { + // TODO: test dingdingScanQr + } + +} diff --git a/src/test/java/com/idmesh/model/CreateRequest1ConfigPropTest.java b/src/test/java/com/idmesh/model/CreateRequest1ConfigPropTest.java new file mode 100644 index 0000000..fbe5893 --- /dev/null +++ b/src/test/java/com/idmesh/model/CreateRequest1ConfigPropTest.java @@ -0,0 +1,149 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.CreateRequest1ConfigPropAccessPolicy; +import com.idmesh.model.CreateRequest1ConfigPropAllowedLoginMethod; +import com.idmesh.model.CreateRequest1ConfigPropAllowedSocialLoginProvider; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateRequest1ConfigProp + */ +public class CreateRequest1ConfigPropTest { + private final CreateRequest1ConfigProp model = new CreateRequest1ConfigProp(); + + /** + * Model tests for CreateRequest1ConfigProp + */ + @Test + public void testCreateRequest1ConfigProp() { + // TODO: test CreateRequest1ConfigProp + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'mfaConfig' + */ + @Test + public void mfaConfigTest() { + // TODO: test mfaConfig + } + + /** + * Test the property 'regPolicy' + */ + @Test + public void regPolicyTest() { + // TODO: test regPolicy + } + + /** + * Test the property 'mfaEnabled' + */ + @Test + public void mfaEnabledTest() { + // TODO: test mfaEnabled + } + + /** + * Test the property 'ssoEnabled' + */ + @Test + public void ssoEnabledTest() { + // TODO: test ssoEnabled + } + + /** + * Test the property 'developerId' + */ + @Test + public void developerIdTest() { + // TODO: test developerId + } + + /** + * Test the property 'accessPolicy' + */ + @Test + public void accessPolicyTest() { + // TODO: test accessPolicy + } + + /** + * Test the property 'allowedRegMethod' + */ + @Test + public void allowedRegMethodTest() { + // TODO: test allowedRegMethod + } + + /** + * Test the property 'defaultRegMethod' + */ + @Test + public void defaultRegMethodTest() { + // TODO: test defaultRegMethod + } + + /** + * Test the property 'allowedLoginMethod' + */ + @Test + public void allowedLoginMethodTest() { + // TODO: test allowedLoginMethod + } + + /** + * Test the property 'defaultLoginMethod' + */ + @Test + public void defaultLoginMethodTest() { + // TODO: test defaultLoginMethod + } + + /** + * Test the property 'allowedSocialLoginProvider' + */ + @Test + public void allowedSocialLoginProviderTest() { + // TODO: test allowedSocialLoginProvider + } + +} diff --git a/src/test/java/com/idmesh/model/CreateRequest1ProtocolPropResponseAttrInnerTest.java b/src/test/java/com/idmesh/model/CreateRequest1ProtocolPropResponseAttrInnerTest.java new file mode 100644 index 0000000..0cd687e --- /dev/null +++ b/src/test/java/com/idmesh/model/CreateRequest1ProtocolPropResponseAttrInnerTest.java @@ -0,0 +1,64 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateRequest1ProtocolPropResponseAttrInner + */ +public class CreateRequest1ProtocolPropResponseAttrInnerTest { + private final CreateRequest1ProtocolPropResponseAttrInner model = new CreateRequest1ProtocolPropResponseAttrInner(); + + /** + * Model tests for CreateRequest1ProtocolPropResponseAttrInner + */ + @Test + public void testCreateRequest1ProtocolPropResponseAttrInner() { + // TODO: test CreateRequest1ProtocolPropResponseAttrInner + } + + /** + * Test the property 'value' + */ + @Test + public void valueTest() { + // TODO: test value + } + + /** + * Test the property 'attribute' + */ + @Test + public void attributeTest() { + // TODO: test attribute + } + + /** + * Test the property 'nameFormat' + */ + @Test + public void nameFormatTest() { + // TODO: test nameFormat + } + +} diff --git a/src/test/java/com/idmesh/model/CreateRequest1ProtocolPropTest.java b/src/test/java/com/idmesh/model/CreateRequest1ProtocolPropTest.java new file mode 100644 index 0000000..cd50aa9 --- /dev/null +++ b/src/test/java/com/idmesh/model/CreateRequest1ProtocolPropTest.java @@ -0,0 +1,132 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.CreateRequest1ProtocolPropResponseAttrInner; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateRequest1ProtocolProp + */ +public class CreateRequest1ProtocolPropTest { + private final CreateRequest1ProtocolProp model = new CreateRequest1ProtocolProp(); + + /** + * Model tests for CreateRequest1ProtocolProp + */ + @Test + public void testCreateRequest1ProtocolProp() { + // TODO: test CreateRequest1ProtocolProp + } + + /** + * Test the property 'acsUrl' + */ + @Test + public void acsUrlTest() { + // TODO: test acsUrl + } + + /** + * Test the property 'spEntity' + */ + @Test + public void spEntityTest() { + // TODO: test spEntity + } + + /** + * Test the property 'responseAttr' + */ + @Test + public void responseAttrTest() { + // TODO: test responseAttr + } + + /** + * Test the property 'digestAlgorithm' + */ + @Test + public void digestAlgorithmTest() { + // TODO: test digestAlgorithm + } + + /** + * Test the property 'lifetimeInSeconds' + */ + @Test + public void lifetimeInSecondsTest() { + // TODO: test lifetimeInSeconds + } + + /** + * Test the property 'signatureAlgorithm' + */ + @Test + public void signatureAlgorithmTest() { + // TODO: test signatureAlgorithm + } + + /** + * Test the property 'nameIdentifierFormat' + */ + @Test + public void nameIdentifierFormatTest() { + // TODO: test nameIdentifierFormat + } + + /** + * Test the property 'authnContextClassRef' + */ + @Test + public void authnContextClassRefTest() { + // TODO: test authnContextClassRef + } + + /** + * Test the property 'samlResponseSigningKey' + */ + @Test + public void samlResponseSigningKeyTest() { + // TODO: test samlResponseSigningKey + } + + /** + * Test the property 'samlResponseSigningCert' + */ + @Test + public void samlResponseSigningCertTest() { + // TODO: test samlResponseSigningCert + } + + /** + * Test the property 'samlResponseSigningCertFingerprint' + */ + @Test + public void samlResponseSigningCertFingerprintTest() { + // TODO: test samlResponseSigningCertFingerprint + } + +} diff --git a/src/test/java/com/idmesh/model/CreateRequest1Test.java b/src/test/java/com/idmesh/model/CreateRequest1Test.java new file mode 100644 index 0000000..a2cbead --- /dev/null +++ b/src/test/java/com/idmesh/model/CreateRequest1Test.java @@ -0,0 +1,170 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.CreateRequest1ConfigProp; +import com.idmesh.model.CreateRequest1ProtocolProp; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateRequest1 + */ +public class CreateRequest1Test { + private final CreateRequest1 model = new CreateRequest1(); + + /** + * Model tests for CreateRequest1 + */ + @Test + public void testCreateRequest1() { + // TODO: test CreateRequest1 + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'domainSn' + */ + @Test + public void domainSnTest() { + // TODO: test domainSn + } + + /** + * Test the property 'templateId' + */ + @Test + public void templateIdTest() { + // TODO: test templateId + } + + /** + * Test the property 'category' + */ + @Test + public void categoryTest() { + // TODO: test category + } + + /** + * Test the property 'descr' + */ + @Test + public void descrTest() { + // TODO: test descr + } + + /** + * Test the property 'logo' + */ + @Test + public void logoTest() { + // TODO: test logo + } + + /** + * Test the property 'loginUrl' + */ + @Test + public void loginUrlTest() { + // TODO: test loginUrl + } + + /** + * Test the property 'redirectUrl' + */ + @Test + public void redirectUrlTest() { + // TODO: test redirectUrl + } + + /** + * Test the property 'logoutUrl' + */ + @Test + public void logoutUrlTest() { + // TODO: test logoutUrl + } + + /** + * Test the property 'subAccountPolicy' + */ + @Test + public void subAccountPolicyTest() { + // TODO: test subAccountPolicy + } + + /** + * Test the property 'sysExtProps' + */ + @Test + public void sysExtPropsTest() { + // TODO: test sysExtProps + } + + /** + * Test the property 'freeExtProps' + */ + @Test + public void freeExtPropsTest() { + // TODO: test freeExtProps + } + + /** + * Test the property 'protocolType' + */ + @Test + public void protocolTypeTest() { + // TODO: test protocolType + } + + /** + * Test the property 'protocolProp' + */ + @Test + public void protocolPropTest() { + // TODO: test protocolProp + } + + /** + * Test the property 'configProp' + */ + @Test + public void configPropTest() { + // TODO: test configProp + } + +} diff --git a/src/test/java/com/idmesh/model/CreateRequestTest.java b/src/test/java/com/idmesh/model/CreateRequestTest.java new file mode 100644 index 0000000..eb5a610 --- /dev/null +++ b/src/test/java/com/idmesh/model/CreateRequestTest.java @@ -0,0 +1,217 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateRequest + */ +public class CreateRequestTest { + private final CreateRequest model = new CreateRequest(); + + /** + * Model tests for CreateRequest + */ + @Test + public void testCreateRequest() { + // TODO: test CreateRequest + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'password' + */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** + * Test the property 'passwordStatus' + */ + @Test + public void passwordStatusTest() { + // TODO: test passwordStatus + } + + /** + * Test the property 'displayName' + */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** + * Test the property 'firstname' + */ + @Test + public void firstnameTest() { + // TODO: test firstname + } + + /** + * Test the property 'lastname' + */ + @Test + public void lastnameTest() { + // TODO: test lastname + } + + /** + * Test the property 'realname' + */ + @Test + public void realnameTest() { + // TODO: test realname + } + + /** + * Test the property 'pinyin' + */ + @Test + public void pinyinTest() { + // TODO: test pinyin + } + + /** + * Test the property 'nickname' + */ + @Test + public void nicknameTest() { + // TODO: test nickname + } + + /** + * Test the property 'userType' + */ + @Test + public void userTypeTest() { + // TODO: test userType + } + + /** + * Test the property 'mobile' + */ + @Test + public void mobileTest() { + // TODO: test mobile + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'gender' + */ + @Test + public void genderTest() { + // TODO: test gender + } + + /** + * Test the property 'certType' + */ + @Test + public void certTypeTest() { + // TODO: test certType + } + + /** + * Test the property 'certNumber' + */ + @Test + public void certNumberTest() { + // TODO: test certNumber + } + + /** + * Test the property 'region' + */ + @Test + public void regionTest() { + // TODO: test region + } + + /** + * Test the property 'workTime' + */ + @Test + public void workTimeTest() { + // TODO: test workTime + } + + /** + * Test the property 'workTitle' + */ + @Test + public void workTitleTest() { + // TODO: test workTitle + } + + /** + * Test the property 'idpConfigId' + */ + @Test + public void idpConfigIdTest() { + // TODO: test idpConfigId + } + + /** + * Test the property 'sysExtProps' + */ + @Test + public void sysExtPropsTest() { + // TODO: test sysExtProps + } + + /** + * Test the property 'freeExtProps' + */ + @Test + public void freeExtPropsTest() { + // TODO: test freeExtProps + } + + /** + * Test the property 'isNotify' + */ + @Test + public void isNotifyTest() { + // TODO: test isNotify + } + +} diff --git a/src/test/java/com/idmesh/model/CreateSecrets200ResponseDataTest.java b/src/test/java/com/idmesh/model/CreateSecrets200ResponseDataTest.java new file mode 100644 index 0000000..bc31e5f --- /dev/null +++ b/src/test/java/com/idmesh/model/CreateSecrets200ResponseDataTest.java @@ -0,0 +1,56 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateSecrets200ResponseData + */ +public class CreateSecrets200ResponseDataTest { + private final CreateSecrets200ResponseData model = new CreateSecrets200ResponseData(); + + /** + * Model tests for CreateSecrets200ResponseData + */ + @Test + public void testCreateSecrets200ResponseData() { + // TODO: test CreateSecrets200ResponseData + } + + /** + * Test the property 'appSecret' + */ + @Test + public void appSecretTest() { + // TODO: test appSecret + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/com/idmesh/model/CreateSecrets200ResponseTest.java b/src/test/java/com/idmesh/model/CreateSecrets200ResponseTest.java new file mode 100644 index 0000000..d28d771 --- /dev/null +++ b/src/test/java/com/idmesh/model/CreateSecrets200ResponseTest.java @@ -0,0 +1,57 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.CreateSecrets200ResponseData; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateSecrets200Response + */ +public class CreateSecrets200ResponseTest { + private final CreateSecrets200Response model = new CreateSecrets200Response(); + + /** + * Model tests for CreateSecrets200Response + */ + @Test + public void testCreateSecrets200Response() { + // TODO: test CreateSecrets200Response + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/idmesh/model/CreateStoreCredential200ResponseTest.java b/src/test/java/com/idmesh/model/CreateStoreCredential200ResponseTest.java new file mode 100644 index 0000000..747f7a5 --- /dev/null +++ b/src/test/java/com/idmesh/model/CreateStoreCredential200ResponseTest.java @@ -0,0 +1,73 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateStoreCredential200Response + */ +public class CreateStoreCredential200ResponseTest { + private final CreateStoreCredential200Response model = new CreateStoreCredential200Response(); + + /** + * Model tests for CreateStoreCredential200Response + */ + @Test + public void testCreateStoreCredential200Response() { + // TODO: test CreateStoreCredential200Response + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'errno' + */ + @Test + public void errnoTest() { + // TODO: test errno + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/idmesh/model/CreateStoreCredentialRequestTest.java b/src/test/java/com/idmesh/model/CreateStoreCredentialRequestTest.java new file mode 100644 index 0000000..81fe8f2 --- /dev/null +++ b/src/test/java/com/idmesh/model/CreateStoreCredentialRequestTest.java @@ -0,0 +1,145 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateStoreCredentialRequest + */ +public class CreateStoreCredentialRequestTest { + private final CreateStoreCredentialRequest model = new CreateStoreCredentialRequest(); + + /** + * Model tests for CreateStoreCredentialRequest + */ + @Test + public void testCreateStoreCredentialRequest() { + // TODO: test CreateStoreCredentialRequest + } + + /** + * Test the property 'providerCode' + */ + @Test + public void providerCodeTest() { + // TODO: test providerCode + } + + /** + * Test the property 'idpConfigId' + */ + @Test + public void idpConfigIdTest() { + // TODO: test idpConfigId + } + + /** + * Test the property 'id1' + */ + @Test + public void id1Test() { + // TODO: test id1 + } + + /** + * Test the property 'id2' + */ + @Test + public void id2Test() { + // TODO: test id2 + } + + /** + * Test the property 'metadata' + */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'nickname' + */ + @Test + public void nicknameTest() { + // TODO: test nickname + } + + /** + * Test the property 'avatar' + */ + @Test + public void avatarTest() { + // TODO: test avatar + } + + /** + * Test the property 'realname' + */ + @Test + public void realnameTest() { + // TODO: test realname + } + + /** + * Test the property 'mobile' + */ + @Test + public void mobileTest() { + // TODO: test mobile + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'gender' + */ + @Test + public void genderTest() { + // TODO: test gender + } + + /** + * Test the property 'idProviderConnection' + */ + @Test + public void idProviderConnectionTest() { + // TODO: test idProviderConnection + } + +} diff --git a/src/test/java/com/idmesh/model/CronJobTest.java b/src/test/java/com/idmesh/model/CronJobTest.java new file mode 100644 index 0000000..e341975 --- /dev/null +++ b/src/test/java/com/idmesh/model/CronJobTest.java @@ -0,0 +1,171 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.Injection; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CronJob + */ +public class CronJobTest { + private final CronJob model = new CronJob(); + + /** + * Model tests for CronJob + */ + @Test + public void testCronJob() { + // TODO: test CronJob + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'developerId' + */ + @Test + public void developerIdTest() { + // TODO: test developerId + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'namespace' + */ + @Test + public void namespaceTest() { + // TODO: test namespace + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'descr' + */ + @Test + public void descrTest() { + // TODO: test descr + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'config' + */ + @Test + public void configTest() { + // TODO: test config + } + + /** + * Test the property 'kind' + */ + @Test + public void kindTest() { + // TODO: test kind + } + + /** + * Test the property 'from' + */ + @Test + public void fromTest() { + // TODO: test from + } + + /** + * Test the property 'execFrequency' + */ + @Test + public void execFrequencyTest() { + // TODO: test execFrequency + } + + /** + * Test the property 'execCmd' + */ + @Test + public void execCmdTest() { + // TODO: test execCmd + } + + /** + * Test the property 'injections' + */ + @Test + public void injectionsTest() { + // TODO: test injections + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + +} diff --git a/src/test/java/com/idmesh/model/Delete200Response1Test.java b/src/test/java/com/idmesh/model/Delete200Response1Test.java new file mode 100644 index 0000000..f2cd923 --- /dev/null +++ b/src/test/java/com/idmesh/model/Delete200Response1Test.java @@ -0,0 +1,56 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Delete200Response1 + */ +public class Delete200Response1Test { + private final Delete200Response1 model = new Delete200Response1(); + + /** + * Model tests for Delete200Response1 + */ + @Test + public void testDelete200Response1() { + // TODO: test Delete200Response1 + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/idmesh/model/Delete200ResponseTest.java b/src/test/java/com/idmesh/model/Delete200ResponseTest.java new file mode 100644 index 0000000..bfccfa4 --- /dev/null +++ b/src/test/java/com/idmesh/model/Delete200ResponseTest.java @@ -0,0 +1,73 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Delete200Response + */ +public class Delete200ResponseTest { + private final Delete200Response model = new Delete200Response(); + + /** + * Model tests for Delete200Response + */ + @Test + public void testDelete200Response() { + // TODO: test Delete200Response + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'errno' + */ + @Test + public void errnoTest() { + // TODO: test errno + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/idmesh/model/DeleteAuthUnitRulesRequestTest.java b/src/test/java/com/idmesh/model/DeleteAuthUnitRulesRequestTest.java new file mode 100644 index 0000000..07a45f1 --- /dev/null +++ b/src/test/java/com/idmesh/model/DeleteAuthUnitRulesRequestTest.java @@ -0,0 +1,50 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for DeleteAuthUnitRulesRequest + */ +public class DeleteAuthUnitRulesRequestTest { + private final DeleteAuthUnitRulesRequest model = new DeleteAuthUnitRulesRequest(); + + /** + * Model tests for DeleteAuthUnitRulesRequest + */ + @Test + public void testDeleteAuthUnitRulesRequest() { + // TODO: test DeleteAuthUnitRulesRequest + } + + /** + * Test the property 'ids' + */ + @Test + public void idsTest() { + // TODO: test ids + } + +} diff --git a/src/test/java/com/idmesh/model/DeleteMembersRequestTest.java b/src/test/java/com/idmesh/model/DeleteMembersRequestTest.java new file mode 100644 index 0000000..7dcdd20 --- /dev/null +++ b/src/test/java/com/idmesh/model/DeleteMembersRequestTest.java @@ -0,0 +1,56 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for DeleteMembersRequest + */ +public class DeleteMembersRequestTest { + private final DeleteMembersRequest model = new DeleteMembersRequest(); + + /** + * Model tests for DeleteMembersRequest + */ + @Test + public void testDeleteMembersRequest() { + // TODO: test DeleteMembersRequest + } + + /** + * Test the property 'nodeId' + */ + @Test + public void nodeIdTest() { + // TODO: test nodeId + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + +} diff --git a/src/test/java/com/idmesh/model/DeleteNode200ResponseTest.java b/src/test/java/com/idmesh/model/DeleteNode200ResponseTest.java new file mode 100644 index 0000000..24395d1 --- /dev/null +++ b/src/test/java/com/idmesh/model/DeleteNode200ResponseTest.java @@ -0,0 +1,48 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for DeleteNode200Response + */ +public class DeleteNode200ResponseTest { + private final DeleteNode200Response model = new DeleteNode200Response(); + + /** + * Model tests for DeleteNode200Response + */ + @Test + public void testDeleteNode200Response() { + // TODO: test DeleteNode200Response + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/com/idmesh/model/DeleteOrganization200ResponseTest.java b/src/test/java/com/idmesh/model/DeleteOrganization200ResponseTest.java new file mode 100644 index 0000000..286584e --- /dev/null +++ b/src/test/java/com/idmesh/model/DeleteOrganization200ResponseTest.java @@ -0,0 +1,48 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for DeleteOrganization200Response + */ +public class DeleteOrganization200ResponseTest { + private final DeleteOrganization200Response model = new DeleteOrganization200Response(); + + /** + * Model tests for DeleteOrganization200Response + */ + @Test + public void testDeleteOrganization200Response() { + // TODO: test DeleteOrganization200Response + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/com/idmesh/model/DeleteResourcesRequestTest.java b/src/test/java/com/idmesh/model/DeleteResourcesRequestTest.java new file mode 100644 index 0000000..7b9fccd --- /dev/null +++ b/src/test/java/com/idmesh/model/DeleteResourcesRequestTest.java @@ -0,0 +1,50 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for DeleteResourcesRequest + */ +public class DeleteResourcesRequestTest { + private final DeleteResourcesRequest model = new DeleteResourcesRequest(); + + /** + * Model tests for DeleteResourcesRequest + */ + @Test + public void testDeleteResourcesRequest() { + // TODO: test DeleteResourcesRequest + } + + /** + * Test the property 'ids' + */ + @Test + public void idsTest() { + // TODO: test ids + } + +} diff --git a/src/test/java/com/idmesh/model/Disable200ResponseTest.java b/src/test/java/com/idmesh/model/Disable200ResponseTest.java new file mode 100644 index 0000000..2d4c7c4 --- /dev/null +++ b/src/test/java/com/idmesh/model/Disable200ResponseTest.java @@ -0,0 +1,57 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Disable200Response + */ +public class Disable200ResponseTest { + private final Disable200Response model = new Disable200Response(); + + /** + * Model tests for Disable200Response + */ + @Test + public void testDisable200Response() { + // TODO: test Disable200Response + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/idmesh/model/EmptyObject10Test.java b/src/test/java/com/idmesh/model/EmptyObject10Test.java new file mode 100644 index 0000000..7a9781b --- /dev/null +++ b/src/test/java/com/idmesh/model/EmptyObject10Test.java @@ -0,0 +1,75 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EmptyObject10 + */ +public class EmptyObject10Test { + private final EmptyObject10 model = new EmptyObject10(); + + /** + * Model tests for EmptyObject10 + */ + @Test + public void testEmptyObject10() { + // TODO: test EmptyObject10 + } + + /** + * Test the property 'resourceId' + */ + @Test + public void resourceIdTest() { + // TODO: test resourceId + } + + /** + * Test the property 'resourceScope' + */ + @Test + public void resourceScopeTest() { + // TODO: test resourceScope + } + + /** + * Test the property 'resourceActions' + */ + @Test + public void resourceActionsTest() { + // TODO: test resourceActions + } + + /** + * Test the property 'matchAllActions' + */ + @Test + public void matchAllActionsTest() { + // TODO: test matchAllActions + } + +} diff --git a/src/test/java/com/idmesh/model/EmptyObject11Test.java b/src/test/java/com/idmesh/model/EmptyObject11Test.java new file mode 100644 index 0000000..547262c --- /dev/null +++ b/src/test/java/com/idmesh/model/EmptyObject11Test.java @@ -0,0 +1,48 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EmptyObject11 + */ +public class EmptyObject11Test { + private final EmptyObject11 model = new EmptyObject11(); + + /** + * Model tests for EmptyObject11 + */ + @Test + public void testEmptyObject11() { + // TODO: test EmptyObject11 + } + + /** + * Test the property 'memberId' + */ + @Test + public void memberIdTest() { + // TODO: test memberId + } + +} diff --git a/src/test/java/com/idmesh/model/EmptyObject12ResourceActionsInnerTest.java b/src/test/java/com/idmesh/model/EmptyObject12ResourceActionsInnerTest.java new file mode 100644 index 0000000..f5e67d6 --- /dev/null +++ b/src/test/java/com/idmesh/model/EmptyObject12ResourceActionsInnerTest.java @@ -0,0 +1,57 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EmptyObject12ResourceActionsInner + */ +public class EmptyObject12ResourceActionsInnerTest { + private final EmptyObject12ResourceActionsInner model = new EmptyObject12ResourceActionsInner(); + + /** + * Model tests for EmptyObject12ResourceActionsInner + */ + @Test + public void testEmptyObject12ResourceActionsInner() { + // TODO: test EmptyObject12ResourceActionsInner + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + +} diff --git a/src/test/java/com/idmesh/model/EmptyObject12Test.java b/src/test/java/com/idmesh/model/EmptyObject12Test.java new file mode 100644 index 0000000..1a3a451 --- /dev/null +++ b/src/test/java/com/idmesh/model/EmptyObject12Test.java @@ -0,0 +1,76 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.EmptyObject12ResourceActionsInner; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EmptyObject12 + */ +public class EmptyObject12Test { + private final EmptyObject12 model = new EmptyObject12(); + + /** + * Model tests for EmptyObject12 + */ + @Test + public void testEmptyObject12() { + // TODO: test EmptyObject12 + } + + /** + * Test the property 'resourceId' + */ + @Test + public void resourceIdTest() { + // TODO: test resourceId + } + + /** + * Test the property 'resourceScope' + */ + @Test + public void resourceScopeTest() { + // TODO: test resourceScope + } + + /** + * Test the property 'resourceActions' + */ + @Test + public void resourceActionsTest() { + // TODO: test resourceActions + } + + /** + * Test the property 'matchAllActions' + */ + @Test + public void matchAllActionsTest() { + // TODO: test matchAllActions + } + +} diff --git a/src/test/java/com/idmesh/model/EmptyObject13Test.java b/src/test/java/com/idmesh/model/EmptyObject13Test.java new file mode 100644 index 0000000..fe21c34 --- /dev/null +++ b/src/test/java/com/idmesh/model/EmptyObject13Test.java @@ -0,0 +1,48 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EmptyObject13 + */ +public class EmptyObject13Test { + private final EmptyObject13 model = new EmptyObject13(); + + /** + * Model tests for EmptyObject13 + */ + @Test + public void testEmptyObject13() { + // TODO: test EmptyObject13 + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/com/idmesh/model/EmptyObject1Test.java b/src/test/java/com/idmesh/model/EmptyObject1Test.java new file mode 100644 index 0000000..033db20 --- /dev/null +++ b/src/test/java/com/idmesh/model/EmptyObject1Test.java @@ -0,0 +1,48 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EmptyObject1 + */ +public class EmptyObject1Test { + private final EmptyObject1 model = new EmptyObject1(); + + /** + * Model tests for EmptyObject1 + */ + @Test + public void testEmptyObject1() { + // TODO: test EmptyObject1 + } + + /** + * Test the property 'configContent' + */ + @Test + public void configContentTest() { + // TODO: test configContent + } + +} diff --git a/src/test/java/com/idmesh/model/EmptyObject2Test.java b/src/test/java/com/idmesh/model/EmptyObject2Test.java new file mode 100644 index 0000000..2af586e --- /dev/null +++ b/src/test/java/com/idmesh/model/EmptyObject2Test.java @@ -0,0 +1,60 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.AuthRuleArg; +import com.idmesh.model.IdentityObj; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EmptyObject2 + */ +public class EmptyObject2Test { + private final EmptyObject2 model = new EmptyObject2(); + + /** + * Model tests for EmptyObject2 + */ + @Test + public void testEmptyObject2() { + // TODO: test EmptyObject2 + } + + /** + * Test the property 'identities' + */ + @Test + public void identitiesTest() { + // TODO: test identities + } + + /** + * Test the property 'rules' + */ + @Test + public void rulesTest() { + // TODO: test rules + } + +} diff --git a/src/test/java/com/idmesh/model/EmptyObject3ActionsInnerTest.java b/src/test/java/com/idmesh/model/EmptyObject3ActionsInnerTest.java new file mode 100644 index 0000000..953f06a --- /dev/null +++ b/src/test/java/com/idmesh/model/EmptyObject3ActionsInnerTest.java @@ -0,0 +1,64 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EmptyObject3ActionsInner + */ +public class EmptyObject3ActionsInnerTest { + private final EmptyObject3ActionsInner model = new EmptyObject3ActionsInner(); + + /** + * Model tests for EmptyObject3ActionsInner + */ + @Test + public void testEmptyObject3ActionsInner() { + // TODO: test EmptyObject3ActionsInner + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + +} diff --git a/src/test/java/com/idmesh/model/EmptyObject3Test.java b/src/test/java/com/idmesh/model/EmptyObject3Test.java new file mode 100644 index 0000000..f8227a9 --- /dev/null +++ b/src/test/java/com/idmesh/model/EmptyObject3Test.java @@ -0,0 +1,67 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.EmptyObject3ActionsInner; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EmptyObject3 + */ +public class EmptyObject3Test { + private final EmptyObject3 model = new EmptyObject3(); + + /** + * Model tests for EmptyObject3 + */ + @Test + public void testEmptyObject3() { + // TODO: test EmptyObject3 + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'uri' + */ + @Test + public void uriTest() { + // TODO: test uri + } + + /** + * Test the property 'actions' + */ + @Test + public void actionsTest() { + // TODO: test actions + } + +} diff --git a/src/test/java/com/idmesh/model/EmptyObject4ApplicationTest.java b/src/test/java/com/idmesh/model/EmptyObject4ApplicationTest.java new file mode 100644 index 0000000..d573b2c --- /dev/null +++ b/src/test/java/com/idmesh/model/EmptyObject4ApplicationTest.java @@ -0,0 +1,48 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EmptyObject4Application + */ +public class EmptyObject4ApplicationTest { + private final EmptyObject4Application model = new EmptyObject4Application(); + + /** + * Model tests for EmptyObject4Application + */ + @Test + public void testEmptyObject4Application() { + // TODO: test EmptyObject4Application + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/com/idmesh/model/EmptyObject4ResourceSetTest.java b/src/test/java/com/idmesh/model/EmptyObject4ResourceSetTest.java new file mode 100644 index 0000000..91bef02 --- /dev/null +++ b/src/test/java/com/idmesh/model/EmptyObject4ResourceSetTest.java @@ -0,0 +1,48 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EmptyObject4ResourceSet + */ +public class EmptyObject4ResourceSetTest { + private final EmptyObject4ResourceSet model = new EmptyObject4ResourceSet(); + + /** + * Model tests for EmptyObject4ResourceSet + */ + @Test + public void testEmptyObject4ResourceSet() { + // TODO: test EmptyObject4ResourceSet + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/com/idmesh/model/EmptyObject4ResourceTest.java b/src/test/java/com/idmesh/model/EmptyObject4ResourceTest.java new file mode 100644 index 0000000..0a20107 --- /dev/null +++ b/src/test/java/com/idmesh/model/EmptyObject4ResourceTest.java @@ -0,0 +1,99 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EmptyObject4Resource + */ +public class EmptyObject4ResourceTest { + private final EmptyObject4Resource model = new EmptyObject4Resource(); + + /** + * Model tests for EmptyObject4Resource + */ + @Test + public void testEmptyObject4Resource() { + // TODO: test EmptyObject4Resource + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'scope' + */ + @Test + public void scopeTest() { + // TODO: test scope + } + + /** + * Test the property 'actions' + */ + @Test + public void actionsTest() { + // TODO: test actions + } + + /** + * Test the property 'matchAllActions' + */ + @Test + public void matchAllActionsTest() { + // TODO: test matchAllActions + } + + /** + * Test the property 'matchAllResources' + */ + @Test + public void matchAllResourcesTest() { + // TODO: test matchAllResources + } + + /** + * Test the property 'applicationId' + */ + @Test + public void applicationIdTest() { + // TODO: test applicationId + } + + /** + * Test the property 'applicationName' + */ + @Test + public void applicationNameTest() { + // TODO: test applicationName + } + +} diff --git a/src/test/java/com/idmesh/model/EmptyObject4Test.java b/src/test/java/com/idmesh/model/EmptyObject4Test.java new file mode 100644 index 0000000..04556c9 --- /dev/null +++ b/src/test/java/com/idmesh/model/EmptyObject4Test.java @@ -0,0 +1,76 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.EmptyObject4Application; +import com.idmesh.model.EmptyObject4Resource; +import com.idmesh.model.EmptyObject4ResourceSet; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EmptyObject4 + */ +public class EmptyObject4Test { + private final EmptyObject4 model = new EmptyObject4(); + + /** + * Model tests for EmptyObject4 + */ + @Test + public void testEmptyObject4() { + // TODO: test EmptyObject4 + } + + /** + * Test the property 'resource' + */ + @Test + public void resourceTest() { + // TODO: test resource + } + + /** + * Test the property 'resourceSet' + */ + @Test + public void resourceSetTest() { + // TODO: test resourceSet + } + + /** + * Test the property 'application' + */ + @Test + public void applicationTest() { + // TODO: test application + } + + /** + * Test the property 'affect' + */ + @Test + public void affectTest() { + // TODO: test affect + } + +} diff --git a/src/test/java/com/idmesh/model/EmptyObject5ActionsInnerTest.java b/src/test/java/com/idmesh/model/EmptyObject5ActionsInnerTest.java new file mode 100644 index 0000000..8a31464 --- /dev/null +++ b/src/test/java/com/idmesh/model/EmptyObject5ActionsInnerTest.java @@ -0,0 +1,56 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EmptyObject5ActionsInner + */ +public class EmptyObject5ActionsInnerTest { + private final EmptyObject5ActionsInner model = new EmptyObject5ActionsInner(); + + /** + * Model tests for EmptyObject5ActionsInner + */ + @Test + public void testEmptyObject5ActionsInner() { + // TODO: test EmptyObject5ActionsInner + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + +} diff --git a/src/test/java/com/idmesh/model/EmptyObject5Test.java b/src/test/java/com/idmesh/model/EmptyObject5Test.java new file mode 100644 index 0000000..f4b9a49 --- /dev/null +++ b/src/test/java/com/idmesh/model/EmptyObject5Test.java @@ -0,0 +1,92 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.EmptyObject5ActionsInner; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EmptyObject5 + */ +public class EmptyObject5Test { + private final EmptyObject5 model = new EmptyObject5(); + + /** + * Model tests for EmptyObject5 + */ + @Test + public void testEmptyObject5() { + // TODO: test EmptyObject5 + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'applicationId' + */ + @Test + public void applicationIdTest() { + // TODO: test applicationId + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'uri' + */ + @Test + public void uriTest() { + // TODO: test uri + } + + /** + * Test the property 'actions' + */ + @Test + public void actionsTest() { + // TODO: test actions + } + +} diff --git a/src/test/java/com/idmesh/model/EmptyObject6Test.java b/src/test/java/com/idmesh/model/EmptyObject6Test.java new file mode 100644 index 0000000..65d991f --- /dev/null +++ b/src/test/java/com/idmesh/model/EmptyObject6Test.java @@ -0,0 +1,48 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EmptyObject6 + */ +public class EmptyObject6Test { + private final EmptyObject6 model = new EmptyObject6(); + + /** + * Model tests for EmptyObject6 + */ + @Test + public void testEmptyObject6() { + // TODO: test EmptyObject6 + } + + /** + * Test the property 'resourceId' + */ + @Test + public void resourceIdTest() { + // TODO: test resourceId + } + +} diff --git a/src/test/java/com/idmesh/model/EmptyObject7Test.java b/src/test/java/com/idmesh/model/EmptyObject7Test.java new file mode 100644 index 0000000..202a638 --- /dev/null +++ b/src/test/java/com/idmesh/model/EmptyObject7Test.java @@ -0,0 +1,56 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EmptyObject7 + */ +public class EmptyObject7Test { + private final EmptyObject7 model = new EmptyObject7(); + + /** + * Model tests for EmptyObject7 + */ + @Test + public void testEmptyObject7() { + // TODO: test EmptyObject7 + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + +} diff --git a/src/test/java/com/idmesh/model/EmptyObject8Test.java b/src/test/java/com/idmesh/model/EmptyObject8Test.java new file mode 100644 index 0000000..d73056c --- /dev/null +++ b/src/test/java/com/idmesh/model/EmptyObject8Test.java @@ -0,0 +1,64 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EmptyObject8 + */ +public class EmptyObject8Test { + private final EmptyObject8 model = new EmptyObject8(); + + /** + * Model tests for EmptyObject8 + */ + @Test + public void testEmptyObject8() { + // TODO: test EmptyObject8 + } + + /** + * Test the property 'applicationId' + */ + @Test + public void applicationIdTest() { + // TODO: test applicationId + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + +} diff --git a/src/test/java/com/idmesh/model/EmptyObject9Test.java b/src/test/java/com/idmesh/model/EmptyObject9Test.java new file mode 100644 index 0000000..f1d51b1 --- /dev/null +++ b/src/test/java/com/idmesh/model/EmptyObject9Test.java @@ -0,0 +1,49 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EmptyObject9 + */ +public class EmptyObject9Test { + private final EmptyObject9 model = new EmptyObject9(); + + /** + * Model tests for EmptyObject9 + */ + @Test + public void testEmptyObject9() { + // TODO: test EmptyObject9 + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + +} diff --git a/src/test/java/com/idmesh/model/EmptyObjectTest.java b/src/test/java/com/idmesh/model/EmptyObjectTest.java new file mode 100644 index 0000000..6e94239 --- /dev/null +++ b/src/test/java/com/idmesh/model/EmptyObjectTest.java @@ -0,0 +1,48 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for EmptyObject + */ +public class EmptyObjectTest { + private final EmptyObject model = new EmptyObject(); + + /** + * Model tests for EmptyObject + */ + @Test + public void testEmptyObject() { + // TODO: test EmptyObject + } + + /** + * Test the property 'configId' + */ + @Test + public void configIdTest() { + // TODO: test configId + } + +} diff --git a/src/test/java/com/idmesh/model/Enable200ResponseTest.java b/src/test/java/com/idmesh/model/Enable200ResponseTest.java new file mode 100644 index 0000000..227a3eb --- /dev/null +++ b/src/test/java/com/idmesh/model/Enable200ResponseTest.java @@ -0,0 +1,57 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Enable200Response + */ +public class Enable200ResponseTest { + private final Enable200Response model = new Enable200Response(); + + /** + * Model tests for Enable200Response + */ + @Test + public void testEnable200Response() { + // TODO: test Enable200Response + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/idmesh/model/Get200ResponseTest.java b/src/test/java/com/idmesh/model/Get200ResponseTest.java new file mode 100644 index 0000000..f65961b --- /dev/null +++ b/src/test/java/com/idmesh/model/Get200ResponseTest.java @@ -0,0 +1,265 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Get200Response + */ +public class Get200ResponseTest { + private final Get200Response model = new Get200Response(); + + /** + * Model tests for Get200Response + */ + @Test + public void testGet200Response() { + // TODO: test Get200Response + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'password' + */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** + * Test the property 'displayName' + */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** + * Test the property 'firstname' + */ + @Test + public void firstnameTest() { + // TODO: test firstname + } + + /** + * Test the property 'lastname' + */ + @Test + public void lastnameTest() { + // TODO: test lastname + } + + /** + * Test the property 'realname' + */ + @Test + public void realnameTest() { + // TODO: test realname + } + + /** + * Test the property 'pinyin' + */ + @Test + public void pinyinTest() { + // TODO: test pinyin + } + + /** + * Test the property 'nickname' + */ + @Test + public void nicknameTest() { + // TODO: test nickname + } + + /** + * Test the property 'userType' + */ + @Test + public void userTypeTest() { + // TODO: test userType + } + + /** + * Test the property 'mobile' + */ + @Test + public void mobileTest() { + // TODO: test mobile + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'gender' + */ + @Test + public void genderTest() { + // TODO: test gender + } + + /** + * Test the property 'certType' + */ + @Test + public void certTypeTest() { + // TODO: test certType + } + + /** + * Test the property 'certNumber' + */ + @Test + public void certNumberTest() { + // TODO: test certNumber + } + + /** + * Test the property 'region' + */ + @Test + public void regionTest() { + // TODO: test region + } + + /** + * Test the property 'workTime' + */ + @Test + public void workTimeTest() { + // TODO: test workTime + } + + /** + * Test the property 'workTitle' + */ + @Test + public void workTitleTest() { + // TODO: test workTitle + } + + /** + * Test the property 'extProp' + */ + @Test + public void extPropTest() { + // TODO: test extProp + } + + /** + * Test the property 'arn' + */ + @Test + public void arnTest() { + // TODO: test arn + } + + /** + * Test the property 'idProviderConnection' + */ + @Test + public void idProviderConnectionTest() { + // TODO: test idProviderConnection + } + + /** + * Test the property 'developerId' + */ + @Test + public void developerIdTest() { + // TODO: test developerId + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'lastLoginIpaddr' + */ + @Test + public void lastLoginIpaddrTest() { + // TODO: test lastLoginIpaddr + } + + /** + * Test the property 'lastLoginTime' + */ + @Test + public void lastLoginTimeTest() { + // TODO: test lastLoginTime + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/src/test/java/com/idmesh/model/Get400ResponseTest.java b/src/test/java/com/idmesh/model/Get400ResponseTest.java new file mode 100644 index 0000000..5169967 --- /dev/null +++ b/src/test/java/com/idmesh/model/Get400ResponseTest.java @@ -0,0 +1,64 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Get400Response + */ +public class Get400ResponseTest { + private final Get400Response model = new Get400Response(); + + /** + * Model tests for Get400Response + */ + @Test + public void testGet400Response() { + // TODO: test Get400Response + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'errno' + */ + @Test + public void errnoTest() { + // TODO: test errno + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + +} diff --git a/src/test/java/com/idmesh/model/GetAccountsByApp200ResponseTest.java b/src/test/java/com/idmesh/model/GetAccountsByApp200ResponseTest.java new file mode 100644 index 0000000..64f05e7 --- /dev/null +++ b/src/test/java/com/idmesh/model/GetAccountsByApp200ResponseTest.java @@ -0,0 +1,60 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.AppSubAccount; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetAccountsByApp200Response + */ +public class GetAccountsByApp200ResponseTest { + private final GetAccountsByApp200Response model = new GetAccountsByApp200Response(); + + /** + * Model tests for GetAccountsByApp200Response + */ + @Test + public void testGetAccountsByApp200Response() { + // TODO: test GetAccountsByApp200Response + } + + /** + * Test the property 'records' + */ + @Test + public void recordsTest() { + // TODO: test records + } + + /** + * Test the property 'total' + */ + @Test + public void totalTest() { + // TODO: test total + } + +} diff --git a/src/test/java/com/idmesh/model/GetAuthUnits200ResponseTest.java b/src/test/java/com/idmesh/model/GetAuthUnits200ResponseTest.java new file mode 100644 index 0000000..f1af51e --- /dev/null +++ b/src/test/java/com/idmesh/model/GetAuthUnits200ResponseTest.java @@ -0,0 +1,60 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.AuthUnit; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetAuthUnits200Response + */ +public class GetAuthUnits200ResponseTest { + private final GetAuthUnits200Response model = new GetAuthUnits200Response(); + + /** + * Model tests for GetAuthUnits200Response + */ + @Test + public void testGetAuthUnits200Response() { + // TODO: test GetAuthUnits200Response + } + + /** + * Test the property 'totalNum' + */ + @Test + public void totalNumTest() { + // TODO: test totalNum + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/idmesh/model/GetConfig200ResponseMfaConfigTest.java b/src/test/java/com/idmesh/model/GetConfig200ResponseMfaConfigTest.java new file mode 100644 index 0000000..62a3842 --- /dev/null +++ b/src/test/java/com/idmesh/model/GetConfig200ResponseMfaConfigTest.java @@ -0,0 +1,64 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetConfig200ResponseMfaConfig + */ +public class GetConfig200ResponseMfaConfigTest { + private final GetConfig200ResponseMfaConfig model = new GetConfig200ResponseMfaConfig(); + + /** + * Model tests for GetConfig200ResponseMfaConfig + */ + @Test + public void testGetConfig200ResponseMfaConfig() { + // TODO: test GetConfig200ResponseMfaConfig + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'providerType' + */ + @Test + public void providerTypeTest() { + // TODO: test providerType + } + + /** + * Test the property 'configId' + */ + @Test + public void configIdTest() { + // TODO: test configId + } + +} diff --git a/src/test/java/com/idmesh/model/GetConfig200ResponseTest.java b/src/test/java/com/idmesh/model/GetConfig200ResponseTest.java new file mode 100644 index 0000000..64030d6 --- /dev/null +++ b/src/test/java/com/idmesh/model/GetConfig200ResponseTest.java @@ -0,0 +1,161 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.GetConfig200ResponseMfaConfig; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetConfig200Response + */ +public class GetConfig200ResponseTest { + private final GetConfig200Response model = new GetConfig200Response(); + + /** + * Model tests for GetConfig200Response + */ + @Test + public void testGetConfig200Response() { + // TODO: test GetConfig200Response + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'appId' + */ + @Test + public void appIdTest() { + // TODO: test appId + } + + /** + * Test the property 'allowedLoginMethod' + */ + @Test + public void allowedLoginMethodTest() { + // TODO: test allowedLoginMethod + } + + /** + * Test the property 'defaultLoginMethod' + */ + @Test + public void defaultLoginMethodTest() { + // TODO: test defaultLoginMethod + } + + /** + * Test the property 'allowedRegMethod' + */ + @Test + public void allowedRegMethodTest() { + // TODO: test allowedRegMethod + } + + /** + * Test the property 'defaultRegMethod' + */ + @Test + public void defaultRegMethodTest() { + // TODO: test defaultRegMethod + } + + /** + * Test the property 'accessPolicy' + */ + @Test + public void accessPolicyTest() { + // TODO: test accessPolicy + } + + /** + * Test the property 'regPolicy' + */ + @Test + public void regPolicyTest() { + // TODO: test regPolicy + } + + /** + * Test the property 'allowedIdProvider' + */ + @Test + public void allowedIdProviderTest() { + // TODO: test allowedIdProvider + } + + /** + * Test the property 'ssoEnabled' + */ + @Test + public void ssoEnabledTest() { + // TODO: test ssoEnabled + } + + /** + * Test the property 'mfaEnabled' + */ + @Test + public void mfaEnabledTest() { + // TODO: test mfaEnabled + } + + /** + * Test the property 'mfaConfig' + */ + @Test + public void mfaConfigTest() { + // TODO: test mfaConfig + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/src/test/java/com/idmesh/model/GetMembers200ResponseInnerTest.java b/src/test/java/com/idmesh/model/GetMembers200ResponseInnerTest.java new file mode 100644 index 0000000..0fc3d58 --- /dev/null +++ b/src/test/java/com/idmesh/model/GetMembers200ResponseInnerTest.java @@ -0,0 +1,146 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.TreeNode; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetMembers200ResponseInner + */ +public class GetMembers200ResponseInnerTest { + private final GetMembers200ResponseInner model = new GetMembers200ResponseInner(); + + /** + * Model tests for GetMembers200ResponseInner + */ + @Test + public void testGetMembers200ResponseInner() { + // TODO: test GetMembers200ResponseInner + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'nodeId' + */ + @Test + public void nodeIdTest() { + // TODO: test nodeId + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + + /** + * Test the property 'path' + */ + @Test + public void pathTest() { + // TODO: test path + } + + /** + * Test the property 'displayName' + */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'relationType' + */ + @Test + public void relationTypeTest() { + // TODO: test relationType + } + + /** + * Test the property 'relationData' + */ + @Test + public void relationDataTest() { + // TODO: test relationData + } + + /** + * Test the property 'isDefault' + */ + @Test + public void isDefaultTest() { + // TODO: test isDefault + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'treeNode' + */ + @Test + public void treeNodeTest() { + // TODO: test treeNode + } + +} diff --git a/src/test/java/com/idmesh/model/GetNodeMembers200ResponseDataInnerNodeInfoInnerTest.java b/src/test/java/com/idmesh/model/GetNodeMembers200ResponseDataInnerNodeInfoInnerTest.java new file mode 100644 index 0000000..1d6e8a1 --- /dev/null +++ b/src/test/java/com/idmesh/model/GetNodeMembers200ResponseDataInnerNodeInfoInnerTest.java @@ -0,0 +1,137 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetNodeMembers200ResponseDataInnerNodeInfoInner + */ +public class GetNodeMembers200ResponseDataInnerNodeInfoInnerTest { + private final GetNodeMembers200ResponseDataInnerNodeInfoInner model = new GetNodeMembers200ResponseDataInnerNodeInfoInner(); + + /** + * Model tests for GetNodeMembers200ResponseDataInnerNodeInfoInner + */ + @Test + public void testGetNodeMembers200ResponseDataInnerNodeInfoInner() { + // TODO: test GetNodeMembers200ResponseDataInnerNodeInfoInner + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'nodeId' + */ + @Test + public void nodeIdTest() { + // TODO: test nodeId + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + + /** + * Test the property 'path' + */ + @Test + public void pathTest() { + // TODO: test path + } + + /** + * Test the property 'displayName' + */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'relationType' + */ + @Test + public void relationTypeTest() { + // TODO: test relationType + } + + /** + * Test the property 'relationData' + */ + @Test + public void relationDataTest() { + // TODO: test relationData + } + + /** + * Test the property 'isDefault' + */ + @Test + public void isDefaultTest() { + // TODO: test isDefault + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/src/test/java/com/idmesh/model/GetNodeMembers200ResponseDataInnerTest.java b/src/test/java/com/idmesh/model/GetNodeMembers200ResponseDataInnerTest.java new file mode 100644 index 0000000..ed32c88 --- /dev/null +++ b/src/test/java/com/idmesh/model/GetNodeMembers200ResponseDataInnerTest.java @@ -0,0 +1,75 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.GetNodeMembers200ResponseDataInnerNodeInfoInner; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetNodeMembers200ResponseDataInner + */ +public class GetNodeMembers200ResponseDataInnerTest { + private final GetNodeMembers200ResponseDataInner model = new GetNodeMembers200ResponseDataInner(); + + /** + * Model tests for GetNodeMembers200ResponseDataInner + */ + @Test + public void testGetNodeMembers200ResponseDataInner() { + // TODO: test GetNodeMembers200ResponseDataInner + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'displayName' + */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** + * Test the property 'nodeInfo' + */ + @Test + public void nodeInfoTest() { + // TODO: test nodeInfo + } + +} diff --git a/src/test/java/com/idmesh/model/GetNodeMembers200ResponseTest.java b/src/test/java/com/idmesh/model/GetNodeMembers200ResponseTest.java new file mode 100644 index 0000000..e6fc68f --- /dev/null +++ b/src/test/java/com/idmesh/model/GetNodeMembers200ResponseTest.java @@ -0,0 +1,67 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.GetNodeMembers200ResponseDataInner; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetNodeMembers200Response + */ +public class GetNodeMembers200ResponseTest { + private final GetNodeMembers200Response model = new GetNodeMembers200Response(); + + /** + * Model tests for GetNodeMembers200Response + */ + @Test + public void testGetNodeMembers200Response() { + // TODO: test GetNodeMembers200Response + } + + /** + * Test the property 'totalNum' + */ + @Test + public void totalNumTest() { + // TODO: test totalNum + } + + /** + * Test the property 'currentPage' + */ + @Test + public void currentPageTest() { + // TODO: test currentPage + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/idmesh/model/GetOrganization200ResponseInnerTest.java b/src/test/java/com/idmesh/model/GetOrganization200ResponseInnerTest.java new file mode 100644 index 0000000..c15149f --- /dev/null +++ b/src/test/java/com/idmesh/model/GetOrganization200ResponseInnerTest.java @@ -0,0 +1,112 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetOrganization200ResponseInner + */ +public class GetOrganization200ResponseInnerTest { + private final GetOrganization200ResponseInner model = new GetOrganization200ResponseInner(); + + /** + * Model tests for GetOrganization200ResponseInner + */ + @Test + public void testGetOrganization200ResponseInner() { + // TODO: test GetOrganization200ResponseInner + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'objectDisplayName' + */ + @Test + public void objectDisplayNameTest() { + // TODO: test objectDisplayName + } + + /** + * Test the property 'objectType' + */ + @Test + public void objectTypeTest() { + // TODO: test objectType + } + + /** + * Test the property 'objectCode' + */ + @Test + public void objectCodeTest() { + // TODO: test objectCode + } + + /** + * Test the property 'objectProps' + */ + @Test + public void objectPropsTest() { + // TODO: test objectProps + } + + /** + * Test the property 'isDefault' + */ + @Test + public void isDefaultTest() { + // TODO: test isDefault + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + +} diff --git a/src/test/java/com/idmesh/model/GetOrganizations200ResponseInnerTest.java b/src/test/java/com/idmesh/model/GetOrganizations200ResponseInnerTest.java new file mode 100644 index 0000000..32369ef --- /dev/null +++ b/src/test/java/com/idmesh/model/GetOrganizations200ResponseInnerTest.java @@ -0,0 +1,112 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetOrganizations200ResponseInner + */ +public class GetOrganizations200ResponseInnerTest { + private final GetOrganizations200ResponseInner model = new GetOrganizations200ResponseInner(); + + /** + * Model tests for GetOrganizations200ResponseInner + */ + @Test + public void testGetOrganizations200ResponseInner() { + // TODO: test GetOrganizations200ResponseInner + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'objectDisplayName' + */ + @Test + public void objectDisplayNameTest() { + // TODO: test objectDisplayName + } + + /** + * Test the property 'objectType' + */ + @Test + public void objectTypeTest() { + // TODO: test objectType + } + + /** + * Test the property 'objectCode' + */ + @Test + public void objectCodeTest() { + // TODO: test objectCode + } + + /** + * Test the property 'objectProps' + */ + @Test + public void objectPropsTest() { + // TODO: test objectProps + } + + /** + * Test the property 'isDefault' + */ + @Test + public void isDefaultTest() { + // TODO: test isDefault + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + +} diff --git a/src/test/java/com/idmesh/model/GetPrivileges200ResponseTest.java b/src/test/java/com/idmesh/model/GetPrivileges200ResponseTest.java new file mode 100644 index 0000000..d4a1e70 --- /dev/null +++ b/src/test/java/com/idmesh/model/GetPrivileges200ResponseTest.java @@ -0,0 +1,68 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.Privilege; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetPrivileges200Response + */ +public class GetPrivileges200ResponseTest { + private final GetPrivileges200Response model = new GetPrivileges200Response(); + + /** + * Model tests for GetPrivileges200Response + */ + @Test + public void testGetPrivileges200Response() { + // TODO: test GetPrivileges200Response + } + + /** + * Test the property 'totalNum' + */ + @Test + public void totalNumTest() { + // TODO: test totalNum + } + + /** + * Test the property 'currentPage' + */ + @Test + public void currentPageTest() { + // TODO: test currentPage + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/idmesh/model/GetResource200ResponseTest.java b/src/test/java/com/idmesh/model/GetResource200ResponseTest.java new file mode 100644 index 0000000..385f145 --- /dev/null +++ b/src/test/java/com/idmesh/model/GetResource200ResponseTest.java @@ -0,0 +1,112 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetResource200Response + */ +public class GetResource200ResponseTest { + private final GetResource200Response model = new GetResource200Response(); + + /** + * Model tests for GetResource200Response + */ + @Test + public void testGetResource200Response() { + // TODO: test GetResource200Response + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'developerId' + */ + @Test + public void developerIdTest() { + // TODO: test developerId + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'applicationId' + */ + @Test + public void applicationIdTest() { + // TODO: test applicationId + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + +} diff --git a/src/test/java/com/idmesh/model/GetResourceMembers200ResponseTest.java b/src/test/java/com/idmesh/model/GetResourceMembers200ResponseTest.java new file mode 100644 index 0000000..19e8f9f --- /dev/null +++ b/src/test/java/com/idmesh/model/GetResourceMembers200ResponseTest.java @@ -0,0 +1,60 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.ResourceSetMember; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetResourceMembers200Response + */ +public class GetResourceMembers200ResponseTest { + private final GetResourceMembers200Response model = new GetResourceMembers200Response(); + + /** + * Model tests for GetResourceMembers200Response + */ + @Test + public void testGetResourceMembers200Response() { + // TODO: test GetResourceMembers200Response + } + + /** + * Test the property 'totalNum' + */ + @Test + public void totalNumTest() { + // TODO: test totalNum + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/idmesh/model/GetResourceSets200ResponseTest.java b/src/test/java/com/idmesh/model/GetResourceSets200ResponseTest.java new file mode 100644 index 0000000..a5d0e63 --- /dev/null +++ b/src/test/java/com/idmesh/model/GetResourceSets200ResponseTest.java @@ -0,0 +1,60 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.ResourceSet; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetResourceSets200Response + */ +public class GetResourceSets200ResponseTest { + private final GetResourceSets200Response model = new GetResourceSets200Response(); + + /** + * Model tests for GetResourceSets200Response + */ + @Test + public void testGetResourceSets200Response() { + // TODO: test GetResourceSets200Response + } + + /** + * Test the property 'totalNum' + */ + @Test + public void totalNumTest() { + // TODO: test totalNum + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/idmesh/model/GetResources200ResponseTest.java b/src/test/java/com/idmesh/model/GetResources200ResponseTest.java new file mode 100644 index 0000000..442737d --- /dev/null +++ b/src/test/java/com/idmesh/model/GetResources200ResponseTest.java @@ -0,0 +1,60 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.GetResource200Response; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetResources200Response + */ +public class GetResources200ResponseTest { + private final GetResources200Response model = new GetResources200Response(); + + /** + * Model tests for GetResources200Response + */ + @Test + public void testGetResources200Response() { + // TODO: test GetResources200Response + } + + /** + * Test the property 'totalNum' + */ + @Test + public void totalNumTest() { + // TODO: test totalNum + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/idmesh/model/GetStoredCredentials200ResponseTest.java b/src/test/java/com/idmesh/model/GetStoredCredentials200ResponseTest.java new file mode 100644 index 0000000..02f9e62 --- /dev/null +++ b/src/test/java/com/idmesh/model/GetStoredCredentials200ResponseTest.java @@ -0,0 +1,67 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.NullInner; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetStoredCredentials200Response + */ +public class GetStoredCredentials200ResponseTest { + private final GetStoredCredentials200Response model = new GetStoredCredentials200Response(); + + /** + * Model tests for GetStoredCredentials200Response + */ + @Test + public void testGetStoredCredentials200Response() { + // TODO: test GetStoredCredentials200Response + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'totalNum' + */ + @Test + public void totalNumTest() { + // TODO: test totalNum + } + + /** + * Test the property 'pageNum' + */ + @Test + public void pageNumTest() { + // TODO: test pageNum + } + +} diff --git a/src/test/java/com/idmesh/model/GetTemplate200ResponseDataInnerConfigPropTest.java b/src/test/java/com/idmesh/model/GetTemplate200ResponseDataInnerConfigPropTest.java new file mode 100644 index 0000000..2260b62 --- /dev/null +++ b/src/test/java/com/idmesh/model/GetTemplate200ResponseDataInnerConfigPropTest.java @@ -0,0 +1,148 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.CreateRequest1ConfigPropAccessPolicy; +import com.idmesh.model.CreateRequest1ConfigPropAllowedLoginMethod; +import com.idmesh.model.CreateRequest1ConfigPropAllowedSocialLoginProvider; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetTemplate200ResponseDataInnerConfigProp + */ +public class GetTemplate200ResponseDataInnerConfigPropTest { + private final GetTemplate200ResponseDataInnerConfigProp model = new GetTemplate200ResponseDataInnerConfigProp(); + + /** + * Model tests for GetTemplate200ResponseDataInnerConfigProp + */ + @Test + public void testGetTemplate200ResponseDataInnerConfigProp() { + // TODO: test GetTemplate200ResponseDataInnerConfigProp + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'mfaConfig' + */ + @Test + public void mfaConfigTest() { + // TODO: test mfaConfig + } + + /** + * Test the property 'regPolicy' + */ + @Test + public void regPolicyTest() { + // TODO: test regPolicy + } + + /** + * Test the property 'mfaEnabled' + */ + @Test + public void mfaEnabledTest() { + // TODO: test mfaEnabled + } + + /** + * Test the property 'ssoEnabled' + */ + @Test + public void ssoEnabledTest() { + // TODO: test ssoEnabled + } + + /** + * Test the property 'developerId' + */ + @Test + public void developerIdTest() { + // TODO: test developerId + } + + /** + * Test the property 'accessPolicy' + */ + @Test + public void accessPolicyTest() { + // TODO: test accessPolicy + } + + /** + * Test the property 'allowedRegMethod' + */ + @Test + public void allowedRegMethodTest() { + // TODO: test allowedRegMethod + } + + /** + * Test the property 'defaultRegMethod' + */ + @Test + public void defaultRegMethodTest() { + // TODO: test defaultRegMethod + } + + /** + * Test the property 'allowedLoginMethod' + */ + @Test + public void allowedLoginMethodTest() { + // TODO: test allowedLoginMethod + } + + /** + * Test the property 'defaultLoginMethod' + */ + @Test + public void defaultLoginMethodTest() { + // TODO: test defaultLoginMethod + } + + /** + * Test the property 'allowedIdProvider' + */ + @Test + public void allowedIdProviderTest() { + // TODO: test allowedIdProvider + } + +} diff --git a/src/test/java/com/idmesh/model/GetTemplate200ResponseDataInnerProtocolPropTest.java b/src/test/java/com/idmesh/model/GetTemplate200ResponseDataInnerProtocolPropTest.java new file mode 100644 index 0000000..92933a1 --- /dev/null +++ b/src/test/java/com/idmesh/model/GetTemplate200ResponseDataInnerProtocolPropTest.java @@ -0,0 +1,132 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.CreateRequest1ProtocolPropResponseAttrInner; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetTemplate200ResponseDataInnerProtocolProp + */ +public class GetTemplate200ResponseDataInnerProtocolPropTest { + private final GetTemplate200ResponseDataInnerProtocolProp model = new GetTemplate200ResponseDataInnerProtocolProp(); + + /** + * Model tests for GetTemplate200ResponseDataInnerProtocolProp + */ + @Test + public void testGetTemplate200ResponseDataInnerProtocolProp() { + // TODO: test GetTemplate200ResponseDataInnerProtocolProp + } + + /** + * Test the property 'acsUrl' + */ + @Test + public void acsUrlTest() { + // TODO: test acsUrl + } + + /** + * Test the property 'spEntity' + */ + @Test + public void spEntityTest() { + // TODO: test spEntity + } + + /** + * Test the property 'responseAttr' + */ + @Test + public void responseAttrTest() { + // TODO: test responseAttr + } + + /** + * Test the property 'digestAlgorithm' + */ + @Test + public void digestAlgorithmTest() { + // TODO: test digestAlgorithm + } + + /** + * Test the property 'lifetimeInSeconds' + */ + @Test + public void lifetimeInSecondsTest() { + // TODO: test lifetimeInSeconds + } + + /** + * Test the property 'signatureAlgorithm' + */ + @Test + public void signatureAlgorithmTest() { + // TODO: test signatureAlgorithm + } + + /** + * Test the property 'nameIdentifierFormat' + */ + @Test + public void nameIdentifierFormatTest() { + // TODO: test nameIdentifierFormat + } + + /** + * Test the property 'authnContextClassRef' + */ + @Test + public void authnContextClassRefTest() { + // TODO: test authnContextClassRef + } + + /** + * Test the property 'samlResponseSigningKey' + */ + @Test + public void samlResponseSigningKeyTest() { + // TODO: test samlResponseSigningKey + } + + /** + * Test the property 'samlResponseSigningCert' + */ + @Test + public void samlResponseSigningCertTest() { + // TODO: test samlResponseSigningCert + } + + /** + * Test the property 'samlResponseSigningCertFingerprint' + */ + @Test + public void samlResponseSigningCertFingerprintTest() { + // TODO: test samlResponseSigningCertFingerprint + } + +} diff --git a/src/test/java/com/idmesh/model/GetTemplate200ResponseDataInnerTest.java b/src/test/java/com/idmesh/model/GetTemplate200ResponseDataInnerTest.java new file mode 100644 index 0000000..49fec24 --- /dev/null +++ b/src/test/java/com/idmesh/model/GetTemplate200ResponseDataInnerTest.java @@ -0,0 +1,170 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.GetTemplate200ResponseDataInnerConfigProp; +import com.idmesh.model.GetTemplate200ResponseDataInnerProtocolProp; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetTemplate200ResponseDataInner + */ +public class GetTemplate200ResponseDataInnerTest { + private final GetTemplate200ResponseDataInner model = new GetTemplate200ResponseDataInner(); + + /** + * Model tests for GetTemplate200ResponseDataInner + */ + @Test + public void testGetTemplate200ResponseDataInner() { + // TODO: test GetTemplate200ResponseDataInner + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'category' + */ + @Test + public void categoryTest() { + // TODO: test category + } + + /** + * Test the property 'descr' + */ + @Test + public void descrTest() { + // TODO: test descr + } + + /** + * Test the property 'logo' + */ + @Test + public void logoTest() { + // TODO: test logo + } + + /** + * Test the property 'loginUrl' + */ + @Test + public void loginUrlTest() { + // TODO: test loginUrl + } + + /** + * Test the property 'redirectUrl' + */ + @Test + public void redirectUrlTest() { + // TODO: test redirectUrl + } + + /** + * Test the property 'logoutUrl' + */ + @Test + public void logoutUrlTest() { + // TODO: test logoutUrl + } + + /** + * Test the property 'subAccountPolicy' + */ + @Test + public void subAccountPolicyTest() { + // TODO: test subAccountPolicy + } + + /** + * Test the property 'prop' + */ + @Test + public void propTest() { + // TODO: test prop + } + + /** + * Test the property 'protocolProp' + */ + @Test + public void protocolPropTest() { + // TODO: test protocolProp + } + + /** + * Test the property 'configProp' + */ + @Test + public void configPropTest() { + // TODO: test configProp + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/src/test/java/com/idmesh/model/GetTemplate200ResponseTest.java b/src/test/java/com/idmesh/model/GetTemplate200ResponseTest.java new file mode 100644 index 0000000..9b3a713 --- /dev/null +++ b/src/test/java/com/idmesh/model/GetTemplate200ResponseTest.java @@ -0,0 +1,68 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.GetTemplate200ResponseDataInner; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for GetTemplate200Response + */ +public class GetTemplate200ResponseTest { + private final GetTemplate200Response model = new GetTemplate200Response(); + + /** + * Model tests for GetTemplate200Response + */ + @Test + public void testGetTemplate200Response() { + // TODO: test GetTemplate200Response + } + + /** + * Test the property 'currentPage' + */ + @Test + public void currentPageTest() { + // TODO: test currentPage + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'totalNum' + */ + @Test + public void totalNumTest() { + // TODO: test totalNum + } + +} diff --git a/src/test/java/com/idmesh/model/IdentityObjTest.java b/src/test/java/com/idmesh/model/IdentityObjTest.java new file mode 100644 index 0000000..43f4365 --- /dev/null +++ b/src/test/java/com/idmesh/model/IdentityObjTest.java @@ -0,0 +1,64 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for IdentityObj + */ +public class IdentityObjTest { + private final IdentityObj model = new IdentityObj(); + + /** + * Model tests for IdentityObj + */ + @Test + public void testIdentityObj() { + // TODO: test IdentityObj + } + + /** + * Test the property 'identityId' + */ + @Test + public void identityIdTest() { + // TODO: test identityId + } + + /** + * Test the property 'identityName' + */ + @Test + public void identityNameTest() { + // TODO: test identityName + } + + /** + * Test the property 'identityType' + */ + @Test + public void identityTypeTest() { + // TODO: test identityType + } + +} diff --git a/src/test/java/com/idmesh/model/InjectionTest.java b/src/test/java/com/idmesh/model/InjectionTest.java new file mode 100644 index 0000000..8140218 --- /dev/null +++ b/src/test/java/com/idmesh/model/InjectionTest.java @@ -0,0 +1,64 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Injection + */ +public class InjectionTest { + private final Injection model = new Injection(); + + /** + * Model tests for Injection + */ + @Test + public void testInjection() { + // TODO: test Injection + } + + /** + * Test the property 'key' + */ + @Test + public void keyTest() { + // TODO: test key + } + + /** + * Test the property 'alias' + */ + @Test + public void aliasTest() { + // TODO: test alias + } + + /** + * Test the property 'value' + */ + @Test + public void valueTest() { + // TODO: test value + } + +} diff --git a/src/test/java/com/idmesh/model/JobTest.java b/src/test/java/com/idmesh/model/JobTest.java new file mode 100644 index 0000000..e7faa6c --- /dev/null +++ b/src/test/java/com/idmesh/model/JobTest.java @@ -0,0 +1,144 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Job + */ +public class JobTest { + private final Job model = new Job(); + + /** + * Model tests for Job + */ + @Test + public void testJob() { + // TODO: test Job + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'cronJobId' + */ + @Test + public void cronJobIdTest() { + // TODO: test cronJobId + } + + /** + * Test the property 'cronJobKind' + */ + @Test + public void cronJobKindTest() { + // TODO: test cronJobKind + } + + /** + * Test the property 'cronJobName' + */ + @Test + public void cronJobNameTest() { + // TODO: test cronJobName + } + + /** + * Test the property 'namespace' + */ + @Test + public void namespaceTest() { + // TODO: test namespace + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'startTime' + */ + @Test + public void startTimeTest() { + // TODO: test startTime + } + + /** + * Test the property 'completionTime' + */ + @Test + public void completionTimeTest() { + // TODO: test completionTime + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'timeStarted' + */ + @Test + public void timeStartedTest() { + // TODO: test timeStarted + } + + /** + * Test the property 'timeCompleted' + */ + @Test + public void timeCompletedTest() { + // TODO: test timeCompleted + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + +} diff --git a/src/test/java/com/idmesh/model/List200Response1DataInnerAllowedProviderIdInnerTest.java b/src/test/java/com/idmesh/model/List200Response1DataInnerAllowedProviderIdInnerTest.java new file mode 100644 index 0000000..23deb6c --- /dev/null +++ b/src/test/java/com/idmesh/model/List200Response1DataInnerAllowedProviderIdInnerTest.java @@ -0,0 +1,64 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for List200Response1DataInnerAllowedProviderIdInner + */ +public class List200Response1DataInnerAllowedProviderIdInnerTest { + private final List200Response1DataInnerAllowedProviderIdInner model = new List200Response1DataInnerAllowedProviderIdInner(); + + /** + * Model tests for List200Response1DataInnerAllowedProviderIdInner + */ + @Test + public void testList200Response1DataInnerAllowedProviderIdInner() { + // TODO: test List200Response1DataInnerAllowedProviderIdInner + } + + /** + * Test the property 'configId' + */ + @Test + public void configIdTest() { + // TODO: test configId + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'providerType' + */ + @Test + public void providerTypeTest() { + // TODO: test providerType + } + +} diff --git a/src/test/java/com/idmesh/model/List200Response1DataInnerTest.java b/src/test/java/com/idmesh/model/List200Response1DataInnerTest.java new file mode 100644 index 0000000..e560e32 --- /dev/null +++ b/src/test/java/com/idmesh/model/List200Response1DataInnerTest.java @@ -0,0 +1,203 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.List200Response1DataInnerAllowedProviderIdInner; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for List200Response1DataInner + */ +public class List200Response1DataInnerTest { + private final List200Response1DataInner model = new List200Response1DataInner(); + + /** + * Model tests for List200Response1DataInner + */ + @Test + public void testList200Response1DataInner() { + // TODO: test List200Response1DataInner + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'developerId' + */ + @Test + public void developerIdTest() { + // TODO: test developerId + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'appId' + */ + @Test + public void appIdTest() { + // TODO: test appId + } + + /** + * Test the property 'category' + */ + @Test + public void categoryTest() { + // TODO: test category + } + + /** + * Test the property 'appSecret' + */ + @Test + public void appSecretTest() { + // TODO: test appSecret + } + + /** + * Test the property 'descr' + */ + @Test + public void descrTest() { + // TODO: test descr + } + + /** + * Test the property 'logo' + */ + @Test + public void logoTest() { + // TODO: test logo + } + + /** + * Test the property 'loginUrl' + */ + @Test + public void loginUrlTest() { + // TODO: test loginUrl + } + + /** + * Test the property 'domain' + */ + @Test + public void domainTest() { + // TODO: test domain + } + + /** + * Test the property 'redirectUrl' + */ + @Test + public void redirectUrlTest() { + // TODO: test redirectUrl + } + + /** + * Test the property 'logoutUrl' + */ + @Test + public void logoutUrlTest() { + // TODO: test logoutUrl + } + + /** + * Test the property 'subAccountPolicy' + */ + @Test + public void subAccountPolicyTest() { + // TODO: test subAccountPolicy + } + + /** + * Test the property 'prop' + */ + @Test + public void propTest() { + // TODO: test prop + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'allowedProviderId' + */ + @Test + public void allowedProviderIdTest() { + // TODO: test allowedProviderId + } + +} diff --git a/src/test/java/com/idmesh/model/List200Response1Test.java b/src/test/java/com/idmesh/model/List200Response1Test.java new file mode 100644 index 0000000..7830682 --- /dev/null +++ b/src/test/java/com/idmesh/model/List200Response1Test.java @@ -0,0 +1,68 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.List200Response1DataInner; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for List200Response1 + */ +public class List200Response1Test { + private final List200Response1 model = new List200Response1(); + + /** + * Model tests for List200Response1 + */ + @Test + public void testList200Response1() { + // TODO: test List200Response1 + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'totalNum' + */ + @Test + public void totalNumTest() { + // TODO: test totalNum + } + + /** + * Test the property 'currentPage' + */ + @Test + public void currentPageTest() { + // TODO: test currentPage + } + +} diff --git a/src/test/java/com/idmesh/model/List200ResponseDataInnerTest.java b/src/test/java/com/idmesh/model/List200ResponseDataInnerTest.java new file mode 100644 index 0000000..3ef5cfb --- /dev/null +++ b/src/test/java/com/idmesh/model/List200ResponseDataInnerTest.java @@ -0,0 +1,265 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for List200ResponseDataInner + */ +public class List200ResponseDataInnerTest { + private final List200ResponseDataInner model = new List200ResponseDataInner(); + + /** + * Model tests for List200ResponseDataInner + */ + @Test + public void testList200ResponseDataInner() { + // TODO: test List200ResponseDataInner + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'password' + */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** + * Test the property 'displayName' + */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** + * Test the property 'firstname' + */ + @Test + public void firstnameTest() { + // TODO: test firstname + } + + /** + * Test the property 'lastname' + */ + @Test + public void lastnameTest() { + // TODO: test lastname + } + + /** + * Test the property 'realname' + */ + @Test + public void realnameTest() { + // TODO: test realname + } + + /** + * Test the property 'pinyin' + */ + @Test + public void pinyinTest() { + // TODO: test pinyin + } + + /** + * Test the property 'nickname' + */ + @Test + public void nicknameTest() { + // TODO: test nickname + } + + /** + * Test the property 'userType' + */ + @Test + public void userTypeTest() { + // TODO: test userType + } + + /** + * Test the property 'mobile' + */ + @Test + public void mobileTest() { + // TODO: test mobile + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'gender' + */ + @Test + public void genderTest() { + // TODO: test gender + } + + /** + * Test the property 'certType' + */ + @Test + public void certTypeTest() { + // TODO: test certType + } + + /** + * Test the property 'certNumber' + */ + @Test + public void certNumberTest() { + // TODO: test certNumber + } + + /** + * Test the property 'region' + */ + @Test + public void regionTest() { + // TODO: test region + } + + /** + * Test the property 'workTime' + */ + @Test + public void workTimeTest() { + // TODO: test workTime + } + + /** + * Test the property 'workTitle' + */ + @Test + public void workTitleTest() { + // TODO: test workTitle + } + + /** + * Test the property 'extProp' + */ + @Test + public void extPropTest() { + // TODO: test extProp + } + + /** + * Test the property 'arn' + */ + @Test + public void arnTest() { + // TODO: test arn + } + + /** + * Test the property 'idProviderConnection' + */ + @Test + public void idProviderConnectionTest() { + // TODO: test idProviderConnection + } + + /** + * Test the property 'developerId' + */ + @Test + public void developerIdTest() { + // TODO: test developerId + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'lastLoginIpaddr' + */ + @Test + public void lastLoginIpaddrTest() { + // TODO: test lastLoginIpaddr + } + + /** + * Test the property 'lastLoginTime' + */ + @Test + public void lastLoginTimeTest() { + // TODO: test lastLoginTime + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/src/test/java/com/idmesh/model/List200ResponseTest.java b/src/test/java/com/idmesh/model/List200ResponseTest.java new file mode 100644 index 0000000..df7f72e --- /dev/null +++ b/src/test/java/com/idmesh/model/List200ResponseTest.java @@ -0,0 +1,68 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.List200ResponseDataInner; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for List200Response + */ +public class List200ResponseTest { + private final List200Response model = new List200Response(); + + /** + * Model tests for List200Response + */ + @Test + public void testList200Response() { + // TODO: test List200Response + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'totalNum' + */ + @Test + public void totalNumTest() { + // TODO: test totalNum + } + + /** + * Test the property 'pageNum' + */ + @Test + public void pageNumTest() { + // TODO: test pageNum + } + +} diff --git a/src/test/java/com/idmesh/model/MFATest.java b/src/test/java/com/idmesh/model/MFATest.java new file mode 100644 index 0000000..72af238 --- /dev/null +++ b/src/test/java/com/idmesh/model/MFATest.java @@ -0,0 +1,74 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for MFA + */ +public class MFATest { + private final MFA model = new MFA(); + + /** + * Model tests for MFA + */ + @Test + public void testMFA() { + // TODO: test MFA + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'providerType' + */ + @Test + public void providerTypeTest() { + // TODO: test providerType + } + + /** + * Test the property 'configId' + */ + @Test + public void configIdTest() { + // TODO: test configId + } + + /** + * Test the property 'scenarios' + */ + @Test + public void scenariosTest() { + // TODO: test scenarios + } + +} diff --git a/src/test/java/com/idmesh/model/ModelObjectTest.java b/src/test/java/com/idmesh/model/ModelObjectTest.java new file mode 100644 index 0000000..3a539cb --- /dev/null +++ b/src/test/java/com/idmesh/model/ModelObjectTest.java @@ -0,0 +1,80 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ModelObject + */ +public class ModelObjectTest { + private final ModelObject model = new ModelObject(); + + /** + * Model tests for ModelObject + */ + @Test + public void testModelObject() { + // TODO: test ModelObject + } + + /** + * Test the property 'bucket' + */ + @Test + public void bucketTest() { + // TODO: test bucket + } + + /** + * Test the property 'key' + */ + @Test + public void keyTest() { + // TODO: test key + } + + /** + * Test the property 'value' + */ + @Test + public void valueTest() { + // TODO: test value + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + +} diff --git a/src/test/java/com/idmesh/model/Modify200Response1Test.java b/src/test/java/com/idmesh/model/Modify200Response1Test.java new file mode 100644 index 0000000..f060f8c --- /dev/null +++ b/src/test/java/com/idmesh/model/Modify200Response1Test.java @@ -0,0 +1,57 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Modify200Response1 + */ +public class Modify200Response1Test { + private final Modify200Response1 model = new Modify200Response1(); + + /** + * Model tests for Modify200Response1 + */ + @Test + public void testModify200Response1() { + // TODO: test Modify200Response1 + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/idmesh/model/Modify200ResponseTest.java b/src/test/java/com/idmesh/model/Modify200ResponseTest.java new file mode 100644 index 0000000..04d777b --- /dev/null +++ b/src/test/java/com/idmesh/model/Modify200ResponseTest.java @@ -0,0 +1,73 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Modify200Response + */ +public class Modify200ResponseTest { + private final Modify200Response model = new Modify200Response(); + + /** + * Model tests for Modify200Response + */ + @Test + public void testModify200Response() { + // TODO: test Modify200Response + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'errno' + */ + @Test + public void errnoTest() { + // TODO: test errno + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/com/idmesh/model/ModifyAccountRequestTest.java b/src/test/java/com/idmesh/model/ModifyAccountRequestTest.java new file mode 100644 index 0000000..9cdd828 --- /dev/null +++ b/src/test/java/com/idmesh/model/ModifyAccountRequestTest.java @@ -0,0 +1,112 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ModifyAccountRequest + */ +public class ModifyAccountRequestTest { + private final ModifyAccountRequest model = new ModifyAccountRequest(); + + /** + * Model tests for ModifyAccountRequest + */ + @Test + public void testModifyAccountRequest() { + // TODO: test ModifyAccountRequest + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + + /** + * Test the property 'appId' + */ + @Test + public void appIdTest() { + // TODO: test appId + } + + /** + * Test the property 'accName' + */ + @Test + public void accNameTest() { + // TODO: test accName + } + + /** + * Test the property 'accNameDisplayed' + */ + @Test + public void accNameDisplayedTest() { + // TODO: test accNameDisplayed + } + + /** + * Test the property 'accSource' + */ + @Test + public void accSourceTest() { + // TODO: test accSource + } + + /** + * Test the property 'accPassword' + */ + @Test + public void accPasswordTest() { + // TODO: test accPassword + } + + /** + * Test the property 'accStatus' + */ + @Test + public void accStatusTest() { + // TODO: test accStatus + } + + /** + * Test the property 'sysExtProps' + */ + @Test + public void sysExtPropsTest() { + // TODO: test sysExtProps + } + + /** + * Test the property 'freeExtProps' + */ + @Test + public void freeExtPropsTest() { + // TODO: test freeExtProps + } + +} diff --git a/src/test/java/com/idmesh/model/ModifyConfigRequestTest.java b/src/test/java/com/idmesh/model/ModifyConfigRequestTest.java new file mode 100644 index 0000000..488aeef --- /dev/null +++ b/src/test/java/com/idmesh/model/ModifyConfigRequestTest.java @@ -0,0 +1,98 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ModifyConfigRequest + */ +public class ModifyConfigRequestTest { + private final ModifyConfigRequest model = new ModifyConfigRequest(); + + /** + * Model tests for ModifyConfigRequest + */ + @Test + public void testModifyConfigRequest() { + // TODO: test ModifyConfigRequest + } + + /** + * Test the property 'allowedLoginMethod' + */ + @Test + public void allowedLoginMethodTest() { + // TODO: test allowedLoginMethod + } + + /** + * Test the property 'defaultLoginMethod' + */ + @Test + public void defaultLoginMethodTest() { + // TODO: test defaultLoginMethod + } + + /** + * Test the property 'allowedRegMethod' + */ + @Test + public void allowedRegMethodTest() { + // TODO: test allowedRegMethod + } + + /** + * Test the property 'defaultRegMethod' + */ + @Test + public void defaultRegMethodTest() { + // TODO: test defaultRegMethod + } + + /** + * Test the property 'defaultProtocol' + */ + @Test + public void defaultProtocolTest() { + // TODO: test defaultProtocol + } + + /** + * Test the property 'accessPolicy' + */ + @Test + public void accessPolicyTest() { + // TODO: test accessPolicy + } + + /** + * Test the property 'regPolicy' + */ + @Test + public void regPolicyTest() { + // TODO: test regPolicy + } + +} diff --git a/src/test/java/com/idmesh/model/ModifyRequest1Test.java b/src/test/java/com/idmesh/model/ModifyRequest1Test.java new file mode 100644 index 0000000..9d03312 --- /dev/null +++ b/src/test/java/com/idmesh/model/ModifyRequest1Test.java @@ -0,0 +1,160 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ModifyRequest1 + */ +public class ModifyRequest1Test { + private final ModifyRequest1 model = new ModifyRequest1(); + + /** + * Model tests for ModifyRequest1 + */ + @Test + public void testModifyRequest1() { + // TODO: test ModifyRequest1 + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'domainSn' + */ + @Test + public void domainSnTest() { + // TODO: test domainSn + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'appId' + */ + @Test + public void appIdTest() { + // TODO: test appId + } + + /** + * Test the property 'appSecret' + */ + @Test + public void appSecretTest() { + // TODO: test appSecret + } + + /** + * Test the property 'category' + */ + @Test + public void categoryTest() { + // TODO: test category + } + + /** + * Test the property 'descr' + */ + @Test + public void descrTest() { + // TODO: test descr + } + + /** + * Test the property 'logo' + */ + @Test + public void logoTest() { + // TODO: test logo + } + + /** + * Test the property 'loginUrl' + */ + @Test + public void loginUrlTest() { + // TODO: test loginUrl + } + + /** + * Test the property 'redirectUrl' + */ + @Test + public void redirectUrlTest() { + // TODO: test redirectUrl + } + + /** + * Test the property 'logoutUrl' + */ + @Test + public void logoutUrlTest() { + // TODO: test logoutUrl + } + + /** + * Test the property 'subAccountPolicy' + */ + @Test + public void subAccountPolicyTest() { + // TODO: test subAccountPolicy + } + + /** + * Test the property 'sysExtProps' + */ + @Test + public void sysExtPropsTest() { + // TODO: test sysExtProps + } + + /** + * Test the property 'freeExtProps' + */ + @Test + public void freeExtPropsTest() { + // TODO: test freeExtProps + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/src/test/java/com/idmesh/model/ModifyRequestTest.java b/src/test/java/com/idmesh/model/ModifyRequestTest.java new file mode 100644 index 0000000..0845b40 --- /dev/null +++ b/src/test/java/com/idmesh/model/ModifyRequestTest.java @@ -0,0 +1,192 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ModifyRequest + */ +public class ModifyRequestTest { + private final ModifyRequest model = new ModifyRequest(); + + /** + * Model tests for ModifyRequest + */ + @Test + public void testModifyRequest() { + // TODO: test ModifyRequest + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'displayName' + */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** + * Test the property 'firstname' + */ + @Test + public void firstnameTest() { + // TODO: test firstname + } + + /** + * Test the property 'lastname' + */ + @Test + public void lastnameTest() { + // TODO: test lastname + } + + /** + * Test the property 'realname' + */ + @Test + public void realnameTest() { + // TODO: test realname + } + + /** + * Test the property 'pinyin' + */ + @Test + public void pinyinTest() { + // TODO: test pinyin + } + + /** + * Test the property 'nickname' + */ + @Test + public void nicknameTest() { + // TODO: test nickname + } + + /** + * Test the property 'mobile' + */ + @Test + public void mobileTest() { + // TODO: test mobile + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'gender' + */ + @Test + public void genderTest() { + // TODO: test gender + } + + /** + * Test the property 'certType' + */ + @Test + public void certTypeTest() { + // TODO: test certType + } + + /** + * Test the property 'certNumber' + */ + @Test + public void certNumberTest() { + // TODO: test certNumber + } + + /** + * Test the property 'region' + */ + @Test + public void regionTest() { + // TODO: test region + } + + /** + * Test the property 'workTime' + */ + @Test + public void workTimeTest() { + // TODO: test workTime + } + + /** + * Test the property 'workTitle' + */ + @Test + public void workTitleTest() { + // TODO: test workTitle + } + + /** + * Test the property 'lastLoginIpaddr' + */ + @Test + public void lastLoginIpaddrTest() { + // TODO: test lastLoginIpaddr + } + + /** + * Test the property 'lastLoginTime' + */ + @Test + public void lastLoginTimeTest() { + // TODO: test lastLoginTime + } + + /** + * Test the property 'sysExtProps' + */ + @Test + public void sysExtPropsTest() { + // TODO: test sysExtProps + } + + /** + * Test the property 'freeExtProps' + */ + @Test + public void freeExtPropsTest() { + // TODO: test freeExtProps + } + +} diff --git a/src/test/java/com/idmesh/model/NullInnerTest.java b/src/test/java/com/idmesh/model/NullInnerTest.java new file mode 100644 index 0000000..3db5790 --- /dev/null +++ b/src/test/java/com/idmesh/model/NullInnerTest.java @@ -0,0 +1,280 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for NullInner + */ +public class NullInnerTest { + private final NullInner model = new NullInner(); + + /** + * Model tests for NullInner + */ + @Test + public void testNullInner() { + // TODO: test NullInner + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'password' + */ + @Test + public void passwordTest() { + // TODO: test password + } + + /** + * Test the property 'displayName' + */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** + * Test the property 'firstname' + */ + @Test + public void firstnameTest() { + // TODO: test firstname + } + + /** + * Test the property 'lastname' + */ + @Test + public void lastnameTest() { + // TODO: test lastname + } + + /** + * Test the property 'realname' + */ + @Test + public void realnameTest() { + // TODO: test realname + } + + /** + * Test the property 'pinyin' + */ + @Test + public void pinyinTest() { + // TODO: test pinyin + } + + /** + * Test the property 'nickname' + */ + @Test + public void nicknameTest() { + // TODO: test nickname + } + + /** + * Test the property 'avatar' + */ + @Test + public void avatarTest() { + // TODO: test avatar + } + + /** + * Test the property 'userType' + */ + @Test + public void userTypeTest() { + // TODO: test userType + } + + /** + * Test the property 'mobile' + */ + @Test + public void mobileTest() { + // TODO: test mobile + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'gender' + */ + @Test + public void genderTest() { + // TODO: test gender + } + + /** + * Test the property 'certType' + */ + @Test + public void certTypeTest() { + // TODO: test certType + } + + /** + * Test the property 'certNumber' + */ + @Test + public void certNumberTest() { + // TODO: test certNumber + } + + /** + * Test the property 'region' + */ + @Test + public void regionTest() { + // TODO: test region + } + + /** + * Test the property 'workTime' + */ + @Test + public void workTimeTest() { + // TODO: test workTime + } + + /** + * Test the property 'workTitle' + */ + @Test + public void workTitleTest() { + // TODO: test workTitle + } + + /** + * Test the property 'arn' + */ + @Test + public void arnTest() { + // TODO: test arn + } + + /** + * Test the property 'idpConfigId' + */ + @Test + public void idpConfigIdTest() { + // TODO: test idpConfigId + } + + /** + * Test the property 'developerId' + */ + @Test + public void developerIdTest() { + // TODO: test developerId + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'lastLoginIpaddr' + */ + @Test + public void lastLoginIpaddrTest() { + // TODO: test lastLoginIpaddr + } + + /** + * Test the property 'lastLoginTime' + */ + @Test + public void lastLoginTimeTest() { + // TODO: test lastLoginTime + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'sysExtProps' + */ + @Test + public void sysExtPropsTest() { + // TODO: test sysExtProps + } + + /** + * Test the property 'freeExtProps' + */ + @Test + public void freeExtPropsTest() { + // TODO: test freeExtProps + } + +} diff --git a/src/test/java/com/idmesh/model/PrivilegeTest.java b/src/test/java/com/idmesh/model/PrivilegeTest.java new file mode 100644 index 0000000..9a73300 --- /dev/null +++ b/src/test/java/com/idmesh/model/PrivilegeTest.java @@ -0,0 +1,129 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Privilege + */ +public class PrivilegeTest { + private final Privilege model = new Privilege(); + + /** + * Model tests for Privilege + */ + @Test + public void testPrivilege() { + // TODO: test Privilege + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'identityType' + */ + @Test + public void identityTypeTest() { + // TODO: test identityType + } + + /** + * Test the property 'identityId' + */ + @Test + public void identityIdTest() { + // TODO: test identityId + } + + /** + * Test the property 'authUnitRuleId' + */ + @Test + public void authUnitRuleIdTest() { + // TODO: test authUnitRuleId + } + + /** + * Test the property 'applicationId' + */ + @Test + public void applicationIdTest() { + // TODO: test applicationId + } + + /** + * Test the property 'objectType' + */ + @Test + public void objectTypeTest() { + // TODO: test objectType + } + + /** + * Test the property 'objectCode' + */ + @Test + public void objectCodeTest() { + // TODO: test objectCode + } + + /** + * Test the property 'affectScope' + */ + @Test + public void affectScopeTest() { + // TODO: test affectScope + } + + /** + * Test the property 'affect' + */ + @Test + public void affectTest() { + // TODO: test affect + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + +} diff --git a/src/test/java/com/idmesh/model/ResourceSetMemberResourceActionsTest.java b/src/test/java/com/idmesh/model/ResourceSetMemberResourceActionsTest.java new file mode 100644 index 0000000..a532c0c --- /dev/null +++ b/src/test/java/com/idmesh/model/ResourceSetMemberResourceActionsTest.java @@ -0,0 +1,56 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ResourceSetMemberResourceActions + */ +public class ResourceSetMemberResourceActionsTest { + private final ResourceSetMemberResourceActions model = new ResourceSetMemberResourceActions(); + + /** + * Model tests for ResourceSetMemberResourceActions + */ + @Test + public void testResourceSetMemberResourceActions() { + // TODO: test ResourceSetMemberResourceActions + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + +} diff --git a/src/test/java/com/idmesh/model/ResourceSetMemberTest.java b/src/test/java/com/idmesh/model/ResourceSetMemberTest.java new file mode 100644 index 0000000..89c6de4 --- /dev/null +++ b/src/test/java/com/idmesh/model/ResourceSetMemberTest.java @@ -0,0 +1,171 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.idmesh.model.ResourceSetMemberResourceActions; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ResourceSetMember + */ +public class ResourceSetMemberTest { + private final ResourceSetMember model = new ResourceSetMember(); + + /** + * Model tests for ResourceSetMember + */ + @Test + public void testResourceSetMember() { + // TODO: test ResourceSetMember + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'setId' + */ + @Test + public void setIdTest() { + // TODO: test setId + } + + /** + * Test the property 'developerId' + */ + @Test + public void developerIdTest() { + // TODO: test developerId + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'resourceId' + */ + @Test + public void resourceIdTest() { + // TODO: test resourceId + } + + /** + * Test the property 'applicationId' + */ + @Test + public void applicationIdTest() { + // TODO: test applicationId + } + + /** + * Test the property 'applicationName' + */ + @Test + public void applicationNameTest() { + // TODO: test applicationName + } + + /** + * Test the property 'isGlobal' + */ + @Test + public void isGlobalTest() { + // TODO: test isGlobal + } + + /** + * Test the property 'resourceType' + */ + @Test + public void resourceTypeTest() { + // TODO: test resourceType + } + + /** + * Test the property 'resourceCode' + */ + @Test + public void resourceCodeTest() { + // TODO: test resourceCode + } + + /** + * Test the property 'resourceScope' + */ + @Test + public void resourceScopeTest() { + // TODO: test resourceScope + } + + /** + * Test the property 'resourceActions' + */ + @Test + public void resourceActionsTest() { + // TODO: test resourceActions + } + + /** + * Test the property 'selectedResourceActions' + */ + @Test + public void selectedResourceActionsTest() { + // TODO: test selectedResourceActions + } + + /** + * Test the property 'matchAllResourceActions' + */ + @Test + public void matchAllResourceActionsTest() { + // TODO: test matchAllResourceActions + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + +} diff --git a/src/test/java/com/idmesh/model/ResourceSetTest.java b/src/test/java/com/idmesh/model/ResourceSetTest.java new file mode 100644 index 0000000..da9158f --- /dev/null +++ b/src/test/java/com/idmesh/model/ResourceSetTest.java @@ -0,0 +1,104 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ResourceSet + */ +public class ResourceSetTest { + private final ResourceSet model = new ResourceSet(); + + /** + * Model tests for ResourceSet + */ + @Test + public void testResourceSet() { + // TODO: test ResourceSet + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'applicationId' + */ + @Test + public void applicationIdTest() { + // TODO: test applicationId + } + + /** + * Test the property 'applicationName' + */ + @Test + public void applicationNameTest() { + // TODO: test applicationName + } + + /** + * Test the property 'isGlobal' + */ + @Test + public void isGlobalTest() { + // TODO: test isGlobal + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + +} diff --git a/src/test/java/com/idmesh/model/ResourceTest.java b/src/test/java/com/idmesh/model/ResourceTest.java new file mode 100644 index 0000000..86c19d8 --- /dev/null +++ b/src/test/java/com/idmesh/model/ResourceTest.java @@ -0,0 +1,136 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Resource + */ +public class ResourceTest { + private final Resource model = new Resource(); + + /** + * Model tests for Resource + */ + @Test + public void testResource() { + // TODO: test Resource + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'developerId' + */ + @Test + public void developerIdTest() { + // TODO: test developerId + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'applicationId' + */ + @Test + public void applicationIdTest() { + // TODO: test applicationId + } + + /** + * Test the property 'applicatioinName' + */ + @Test + public void applicatioinNameTest() { + // TODO: test applicatioinName + } + + /** + * Test the property 'isGlobal' + */ + @Test + public void isGlobalTest() { + // TODO: test isGlobal + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'uri' + */ + @Test + public void uriTest() { + // TODO: test uri + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + +} diff --git a/src/test/java/com/idmesh/model/SaveObjectRequestTest.java b/src/test/java/com/idmesh/model/SaveObjectRequestTest.java new file mode 100644 index 0000000..7594b16 --- /dev/null +++ b/src/test/java/com/idmesh/model/SaveObjectRequestTest.java @@ -0,0 +1,56 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for SaveObjectRequest + */ +public class SaveObjectRequestTest { + private final SaveObjectRequest model = new SaveObjectRequest(); + + /** + * Model tests for SaveObjectRequest + */ + @Test + public void testSaveObjectRequest() { + // TODO: test SaveObjectRequest + } + + /** + * Test the property 'key' + */ + @Test + public void keyTest() { + // TODO: test key + } + + /** + * Test the property 'value' + */ + @Test + public void valueTest() { + // TODO: test value + } + +} diff --git a/src/test/java/com/idmesh/model/TreeNodeTest.java b/src/test/java/com/idmesh/model/TreeNodeTest.java new file mode 100644 index 0000000..0591261 --- /dev/null +++ b/src/test/java/com/idmesh/model/TreeNodeTest.java @@ -0,0 +1,224 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for TreeNode + */ +public class TreeNodeTest { + private final TreeNode model = new TreeNode(); + + /** + * Model tests for TreeNode + */ + @Test + public void testTreeNode() { + // TODO: test TreeNode + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'developerId' + */ + @Test + public void developerIdTest() { + // TODO: test developerId + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'arn' + */ + @Test + public void arnTest() { + // TODO: test arn + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'tag' + */ + @Test + public void tagTest() { + // TODO: test tag + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'isPointer' + */ + @Test + public void isPointerTest() { + // TODO: test isPointer + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'permNamespaceArn' + */ + @Test + public void permNamespaceArnTest() { + // TODO: test permNamespaceArn + } + + /** + * Test the property 'condition' + */ + @Test + public void conditionTest() { + // TODO: test condition + } + + /** + * Test the property 'isDynamic' + */ + @Test + public void isDynamicTest() { + // TODO: test isDynamic + } + + /** + * Test the property 'sysCode' + */ + @Test + public void sysCodeTest() { + // TODO: test sysCode + } + + /** + * Test the property 'operatorId' + */ + @Test + public void operatorIdTest() { + // TODO: test operatorId + } + + /** + * Test the property 'pointerId' + */ + @Test + public void pointerIdTest() { + // TODO: test pointerId + } + + /** + * Test the property 'seq' + */ + @Test + public void seqTest() { + // TODO: test seq + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'objectCode' + */ + @Test + public void objectCodeTest() { + // TODO: test objectCode + } + + /** + * Test the property 'parentId' + */ + @Test + public void parentIdTest() { + // TODO: test parentId + } + + /** + * Test the property 'sysExtProps' + */ + @Test + public void sysExtPropsTest() { + // TODO: test sysExtProps + } + + /** + * Test the property 'freeExtProps' + */ + @Test + public void freeExtPropsTest() { + // TODO: test freeExtProps + } + +} diff --git a/src/test/java/com/idmesh/model/TreeUserTest.java b/src/test/java/com/idmesh/model/TreeUserTest.java new file mode 100644 index 0000000..21a4f16 --- /dev/null +++ b/src/test/java/com/idmesh/model/TreeUserTest.java @@ -0,0 +1,153 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for TreeUser + */ +public class TreeUserTest { + private final TreeUser model = new TreeUser(); + + /** + * Model tests for TreeUser + */ + @Test + public void testTreeUser() { + // TODO: test TreeUser + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'developerId' + */ + @Test + public void developerIdTest() { + // TODO: test developerId + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'nodeId' + */ + @Test + public void nodeIdTest() { + // TODO: test nodeId + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + + /** + * Test the property 'path' + */ + @Test + public void pathTest() { + // TODO: test path + } + + /** + * Test the property 'displayName' + */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'relationType' + */ + @Test + public void relationTypeTest() { + // TODO: test relationType + } + + /** + * Test the property 'relationData' + */ + @Test + public void relationDataTest() { + // TODO: test relationData + } + + /** + * Test the property 'isDefault' + */ + @Test + public void isDefaultTest() { + // TODO: test isDefault + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/src/test/java/com/idmesh/model/UpdateMemberRequestTest.java b/src/test/java/com/idmesh/model/UpdateMemberRequestTest.java new file mode 100644 index 0000000..be3d663 --- /dev/null +++ b/src/test/java/com/idmesh/model/UpdateMemberRequestTest.java @@ -0,0 +1,72 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for UpdateMemberRequest + */ +public class UpdateMemberRequestTest { + private final UpdateMemberRequest model = new UpdateMemberRequest(); + + /** + * Model tests for UpdateMemberRequest + */ + @Test + public void testUpdateMemberRequest() { + // TODO: test UpdateMemberRequest + } + + /** + * Test the property 'action' + */ + @Test + public void actionTest() { + // TODO: test action + } + + /** + * Test the property 'isDefault' + */ + @Test + public void isDefaultTest() { + // TODO: test isDefault + } + + /** + * Test the property 'sourceNodeId' + */ + @Test + public void sourceNodeIdTest() { + // TODO: test sourceNodeId + } + + /** + * Test the property 'destNodeId' + */ + @Test + public void destNodeIdTest() { + // TODO: test destNodeId + } + +} diff --git a/src/test/java/com/idmesh/model/UpdateNode200ResponseTest.java b/src/test/java/com/idmesh/model/UpdateNode200ResponseTest.java new file mode 100644 index 0000000..1913aba --- /dev/null +++ b/src/test/java/com/idmesh/model/UpdateNode200ResponseTest.java @@ -0,0 +1,169 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for UpdateNode200Response + */ +public class UpdateNode200ResponseTest { + private final UpdateNode200Response model = new UpdateNode200Response(); + + /** + * Model tests for UpdateNode200Response + */ + @Test + public void testUpdateNode200Response() { + // TODO: test UpdateNode200Response + } + + /** + * Test the property 'sysCode' + */ + @Test + public void sysCodeTest() { + // TODO: test sysCode + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'isPointer' + */ + @Test + public void isPointerTest() { + // TODO: test isPointer + } + + /** + * Test the property 'operatorId' + */ + @Test + public void operatorIdTest() { + // TODO: test operatorId + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'permNamespaceArn' + */ + @Test + public void permNamespaceArnTest() { + // TODO: test permNamespaceArn + } + + /** + * Test the property 'pointerId' + */ + @Test + public void pointerIdTest() { + // TODO: test pointerId + } + + /** + * Test the property 'condition' + */ + @Test + public void conditionTest() { + // TODO: test condition + } + + /** + * Test the property 'sourceParentId' + */ + @Test + public void sourceParentIdTest() { + // TODO: test sourceParentId + } + + /** + * Test the property 'destParentId' + */ + @Test + public void destParentIdTest() { + // TODO: test destParentId + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'isDynamic' + */ + @Test + public void isDynamicTest() { + // TODO: test isDynamic + } + + /** + * Test the property 'objectCode' + */ + @Test + public void objectCodeTest() { + // TODO: test objectCode + } + + /** + * Test the property 'arn' + */ + @Test + public void arnTest() { + // TODO: test arn + } + + /** + * Test the property 'seq' + */ + @Test + public void seqTest() { + // TODO: test seq + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/src/test/java/com/idmesh/model/UpdateNodeRequestTest.java b/src/test/java/com/idmesh/model/UpdateNodeRequestTest.java new file mode 100644 index 0000000..6fae79e --- /dev/null +++ b/src/test/java/com/idmesh/model/UpdateNodeRequestTest.java @@ -0,0 +1,216 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for UpdateNodeRequest + */ +public class UpdateNodeRequestTest { + private final UpdateNodeRequest model = new UpdateNodeRequest(); + + /** + * Model tests for UpdateNodeRequest + */ + @Test + public void testUpdateNodeRequest() { + // TODO: test UpdateNodeRequest + } + + /** + * Test the property 'developerId' + */ + @Test + public void developerIdTest() { + // TODO: test developerId + } + + /** + * Test the property 'tenantId' + */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** + * Test the property 'arn' + */ + @Test + public void arnTest() { + // TODO: test arn + } + + /** + * Test the property 'timeCreated' + */ + @Test + public void timeCreatedTest() { + // TODO: test timeCreated + } + + /** + * Test the property 'tag' + */ + @Test + public void tagTest() { + // TODO: test tag + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'isPointer' + */ + @Test + public void isPointerTest() { + // TODO: test isPointer + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'permNamespaceArn' + */ + @Test + public void permNamespaceArnTest() { + // TODO: test permNamespaceArn + } + + /** + * Test the property 'condition' + */ + @Test + public void conditionTest() { + // TODO: test condition + } + + /** + * Test the property 'isDynamic' + */ + @Test + public void isDynamicTest() { + // TODO: test isDynamic + } + + /** + * Test the property 'sysCode' + */ + @Test + public void sysCodeTest() { + // TODO: test sysCode + } + + /** + * Test the property 'operatorId' + */ + @Test + public void operatorIdTest() { + // TODO: test operatorId + } + + /** + * Test the property 'pointerId' + */ + @Test + public void pointerIdTest() { + // TODO: test pointerId + } + + /** + * Test the property 'seq' + */ + @Test + public void seqTest() { + // TODO: test seq + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'timeModified' + */ + @Test + public void timeModifiedTest() { + // TODO: test timeModified + } + + /** + * Test the property 'objectCode' + */ + @Test + public void objectCodeTest() { + // TODO: test objectCode + } + + /** + * Test the property 'parentId' + */ + @Test + public void parentIdTest() { + // TODO: test parentId + } + + /** + * Test the property 'sysExtProps' + */ + @Test + public void sysExtPropsTest() { + // TODO: test sysExtProps + } + + /** + * Test the property 'freeExtProps' + */ + @Test + public void freeExtPropsTest() { + // TODO: test freeExtProps + } + +} diff --git a/src/test/java/com/idmesh/model/UpdateOrganizationRequestTest.java b/src/test/java/com/idmesh/model/UpdateOrganizationRequestTest.java new file mode 100644 index 0000000..2164745 --- /dev/null +++ b/src/test/java/com/idmesh/model/UpdateOrganizationRequestTest.java @@ -0,0 +1,80 @@ +/* + * IDMesh-Dev + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.idmesh.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for UpdateOrganizationRequest + */ +public class UpdateOrganizationRequestTest { + private final UpdateOrganizationRequest model = new UpdateOrganizationRequest(); + + /** + * Model tests for UpdateOrganizationRequest + */ + @Test + public void testUpdateOrganizationRequest() { + // TODO: test UpdateOrganizationRequest + } + + /** + * Test the property 'objectDisplayName' + */ + @Test + public void objectDisplayNameTest() { + // TODO: test objectDisplayName + } + + /** + * Test the property 'objectType' + */ + @Test + public void objectTypeTest() { + // TODO: test objectType + } + + /** + * Test the property 'objectProps' + */ + @Test + public void objectPropsTest() { + // TODO: test objectProps + } + + /** + * Test the property 'isDefault' + */ + @Test + public void isDefaultTest() { + // TODO: test isDefault + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +}