diff --git a/AvataryugKotlinSDK/.gradle/8.0/checksums/checksums.lock b/AvataryugKotlinSDK/.gradle/8.0/checksums/checksums.lock new file mode 100644 index 0000000..8c123bc Binary files /dev/null and b/AvataryugKotlinSDK/.gradle/8.0/checksums/checksums.lock differ diff --git a/AvataryugKotlinSDK/.gradle/8.0/checksums/md5-checksums.bin b/AvataryugKotlinSDK/.gradle/8.0/checksums/md5-checksums.bin new file mode 100644 index 0000000..05c8976 Binary files /dev/null and b/AvataryugKotlinSDK/.gradle/8.0/checksums/md5-checksums.bin differ diff --git a/AvataryugKotlinSDK/.gradle/8.0/checksums/sha1-checksums.bin b/AvataryugKotlinSDK/.gradle/8.0/checksums/sha1-checksums.bin new file mode 100644 index 0000000..c54a570 Binary files /dev/null and b/AvataryugKotlinSDK/.gradle/8.0/checksums/sha1-checksums.bin differ diff --git a/AvataryugKotlinSDK/.gradle/8.0/dependencies-accessors/dependencies-accessors.lock b/AvataryugKotlinSDK/.gradle/8.0/dependencies-accessors/dependencies-accessors.lock new file mode 100644 index 0000000..5d857d5 Binary files /dev/null and b/AvataryugKotlinSDK/.gradle/8.0/dependencies-accessors/dependencies-accessors.lock differ diff --git a/AvataryugKotlinSDK/.gradle/8.0/dependencies-accessors/gc.properties b/AvataryugKotlinSDK/.gradle/8.0/dependencies-accessors/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/AvataryugKotlinSDK/.gradle/8.0/executionHistory/executionHistory.lock b/AvataryugKotlinSDK/.gradle/8.0/executionHistory/executionHistory.lock new file mode 100644 index 0000000..05fe3ee Binary files /dev/null and b/AvataryugKotlinSDK/.gradle/8.0/executionHistory/executionHistory.lock differ diff --git a/AvataryugKotlinSDK/.gradle/8.0/fileChanges/last-build.bin b/AvataryugKotlinSDK/.gradle/8.0/fileChanges/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/AvataryugKotlinSDK/.gradle/8.0/fileChanges/last-build.bin differ diff --git a/AvataryugKotlinSDK/.gradle/8.0/fileHashes/fileHashes.bin b/AvataryugKotlinSDK/.gradle/8.0/fileHashes/fileHashes.bin new file mode 100644 index 0000000..549ce44 Binary files /dev/null and b/AvataryugKotlinSDK/.gradle/8.0/fileHashes/fileHashes.bin differ diff --git a/AvataryugKotlinSDK/.gradle/8.0/fileHashes/fileHashes.lock b/AvataryugKotlinSDK/.gradle/8.0/fileHashes/fileHashes.lock new file mode 100644 index 0000000..f476d86 Binary files /dev/null and b/AvataryugKotlinSDK/.gradle/8.0/fileHashes/fileHashes.lock differ diff --git a/AvataryugKotlinSDK/.gradle/8.0/fileHashes/resourceHashesCache.bin b/AvataryugKotlinSDK/.gradle/8.0/fileHashes/resourceHashesCache.bin new file mode 100644 index 0000000..e3ce423 Binary files /dev/null and b/AvataryugKotlinSDK/.gradle/8.0/fileHashes/resourceHashesCache.bin differ diff --git a/AvataryugKotlinSDK/.gradle/8.0/gc.properties b/AvataryugKotlinSDK/.gradle/8.0/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/AvataryugKotlinSDK/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/AvataryugKotlinSDK/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000..a1c41f6 Binary files /dev/null and b/AvataryugKotlinSDK/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/AvataryugKotlinSDK/.gradle/buildOutputCleanup/cache.properties b/AvataryugKotlinSDK/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..7c85143 --- /dev/null +++ b/AvataryugKotlinSDK/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Thu Feb 08 14:52:34 IST 2024 +gradle.version=8.0 diff --git a/AvataryugKotlinSDK/.gradle/buildOutputCleanup/outputFiles.bin b/AvataryugKotlinSDK/.gradle/buildOutputCleanup/outputFiles.bin new file mode 100644 index 0000000..defac9a Binary files /dev/null and b/AvataryugKotlinSDK/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/AvataryugKotlinSDK/.gradle/vcs-1/gc.properties b/AvataryugKotlinSDK/.gradle/vcs-1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/AvataryugKotlinSDK/.idea/.gitignore b/AvataryugKotlinSDK/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/AvataryugKotlinSDK/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/AvataryugKotlinSDK/.idea/.name b/AvataryugKotlinSDK/.idea/.name new file mode 100644 index 0000000..a5d43ae --- /dev/null +++ b/AvataryugKotlinSDK/.idea/.name @@ -0,0 +1 @@ +MyKotlinAndroidSDK \ No newline at end of file diff --git a/AvataryugKotlinSDK/.idea/compiler.xml b/AvataryugKotlinSDK/.idea/compiler.xml new file mode 100644 index 0000000..b589d56 --- /dev/null +++ b/AvataryugKotlinSDK/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/AvataryugKotlinSDK/.idea/gradle.xml b/AvataryugKotlinSDK/.idea/gradle.xml new file mode 100644 index 0000000..6d89050 --- /dev/null +++ b/AvataryugKotlinSDK/.idea/gradle.xml @@ -0,0 +1,19 @@ + + + + + + \ No newline at end of file diff --git a/AvataryugKotlinSDK/.idea/kotlinc.xml b/AvataryugKotlinSDK/.idea/kotlinc.xml new file mode 100644 index 0000000..e1eea1d --- /dev/null +++ b/AvataryugKotlinSDK/.idea/kotlinc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/AvataryugKotlinSDK/.idea/misc.xml b/AvataryugKotlinSDK/.idea/misc.xml new file mode 100644 index 0000000..0ad17cb --- /dev/null +++ b/AvataryugKotlinSDK/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/AvataryugKotlinSDK/.idea/vcs.xml b/AvataryugKotlinSDK/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/AvataryugKotlinSDK/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/AvataryugKotlinSDK/app/.gitignore b/AvataryugKotlinSDK/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/AvataryugKotlinSDK/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/AvataryugKotlinSDK/app/build.gradle b/AvataryugKotlinSDK/app/build.gradle new file mode 100644 index 0000000..130abe6 --- /dev/null +++ b/AvataryugKotlinSDK/app/build.gradle @@ -0,0 +1,88 @@ +plugins { + id 'com.android.application' + id 'org.jetbrains.kotlin.android' +} + +android { + namespace 'com.example.mykotlinandroidsdk' + compileSdk 33 + + defaultConfig { + applicationId "com.example.mykotlinandroidsdk" + minSdk 24 + targetSdk 33 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + vectorDrawables { + useSupportLibrary true + } + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } + buildFeatures { + compose true + } + composeOptions { + kotlinCompilerExtensionVersion '1.3.2' + } + packagingOptions { + resources { + excludes += '/META-INF/{AL2.0,LGPL2.1}' + exclude 'META-INF/DEPENDENCIES' + } + } +} +ext { + swagger_annotations_version = "1.6.6" + gson_version = "2.8.9" + httpmime_version = "4.5.13" + volley_version = "1.2.1" + junit_version = "4.13.2" + robolectric_version = "4.5.1" + concurrent_unit_version = "0.4.6" +} +dependencies { + + + implementation 'androidx.core:core-ktx:1.8.0' + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1' + implementation 'androidx.activity:activity-compose:1.5.1' + implementation platform('androidx.compose:compose-bom:2022.10.00') + implementation 'androidx.compose.ui:ui' + implementation 'androidx.compose.ui:ui-graphics' + implementation 'androidx.compose.ui:ui-tooling-preview' + implementation 'androidx.compose.material3:material3' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'com.google.android.material:material:1.5.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' + androidTestImplementation platform('androidx.compose:compose-bom:2022.10.00') + androidTestImplementation 'androidx.compose.ui:ui-test-junit4' + debugImplementation 'androidx.compose.ui:ui-tooling' + debugImplementation 'androidx.compose.ui:ui-test-manifest' + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + implementation "com.google.code.gson:gson:$gson_version" + implementation "org.apache.httpcomponents:httpmime:$httpmime_version" + implementation "com.android.volley:volley:${volley_version}" + testImplementation "org.robolectric:robolectric:${robolectric_version}" + testImplementation "net.jodah:concurrentunit:${concurrent_unit_version}" + implementation "com.squareup.moshi:moshi-kotlin:1.13.0" + implementation "com.squareup.moshi:moshi-adapters:1.13.0" + implementation "com.squareup.okhttp3:okhttp:4.10.0" +} \ No newline at end of file diff --git a/AvataryugKotlinSDK/app/proguard-rules.pro b/AvataryugKotlinSDK/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/AvataryugKotlinSDK/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/AvataryugKotlinSDK/app/src/androidTest/java/com/example/mykotlinandroidsdk/ExampleInstrumentedTest.kt b/AvataryugKotlinSDK/app/src/androidTest/java/com/example/mykotlinandroidsdk/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..63dc176 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/androidTest/java/com/example/mykotlinandroidsdk/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.example.mykotlinandroidsdk + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("com.example.mykotlinandroidsdk", appContext.packageName) + } +} \ No newline at end of file diff --git a/AvataryugKotlinSDK/app/src/main/AndroidManifest.xml b/AvataryugKotlinSDK/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..64b48cb --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/AndroidManifest.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/AdvertisingApi.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/AdvertisingApi.kt new file mode 100644 index 0000000..21dfbbb --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/AdvertisingApi.kt @@ -0,0 +1,273 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +/** + * Represents a collection of functions to interact with the API endpoints. + */ +package com.Avataryug.client.Apis + +import Avataryug.Client.AvatarProjectSettings +import com.Avataryug.client.Infrastructure.ApiClient +import java.io.IOException +import okhttp3.OkHttpClient +import okhttp3.HttpUrl + +import com.Avataryug.client.Models.GetAdPlacementByIDResult +import com.Avataryug.client.Models.GrantAdsRewardRequest +import com.Avataryug.client.Models.GrantAdsRewardResult +import com.Avataryug.client.Models.RecordAdsActivityRequest +import com.Avataryug.client.Models.RecordAdsActivityResult + +import com.Avataryug.client.Infrastructure.ApiResponse +import com.Avataryug.client.Infrastructure.ClientException +import com.Avataryug.client.Infrastructure.ClientError +import com.Avataryug.client.Infrastructure.ServerException +import com.Avataryug.client.Infrastructure.ServerError +import com.Avataryug.client.Infrastructure.MultiValueMap +import com.Avataryug.client.Infrastructure.RequestConfig +import com.Avataryug.client.Infrastructure.RequestMethod +import com.Avataryug.client.Infrastructure.ResponseType +import com.Avataryug.client.Infrastructure.Success + +class AdvertisingApi (basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { + companion object { + @JvmStatic + val defaultBasePath: String by lazy { + val id = AvatarProjectSettings.Project_Id + System.getProperties().getProperty(ApiClient.baseUrlKey, "https://$id.avataryugapi.com/client") + } + } + + /** + * Get Ad Placement By ID + * Returns a list of ad placements by ID + * @param placementID Unique identifier of the placement + * @return GetAdPlacementByIDResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getAdPlacementByID(placementID: kotlin.String) : GetAdPlacementByIDResult { + val localVarResponse = getAdPlacementByIDWithHttpInfo(placementID = placementID) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetAdPlacementByIDResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get Ad Placement By ID + * Returns a list of ad placements by ID + * @param placementID Unique identifier of the placement + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getAdPlacementByIDWithHttpInfo(placementID: kotlin.String) : ApiResponse { + val localVariableConfig = getAdPlacementByIDRequestConfig(placementID = placementID) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getAdPlacementByID + * + * @param placementID Unique identifier of the placement + * @return RequestConfig + */ + fun getAdPlacementByIDRequestConfig(placementID: kotlin.String) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("PlacementID", listOf(placementID.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetAdPlacementByID", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Grant Ads Reward + * Grants ads rewards into user wallet (if currency) or inventory (if items) + * @param grantAdsRewardRequest (optional) + * @return GrantAdsRewardResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun grantAdsReward(grantAdsRewardRequest: GrantAdsRewardRequest? = null) : GrantAdsRewardResult { + val localVarResponse = grantAdsRewardWithHttpInfo(grantAdsRewardRequest = grantAdsRewardRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GrantAdsRewardResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Grant Ads Reward + * Grants ads rewards into user wallet (if currency) or inventory (if items) + * @param grantAdsRewardRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun grantAdsRewardWithHttpInfo(grantAdsRewardRequest: GrantAdsRewardRequest?) : ApiResponse { + val localVariableConfig = grantAdsRewardRequestConfig(grantAdsRewardRequest = grantAdsRewardRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation grantAdsReward + * + * @param grantAdsRewardRequest (optional) + * @return RequestConfig + */ + fun grantAdsRewardRequestConfig(grantAdsRewardRequest: GrantAdsRewardRequest?) : RequestConfig { + val localVariableBody = grantAdsRewardRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/GrantAdsReward", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Record Ads Activity + * Stores the Ads activity related data into our system for reporting + * @param recordAdsActivityRequest (optional) + * @return RecordAdsActivityResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun recordAdsActivity(recordAdsActivityRequest: RecordAdsActivityRequest? = null) : RecordAdsActivityResult { + val localVarResponse = recordAdsActivityWithHttpInfo(recordAdsActivityRequest = recordAdsActivityRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as RecordAdsActivityResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Record Ads Activity + * Stores the Ads activity related data into our system for reporting + * @param recordAdsActivityRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun recordAdsActivityWithHttpInfo(recordAdsActivityRequest: RecordAdsActivityRequest?) : ApiResponse { + val localVariableConfig = recordAdsActivityRequestConfig(recordAdsActivityRequest = recordAdsActivityRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation recordAdsActivity + * + * @param recordAdsActivityRequest (optional) + * @return RequestConfig + */ + fun recordAdsActivityRequestConfig(recordAdsActivityRequest: RecordAdsActivityRequest?) : RequestConfig { + val localVariableBody = recordAdsActivityRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/RecordAdsActivity", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = + HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] +} diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/AuthenticationApi.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/AuthenticationApi.kt new file mode 100644 index 0000000..67acf6a --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/AuthenticationApi.kt @@ -0,0 +1,643 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Apis + +import Avataryug.Client.AvatarProjectSettings +import com.Avataryug.client.Infrastructure.ApiClient +import java.io.IOException +import okhttp3.OkHttpClient +import okhttp3.HttpUrl + +import com.Avataryug.client.Models.LoginWithAndroidDeviceIDRequest +import com.Avataryug.client.Models.LoginWithAndroidDeviceIDResult +import com.Avataryug.client.Models.LoginWithAppleRequest +import com.Avataryug.client.Models.LoginWithAppleResult +import com.Avataryug.client.Models.LoginWithCustomIDRequest +import com.Avataryug.client.Models.LoginWithCustomIDResult +import com.Avataryug.client.Models.LoginWithEmailAddressRequest +import com.Avataryug.client.Models.LoginWithEmailAddressResult +import com.Avataryug.client.Models.LoginWithFacebookRequest +import com.Avataryug.client.Models.LoginWithFacebookResult +import com.Avataryug.client.Models.LoginWithGoogleRequest +import com.Avataryug.client.Models.LoginWithGoogleResult +import com.Avataryug.client.Models.LoginWithIOSDeviceIDRequest +import com.Avataryug.client.Models.LoginWithIOSDeviceIDResult +import com.Avataryug.client.Models.RegisterUserRequest +import com.Avataryug.client.Models.RegisterUserResult + +import com.Avataryug.client.Infrastructure.ApiResponse +import com.Avataryug.client.Infrastructure.ClientException +import com.Avataryug.client.Infrastructure.ClientError +import com.Avataryug.client.Infrastructure.ServerException +import com.Avataryug.client.Infrastructure.ServerError +import com.Avataryug.client.Infrastructure.MultiValueMap +import com.Avataryug.client.Infrastructure.RequestConfig +import com.Avataryug.client.Infrastructure.RequestMethod +import com.Avataryug.client.Infrastructure.ResponseType +import com.Avataryug.client.Infrastructure.Success + +/** + * Represents a collection of functions to interact with the API endpoints + */ + +class AuthenticationApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { + companion object { + @JvmStatic + val defaultBasePath: String by lazy { + val id = AvatarProjectSettings.Project_Id + System.getProperties().getProperty(ApiClient.baseUrlKey, "https://$id.avataryugapi.com/client") + } + } + + /** + * Login With Android Device ID + * Signs the user in using the Android device identifier, returning a session identifier that can subsequently be used for API calls which require an authenticated user + * @param loginWithAndroidDeviceIDRequest (optional) + * @return LoginWithAndroidDeviceIDResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun loginWithAndroidDeviceID(loginWithAndroidDeviceIDRequest: LoginWithAndroidDeviceIDRequest? = null) : LoginWithAndroidDeviceIDResult { + val localVarResponse = loginWithAndroidDeviceIDWithHttpInfo(loginWithAndroidDeviceIDRequest = loginWithAndroidDeviceIDRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as LoginWithAndroidDeviceIDResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Login With Android Device ID + * Signs the user in using the Android device identifier, returning a session identifier that can subsequently be used for API calls which require an authenticated user + * @param loginWithAndroidDeviceIDRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun loginWithAndroidDeviceIDWithHttpInfo(loginWithAndroidDeviceIDRequest: LoginWithAndroidDeviceIDRequest?) : ApiResponse { + val localVariableConfig = loginWithAndroidDeviceIDRequestConfig(loginWithAndroidDeviceIDRequest = loginWithAndroidDeviceIDRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation loginWithAndroidDeviceID + * + * @param loginWithAndroidDeviceIDRequest (optional) + * @return RequestConfig + */ + fun loginWithAndroidDeviceIDRequestConfig(loginWithAndroidDeviceIDRequest: LoginWithAndroidDeviceIDRequest?) : RequestConfig { + val localVariableBody = loginWithAndroidDeviceIDRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/LoginWithAndroidDeviceID", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Login With Apple + * Signs in the user with a Sign in with Apple identity token. + * @param loginWithAppleRequest (optional) + * @return LoginWithAppleResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun loginWithApple(loginWithAppleRequest: LoginWithAppleRequest? = null) : LoginWithAppleResult { + val localVarResponse = loginWithAppleWithHttpInfo(loginWithAppleRequest = loginWithAppleRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as LoginWithAppleResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Login With Apple + * Signs in the user with a Sign in with Apple identity token. + * @param loginWithAppleRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun loginWithAppleWithHttpInfo(loginWithAppleRequest: LoginWithAppleRequest?) : ApiResponse { + val localVariableConfig = loginWithAppleRequestConfig(loginWithAppleRequest = loginWithAppleRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation loginWithApple + * + * @param loginWithAppleRequest (optional) + * @return RequestConfig + */ + fun loginWithAppleRequestConfig(loginWithAppleRequest: LoginWithAppleRequest?) : RequestConfig { + val localVariableBody = loginWithAppleRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/LoginWithApple", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Login With Custom ID + * Signs the user in using a custom unique identifier generated by the Project, returning a session identifier that can subsequently be used for API calls which require an authenticated user + * @param loginWithCustomIDRequest (optional) + * @return LoginWithCustomIDResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun loginWithCustomID(loginWithCustomIDRequest: LoginWithCustomIDRequest? = null) : LoginWithCustomIDResult { + val localVarResponse = loginWithCustomIDWithHttpInfo(loginWithCustomIDRequest = loginWithCustomIDRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as LoginWithCustomIDResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Login With Custom ID + * Signs the user in using a custom unique identifier generated by the Project, returning a session identifier that can subsequently be used for API calls which require an authenticated user + * @param loginWithCustomIDRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun loginWithCustomIDWithHttpInfo(loginWithCustomIDRequest: LoginWithCustomIDRequest?) : ApiResponse { + val localVariableConfig = loginWithCustomIDRequestConfig(loginWithCustomIDRequest = loginWithCustomIDRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation loginWithCustomID + * + * @param loginWithCustomIDRequest (optional) + * @return RequestConfig + */ + fun loginWithCustomIDRequestConfig(loginWithCustomIDRequest: LoginWithCustomIDRequest?) : RequestConfig { + val localVariableBody = loginWithCustomIDRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/LoginWithCustomID", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Login With Email Address + * Signs the user into the AvatarYug account, returning a session identifier that can subsequently be used for API calls which require an authenticated user. Unlike most other login API calls, LoginWithEmailAddress does not permit the creation of new accounts via the CreateAccountFlag. E + * @param loginWithEmailAddressRequest (optional) + * @return LoginWithEmailAddressResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun loginWithEmailAddress(loginWithEmailAddressRequest: LoginWithEmailAddressRequest? = null) : LoginWithEmailAddressResult { + val localVarResponse = loginWithEmailAddressWithHttpInfo(loginWithEmailAddressRequest = loginWithEmailAddressRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as LoginWithEmailAddressResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Login With Email Address + * Signs the user into the AvatarYug account, returning a session identifier that can subsequently be used for API calls which require an authenticated user. Unlike most other login API calls, LoginWithEmailAddress does not permit the creation of new accounts via the CreateAccountFlag. E + * @param loginWithEmailAddressRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun loginWithEmailAddressWithHttpInfo(loginWithEmailAddressRequest: LoginWithEmailAddressRequest?) : ApiResponse { + val localVariableConfig = loginWithEmailAddressRequestConfig(loginWithEmailAddressRequest = loginWithEmailAddressRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation loginWithEmailAddress + * + * @param loginWithEmailAddressRequest (optional) + * @return RequestConfig + */ + fun loginWithEmailAddressRequestConfig(loginWithEmailAddressRequest: LoginWithEmailAddressRequest?) : RequestConfig { + val localVariableBody = loginWithEmailAddressRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/LoginWithEmailAddress", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Login With Facebook + * Signs the user in using a Facebook access token, returning a session identifier that can subsequently be used for API calls which require an authenticated user + * @param loginWithFacebookRequest (optional) + * @return LoginWithFacebookResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun loginWithFacebook(loginWithFacebookRequest: LoginWithFacebookRequest? = null) : LoginWithFacebookResult { + val localVarResponse = loginWithFacebookWithHttpInfo(loginWithFacebookRequest = loginWithFacebookRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as LoginWithFacebookResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Login With Facebook + * Signs the user in using a Facebook access token, returning a session identifier that can subsequently be used for API calls which require an authenticated user + * @param loginWithFacebookRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun loginWithFacebookWithHttpInfo(loginWithFacebookRequest: LoginWithFacebookRequest?) : ApiResponse { + val localVariableConfig = loginWithFacebookRequestConfig(loginWithFacebookRequest = loginWithFacebookRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation loginWithFacebook + * + * @param loginWithFacebookRequest (optional) + * @return RequestConfig + */ + fun loginWithFacebookRequestConfig(loginWithFacebookRequest: LoginWithFacebookRequest?) : RequestConfig { + val localVariableBody = loginWithFacebookRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/LoginWithFacebook", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Login With Google Account + * Signs the user in using their Google account credentials + * @param loginWithGoogleRequest (optional) + * @return LoginWithGoogleResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun loginWithGoogle(loginWithGoogleRequest: LoginWithGoogleRequest? = null) : LoginWithGoogleResult { + val localVarResponse = loginWithGoogleWithHttpInfo(loginWithGoogleRequest = loginWithGoogleRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as LoginWithGoogleResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Login With Google Account + * Signs the user in using their Google account credentials + * @param loginWithGoogleRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun loginWithGoogleWithHttpInfo(loginWithGoogleRequest: LoginWithGoogleRequest?) : ApiResponse { + val localVariableConfig = loginWithGoogleRequestConfig(loginWithGoogleRequest = loginWithGoogleRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation loginWithGoogle + * + * @param loginWithGoogleRequest (optional) + * @return RequestConfig + */ + fun loginWithGoogleRequestConfig(loginWithGoogleRequest: LoginWithGoogleRequest?) : RequestConfig { + val localVariableBody = loginWithGoogleRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/LoginWithGoogle", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Login With IOS Device ID + * Signs the user in using the vendor-specific iOS device identifier, returning a session identifier that can subsequently be used for API calls which require an authenticated user + * @param loginWithIOSDeviceIDRequest (optional) + * @return LoginWithIOSDeviceIDResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun loginWithIOSDeviceID(loginWithIOSDeviceIDRequest: LoginWithIOSDeviceIDRequest? = null) : LoginWithIOSDeviceIDResult { + val localVarResponse = loginWithIOSDeviceIDWithHttpInfo(loginWithIOSDeviceIDRequest = loginWithIOSDeviceIDRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as LoginWithIOSDeviceIDResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Login With IOS Device ID + * Signs the user in using the vendor-specific iOS device identifier, returning a session identifier that can subsequently be used for API calls which require an authenticated user + * @param loginWithIOSDeviceIDRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun loginWithIOSDeviceIDWithHttpInfo(loginWithIOSDeviceIDRequest: LoginWithIOSDeviceIDRequest?) : ApiResponse { + val localVariableConfig = loginWithIOSDeviceIDRequestConfig(loginWithIOSDeviceIDRequest = loginWithIOSDeviceIDRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation loginWithIOSDeviceID + * + * @param loginWithIOSDeviceIDRequest (optional) + * @return RequestConfig + */ + fun loginWithIOSDeviceIDRequestConfig(loginWithIOSDeviceIDRequest: LoginWithIOSDeviceIDRequest?) : RequestConfig { + val localVariableBody = loginWithIOSDeviceIDRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/LoginWithIOSDeviceID", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Register User + * + * @param registerUserRequest (optional) + * @return RegisterUserResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun registerUser(registerUserRequest: RegisterUserRequest? = null) : RegisterUserResult { + val localVarResponse = registerUserWithHttpInfo(registerUserRequest = registerUserRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as RegisterUserResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Register User + * + * @param registerUserRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun registerUserWithHttpInfo(registerUserRequest: RegisterUserRequest?) : ApiResponse { + val localVariableConfig = registerUserRequestConfig(registerUserRequest = registerUserRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation registerUser + * + * @param registerUserRequest (optional) + * @return RequestConfig + */ + fun registerUserRequestConfig(registerUserRequest: RegisterUserRequest?) : RequestConfig { + val localVariableBody = registerUserRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/RegisterUser", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = + HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] +} \ No newline at end of file diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/AvatarManagementApi.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/AvatarManagementApi.kt new file mode 100644 index 0000000..5354819 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/AvatarManagementApi.kt @@ -0,0 +1,943 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Apis + +import Avataryug.Client.AvatarProjectSettings +import com.Avataryug.client.Infrastructure.ApiClient +import java.io.IOException +import okhttp3.OkHttpClient +import okhttp3.HttpUrl + +import com.Avataryug.client.Models.GenerateAvatarMeshRequest +import com.Avataryug.client.Models.GenerateAvatarMeshResult +import com.Avataryug.client.Models.GetAllBucketVerticesResult +import com.Avataryug.client.Models.GetAvatarPresetByIDRequest +import com.Avataryug.client.Models.GetAvatarPresetsResult +import com.Avataryug.client.Models.GetClipsByIDResult +import com.Avataryug.client.Models.GetClipsResult +import com.Avataryug.client.Models.GetExpressionByIDResult +import com.Avataryug.client.Models.GetExpressionsResult +import com.Avataryug.client.Models.GrantAvatarPresetItemsToUserRequest +import com.Avataryug.client.Models.GrantAvatarPresetItemsToUserResult +import com.Avataryug.client.Models.GrantAvatarPresetToUserRequest +import com.Avataryug.client.Models.GrantAvatarPresetToUserResult +import com.Avataryug.client.Models.RenderAvatarImageRequest +import com.Avataryug.client.Models.RenderAvatarImageResult +import com.Avataryug.client.Models.SyncAvatarsRequest +import com.Avataryug.client.Models.SyncAvatarsResult + +import com.Avataryug.client.Infrastructure.ApiResponse +import com.Avataryug.client.Infrastructure.ClientException +import com.Avataryug.client.Infrastructure.ClientError +import com.Avataryug.client.Infrastructure.ServerException +import com.Avataryug.client.Infrastructure.ServerError +import com.Avataryug.client.Infrastructure.MultiValueMap +import com.Avataryug.client.Infrastructure.RequestConfig +import com.Avataryug.client.Infrastructure.RequestMethod +import com.Avataryug.client.Infrastructure.ResponseType +import com.Avataryug.client.Infrastructure.Success + +/** + * Represents a collection of functions to interact with the API endpoints + */ +class AvatarManagementApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { + companion object { + @JvmStatic + val defaultBasePath: String by lazy { + val id = AvatarProjectSettings.Project_Id + System.getProperties().getProperty(ApiClient.baseUrlKey, "https://$id.avataryugapi.com/client") + } + } + + /** + * Generate Avatar Mesh + * Generates the 3D mesh as per the configuration in the Config panel + * @param generateAvatarMeshRequest (optional) + * @return GenerateAvatarMeshResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun generateAvatarMesh(generateAvatarMeshRequest: GenerateAvatarMeshRequest? = null) : GenerateAvatarMeshResult { + val localVarResponse = generateAvatarMeshWithHttpInfo(generateAvatarMeshRequest = generateAvatarMeshRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GenerateAvatarMeshResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Generate Avatar Mesh + * Generates the 3D mesh as per the configuration in the Config panel + * @param generateAvatarMeshRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun generateAvatarMeshWithHttpInfo(generateAvatarMeshRequest: GenerateAvatarMeshRequest?) : ApiResponse { + val localVariableConfig = generateAvatarMeshRequestConfig(generateAvatarMeshRequest = generateAvatarMeshRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation generateAvatarMesh + * + * @param generateAvatarMeshRequest (optional) + * @return RequestConfig + */ + fun generateAvatarMeshRequestConfig(generateAvatarMeshRequest: GenerateAvatarMeshRequest?) : RequestConfig { + val localVariableBody = generateAvatarMeshRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/GenerateAvatarMesh", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Get Avatar Presets + * Get all avatar presets + * @return GetAvatarPresetsResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getAvatarPresets(status: kotlin.Int, Gender: kotlin.Int) : GetAvatarPresetsResult { + val localVarResponse = getAvatarPresetsWithHttpInfo(status,Gender) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetAvatarPresetsResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get Avatar Presets + * Get all avatar presets + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getAvatarPresetsWithHttpInfo(status: kotlin.Int, Gender: kotlin.Int) : ApiResponse { + val localVariableConfig = getAvatarPresetsRequestConfig(status, Gender) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getAvatarPresets + * + * @return RequestConfig + */ + fun getAvatarPresetsRequestConfig(status: kotlin.Int, Gender: kotlin.Int) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("Status", listOf(status.toString())) + put("Gender", listOf(Gender.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetAvatarPresets", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Get Avatar Presets By ID + * Retrive Avatar preset by ID + * @param avatarPresetID Unique Identifier for the Avatar Preset which is being requested + * @return GetAvatarPresetByIDRequest + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getAvatarPresetsByID(avatarPresetID: kotlin.String) : GetAvatarPresetByIDRequest { + val localVarResponse = getAvatarPresetsByIDWithHttpInfo(avatarPresetID = avatarPresetID) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetAvatarPresetByIDRequest + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get Avatar Presets By ID + * Retrive Avatar preset by ID + * @param avatarPresetID Unique Identifier for the Avatar Preset which is being requested + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getAvatarPresetsByIDWithHttpInfo(avatarPresetID: kotlin.String) : ApiResponse { + val localVariableConfig = getAvatarPresetsByIDRequestConfig(avatarPresetID = avatarPresetID) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getAvatarPresetsByID + * + * @param avatarPresetID Unique Identifier for the Avatar Preset which is being requested + * @return RequestConfig + */ + fun getAvatarPresetsByIDRequestConfig(avatarPresetID: kotlin.String) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("AvatarPresetID", listOf(avatarPresetID.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetAvatarPresetsByID", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Get Clips + * Get all the clips by Active status + * @param status Status of the clips + * @return GetClipsResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getClips(status: kotlin.Int) : GetClipsResult { + val localVarResponse = getClipsWithHttpInfo(status = status) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetClipsResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get Clips + * Get all the clips by Active status + * @param status Status of the clips + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getClipsWithHttpInfo(status: kotlin.Int) : ApiResponse { + val localVariableConfig = getClipsRequestConfig(status = status) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getClips + * + * @param status Status of the clips + * @return RequestConfig + */ + fun getClipsRequestConfig(status: kotlin.Int) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("Status", listOf(status.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetClips", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Get Clips By ID + * Get the specified clip's details by providing ClipID + * @param clipID Unique Identifier for the clip + * @return GetClipsByIDResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getClipsByID(clipID: kotlin.String) : GetClipsByIDResult { + val localVarResponse = getClipsByIDWithHttpInfo(clipID = clipID) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetClipsByIDResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get Clips By ID + * Get the specified clip's details by providing ClipID + * @param clipID Unique Identifier for the clip + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getClipsByIDWithHttpInfo(clipID: kotlin.String) : ApiResponse { + val localVariableConfig = getClipsByIDRequestConfig(clipID = clipID) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getClipsByID + * + * @param clipID Unique Identifier for the clip + * @return RequestConfig + */ + fun getClipsByIDRequestConfig(clipID: kotlin.String) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("ClipID", listOf(clipID.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetClipsByID", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Get Expression By ID + * Get the specified expression details by providing ExpressionID + * @param expressionID Unique Identifier for the expression + * @return GetExpressionByIDResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getExpressionByID(expressionID: kotlin.String) : GetExpressionByIDResult { + val localVarResponse = getExpressionByIDWithHttpInfo(expressionID = expressionID) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetExpressionByIDResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get Expression By ID + * Get the specified expression details by providing ExpressionID + * @param expressionID Unique Identifier for the expression + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getExpressionByIDWithHttpInfo(expressionID: kotlin.String) : ApiResponse { + val localVariableConfig = getExpressionByIDRequestConfig(expressionID = expressionID) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getExpressionByID + * + * @param expressionID Unique Identifier for the expression + * @return RequestConfig + */ + fun getExpressionByIDRequestConfig(expressionID: kotlin.String) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("ExpressionID", listOf(expressionID.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetExpressionByID", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Get Expressions + * Get all the active expressions + * @param status Status of Expressions + * @return GetExpressionsResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getExpressions(status: kotlin.Int) : GetExpressionsResult { + val localVarResponse = getExpressionsWithHttpInfo(status = status) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetExpressionsResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get Expressions + * Get all the active expressions + * @param status Status of Expressions + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getExpressionsWithHttpInfo(status: kotlin.Int) : ApiResponse { + val localVariableConfig = getExpressionsRequestConfig(status = status) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getExpressions + * + * @param status Status of Expressions + * @return RequestConfig + */ + fun getExpressionsRequestConfig(status: kotlin.Int) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("Status", listOf(status.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetExpressions", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Get All Bucket Vertices + * Get vertices for all buckets + * @param platform Name of the platform. I.e. Unreal, Unity + * @return GetAllBucketVerticesResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getGetallbucketvertices(platform: kotlin.String) : GetAllBucketVerticesResult { + val localVarResponse = getGetallbucketverticesWithHttpInfo(platform = platform) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetAllBucketVerticesResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get All Bucket Vertices + * Get vertices for all buckets + * @param platform Name of the platform. I.e. Unreal, Unity + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getGetallbucketverticesWithHttpInfo(platform: kotlin.String) : ApiResponse { + val localVariableConfig = getGetallbucketverticesRequestConfig(platform = platform) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getGetallbucketvertices + * + * @param platform Name of the platform. I.e. Unreal, Unity + * @return RequestConfig + */ + fun getGetallbucketverticesRequestConfig(platform: kotlin.String) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("Platform", listOf(platform.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetAllBucketVertices", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Grant Avatar Preset Items To User + * + * @param grantAvatarPresetItemsToUserRequest Request payload (optional) + * @return GrantAvatarPresetItemsToUserResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun grantAvatarPresetItemsToUser(grantAvatarPresetItemsToUserRequest: GrantAvatarPresetItemsToUserRequest? = null) : GrantAvatarPresetItemsToUserResult { + val localVarResponse = grantAvatarPresetItemsToUserWithHttpInfo(grantAvatarPresetItemsToUserRequest = grantAvatarPresetItemsToUserRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GrantAvatarPresetItemsToUserResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Grant Avatar Preset Items To User + * + * @param grantAvatarPresetItemsToUserRequest Request payload (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun grantAvatarPresetItemsToUserWithHttpInfo(grantAvatarPresetItemsToUserRequest: GrantAvatarPresetItemsToUserRequest?) : ApiResponse { + val localVariableConfig = grantAvatarPresetItemsToUserRequestConfig(grantAvatarPresetItemsToUserRequest = grantAvatarPresetItemsToUserRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation grantAvatarPresetItemsToUser + * + * @param grantAvatarPresetItemsToUserRequest Request payload (optional) + * @return RequestConfig + */ + fun grantAvatarPresetItemsToUserRequestConfig(grantAvatarPresetItemsToUserRequest: GrantAvatarPresetItemsToUserRequest?) : RequestConfig { + val localVariableBody = grantAvatarPresetItemsToUserRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/GrantAvatarPresetItemsToUser", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Grant Avatar Preset To User + * + * @param grantAvatarPresetToUserRequest (optional) + * @return GrantAvatarPresetToUserResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun grantAvatarPresetToUser(grantAvatarPresetToUserRequest: GrantAvatarPresetToUserRequest? = null) : GrantAvatarPresetToUserResult { + val localVarResponse = grantAvatarPresetToUserWithHttpInfo(grantAvatarPresetToUserRequest = grantAvatarPresetToUserRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GrantAvatarPresetToUserResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Grant Avatar Preset To User + * + * @param grantAvatarPresetToUserRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun grantAvatarPresetToUserWithHttpInfo(grantAvatarPresetToUserRequest: GrantAvatarPresetToUserRequest?) : ApiResponse { + val localVariableConfig = grantAvatarPresetToUserRequestConfig(grantAvatarPresetToUserRequest = grantAvatarPresetToUserRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation grantAvatarPresetToUser + * + * @param grantAvatarPresetToUserRequest (optional) + * @return RequestConfig + */ + fun grantAvatarPresetToUserRequestConfig(grantAvatarPresetToUserRequest: GrantAvatarPresetToUserRequest?) : RequestConfig { + val localVariableBody = grantAvatarPresetToUserRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/GrantAvatarPresetToUser", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Render Avatar Image + * + * @param renderAvatarImageRequest (optional) + * @return RenderAvatarImageResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun renderAvatarImage(renderAvatarImageRequest: RenderAvatarImageRequest? = null) : RenderAvatarImageResult { + val localVarResponse = renderAvatarImageWithHttpInfo(renderAvatarImageRequest = renderAvatarImageRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as RenderAvatarImageResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Render Avatar Image + * + * @param renderAvatarImageRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun renderAvatarImageWithHttpInfo(renderAvatarImageRequest: RenderAvatarImageRequest?) : ApiResponse { + val localVariableConfig = renderAvatarImageRequestConfig(renderAvatarImageRequest = renderAvatarImageRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation renderAvatarImage + * + * @param renderAvatarImageRequest (optional) + * @return RequestConfig + */ + fun renderAvatarImageRequestConfig(renderAvatarImageRequest: RenderAvatarImageRequest?) : RequestConfig { + val localVariableBody = renderAvatarImageRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/RenderAvatarImage", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Sync Avatars + * Creates missing avatars into the mentioned platform for the user + * @param syncAvatarsRequest (optional) + * @return SyncAvatarsResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun syncAvatars(syncAvatarsRequest: SyncAvatarsRequest? = null) : SyncAvatarsResult { + val localVarResponse = syncAvatarsWithHttpInfo(syncAvatarsRequest = syncAvatarsRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as SyncAvatarsResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Sync Avatars + * Creates missing avatars into the mentioned platform for the user + * @param syncAvatarsRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun syncAvatarsWithHttpInfo(syncAvatarsRequest: SyncAvatarsRequest?) : ApiResponse { + val localVariableConfig = syncAvatarsRequestConfig(syncAvatarsRequest = syncAvatarsRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation syncAvatars + * + * @param syncAvatarsRequest (optional) + * @return RequestConfig + */ + fun syncAvatarsRequestConfig(syncAvatarsRequest: SyncAvatarsRequest?) : RequestConfig { + val localVariableBody = syncAvatarsRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/SyncAvatars", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = + HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] +} diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/DefaultApi.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/DefaultApi.kt new file mode 100644 index 0000000..1d06926 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/DefaultApi.kt @@ -0,0 +1,116 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Apis + +import Avataryug.Client.AvatarProjectSettings +import com.Avataryug.client.Infrastructure.ApiClient +import java.io.IOException +import okhttp3.OkHttpClient +import okhttp3.HttpUrl + +import com.Avataryug.client.Models.GetUserIDfromSessionTicket + +import com.Avataryug.client.Infrastructure.ApiResponse +import com.Avataryug.client.Infrastructure.ClientException +import com.Avataryug.client.Infrastructure.ClientError +import com.Avataryug.client.Infrastructure.ServerException +import com.Avataryug.client.Infrastructure.ServerError +import com.Avataryug.client.Infrastructure.MultiValueMap +import com.Avataryug.client.Infrastructure.RequestConfig +import com.Avataryug.client.Infrastructure.RequestMethod +import com.Avataryug.client.Infrastructure.ResponseType +import com.Avataryug.client.Infrastructure.Success + +class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { + companion object { + @JvmStatic + val defaultBasePath: String by lazy { + val id = AvatarProjectSettings.Project_Id + System.getProperties().getProperty(ApiClient.baseUrlKey, "https://$id.avataryugapi.com/client") + } + } + + /** + * Get UserID from Session Ticket + * This API gives UserID from the session icket + * @return GetUserIDfromSessionTicket + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getUserIDfromSessionTicket() : GetUserIDfromSessionTicket { + val localVarResponse = getUserIDfromSessionTicketWithHttpInfo() + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetUserIDfromSessionTicket + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get UserID from Session Ticket + * This API gives UserID from the session icket + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getUserIDfromSessionTicketWithHttpInfo() : ApiResponse { + val localVariableConfig = getUserIDfromSessionTicketRequestConfig() + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getUserIDfromSessionTicket + * + * @return RequestConfig + */ + fun getUserIDfromSessionTicketRequestConfig() : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetUserIDfromSessionTicket", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = + HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] +} diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/EconomyApi.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/EconomyApi.kt new file mode 100644 index 0000000..e8d4215 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/EconomyApi.kt @@ -0,0 +1,658 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Apis + +import Avataryug.Client.AvatarProjectSettings +import com.Avataryug.client.Infrastructure.ApiClient +import java.io.IOException +import okhttp3.OkHttpClient +import okhttp3.HttpUrl + +import com.Avataryug.client.Models.GetEconomyBundleByIDResult +import com.Avataryug.client.Models.GetEconomyBundlesResult +import com.Avataryug.client.Models.GetEconomyContainerByIDResult +import com.Avataryug.client.Models.GetEconomyContainersResult +import com.Avataryug.client.Models.GetEconomyItemsByIDResult +import com.Avataryug.client.Models.GetEconomyItemsResult +import com.Avataryug.client.Models.GetEconomyStoresResult +import com.Avataryug.client.Models.GetStoreItemsByIDResult + +import com.Avataryug.client.Infrastructure.ApiResponse +import com.Avataryug.client.Infrastructure.ClientException +import com.Avataryug.client.Infrastructure.ClientError +import com.Avataryug.client.Infrastructure.ServerException +import com.Avataryug.client.Infrastructure.ServerError +import com.Avataryug.client.Infrastructure.MultiValueMap +import com.Avataryug.client.Infrastructure.RequestConfig +import com.Avataryug.client.Infrastructure.RequestMethod +import com.Avataryug.client.Infrastructure.ResponseType +import com.Avataryug.client.Infrastructure.Success + +/** + * Represents a collection of functions to interact with the API endpoints + */ +class EconomyApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { + companion object { + @JvmStatic + val defaultBasePath: String by lazy { + val id = AvatarProjectSettings.Project_Id + System.getProperties().getProperty(ApiClient.baseUrlKey, "https://$id.avataryugapi.com/client") + } + } + + /** + * Get Economy Bundles by ID + * Get Economy Bundles by ID + * @param bundleID Unqiue identifier for the bundle which is being requested. + * @return GetEconomyBundleByIDResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getEconomyBundleByID(bundleID: kotlin.String) : GetEconomyBundleByIDResult { + val localVarResponse = getEconomyBundleByIDWithHttpInfo(bundleID = bundleID) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetEconomyBundleByIDResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get Economy Bundles by ID + * Get Economy Bundles by ID + * @param bundleID Unqiue identifier for the bundle which is being requested. + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getEconomyBundleByIDWithHttpInfo(bundleID: kotlin.String) : ApiResponse { + val localVariableConfig = getEconomyBundleByIDRequestConfig(bundleID = bundleID) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getEconomyBundleByID + * + * @param bundleID Unqiue identifier for the bundle which is being requested. + * @return RequestConfig + */ + fun getEconomyBundleByIDRequestConfig(bundleID: kotlin.String) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("BundleID", listOf(bundleID.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetEconomyBundleByID", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Get Economy Bundles + * Get Economy Bundles + * @param status Status of the Bundles + * @return GetEconomyBundlesResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getEconomyBundles(status: kotlin.Int) : GetEconomyBundlesResult { + val localVarResponse = getEconomyBundlesWithHttpInfo(status = status) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetEconomyBundlesResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get Economy Bundles + * Get Economy Bundles + * @param status Status of the Bundles + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getEconomyBundlesWithHttpInfo(status: kotlin.Int) : ApiResponse { + val localVariableConfig = getEconomyBundlesRequestConfig(status = status) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getEconomyBundles + * + * @param status Status of the Bundles + * @return RequestConfig + */ + fun getEconomyBundlesRequestConfig(status: kotlin.Int) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("Status", listOf(status.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetEconomyBundles", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Get Economy Container by ID + * Get Economy Container by ID + * @param containerID Unqiue identifier for the container which is being requested. + * @return GetEconomyContainerByIDResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getEconomyContainerByID(containerID: kotlin.String) : GetEconomyContainerByIDResult { + val localVarResponse = getEconomyContainerByIDWithHttpInfo(containerID = containerID) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetEconomyContainerByIDResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get Economy Container by ID + * Get Economy Container by ID + * @param containerID Unqiue identifier for the container which is being requested. + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getEconomyContainerByIDWithHttpInfo(containerID: kotlin.String) : ApiResponse { + val localVariableConfig = getEconomyContainerByIDRequestConfig(containerID = containerID) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getEconomyContainerByID + * + * @param containerID Unqiue identifier for the container which is being requested. + * @return RequestConfig + */ + fun getEconomyContainerByIDRequestConfig(containerID: kotlin.String) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("ContainerID", listOf(containerID.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetEconomyContainerByID", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Get Economy Containers + * Get Economy Containers + * @param status Status of the Containers + * @return GetEconomyContainersResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getEconomyContainers(status: kotlin.Int) : GetEconomyContainersResult { + val localVarResponse = getEconomyContainersWithHttpInfo(status = status) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetEconomyContainersResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get Economy Containers + * Get Economy Containers + * @param status Status of the Containers + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getEconomyContainersWithHttpInfo(status: kotlin.Int) : ApiResponse { + val localVariableConfig = getEconomyContainersRequestConfig(status = status) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getEconomyContainers + * + * @param status Status of the Containers + * @return RequestConfig + */ + fun getEconomyContainersRequestConfig(status: kotlin.Int) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("Status", listOf(status.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetEconomyContainers", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Get Economy Items + * Get Economy Items + * @param category Category of the Item + * @param status Status of the Item + * @param gender Gender type of the item + * @return GetEconomyItemsResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getEconomyItems(category: kotlin.String, status: kotlin.Int, gender: kotlin.Int) : GetEconomyItemsResult { + val localVarResponse = getEconomyItemsWithHttpInfo(category = category, status = status, gender = gender) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetEconomyItemsResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get Economy Items + * Get Economy Items + * @param category Category of the Item + * @param status Status of the Item + * @param gender Gender type of the item + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getEconomyItemsWithHttpInfo(category: kotlin.String, status: kotlin.Int, gender: kotlin.Int) : ApiResponse { + val localVariableConfig = getEconomyItemsRequestConfig(category = category, status = status, gender = gender) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getEconomyItems + * + * @param category Category of the Item + * @param status Status of the Item + * @param gender Gender type of the item + * @return RequestConfig + */ + fun getEconomyItemsRequestConfig(category: kotlin.String, status: kotlin.Int, gender: kotlin.Int) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("Category", listOf(category.toString())) + put("Status", listOf(status.toString())) + put("Gender", listOf(gender.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetEconomyItems", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Get Economy Item by ID + * Get Economy Item by ID + * @param itemID Unqiue identifier for the item which is being requested. + * @return GetEconomyItemsByIDResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getEconomyItemsByID(itemID: kotlin.String) : GetEconomyItemsByIDResult { + val localVarResponse = getEconomyItemsByIDWithHttpInfo(itemID = itemID) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetEconomyItemsByIDResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get Economy Item by ID + * Get Economy Item by ID + * @param itemID Unqiue identifier for the item which is being requested. + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getEconomyItemsByIDWithHttpInfo(itemID: kotlin.String) : ApiResponse { + val localVariableConfig = getEconomyItemsByIDRequestConfig(itemID = itemID) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getEconomyItemsByID + * + * @param itemID Unqiue identifier for the item which is being requested. + * @return RequestConfig + */ + fun getEconomyItemsByIDRequestConfig(itemID: kotlin.String) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("ItemID", listOf(itemID.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetEconomyItemsByID", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Get Economy Stores + * Get Economy Stores + * @param status Status of the Stores + * @return GetEconomyStoresResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getEconomyStores(status: kotlin.Int) : GetEconomyStoresResult { + val localVarResponse = getEconomyStoresWithHttpInfo(status = status) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetEconomyStoresResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get Economy Stores + * Get Economy Stores + * @param status Status of the Stores + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getEconomyStoresWithHttpInfo(status: kotlin.Int) : ApiResponse { + val localVariableConfig = getEconomyStoresRequestConfig(status = status) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getEconomyStores + * + * @param status Status of the Stores + * @return RequestConfig + */ + fun getEconomyStoresRequestConfig(status: kotlin.Int) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("Status", listOf(status.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetEconomyStores", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Get Store Items by ID + * Retrieves the set of items defined for the specified store, including all prices defined + * @param storeID Unqiue identifier for the store which is being requested. + * @return GetStoreItemsByIDResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getStoreItemsByID(storeID: kotlin.String) : GetStoreItemsByIDResult { + val localVarResponse = getStoreItemsByIDWithHttpInfo(storeID = storeID) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetStoreItemsByIDResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get Store Items by ID + * Retrieves the set of items defined for the specified store, including all prices defined + * @param storeID Unqiue identifier for the store which is being requested. + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getStoreItemsByIDWithHttpInfo(storeID: kotlin.String) : ApiResponse { + val localVariableConfig = getStoreItemsByIDRequestConfig(storeID = storeID) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getStoreItemsByID + * + * @param storeID Unqiue identifier for the store which is being requested. + * @return RequestConfig + */ + fun getStoreItemsByIDRequestConfig(storeID: kotlin.String) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("StoreID", listOf(storeID.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetStoreItemsByID", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = + HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] +} diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/UserAccountManagementApi.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/UserAccountManagementApi.kt new file mode 100644 index 0000000..16c09ec --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/UserAccountManagementApi.kt @@ -0,0 +1,1930 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Apis + +import Avataryug.Client.AvatarProjectSettings +import com.Avataryug.client.Infrastructure.ApiClient +import java.io.IOException +import okhttp3.OkHttpClient +import okhttp3.HttpUrl + +import com.Avataryug.client.Models.AddEmailPasswordRequest +import com.Avataryug.client.Models.AddEmailPasswordResult +import com.Avataryug.client.Models.AddGenericServiceIDRequest +import com.Avataryug.client.Models.AddGenericServiceIDResult +import com.Avataryug.client.Models.ChangePasswordRequest +import com.Avataryug.client.Models.ChangePasswordResult +import com.Avataryug.client.Models.DeleteUserResult +import com.Avataryug.client.Models.GetUserAccountInfoResult +import com.Avataryug.client.Models.GetUserProfileResult +import com.Avataryug.client.Models.LinkAndroidDeviceIDRequest +import com.Avataryug.client.Models.LinkAndroidDeviceIDResult +import com.Avataryug.client.Models.LinkAppleRequest +import com.Avataryug.client.Models.LinkAppleResult +import com.Avataryug.client.Models.LinkCustomIDRequest +import com.Avataryug.client.Models.LinkCustomIDResult +import com.Avataryug.client.Models.LinkFacebookAccountRequest +import com.Avataryug.client.Models.LinkFacebookAccountResult +import com.Avataryug.client.Models.LinkGoogleAccountRequest +import com.Avataryug.client.Models.LinkGoogleAccountResult +import com.Avataryug.client.Models.LinkIOSDeviceIDRequest +import com.Avataryug.client.Models.LinkIOSDeviceIDResult +import com.Avataryug.client.Models.RemoveGenericServiceIDResult +import com.Avataryug.client.Models.SendAccountRecoveryEmailRequset +import com.Avataryug.client.Models.SendAccountRecoveryEmailResult +import com.Avataryug.client.Models.SendAccountVerificationEmailRequest +import com.Avataryug.client.Models.SendAccountVerificationEmailResult +import com.Avataryug.client.Models.UnlinkAndroidDeviceIDResult +import com.Avataryug.client.Models.UnlinkAppleResult +import com.Avataryug.client.Models.UnlinkCustomIDResult +import com.Avataryug.client.Models.UnlinkFacebookAccountResult +import com.Avataryug.client.Models.UnlinkGoogleAccountResult +import com.Avataryug.client.Models.UnlinkIOSDeviceIDResult +import com.Avataryug.client.Models.UpdateDefaultAvatarIDRequest +import com.Avataryug.client.Models.UpdateDefaultAvatarIDResult +import com.Avataryug.client.Models.UpdateEmailPasswordRequest +import com.Avataryug.client.Models.UpdateEmailPasswordResult +import com.Avataryug.client.Models.UpdateUserDemographicsRequest +import com.Avataryug.client.Models.UpdateUserDemographicsResult +import com.Avataryug.client.Models.UpdateUserProjectDisplayNameRequest +import com.Avataryug.client.Models.UpdateUserProjectDisplayNameResult +import com.Avataryug.client.Models.VerifyUserWithEmailRequest +import com.Avataryug.client.Models.VerifyUserWithEmailResult + +import com.Avataryug.client.Infrastructure.ApiResponse +import com.Avataryug.client.Infrastructure.ClientException +import com.Avataryug.client.Infrastructure.ClientError +import com.Avataryug.client.Infrastructure.ServerException +import com.Avataryug.client.Infrastructure.ServerError +import com.Avataryug.client.Infrastructure.MultiValueMap +import com.Avataryug.client.Infrastructure.RequestConfig +import com.Avataryug.client.Infrastructure.RequestMethod +import com.Avataryug.client.Infrastructure.ResponseType +import com.Avataryug.client.Infrastructure.Success + +/** + * Represents a collection of functions to interact with the API endpoints + */ +class UserAccountManagementApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { + companion object { + @JvmStatic + val defaultBasePath: String by lazy { + val id = AvatarProjectSettings.Project_Id + System.getProperties().getProperty(ApiClient.baseUrlKey, "https://$id.avataryugapi.com/client") + } + } + + /** + * Add Email Password + * Adds AvatarYug email/password auth to an existing account created via an anonymous auth method, e.g. automatic device ID login. + * @param addEmailPasswordRequest (optional) + * @return AddEmailPasswordResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun addEmailPassword(addEmailPasswordRequest: AddEmailPasswordRequest? = null) : AddEmailPasswordResult { + val localVarResponse = addEmailPasswordWithHttpInfo(addEmailPasswordRequest = addEmailPasswordRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as AddEmailPasswordResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Add Email Password + * Adds AvatarYug email/password auth to an existing account created via an anonymous auth method, e.g. automatic device ID login. + * @param addEmailPasswordRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun addEmailPasswordWithHttpInfo(addEmailPasswordRequest: AddEmailPasswordRequest?) : ApiResponse { + val localVariableConfig = addEmailPasswordRequestConfig(addEmailPasswordRequest = addEmailPasswordRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation addEmailPassword + * + * @param addEmailPasswordRequest (optional) + * @return RequestConfig + */ + fun addEmailPasswordRequestConfig(addEmailPasswordRequest: AddEmailPasswordRequest?) : RequestConfig { + val localVariableBody = addEmailPasswordRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/AddEmailPassword", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Add Generic Service ID + * Adds the specified generic service identifier to the user's AvatarYug account. This is designed to allow for a AvatarYug ID lookup of any arbitrary service identifier a Project wants to add. This identifier should never be used as authentication credentials, as the intent is that it is easily accessible by other users. + * @param addGenericServiceIDRequest (optional) + * @return AddGenericServiceIDResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun addGenericServiceID(addGenericServiceIDRequest: AddGenericServiceIDRequest? = null) : AddGenericServiceIDResult { + val localVarResponse = addGenericServiceIDWithHttpInfo(addGenericServiceIDRequest = addGenericServiceIDRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as AddGenericServiceIDResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Add Generic Service ID + * Adds the specified generic service identifier to the user's AvatarYug account. This is designed to allow for a AvatarYug ID lookup of any arbitrary service identifier a Project wants to add. This identifier should never be used as authentication credentials, as the intent is that it is easily accessible by other users. + * @param addGenericServiceIDRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun addGenericServiceIDWithHttpInfo(addGenericServiceIDRequest: AddGenericServiceIDRequest?) : ApiResponse { + val localVariableConfig = addGenericServiceIDRequestConfig(addGenericServiceIDRequest = addGenericServiceIDRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation addGenericServiceID + * + * @param addGenericServiceIDRequest (optional) + * @return RequestConfig + */ + fun addGenericServiceIDRequestConfig(addGenericServiceIDRequest: AddGenericServiceIDRequest?) : RequestConfig { + val localVariableBody = addGenericServiceIDRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/AddGenericServiceID", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Change Password + * + * @param changePasswordRequest (optional) + * @return ChangePasswordResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun changePassword(changePasswordRequest: ChangePasswordRequest? = null) : ChangePasswordResult { + val localVarResponse = changePasswordWithHttpInfo(changePasswordRequest = changePasswordRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as ChangePasswordResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Change Password + * + * @param changePasswordRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun changePasswordWithHttpInfo(changePasswordRequest: ChangePasswordRequest?) : ApiResponse { + val localVariableConfig = changePasswordRequestConfig(changePasswordRequest = changePasswordRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation changePassword + * + * @param changePasswordRequest (optional) + * @return RequestConfig + */ + fun changePasswordRequestConfig(changePasswordRequest: ChangePasswordRequest?) : RequestConfig { + val localVariableBody = changePasswordRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/ChangePassword", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Delete User + * Delete User Account from Avataryug platform. + * @return DeleteUserResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun deleteUser() : DeleteUserResult { + val localVarResponse = deleteUserWithHttpInfo() + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as DeleteUserResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Delete User + * Delete User Account from Avataryug platform. + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun deleteUserWithHttpInfo() : ApiResponse { + val localVariableConfig = deleteUserRequestConfig() + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation deleteUser + * + * @return RequestConfig + */ + fun deleteUserRequestConfig() : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.DELETE, + path = "/DeleteUser", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Get User Account Info + * Get user's complete account information + * @return GetUserAccountInfoResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getUserAccountInfo() : GetUserAccountInfoResult { + val localVarResponse = getUserAccountInfoWithHttpInfo() + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetUserAccountInfoResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get User Account Info + * Get user's complete account information + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getUserAccountInfoWithHttpInfo() : ApiResponse { + val localVariableConfig = getUserAccountInfoRequestConfig() + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getUserAccountInfo + * + * @return RequestConfig + */ + fun getUserAccountInfoRequestConfig() : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetUserAccountInfo", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Get User Profile + * Get Public data for the User + * @param userID Unique AvatarYug assigned ID of the user on whom the operation will be performed + * @return GetUserProfileResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getUserProfile(userID: kotlin.String) : GetUserProfileResult { + val localVarResponse = getUserProfileWithHttpInfo(userID = userID) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetUserProfileResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get User Profile + * Get Public data for the User + * @param userID Unique AvatarYug assigned ID of the user on whom the operation will be performed + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getUserProfileWithHttpInfo(userID: kotlin.String) : ApiResponse { + val localVariableConfig = getUserProfileRequestConfig(userID = userID) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getUserProfile + * + * @param userID Unique AvatarYug assigned ID of the user on whom the operation will be performed + * @return RequestConfig + */ + fun getUserProfileRequestConfig(userID: kotlin.String) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("UserID", listOf(userID.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetUserProfile", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Link Android Device ID + * Links the Android device identifier to the user's AvatarYug account + * @param linkAndroidDeviceIDRequest (optional) + * @return LinkAndroidDeviceIDResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun linkAndroidDeviceID(linkAndroidDeviceIDRequest: LinkAndroidDeviceIDRequest? = null) : LinkAndroidDeviceIDResult { + val localVarResponse = linkAndroidDeviceIDWithHttpInfo(linkAndroidDeviceIDRequest = linkAndroidDeviceIDRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as LinkAndroidDeviceIDResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Link Android Device ID + * Links the Android device identifier to the user's AvatarYug account + * @param linkAndroidDeviceIDRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun linkAndroidDeviceIDWithHttpInfo(linkAndroidDeviceIDRequest: LinkAndroidDeviceIDRequest?) : ApiResponse { + val localVariableConfig = linkAndroidDeviceIDRequestConfig(linkAndroidDeviceIDRequest = linkAndroidDeviceIDRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation linkAndroidDeviceID + * + * @param linkAndroidDeviceIDRequest (optional) + * @return RequestConfig + */ + fun linkAndroidDeviceIDRequestConfig(linkAndroidDeviceIDRequest: LinkAndroidDeviceIDRequest?) : RequestConfig { + val localVariableBody = linkAndroidDeviceIDRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/LinkAndroidDeviceID", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Link Apple + * Links the Apple account associated with the token to the user's AvatarYug account. + * @param linkAppleRequest (optional) + * @return LinkAppleResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun linkApple(linkAppleRequest: LinkAppleRequest? = null) : LinkAppleResult { + val localVarResponse = linkAppleWithHttpInfo(linkAppleRequest = linkAppleRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as LinkAppleResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Link Apple + * Links the Apple account associated with the token to the user's AvatarYug account. + * @param linkAppleRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun linkAppleWithHttpInfo(linkAppleRequest: LinkAppleRequest?) : ApiResponse { + val localVariableConfig = linkAppleRequestConfig(linkAppleRequest = linkAppleRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation linkApple + * + * @param linkAppleRequest (optional) + * @return RequestConfig + */ + fun linkAppleRequestConfig(linkAppleRequest: LinkAppleRequest?) : RequestConfig { + val localVariableBody = linkAppleRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/LinkApple", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Link Custom ID + * Links the custom identifier, generated by the Project, to the user's AvatarYug account + * @param linkCustomIDRequest (optional) + * @return LinkCustomIDResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun linkCustomID(linkCustomIDRequest: LinkCustomIDRequest? = null) : LinkCustomIDResult { + val localVarResponse = linkCustomIDWithHttpInfo(linkCustomIDRequest = linkCustomIDRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as LinkCustomIDResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Link Custom ID + * Links the custom identifier, generated by the Project, to the user's AvatarYug account + * @param linkCustomIDRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun linkCustomIDWithHttpInfo(linkCustomIDRequest: LinkCustomIDRequest?) : ApiResponse { + val localVariableConfig = linkCustomIDRequestConfig(linkCustomIDRequest = linkCustomIDRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation linkCustomID + * + * @param linkCustomIDRequest (optional) + * @return RequestConfig + */ + fun linkCustomIDRequestConfig(linkCustomIDRequest: LinkCustomIDRequest?) : RequestConfig { + val localVariableBody = linkCustomIDRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/LinkCustomID", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Link Facebook Account + * Links the Facebook account associated with the provided Facebook access token to the user's AvatarYug account + * @param linkFacebookAccountRequest (optional) + * @return LinkFacebookAccountResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun linkFacebookAccount(linkFacebookAccountRequest: LinkFacebookAccountRequest? = null) : LinkFacebookAccountResult { + val localVarResponse = linkFacebookAccountWithHttpInfo(linkFacebookAccountRequest = linkFacebookAccountRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as LinkFacebookAccountResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Link Facebook Account + * Links the Facebook account associated with the provided Facebook access token to the user's AvatarYug account + * @param linkFacebookAccountRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun linkFacebookAccountWithHttpInfo(linkFacebookAccountRequest: LinkFacebookAccountRequest?) : ApiResponse { + val localVariableConfig = linkFacebookAccountRequestConfig(linkFacebookAccountRequest = linkFacebookAccountRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation linkFacebookAccount + * + * @param linkFacebookAccountRequest (optional) + * @return RequestConfig + */ + fun linkFacebookAccountRequestConfig(linkFacebookAccountRequest: LinkFacebookAccountRequest?) : RequestConfig { + val localVariableBody = linkFacebookAccountRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/LinkFacebookAccount", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Link Google Account + * Links the currently signed-in user account to their Google account, using their Google account credentials + * @param linkGoogleAccountRequest Linked Google account to user's account successfully (optional) + * @return LinkGoogleAccountResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun linkGoogleAccount(linkGoogleAccountRequest: LinkGoogleAccountRequest? = null) : LinkGoogleAccountResult { + val localVarResponse = linkGoogleAccountWithHttpInfo(linkGoogleAccountRequest = linkGoogleAccountRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as LinkGoogleAccountResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Link Google Account + * Links the currently signed-in user account to their Google account, using their Google account credentials + * @param linkGoogleAccountRequest Linked Google account to user's account successfully (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun linkGoogleAccountWithHttpInfo(linkGoogleAccountRequest: LinkGoogleAccountRequest?) : ApiResponse { + val localVariableConfig = linkGoogleAccountRequestConfig(linkGoogleAccountRequest = linkGoogleAccountRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation linkGoogleAccount + * + * @param linkGoogleAccountRequest Linked Google account to user's account successfully (optional) + * @return RequestConfig + */ + fun linkGoogleAccountRequestConfig(linkGoogleAccountRequest: LinkGoogleAccountRequest?) : RequestConfig { + val localVariableBody = linkGoogleAccountRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/LinkGoogleAccount", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Link IOS Device ID + * Links the vendor-specific iOS device identifier to the user's AvatarYug account + * @param linkIOSDeviceIDRequest (optional) + * @return LinkIOSDeviceIDResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun linkIOSDeviceID(linkIOSDeviceIDRequest: LinkIOSDeviceIDRequest? = null) : LinkIOSDeviceIDResult { + val localVarResponse = linkIOSDeviceIDWithHttpInfo(linkIOSDeviceIDRequest = linkIOSDeviceIDRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as LinkIOSDeviceIDResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Link IOS Device ID + * Links the vendor-specific iOS device identifier to the user's AvatarYug account + * @param linkIOSDeviceIDRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun linkIOSDeviceIDWithHttpInfo(linkIOSDeviceIDRequest: LinkIOSDeviceIDRequest?) : ApiResponse { + val localVariableConfig = linkIOSDeviceIDRequestConfig(linkIOSDeviceIDRequest = linkIOSDeviceIDRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation linkIOSDeviceID + * + * @param linkIOSDeviceIDRequest (optional) + * @return RequestConfig + */ + fun linkIOSDeviceIDRequestConfig(linkIOSDeviceIDRequest: LinkIOSDeviceIDRequest?) : RequestConfig { + val localVariableBody = linkIOSDeviceIDRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/LinkIOSDeviceID", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Remove Generic Service ID + * Removes the generic service identifier from the user's AvatarYug account. + * @return RemoveGenericServiceIDResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun removeGenericServiceID() : RemoveGenericServiceIDResult { + val localVarResponse = removeGenericServiceIDWithHttpInfo() + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as RemoveGenericServiceIDResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Remove Generic Service ID + * Removes the generic service identifier from the user's AvatarYug account. + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun removeGenericServiceIDWithHttpInfo() : ApiResponse { + val localVariableConfig = removeGenericServiceIDRequestConfig() + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation removeGenericServiceID + * + * @return RequestConfig + */ + fun removeGenericServiceIDRequestConfig() : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/RemoveGenericServiceID", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Send Account Recovery Email + * + * @param sendAccountRecoveryEmailRequset (optional) + * @return SendAccountRecoveryEmailResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun sendAccountRecoveryEmail(sendAccountRecoveryEmailRequset: SendAccountRecoveryEmailRequset? = null) : SendAccountRecoveryEmailResult { + val localVarResponse = sendAccountRecoveryEmailWithHttpInfo(sendAccountRecoveryEmailRequset = sendAccountRecoveryEmailRequset) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as SendAccountRecoveryEmailResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Send Account Recovery Email + * + * @param sendAccountRecoveryEmailRequset (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun sendAccountRecoveryEmailWithHttpInfo(sendAccountRecoveryEmailRequset: SendAccountRecoveryEmailRequset?) : ApiResponse { + val localVariableConfig = sendAccountRecoveryEmailRequestConfig(sendAccountRecoveryEmailRequset = sendAccountRecoveryEmailRequset) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation sendAccountRecoveryEmail + * + * @param sendAccountRecoveryEmailRequset (optional) + * @return RequestConfig + */ + fun sendAccountRecoveryEmailRequestConfig(sendAccountRecoveryEmailRequset: SendAccountRecoveryEmailRequset?) : RequestConfig { + val localVariableBody = sendAccountRecoveryEmailRequset + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/SendAccountRecoveryEmail", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Send Account Verification Email + * Send Verification Email to verify the email address + * @param sendAccountVerificationEmailRequest (optional) + * @return SendAccountVerificationEmailResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun sendAccountVerificationEmail(sendAccountVerificationEmailRequest: SendAccountVerificationEmailRequest? = null) : SendAccountVerificationEmailResult { + val localVarResponse = sendAccountVerificationEmailWithHttpInfo(sendAccountVerificationEmailRequest = sendAccountVerificationEmailRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as SendAccountVerificationEmailResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Send Account Verification Email + * Send Verification Email to verify the email address + * @param sendAccountVerificationEmailRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun sendAccountVerificationEmailWithHttpInfo(sendAccountVerificationEmailRequest: SendAccountVerificationEmailRequest?) : ApiResponse { + val localVariableConfig = sendAccountVerificationEmailRequestConfig(sendAccountVerificationEmailRequest = sendAccountVerificationEmailRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation sendAccountVerificationEmail + * + * @param sendAccountVerificationEmailRequest (optional) + * @return RequestConfig + */ + fun sendAccountVerificationEmailRequestConfig(sendAccountVerificationEmailRequest: SendAccountVerificationEmailRequest?) : RequestConfig { + val localVariableBody = sendAccountVerificationEmailRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/SendAccountVerificationEmail", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Unlink Android Device ID + * Unlinks the related Android device identifier from the user's AvatarYug account + * @return UnlinkAndroidDeviceIDResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun unlinkAndroidDeviceID() : UnlinkAndroidDeviceIDResult { + val localVarResponse = unlinkAndroidDeviceIDWithHttpInfo() + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as UnlinkAndroidDeviceIDResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Unlink Android Device ID + * Unlinks the related Android device identifier from the user's AvatarYug account + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun unlinkAndroidDeviceIDWithHttpInfo() : ApiResponse { + val localVariableConfig = unlinkAndroidDeviceIDRequestConfig() + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation unlinkAndroidDeviceID + * + * @return RequestConfig + */ + fun unlinkAndroidDeviceIDRequestConfig() : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/UnlinkAndroidDeviceID", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Unlink Apple + * Unlinks the related Apple account from the user's AvatarYug account. + * @return UnlinkAppleResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun unlinkApple() : UnlinkAppleResult { + val localVarResponse = unlinkAppleWithHttpInfo() + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as UnlinkAppleResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Unlink Apple + * Unlinks the related Apple account from the user's AvatarYug account. + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun unlinkAppleWithHttpInfo() : ApiResponse { + val localVariableConfig = unlinkAppleRequestConfig() + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation unlinkApple + * + * @return RequestConfig + */ + fun unlinkAppleRequestConfig() : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/UnlinkApple", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Unlink Custom ID + * Unlinks the related custom identifier from the user's AvatarYug account + * @return UnlinkCustomIDResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun unlinkCustomID() : UnlinkCustomIDResult { + val localVarResponse = unlinkCustomIDWithHttpInfo() + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as UnlinkCustomIDResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Unlink Custom ID + * Unlinks the related custom identifier from the user's AvatarYug account + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun unlinkCustomIDWithHttpInfo() : ApiResponse { + val localVariableConfig = unlinkCustomIDRequestConfig() + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation unlinkCustomID + * + * @return RequestConfig + */ + fun unlinkCustomIDRequestConfig() : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/UnlinkCustomID", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Unlink Facebook Account + * Unlinks the related Facebook account from the user's AvatarYug account + * @return UnlinkFacebookAccountResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun unlinkFacebookAccount() : UnlinkFacebookAccountResult { + val localVarResponse = unlinkFacebookAccountWithHttpInfo() + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as UnlinkFacebookAccountResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Unlink Facebook Account + * Unlinks the related Facebook account from the user's AvatarYug account + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun unlinkFacebookAccountWithHttpInfo() : ApiResponse { + val localVariableConfig = unlinkFacebookAccountRequestConfig() + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation unlinkFacebookAccount + * + * @return RequestConfig + */ + fun unlinkFacebookAccountRequestConfig() : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/UnlinkFacebookAccount", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Unlink Google Account + * Unlinks the related Google account from the user's AvatarYug account + * @return UnlinkGoogleAccountResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun unlinkGoogleAccount() : UnlinkGoogleAccountResult { + val localVarResponse = unlinkGoogleAccountWithHttpInfo() + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as UnlinkGoogleAccountResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Unlink Google Account + * Unlinks the related Google account from the user's AvatarYug account + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun unlinkGoogleAccountWithHttpInfo() : ApiResponse { + val localVariableConfig = unlinkGoogleAccountRequestConfig() + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation unlinkGoogleAccount + * + * @return RequestConfig + */ + fun unlinkGoogleAccountRequestConfig() : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/UnlinkGoogleAccount", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Unlink IOS Device ID + * Unlinks the related iOS device identifier from the user's AvatarYug account + * @return UnlinkIOSDeviceIDResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun unlinkIOSDeviceID() : UnlinkIOSDeviceIDResult { + val localVarResponse = unlinkIOSDeviceIDWithHttpInfo() + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as UnlinkIOSDeviceIDResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Unlink IOS Device ID + * Unlinks the related iOS device identifier from the user's AvatarYug account + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun unlinkIOSDeviceIDWithHttpInfo() : ApiResponse { + val localVariableConfig = unlinkIOSDeviceIDRequestConfig() + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation unlinkIOSDeviceID + * + * @return RequestConfig + */ + fun unlinkIOSDeviceIDRequestConfig() : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/UnlinkIOSDeviceID", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Update Default AvatarID + * Sets the default avatar ID to users account + * @param updateDefaultAvatarIDRequest (optional) + * @return UpdateDefaultAvatarIDResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun updateDefaultAvatarID(updateDefaultAvatarIDRequest: UpdateDefaultAvatarIDRequest? = null) : UpdateDefaultAvatarIDResult { + val localVarResponse = updateDefaultAvatarIDWithHttpInfo(updateDefaultAvatarIDRequest = updateDefaultAvatarIDRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as UpdateDefaultAvatarIDResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Update Default AvatarID + * Sets the default avatar ID to users account + * @param updateDefaultAvatarIDRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun updateDefaultAvatarIDWithHttpInfo(updateDefaultAvatarIDRequest: UpdateDefaultAvatarIDRequest?) : ApiResponse { + val localVariableConfig = updateDefaultAvatarIDRequestConfig(updateDefaultAvatarIDRequest = updateDefaultAvatarIDRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation updateDefaultAvatarID + * + * @param updateDefaultAvatarIDRequest (optional) + * @return RequestConfig + */ + fun updateDefaultAvatarIDRequestConfig(updateDefaultAvatarIDRequest: UpdateDefaultAvatarIDRequest?) : RequestConfig { + val localVariableBody = updateDefaultAvatarIDRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/UpdateDefaultAvatarID", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Update Email Password + * + * @param updateEmailPasswordRequest (optional) + * @return UpdateEmailPasswordResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun updateEmailPassword(updateEmailPasswordRequest: UpdateEmailPasswordRequest? = null) : UpdateEmailPasswordResult { + val localVarResponse = updateEmailPasswordWithHttpInfo(updateEmailPasswordRequest = updateEmailPasswordRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as UpdateEmailPasswordResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Update Email Password + * + * @param updateEmailPasswordRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun updateEmailPasswordWithHttpInfo(updateEmailPasswordRequest: UpdateEmailPasswordRequest?) : ApiResponse { + val localVariableConfig = updateEmailPasswordRequestConfig(updateEmailPasswordRequest = updateEmailPasswordRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation updateEmailPassword + * + * @param updateEmailPasswordRequest (optional) + * @return RequestConfig + */ + fun updateEmailPasswordRequestConfig(updateEmailPasswordRequest: UpdateEmailPasswordRequest?) : RequestConfig { + val localVariableBody = updateEmailPasswordRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/UpdateEmailPassword", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Update User Demographics + * + * @param updateUserDemographicsRequest (optional) + * @return UpdateUserDemographicsResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun updateUserDemographics(updateUserDemographicsRequest: UpdateUserDemographicsRequest? = null) : UpdateUserDemographicsResult { + val localVarResponse = updateUserDemographicsWithHttpInfo(updateUserDemographicsRequest = updateUserDemographicsRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as UpdateUserDemographicsResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Update User Demographics + * + * @param updateUserDemographicsRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun updateUserDemographicsWithHttpInfo(updateUserDemographicsRequest: UpdateUserDemographicsRequest?) : ApiResponse { + val localVariableConfig = updateUserDemographicsRequestConfig(updateUserDemographicsRequest = updateUserDemographicsRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation updateUserDemographics + * + * @param updateUserDemographicsRequest (optional) + * @return RequestConfig + */ + fun updateUserDemographicsRequestConfig(updateUserDemographicsRequest: UpdateUserDemographicsRequest?) : RequestConfig { + val localVariableBody = updateUserDemographicsRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/UpdateUserDemographics", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Update User Display Name + * Updates the display name for the user in the project + * @param updateUserProjectDisplayNameRequest (optional) + * @return UpdateUserProjectDisplayNameResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun updateUserProjectDisplayName(updateUserProjectDisplayNameRequest: UpdateUserProjectDisplayNameRequest? = null) : UpdateUserProjectDisplayNameResult { + val localVarResponse = updateUserProjectDisplayNameWithHttpInfo(updateUserProjectDisplayNameRequest = updateUserProjectDisplayNameRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as UpdateUserProjectDisplayNameResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Update User Display Name + * Updates the display name for the user in the project + * @param updateUserProjectDisplayNameRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun updateUserProjectDisplayNameWithHttpInfo(updateUserProjectDisplayNameRequest: UpdateUserProjectDisplayNameRequest?) : ApiResponse { + val localVariableConfig = updateUserProjectDisplayNameRequestConfig(updateUserProjectDisplayNameRequest = updateUserProjectDisplayNameRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation updateUserProjectDisplayName + * + * @param updateUserProjectDisplayNameRequest (optional) + * @return RequestConfig + */ + fun updateUserProjectDisplayNameRequestConfig(updateUserProjectDisplayNameRequest: UpdateUserProjectDisplayNameRequest?) : RequestConfig { + val localVariableBody = updateUserProjectDisplayNameRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.PUT, + path = "/UpdateUserProjectDisplayName", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Verify User With Email + * Verifies user account status to email verified once email verification is dine + * @param verifyUserWithEmailRequest (optional) + * @return VerifyUserWithEmailResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun verifyUserWithEmail(verifyUserWithEmailRequest: VerifyUserWithEmailRequest? = null) : VerifyUserWithEmailResult { + val localVarResponse = verifyUserWithEmailWithHttpInfo(verifyUserWithEmailRequest = verifyUserWithEmailRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as VerifyUserWithEmailResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Verify User With Email + * Verifies user account status to email verified once email verification is dine + * @param verifyUserWithEmailRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun verifyUserWithEmailWithHttpInfo(verifyUserWithEmailRequest: VerifyUserWithEmailRequest?) : ApiResponse { + val localVariableConfig = verifyUserWithEmailRequestConfig(verifyUserWithEmailRequest = verifyUserWithEmailRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation verifyUserWithEmail + * + * @param verifyUserWithEmailRequest (optional) + * @return RequestConfig + */ + fun verifyUserWithEmailRequestConfig(verifyUserWithEmailRequest: VerifyUserWithEmailRequest?) : RequestConfig { + val localVariableBody = verifyUserWithEmailRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/VerifyUserWithEmail", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = + HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] +} diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/UserDataManagementApi.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/UserDataManagementApi.kt new file mode 100644 index 0000000..be8fffd --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Api/UserDataManagementApi.kt @@ -0,0 +1,1158 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Apis + +import Avataryug.Client.AvatarProjectSettings +import com.Avataryug.client.Infrastructure.ApiClient +import java.io.IOException +import okhttp3.OkHttpClient +import okhttp3.HttpUrl + +import com.Avataryug.client.Models.AddUserAvatarRequest +import com.Avataryug.client.Models.AddUserAvatarResult +import com.Avataryug.client.Models.AddVirtualCurrencyToUserRequest +import com.Avataryug.client.Models.AddVirtualCurrencyToUserResult +import com.Avataryug.client.Models.ConfirmPurchaseRequest +import com.Avataryug.client.Models.ConfirmPurchaseResult +import com.Avataryug.client.Models.ConsumeInstanceRequest +import com.Avataryug.client.Models.ConsumeInstanceResult +import com.Avataryug.client.Models.DeleteUserAvatarResult +import com.Avataryug.client.Models.GetPurchaseResult +import com.Avataryug.client.Models.GetUserInventoryResult +import com.Avataryug.client.Models.GetUsersAllAvatarsResult +import com.Avataryug.client.Models.GrantInstanceToUserRequest +import com.Avataryug.client.Models.GrantInstanceToUserResult +import com.Avataryug.client.Models.PayForPurchaseRequest +import com.Avataryug.client.Models.PayForPurchaseResult +import com.Avataryug.client.Models.PurchaseInstanceRequest +import com.Avataryug.client.Models.PurchaseInstanceResult +import com.Avataryug.client.Models.SubtractUserVirtualCurrencyRequest +import com.Avataryug.client.Models.SubtractUserVirtualCurrencyResult +import com.Avataryug.client.Models.UnlockContainerInstanceRequest +import com.Avataryug.client.Models.UnlockContainerInstanceResult +import com.Avataryug.client.Models.UpdateUserAvatarRequest +import com.Avataryug.client.Models.UpdateUserAvatarResult + +import com.Avataryug.client.Infrastructure.ApiResponse +import com.Avataryug.client.Infrastructure.ClientException +import com.Avataryug.client.Infrastructure.ClientError +import com.Avataryug.client.Infrastructure.ServerException +import com.Avataryug.client.Infrastructure.ServerError +import com.Avataryug.client.Infrastructure.MultiValueMap +import com.Avataryug.client.Infrastructure.RequestConfig +import com.Avataryug.client.Infrastructure.RequestMethod +import com.Avataryug.client.Infrastructure.ResponseType +import com.Avataryug.client.Infrastructure.Success + +/** + * Represents a collection of functions to interact with the API endpoints + */ +class UserDataManagementApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { + companion object { + @JvmStatic + val defaultBasePath: String by lazy { + val id = AvatarProjectSettings.Project_Id + System.getProperties().getProperty(ApiClient.baseUrlKey, "https://$id.avataryugapi.com/client") + } + } + + /** + * Add User Avatar + * Add Avatar to the user + * @param addUserAvatarRequest (optional) + * @return AddUserAvatarResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun addUserAvatar(addUserAvatarRequest: AddUserAvatarRequest? = null) : AddUserAvatarResult { + val localVarResponse = addUserAvatarWithHttpInfo(addUserAvatarRequest = addUserAvatarRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as AddUserAvatarResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Add User Avatar + * Add Avatar to the user + * @param addUserAvatarRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun addUserAvatarWithHttpInfo(addUserAvatarRequest: AddUserAvatarRequest?) : ApiResponse { + val localVariableConfig = addUserAvatarRequestConfig(addUserAvatarRequest = addUserAvatarRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation addUserAvatar + * + * @param addUserAvatarRequest (optional) + * @return RequestConfig + */ + fun addUserAvatarRequestConfig(addUserAvatarRequest: AddUserAvatarRequest?) : RequestConfig { + val localVariableBody = addUserAvatarRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/AddUserAvatar", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Add Virtual Currency to User + * Increments the user's balance of the specified virtual currency by the stated amount + * @param addVirtualCurrencyToUserRequest (optional) + * @return AddVirtualCurrencyToUserResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun addVirtualCurrencyToUser(addVirtualCurrencyToUserRequest: AddVirtualCurrencyToUserRequest? = null) : AddVirtualCurrencyToUserResult { + val localVarResponse = addVirtualCurrencyToUserWithHttpInfo(addVirtualCurrencyToUserRequest = addVirtualCurrencyToUserRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as AddVirtualCurrencyToUserResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Add Virtual Currency to User + * Increments the user's balance of the specified virtual currency by the stated amount + * @param addVirtualCurrencyToUserRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun addVirtualCurrencyToUserWithHttpInfo(addVirtualCurrencyToUserRequest: AddVirtualCurrencyToUserRequest?) : ApiResponse { + val localVariableConfig = addVirtualCurrencyToUserRequestConfig(addVirtualCurrencyToUserRequest = addVirtualCurrencyToUserRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation addVirtualCurrencyToUser + * + * @param addVirtualCurrencyToUserRequest (optional) + * @return RequestConfig + */ + fun addVirtualCurrencyToUserRequestConfig(addVirtualCurrencyToUserRequest: AddVirtualCurrencyToUserRequest?) : RequestConfig { + val localVariableBody = addVirtualCurrencyToUserRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/AddVirtualCurrencyToUser", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Confirm Purchase + * Confirms with the payment provider that the purchase was approved (if applicable) and adjusts inventory and virtual currency balances as appropriate + * @param confirmPurchaseRequest (optional) + * @return ConfirmPurchaseResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun confirmPurchase(confirmPurchaseRequest: ConfirmPurchaseRequest? = null) : ConfirmPurchaseResult { + val localVarResponse = confirmPurchaseWithHttpInfo(confirmPurchaseRequest = confirmPurchaseRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as ConfirmPurchaseResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Confirm Purchase + * Confirms with the payment provider that the purchase was approved (if applicable) and adjusts inventory and virtual currency balances as appropriate + * @param confirmPurchaseRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun confirmPurchaseWithHttpInfo(confirmPurchaseRequest: ConfirmPurchaseRequest?) : ApiResponse { + val localVariableConfig = confirmPurchaseRequestConfig(confirmPurchaseRequest = confirmPurchaseRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation confirmPurchase + * + * @param confirmPurchaseRequest (optional) + * @return RequestConfig + */ + fun confirmPurchaseRequestConfig(confirmPurchaseRequest: ConfirmPurchaseRequest?) : RequestConfig { + val localVariableBody = confirmPurchaseRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/ConfirmPurchase", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Consume Instance + * Consume uses of a consumable item. When all uses are consumed, it will be removed from the user's inventory. + * @param consumeInstanceRequest (optional) + * @return ConsumeInstanceResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun consumeInstance(consumeInstanceRequest: ConsumeInstanceRequest? = null) : ConsumeInstanceResult { + val localVarResponse = consumeInstanceWithHttpInfo(consumeInstanceRequest = consumeInstanceRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as ConsumeInstanceResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Consume Instance + * Consume uses of a consumable item. When all uses are consumed, it will be removed from the user's inventory. + * @param consumeInstanceRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun consumeInstanceWithHttpInfo(consumeInstanceRequest: ConsumeInstanceRequest?) : ApiResponse { + val localVariableConfig = consumeInstanceRequestConfig(consumeInstanceRequest = consumeInstanceRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation consumeInstance + * + * @param consumeInstanceRequest (optional) + * @return RequestConfig + */ + fun consumeInstanceRequestConfig(consumeInstanceRequest: ConsumeInstanceRequest?) : RequestConfig { + val localVariableBody = consumeInstanceRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/ConsumeInstance", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Delete User Avatar + * Delete specified Avatar for the user + * @param avatarID Unique Identifier of the Avatar which needs to be deleted + * @return DeleteUserAvatarResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun deleteUserAvatar(avatarID: kotlin.String) : DeleteUserAvatarResult { + val localVarResponse = deleteUserAvatarWithHttpInfo(avatarID = avatarID) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as DeleteUserAvatarResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Delete User Avatar + * Delete specified Avatar for the user + * @param avatarID Unique Identifier of the Avatar which needs to be deleted + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun deleteUserAvatarWithHttpInfo(avatarID: kotlin.String) : ApiResponse { + val localVariableConfig = deleteUserAvatarRequestConfig(avatarID = avatarID) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation deleteUserAvatar + * + * @param avatarID Unique Identifier of the Avatar which needs to be deleted + * @return RequestConfig + */ + fun deleteUserAvatarRequestConfig(avatarID: kotlin.String) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("AvatarID", listOf(avatarID.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.DELETE, + path = "/DeleteUserAvatar", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Get Purchase + * Retrieves a purchase along with its current AvatarYug status. Returns inventory items from the purchase that are still active. + * @return GetPurchaseResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getPurchase() : GetPurchaseResult { + val localVarResponse = getPurchaseWithHttpInfo() + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetPurchaseResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get Purchase + * Retrieves a purchase along with its current AvatarYug status. Returns inventory items from the purchase that are still active. + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getPurchaseWithHttpInfo() : ApiResponse { + val localVariableConfig = getPurchaseRequestConfig() + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getPurchase + * + * @return RequestConfig + */ + fun getPurchaseRequestConfig() : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetPurchase", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Get User Inventory + * Retrieves the user's current inventory of virtual goods + * @param userID Unique AvatarYug identifier of the user whose info is being requested. Optional, defaults to the authenticated user if no other lookup identifier set. (optional) + * @return GetUserInventoryResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getUserInventory(userID: kotlin.String? = null) : GetUserInventoryResult { + val localVarResponse = getUserInventoryWithHttpInfo(userID = userID) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetUserInventoryResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get User Inventory + * Retrieves the user's current inventory of virtual goods + * @param userID Unique AvatarYug identifier of the user whose info is being requested. Optional, defaults to the authenticated user if no other lookup identifier set. (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getUserInventoryWithHttpInfo(userID: kotlin.String?) : ApiResponse { + val localVariableConfig = getUserInventoryRequestConfig(userID = userID) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getUserInventory + * + * @param userID Unique AvatarYug identifier of the user whose info is being requested. Optional, defaults to the authenticated user if no other lookup identifier set. (optional) + * @return RequestConfig + */ + fun getUserInventoryRequestConfig(userID: kotlin.String?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + if (userID != null) { + put("UserID", listOf(userID.toString())) + } + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetUserInventory", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Get Users All Avatars + * Lists all of the avatars that belong to a specific user + * @param userID Unique AvatarYug assigned ID of the user on whom the operation will be performed + * @return GetUsersAllAvatarsResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getUsersAllAvatars(userID: kotlin.String) : GetUsersAllAvatarsResult { + val localVarResponse = getUsersAllAvatarsWithHttpInfo(userID = userID) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetUsersAllAvatarsResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Get Users All Avatars + * Lists all of the avatars that belong to a specific user + * @param userID Unique AvatarYug assigned ID of the user on whom the operation will be performed + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getUsersAllAvatarsWithHttpInfo(userID: kotlin.String) : ApiResponse { + val localVariableConfig = getUsersAllAvatarsRequestConfig(userID = userID) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getUsersAllAvatars + * + * @param userID Unique AvatarYug assigned ID of the user on whom the operation will be performed + * @return RequestConfig + */ + fun getUsersAllAvatarsRequestConfig(userID: kotlin.String) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("UserID", listOf(userID.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/GetUsersAllAvatars", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Grant Items To User + * Adds the specified items to the specified user's inventory + * @param grantInstanceToUserRequest (optional) + * @return GrantInstanceToUserResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun grantInstanceToUser(grantInstanceToUserRequest: GrantInstanceToUserRequest? = null) : GrantInstanceToUserResult { + val localVarResponse = grantInstanceToUserWithHttpInfo(grantInstanceToUserRequest = grantInstanceToUserRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GrantInstanceToUserResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Grant Items To User + * Adds the specified items to the specified user's inventory + * @param grantInstanceToUserRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun grantInstanceToUserWithHttpInfo(grantInstanceToUserRequest: GrantInstanceToUserRequest?) : ApiResponse { + val localVariableConfig = grantInstanceToUserRequestConfig(grantInstanceToUserRequest = grantInstanceToUserRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation grantInstanceToUser + * + * @param grantInstanceToUserRequest (optional) + * @return RequestConfig + */ + fun grantInstanceToUserRequestConfig(grantInstanceToUserRequest: GrantInstanceToUserRequest?) : RequestConfig { + val localVariableBody = grantInstanceToUserRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/GrantInstanceToUser", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Pay For Purchase + * + * @param payForPurchaseRequest Selects a payment option for purchase order created via StartPurchase (optional) + * @return PayForPurchaseResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun payForPurchase(payForPurchaseRequest: PayForPurchaseRequest? = null) : PayForPurchaseResult { + val localVarResponse = payForPurchaseWithHttpInfo(payForPurchaseRequest = payForPurchaseRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as PayForPurchaseResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Pay For Purchase + * + * @param payForPurchaseRequest Selects a payment option for purchase order created via StartPurchase (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun payForPurchaseWithHttpInfo(payForPurchaseRequest: PayForPurchaseRequest?) : ApiResponse { + val localVariableConfig = payForPurchaseRequestConfig(payForPurchaseRequest = payForPurchaseRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation payForPurchase + * + * @param payForPurchaseRequest Selects a payment option for purchase order created via StartPurchase (optional) + * @return RequestConfig + */ + fun payForPurchaseRequestConfig(payForPurchaseRequest: PayForPurchaseRequest?) : RequestConfig { + val localVariableBody = payForPurchaseRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/PayForPurchase", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Purchase Instance + * Buys a single item with virtual currency. You must specify both the virtual currency to use to purchase, as well as what the client believes the price to be. This lets the server fail the purchase if the price has changed. + * @param purchaseInstanceRequest (optional) + * @return PurchaseInstanceResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun purchaseInstance(purchaseInstanceRequest: PurchaseInstanceRequest? = null) : PurchaseInstanceResult { + val localVarResponse = purchaseInstanceWithHttpInfo(purchaseInstanceRequest = purchaseInstanceRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as PurchaseInstanceResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Purchase Instance + * Buys a single item with virtual currency. You must specify both the virtual currency to use to purchase, as well as what the client believes the price to be. This lets the server fail the purchase if the price has changed. + * @param purchaseInstanceRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun purchaseInstanceWithHttpInfo(purchaseInstanceRequest: PurchaseInstanceRequest?) : ApiResponse { + val localVariableConfig = purchaseInstanceRequestConfig(purchaseInstanceRequest = purchaseInstanceRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation purchaseInstance + * + * @param purchaseInstanceRequest (optional) + * @return RequestConfig + */ + fun purchaseInstanceRequestConfig(purchaseInstanceRequest: PurchaseInstanceRequest?) : RequestConfig { + val localVariableBody = purchaseInstanceRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/PurchaseInstance", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Start Purchase + * Creates an order for a list of items that needs to be purchased + * @param body (optional) + * @return kotlin.Any + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun startPurchase(body: kotlin.Any? = null) : kotlin.Any { + val localVarResponse = startPurchaseWithHttpInfo(body = body) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.Any + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Start Purchase + * Creates an order for a list of items that needs to be purchased + * @param body (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun startPurchaseWithHttpInfo(body: kotlin.Any?) : ApiResponse { + val localVariableConfig = startPurchaseRequestConfig(body = body) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation startPurchase + * + * @param body (optional) + * @return RequestConfig + */ + fun startPurchaseRequestConfig(body: kotlin.Any?) : RequestConfig { + val localVariableBody = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/StartPurchase", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Subtract User Virtual Currency + * Decrements the user's balance of the specified virtual currency by the stated amount. It is possible to make a VC balance negative with this API. + * @param subtractUserVirtualCurrencyRequest (optional) + * @return SubtractUserVirtualCurrencyResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun subtractUserVirtualCurrency(subtractUserVirtualCurrencyRequest: SubtractUserVirtualCurrencyRequest? = null) : SubtractUserVirtualCurrencyResult { + val localVarResponse = subtractUserVirtualCurrencyWithHttpInfo(subtractUserVirtualCurrencyRequest = subtractUserVirtualCurrencyRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as SubtractUserVirtualCurrencyResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Subtract User Virtual Currency + * Decrements the user's balance of the specified virtual currency by the stated amount. It is possible to make a VC balance negative with this API. + * @param subtractUserVirtualCurrencyRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun subtractUserVirtualCurrencyWithHttpInfo(subtractUserVirtualCurrencyRequest: SubtractUserVirtualCurrencyRequest?) : ApiResponse { + val localVariableConfig = subtractUserVirtualCurrencyRequestConfig(subtractUserVirtualCurrencyRequest = subtractUserVirtualCurrencyRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation subtractUserVirtualCurrency + * + * @param subtractUserVirtualCurrencyRequest (optional) + * @return RequestConfig + */ + fun subtractUserVirtualCurrencyRequestConfig(subtractUserVirtualCurrencyRequest: SubtractUserVirtualCurrencyRequest?) : RequestConfig { + val localVariableBody = subtractUserVirtualCurrencyRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/SubtractUserVirtualCurrency", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Unlock Container Instance + * Opens the specified container, with the specified key (when required), and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + * @param unlockContainerInstanceRequest (optional) + * @return UnlockContainerInstanceResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun unlockContainerInstance(unlockContainerInstanceRequest: UnlockContainerInstanceRequest? = null) : UnlockContainerInstanceResult { + val localVarResponse = unlockContainerInstanceWithHttpInfo(unlockContainerInstanceRequest = unlockContainerInstanceRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as UnlockContainerInstanceResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Unlock Container Instance + * Opens the specified container, with the specified key (when required), and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + * @param unlockContainerInstanceRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun unlockContainerInstanceWithHttpInfo(unlockContainerInstanceRequest: UnlockContainerInstanceRequest?) : ApiResponse { + val localVariableConfig = unlockContainerInstanceRequestConfig(unlockContainerInstanceRequest = unlockContainerInstanceRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation unlockContainerInstance + * + * @param unlockContainerInstanceRequest (optional) + * @return RequestConfig + */ + fun unlockContainerInstanceRequestConfig(unlockContainerInstanceRequest: UnlockContainerInstanceRequest?) : RequestConfig { + val localVariableBody = unlockContainerInstanceRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/UnlockContainerInstance", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Update User Avatar + * Update Avatar for the user + * @param updateUserAvatarRequest (optional) + * @return UpdateUserAvatarResult + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun updateUserAvatar(updateUserAvatarRequest: UpdateUserAvatarRequest? = null) : UpdateUserAvatarResult { + val localVarResponse = updateUserAvatarWithHttpInfo(updateUserAvatarRequest = updateUserAvatarRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as UpdateUserAvatarResult + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * Update User Avatar + * Update Avatar for the user + * @param updateUserAvatarRequest (optional) + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun updateUserAvatarWithHttpInfo(updateUserAvatarRequest: UpdateUserAvatarRequest?) : ApiResponse { + val localVariableConfig = updateUserAvatarRequestConfig(updateUserAvatarRequest = updateUserAvatarRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation updateUserAvatar + * + * @param updateUserAvatarRequest (optional) + * @return RequestConfig + */ + fun updateUserAvatarRequestConfig(updateUserAvatarRequest: UpdateUserAvatarRequest?) : RequestConfig { + val localVariableBody = updateUserAvatarRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.PUT, + path = "/UpdateUserAvatar", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = + HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] +} diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/AvatarProjectSettings.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/AvatarProjectSettings.kt new file mode 100644 index 0000000..030f13a --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/AvatarProjectSettings.kt @@ -0,0 +1,12 @@ +package Avataryug.Client + +object AvatarProjectSettings +{ + const val Project_Id = "" + + const val Sceret_Key = "" + + const val IV_Secret_Key = "" + + const val IsDebug:Boolean = true; +} \ No newline at end of file diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/ConfigurationApi.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/ConfigurationApi.kt new file mode 100644 index 0000000..bdbb7ce --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/ConfigurationApi.kt @@ -0,0 +1,42 @@ +package com.Avataryug.client + +/** + * Represents a set of configuration settings + */ +class ConfigurationApi +{ + private var accessToken: String = "" + + private var userId:String = "" + + /** + * Gets the access token (Bearer/OAuth authentication). + */ + fun getAccessToken(): String { + return accessToken + } + + /** + * Sets the access token (Bearer/OAuth authentication). + */ + fun setAccessToken(value: String) { + accessToken = value + } + + /** + * Get UserID + */ + fun getUserId(): String + { + return userId + } + + /** + * Set UserID + */ + fun setUserId(value: String) + { + userId = value + } + +} \ No newline at end of file diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/AdvertisingHandler.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/AdvertisingHandler.kt new file mode 100644 index 0000000..cdec399 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/AdvertisingHandler.kt @@ -0,0 +1,211 @@ +package com.Avataryug.client.Handler + +import android.util.Log +import com.Avataryug.client.Apis.AdvertisingApi +import com.Avataryug.client.Infrastructure.ClientException +import com.Avataryug.client.Infrastructure.ServerException +import com.Avataryug.client.Models.GetAdPlacementByIDResult +import com.Avataryug.client.Models.GrantAdsRewardRequest +import com.Avataryug.client.Models.GrantAdsRewardResult +import com.Avataryug.client.Models.RecordAdsActivityRequest +import com.Avataryug.client.Models.RecordAdsActivityResult +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch + +/** + * The "AdvertisingHandler" class is responsible for handling advertising operations. + * It uses the "Base" class for making API calls. + * The class provides three methods: + * "GetAdsPlacement" retrieves a list of ad placements by ID, + * "RecordAdsActivity" stores ads activity data for reporting + * And "GrantAdsReward" grants rewards for ads. + * Each method takes callbacks for handling the response and error conditions. + */ +class AdvertisingHandler(private val apiBase: Base) { + + /** + * Retrieves a list of ad placements by ID. + */ + fun getAdPlacementByID(listener: OnGetAdPlacementByIDListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is GetAdPlacementByIDResult) { + listener.onGetAdPlacementByIDResult(response) + } else { + listener.onGetAdPlacementByIDError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onGetAdPlacementByIDError(error) + } + }) + } + + /** + * Define the listener interface for the GetAdPlacementByID method + */ + interface OnGetAdPlacementByIDListener + { + fun onGetAdPlacementByIDResult(result: GetAdPlacementByIDResult) + fun onGetAdPlacementByIDError(error: Exception) + } + + /** + * Retrieves a list of ad placements by ID + */ + class GetAdPlacementByID(private val placementID: String) : Base + { + + override fun callApi(listener: Base.OnApiResultListener) { + GlobalScope.launch(Dispatchers.IO) { + try { + val apiInstance = AdvertisingApi() + val result: GetAdPlacementByIDResult = + apiInstance.getAdPlacementByID(placementID) + listener.onResult(result) + } catch (e: ClientException) { + Log.e("Get Ad Placement By ID CLIENT EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: ServerException) { + Log.e("Get Ad Placement By ID SERVER EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: Exception) { + Log.e("Get Ad Placement By ID EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + } + + + } + } + + /** + * Stores ads activity data for reporting after ad watch + * @param listener + */ + fun recordAdsActivity(listener: OnRecordAdsActivityResultListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is RecordAdsActivityResult) { + listener.onRecordAdsActivityResult(response) + } else { + listener.onRecordAdsActivityError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onRecordAdsActivityError(error) + } + }) + } + + /** + * Define the listener interface for the RecordAdsActivity method + */ + interface OnRecordAdsActivityResultListener + { + fun onRecordAdsActivityResult(result: RecordAdsActivityResult) + fun onRecordAdsActivityError(error: Exception) + } + + /** + * Stores ads activity data for reporting after ad watch. + */ + class RecordAdsActivity(private val revenueCurrency: String, private val adRevenue: Int, private val placementID: String) : Base + { + // Implement the callApi function from the Base interface + override fun callApi(listener: Base.OnApiResultListener) + { + // Perform the API call here using the provided data + // For example, you can use the `apiBase` to make the API call as shown in your original code. + // Since the actual API call is not provided, the following code is just a placeholder to demonstrate how the call might be done. + GlobalScope.launch(Dispatchers.IO) { + try { + val apiInstance = AdvertisingApi() + + val request = RecordAdsActivityRequest( + placementID = placementID, + adRevenue = adRevenue, + revenueCurrency = revenueCurrency + ) + val result: RecordAdsActivityResult = apiInstance.recordAdsActivity(request) + listener.onResult(result) + } catch (e: ClientException) { + Log.e("Record Ads Activity CLIENT EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: ServerException) { + Log.e("Record Ads Activity SERVER EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: Exception) { + Log.e("Record Ads Activity EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + } + } + } + + /** + * Grants rewards for ads. + */ + fun grantAdsReward(listener: OnGrantAdsRewardResultListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is GrantAdsRewardResult) { + listener.onGrantAdsRewardResult(response) + } else { + listener.onGrantAdsRewardError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onGrantAdsRewardError(error) + } + }) + } + + /** + * Define the listener interface for the GrantAdsReward method + */ + interface OnGrantAdsRewardResultListener + { + fun onGrantAdsRewardResult(result: GrantAdsRewardResult) + fun onGrantAdsRewardError(error: Exception) + } + + /** + * Grants rewards for ads. + */ + class GrantAdsReward(private val placementID: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + + GlobalScope.launch(Dispatchers.IO) { + try { + val apiInstance = AdvertisingApi() + val grantAdsRewardRequest = GrantAdsRewardRequest( + placementID = placementID + ) + val result: GrantAdsRewardResult = + apiInstance.grantAdsReward(grantAdsRewardRequest) + listener.onResult(result) + } catch (e: ClientException) { + Log.e("Grant Ads Reward CLIENT EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: ServerException) { + Log.e("Grant Ads Reward SERVER EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: Exception) { + Log.e("Grant Ads Reward EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + } + } + + } +} \ No newline at end of file diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/AuthenticationHandler.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/AuthenticationHandler.kt new file mode 100644 index 0000000..f5846b9 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/AuthenticationHandler.kt @@ -0,0 +1,516 @@ +package com.Avataryug.client.Handler + +import android.util.Log +import com.Avataryug.client.Apis.AuthenticationApi +import com.Avataryug.client.Infrastructure.ClientException +import com.Avataryug.client.Infrastructure.ServerException +import com.Avataryug.client.Models.LoginWithAndroidDeviceIDRequest +import com.Avataryug.client.Models.LoginWithAndroidDeviceIDResult +import com.Avataryug.client.Models.LoginWithAppleRequest +import com.Avataryug.client.Models.LoginWithAppleResult +import com.Avataryug.client.Models.LoginWithCustomIDRequest +import com.Avataryug.client.Models.LoginWithCustomIDResult +import com.Avataryug.client.Models.LoginWithEmailAddressRequest +import com.Avataryug.client.Models.LoginWithEmailAddressResult +import com.Avataryug.client.Models.LoginWithFacebookRequest +import com.Avataryug.client.Models.LoginWithFacebookResult +import com.Avataryug.client.Models.LoginWithGoogleRequest +import com.Avataryug.client.Models.LoginWithGoogleResult +import com.Avataryug.client.Models.LoginWithIOSDeviceIDRequest +import com.Avataryug.client.Models.LoginWithIOSDeviceIDResult +import com.Avataryug.client.Models.RegisterUserRequest +import com.Avataryug.client.Models.RegisterUserResult +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch + +/** + * The "AuthenticateHandler" class facilitates authentication operations by utilizing the "Base" class for API calls. + * It offers multiple methods for various authentication scenarios, + * These methods accept callback parameters to handle response and error conditions. + * By leveraging the "baseApiCall" instance, the class ensures appropriate API calls are made and callbacks are invoked accordingly. + */ +class AuthenticationHandler(private val apiBase: Base) +{ + /** + * Signs the user in using a custom unique identifier, which can be a combination of strings, integers, numbers, and symbols. + * @param listener + */ + fun loginWithCustomID(listener: LoginWithCustomIDListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is LoginWithCustomIDResult) { + listener.onLoginWithCustomIDResult(response) + } else { + listener.onLoginWithCustomIDError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onLoginWithCustomIDError(error) + } + }) + } + + /** + * Define the listener interface for the LoginWithCustomID method + */ + interface LoginWithCustomIDListener + { + fun onLoginWithCustomIDResult(result: LoginWithCustomIDResult) + fun onLoginWithCustomIDError(error: Exception) + } + + /** + * Signs the user in using a custom unique identifier, which can be a combination of strings, integers, numbers, and symbols, + * creating a session identifier for subsequent API calls that require an authenticated user. + */ + class LoginWithCustomID(private val customID: String, private val createAccount: Boolean) : Base + { + override fun callApi(listener: Base.OnApiResultListener) { + + GlobalScope.launch(Dispatchers.IO) { + try { + val apiInstance = AuthenticationApi() + val loginWithCustomIDRequest = LoginWithCustomIDRequest(customID, createAccount) + val result: LoginWithCustomIDResult = + apiInstance.loginWithCustomID(loginWithCustomIDRequest) + listener.onResult(result) + } catch (e: ClientException) { + Log.e("Login With Custom ID CLIENT EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: ServerException) { + Log.e("Login With Custom ID SERVER EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: Exception) { + Log.e("Login With Custom ID EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + } + } + } + + /** + *Signs the user in using the Android device identifier. + * @param listener + */ + fun loginWithAndroidDeviceID(listener: LoginWithAndroidDeviceIDListener) { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is LoginWithAndroidDeviceIDResult) { + listener.onLoginWithAndroidDeviceIDResult(response) + } else { + listener.onLoginWithAndroidDeviceIDError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onLoginWithAndroidDeviceIDError(error) + } + }) + } + + /** + * Define the listener interface for the loginWithAndroidDeviceID method + */ + interface LoginWithAndroidDeviceIDListener + { + fun onLoginWithAndroidDeviceIDResult(result: LoginWithAndroidDeviceIDResult) + fun onLoginWithAndroidDeviceIDError(error: Exception) + } + + /** + * Signs the user in using the Android device identifier, + * returning a session identifier that can subsequently be used for API calls which require an authenticated user. + */ + class LoginWithAndroidDeviceID(private val androidDeviceID: String, private val createAccount: Boolean) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try { + val api = AuthenticationApi() + val loginWithAndroidDeviceIDRequest = LoginWithAndroidDeviceIDRequest( + androidDeviceID = androidDeviceID, + createAccount = createAccount + ) + val result: LoginWithAndroidDeviceIDResult = api.loginWithAndroidDeviceID(loginWithAndroidDeviceIDRequest) + listener.onResult(result) + } catch (e: ClientException) + { + println("Exception when calling AuthenticationApi#LoginWithandroidIDs") + e.printStackTrace() + } catch (e: ServerException) + { + println("5xx response calling AuthenticationApi #loginWithAndroidDeviceID") + e.printStackTrace() + } + } + } + } + + /** + * Register user with email id. + * @param listener + */ + fun registerUser(listener: RegisterUserListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is RegisterUserResult) { + listener.onRegisterUserResult(response) + } else { + listener.onRegisterUserError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onRegisterUserError(error) + } + }) + } + + /** + * Define the listener interface for the RegisterUser method. + */ + interface RegisterUserListener + { + fun onRegisterUserResult(result: RegisterUserResult) + fun onRegisterUserError(error: Exception) + } + + /** + * Register user with email id, + * creating a session identifier for subsequent API calls that require an authenticated user. + */ + class RegisterUser(private val addDisplayName: String,private val emailID: String,private val password: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val registerUserRequest = RegisterUserRequest( + emailID = emailID, + password = password, + displayName = addDisplayName + ) + val api = AuthenticationApi() + val result: RegisterUserResult = api.registerUser(registerUserRequest) + listener.onResult(result) + } catch (e: ClientException) + { + println("Exception when calling AuthenticationApi #RegisterUser") + e.printStackTrace() + } catch (e: ServerException) + { + println("5xx response calling AuthenticationApi #RegisterUser") + e.printStackTrace() + } + } + } + } + + /** + * Signs the user into the Avataryug account. + * @param listener + */ + fun loginWithEmailAddress(listener: OnLoginWithEmailAddressListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is LoginWithEmailAddressResult) { + listener.onLoginWithEmailAddressResult(response) + } else { + listener.onLoginWithEmailAddressError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onLoginWithEmailAddressError(error) + } + }) + } + + /** + * Define the listener interface for the LoginWithEmailAddress method. + */ + interface OnLoginWithEmailAddressListener + { + fun onLoginWithEmailAddressResult(result: LoginWithEmailAddressResult) + fun onLoginWithEmailAddressError(error: Exception) + } + + /** + * Signs the user into the Avataryug account, returning a session identifier that can subsequently be used for API calls which require an authenticated user. + * Unlike most other login API calls, LoginWithEmailAddress does not permit the creation of new accounts via the CreateAccountFlag. + */ + class LoginWithEmailAddress(private val emailID: String, private val password: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) { + // Use Retrofit to make the API call + GlobalScope.launch(Dispatchers.IO) { + try { + val request = LoginWithEmailAddressRequest( + emailID = emailID, + password = password, + ) + val api = AuthenticationApi() + val result: LoginWithEmailAddressResult = api.loginWithEmailAddress(request) + listener.onResult(result) + } catch (e: ClientException) { + println("Exception when calling AuthenticationApi #LoginWithEmailAddress") + e.printStackTrace() + } catch (e: ServerException) { + println("5xx response calling AuthenticationApi #LoginWithEmailAddress") + e.printStackTrace() + } + } + } + } + + /** + * Signs in the user using an identity token obtained from Sign in with Apple. + * @param listener + */ + fun loginWithApple(listener: LoginWithAppleListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is LoginWithAppleResult) { + listener.onLoginWithAppleResult(response) + } else { + listener.onLoginWithAppleError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onLoginWithAppleError(error) + } + }) + } + + /** + * Define the listener interface for the LoginWithApple method. + */ + interface LoginWithAppleListener + { + fun onLoginWithAppleResult(result: LoginWithAppleResult) + fun onLoginWithAppleError(error: Exception) + } + + /** + * Signs in the user using an identity token obtained from Sign in with Apple, + * returning a session identifier that can subsequently be used for API calls which require an authenticated user + */ + class LoginWithApple(private val appleIdentityToken: String, private val createAccount: Boolean, private val appleID: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) { + + GlobalScope.launch(Dispatchers.IO) + { + try { + val loginWithAppleRequest = LoginWithAppleRequest( + appleID = appleID, + appleIdentityToken = appleIdentityToken, + createAccount = createAccount + ) + val api = AuthenticationApi() + val result: LoginWithAppleResult = api.loginWithApple(loginWithAppleRequest) + listener.onResult(result) + } catch (e: ClientException) { + println("Exception when calling AuthenticationApi #LoginWithAppleResult") + e.printStackTrace() + } catch (e: ServerException) { + println("5xx response calling AuthenticationApi #LoginWithAppleResult") + e.printStackTrace() + } + } + + } + } + + /** + * Signs the user in using the vendor-specific iOS device identifier. + * @param listener + */ + fun loginWithIOSDeviceID(listener: LoginWithIOSDeviceIDListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is LoginWithIOSDeviceIDResult) { + listener.onLoginWithIOSDeviceIDResult(response) + } else { + listener.onLoginWithIOSDeviceIDError(Exception("Invalid response type")) + } + } + override fun onError(error: Exception) { + listener.onLoginWithIOSDeviceIDError(error) + } + }) + } + + /** + * Define the listener interface for the loginWithIOSDeviceID method. + */ + interface LoginWithIOSDeviceIDListener + { + fun onLoginWithIOSDeviceIDResult(result: LoginWithIOSDeviceIDResult) + fun onLoginWithIOSDeviceIDError(error: Exception) + } + + /** + * Signs the user in using the vendor specific iOS device identifier, + * returning a session identifier that can subsequently be used for API calls which require an authenticated user. + */ + class LoginWithIOSDeviceID(private val iOSDeviceID: String, private val createAccount: Boolean) : Base + { + override fun callApi(listener: Base.OnApiResultListener) { + GlobalScope.launch(Dispatchers.IO) + { + try { + val req = LoginWithIOSDeviceIDRequest( + ioSDeviceID = iOSDeviceID, + createAccount = createAccount + ) + val api = AuthenticationApi() + val result: LoginWithIOSDeviceIDResult = api.loginWithIOSDeviceID(req) + listener.onResult(result) + } catch (e: ClientException) { + println("Exception when calling AuthenticationApi #LoginWithAppleResult") + e.printStackTrace() + } catch (e: ServerException) { + println("5xx response calling AuthenticationApi #LoginWithAppleResult") + e.printStackTrace() + } + } + + } + } + + /** + * Signs the user in using their Google account credentials. + * @param listener + */ + fun loginWithGoogle(listener: LoginWithGoogleListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is LoginWithGoogleResult) { + listener.onLoginWithGoogleResult(response) + } else { + listener.onLoginWithGoogleError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) + { + listener.onLoginWithGoogleError(error) + } + }) + } + + /** + * Define the listener interface for the LoginWithGoogle method. + */ + interface LoginWithGoogleListener + { + fun onLoginWithGoogleResult(result: LoginWithGoogleResult?) + fun onLoginWithGoogleError(error: Exception) + } + + /** + * Signs the user in using their Google account credentials, + * returning a session identifier that can subsequently be used for API calls which require an authenticated user + */ + class LoginWithGoogle(private val googleServerAuthCode: String, private val createAccount: Boolean, private val googleID: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) { + + GlobalScope.launch(Dispatchers.IO) + { + try { + val loginWithGoogleRequest = LoginWithGoogleRequest( + googleID = googleID, + googleServerAuthCode = googleServerAuthCode, + createAccount = createAccount) + + val api = AuthenticationApi() + val result: LoginWithGoogleResult = api.loginWithGoogle(loginWithGoogleRequest) + listener.onResult(result) + } catch (e: ClientException) { + println("Exception when calling AuthenticationApi #LoginWithGoogleResult") + e.printStackTrace() + } catch (e: ServerException) { + println("5xx response calling AuthenticationApi #LoginWithGoogleResult") + e.printStackTrace() + } + } + + + } + } + + /** + * Signs the user in using a Facebook access token. + * @param listener + */ + fun loginWithFacebook(listener: LoginWithFacebookListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is LoginWithFacebookResult) { + listener.onLoginWithFacebookResult(response) + } else { + listener.onLoginWithFacebookError(Exception("Invalid response type")) + } + } + override fun onError(error: Exception) + { + listener.onLoginWithFacebookError(error) + } + }) + } + + /** + * Define the listener interface for the LoginWithFacebook method. + */ + interface LoginWithFacebookListener + { + fun onLoginWithFacebookResult(result: LoginWithFacebookResult) + fun onLoginWithFacebookError(error: Exception) + } + + /** + * Signs the user in using a Facebook access token, + * returning a session identifier that can subsequently be used for API calls which require an authenticated user + */ + class LoginWithFacebook(private val fbAccessToken: String, private val createAccount: Boolean, private val facebookID: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try { + val loginWithFacebookRequest = LoginWithFacebookRequest( + facebookID = facebookID, + createAccount = createAccount, + fbAccessToken = fbAccessToken + ) + val api = AuthenticationApi() + val result: LoginWithFacebookResult = api.loginWithFacebook(loginWithFacebookRequest) + listener.onResult(result) + } catch (e: ClientException) { + println("Exception when calling AuthenticationApi #LoginWithFacebookResult") + e.printStackTrace() + } catch (e: ServerException) { + println("5xx response calling AuthenticationApi #LoginWithFacebookResult") + e.printStackTrace() + } + } + } + } +} \ No newline at end of file diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/AvatarManagementHandler.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/AvatarManagementHandler.kt new file mode 100644 index 0000000..bfebab5 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/AvatarManagementHandler.kt @@ -0,0 +1,823 @@ +package com.Avataryug.client.Handler + +import com.Avataryug.client.Apis.AvatarManagementApi +import com.Avataryug.client.Handler.Base.OnApiResultListener +import com.Avataryug.client.Infrastructure.ClientException +import com.Avataryug.client.Infrastructure.ServerException +import com.Avataryug.client.Models.GenerateAvatarMeshRequest +import com.Avataryug.client.Models.GenerateAvatarMeshResult +import com.Avataryug.client.Models.GetAllBucketVerticesResult +import com.Avataryug.client.Models.GetAvatarPresetByIDRequest +import com.Avataryug.client.Models.GetAvatarPresetsByIDResult +import com.Avataryug.client.Models.GetAvatarPresetsResult +import com.Avataryug.client.Models.GetClipsByIDResult +import com.Avataryug.client.Models.GetClipsResult +import com.Avataryug.client.Models.GetExpressionByIDResult +import com.Avataryug.client.Models.GetExpressionsResult +import com.Avataryug.client.Models.GrantAvatarPresetItemsToUserRequest +import com.Avataryug.client.Models.GrantAvatarPresetItemsToUserResult +import com.Avataryug.client.Models.GrantAvatarPresetToUserRequest +import com.Avataryug.client.Models.GrantAvatarPresetToUserResult +import com.Avataryug.client.Models.RenderAvatarImageRequest +import com.Avataryug.client.Models.RenderAvatarImageResult +import com.Avataryug.client.Models.SyncAvatarsRequest +import com.Avataryug.client.Models.SyncAvatarsResult +import com.android.volley.Response +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch + +/** + * The "AvatarManagementHandler" class is responsible for managing avatars and making API calls through the "Base" class. + * It provides multiple methods for creating, updating, and retrieving avatars related functionality. + */ +class AvatarManagementHandler (private val apiBase: Base) +{ + /** + * Generates the 3D mesh as per the configuration in the Config panel. + * @param listener + */ + fun generateAvatarMesh(listener: OnGenerateAvatarMeshListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is GenerateAvatarMeshResult) { + listener.onGenerateAvatarMeshResult(response) + } else { + listener.onGenerateAvatarMeshError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onGenerateAvatarMeshError(error) + } + }) + } + + /** + * Define the listener interface for the GenerateAvatarMesh method + */ + interface OnGenerateAvatarMeshListener + { + fun onGenerateAvatarMeshResult(result: GenerateAvatarMeshResult) + fun onGenerateAvatarMeshError(error: Exception) + } + + /** + * Generates the 3D mesh as per the configuration in the Config panel + */ + class GenerateAvatarMesh(private val avatarID: String, private val platform: String) : Base + { + + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val request = GenerateAvatarMeshRequest( + avatarID = avatarID, + platform = platform + ) + val apiInstance = AvatarManagementApi() + val result: GenerateAvatarMeshResult = apiInstance.generateAvatarMesh(request) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Get all avatar presets + * @param listener + */ + fun getAvatarPresets(listener: OnGetAvatarPresetsListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is GetAvatarPresetsResult) { + listener.onGetAvatarPresetsResult(response) + } else { + listener.onGetAvatarPresetsError(Exception("Invalid response type")) + } + } + override fun onError(error: Exception) { + listener.onGetAvatarPresetsError(error) + } + }) + } + + /** + * Define the listener interface for the GetAvatarPresets method + */ + interface OnGetAvatarPresetsListener + { + fun onGetAvatarPresetsResult(result: GetAvatarPresetsResult) + fun onGetAvatarPresetsError(error: Exception) + } + + /** + * Get all avatar presets + */ + class GetAvatarPresets(private val status: Int, private val gender: Int) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = AvatarManagementApi() + val result: GetAvatarPresetsResult = apiInstance.getAvatarPresets(status = status, Gender = gender) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Get all the clips by Active status + * @param listener + */ + fun getClips(listener: OnGetClipsListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is GetClipsResult) { + listener.onGetClipsResult(response) + } else { + listener.onGetClipsError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onGetClipsError(error) + } + }) + } + + /** + * Define the listener interface for the GetClips method + */ + interface OnGetClipsListener + { + fun onGetClipsResult(result: GetClipsResult) + fun onGetClipsError(error: Exception) + } + + /** + * Get all the clips by Active status + */ + class GetClips(private val status: Int) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = AvatarManagementApi() + val result: GetClipsResult = apiInstance.getClips(status = status) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + *Get the specified clip's details by providing ClipID. + * @param listener + */ + open fun getClipsByID(listener: OnGetClipsByIDListener?) + { + apiBase.callApi(object : OnApiResultListener { + override fun onResult(response: Any) { + if (response is GetClipsByIDResult) { + listener?.onGetClipsByIDResult(response) + } else { + listener?.onGetClipsByIDError(java.lang.Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener?.onGetClipsByIDError(error) + } + }) + } + + /** + * Define the listener interface for the GetClipsByID method + */ + interface OnGetClipsByIDListener + { + fun onGetClipsByIDResult(result: GetClipsByIDResult?) + fun onGetClipsByIDError(error: Exception) + } + + /** + * Get the specified clip's details by providing ClipID + */ + class GetClipsByID(private val clipId: String) : Base + { + override fun callApi(listener: OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = AvatarManagementApi() + val result: GetClipsByIDResult = apiInstance.getClipsByID(clipID = clipId) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Retrieve all expressions based on the provided status. + * 0 = Draft, + * 1 = Active, + * 2 = Inactive, + * 3 = Expired + * @param listener + */ + fun getExpression(listener: OnGetExpressionsListener?) + { + apiBase.callApi(object : OnApiResultListener { + override fun onResult(response: Any) { + if (response is GetExpressionsResult) { + listener?.onGetExpressionsResult(response as GetExpressionsResult) + } else { + listener?.onGetExpressionsError(java.lang.Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener?.onGetExpressionsError(error) + } + }) + } + + /** Define the listener interface for the GetExpression method + * + */ + interface OnGetExpressionsListener + { + fun onGetExpressionsResult(result: GetExpressionsResult?) + fun onGetExpressionsError(error: Exception?) + } + + /** + * Get all the active expressions + */ + class GetExpressions(private val status: Int) : Base + { + override fun callApi(listener: OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = AvatarManagementApi() + val result: GetExpressionsResult = apiInstance.getExpressions(status = status) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Get the specified expression details by providing ExpressionID + * @param listener + */ + fun getExpressionByID(listener: OnGetExpressionByIDListener?) + { + apiBase.callApi(object : OnApiResultListener + { + override fun onResult(response: Any) + { + if (response is GetExpressionByIDResult) + { + listener?.onGetExpressionByIDResult(response as GetExpressionByIDResult) + } else + { + listener?.onGetExpressionByIDError(java.lang.Exception("Invalid response type")) + } + } + override fun onError(error: java.lang.Exception) + { + listener?.onGetExpressionByIDError(error) + } + }) + } + + /** Define the listener interface for the GetExpressionByID method + * + */ + interface OnGetExpressionByIDListener + { + fun onGetExpressionByIDResult(result: GetExpressionByIDResult?) + fun onGetExpressionByIDError(error: java.lang.Exception?) + } + + /** + * Get the specified expression details by providing ExpressionID. + */ + class GetExpressionByID(private val expressionID: String) : Base + { + override fun callApi(listener: OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = AvatarManagementApi() + val result: GetExpressionByIDResult = apiInstance.getExpressionByID(expressionID = expressionID) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Get vertices for all buckets. + * @param listener + */ + fun getGetallbucketvertices(listener: OnGetAllBucketVerticesListener?) + { + apiBase.callApi(object : OnApiResultListener + { + override fun onResult(response: Any) + { + if (response is GetAllBucketVerticesResult) + { + listener?.onGetAllBucketVerticesResult(response as GetAllBucketVerticesResult) + } else + { + listener?.onGetAllBucketVerticesError(java.lang.Exception("Invalid response type")) + } + } + override fun onError(error:Exception) + { + listener?.onGetAllBucketVerticesError(error) + } + }) + } + + /** + * Define the listener interface for the GetGetallbucketvertices method + */ + interface OnGetAllBucketVerticesListener + { + fun onGetAllBucketVerticesResult(result: GetAllBucketVerticesResult?) + fun onGetAllBucketVerticesError(error:Exception) + } + + /** + * Get vertices for all buckets + */ + class GetAllBucketVertices(private val platform: String) : Base + { + override fun callApi(listener: OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = AvatarManagementApi() + val result: GetAllBucketVerticesResult = apiInstance.getGetallbucketvertices(platform = platform) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Grant the selected avatar and its associated items to the user's inventory. + * @param listener + */ + fun grantAvatarPresetItemsToUser(listener: OnGrantAvatarPresetItemsToUserListener?) + { + apiBase.callApi(object : OnApiResultListener { + override fun onResult(response: Any) { + if (response is GrantAvatarPresetItemsToUserResult) { + listener?.onGrantAvatarPresetItemsToUserResult(response as GrantAvatarPresetItemsToUserResult) + } else { + listener?.onGrantAvatarPresetItemsToUserError(java.lang.Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener?.onGrantAvatarPresetItemsToUserError(error) + } + }) + } + + /** Define the listener interface for the GrantAvatarPresetItemsToUser method + * + */ + interface OnGrantAvatarPresetItemsToUserListener + { + fun onGrantAvatarPresetItemsToUserResult(result: GrantAvatarPresetItemsToUserResult?) + fun onGrantAvatarPresetItemsToUserError(error: Exception) + } + + /**Grant Avatar Preset Items To User + * + */ + class GrantAvatarPresetItemsToUser(request: GrantAvatarPresetItemsToUserRequest) : Base + { + private val request: GrantAvatarPresetItemsToUserRequest + + init { + this.request = request + } + + override fun callApi(listener: OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = AvatarManagementApi() + val result: GrantAvatarPresetItemsToUserResult = apiInstance.grantAvatarPresetItemsToUser(request) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Utilize the specified API to render the image of the avatar associated with the provided avatar ID. + * This API is specifically designed to generate and retrieve the rendered image of the avatar. + * @param listener + */ + fun renderAvatarImage(listener: OnRenderAvatarImageListener?) + { + apiBase.callApi(object : OnApiResultListener + { + override fun onResult(response: Any) + { + if (response is RenderAvatarImageResult) + { + listener?.onRenderAvatarImageResult(response as RenderAvatarImageResult) + } else + { + listener?.onRenderAvatarImageError(java.lang.Exception("Invalid response type")) + } + } + + override fun onError(error:Exception) + { + listener?.onRenderAvatarImageError(error) + } + }) + } + + /** + * Define the listener interface for the RenderAvatarImage method + */ + interface OnRenderAvatarImageListener + { + fun onRenderAvatarImageResult(result: RenderAvatarImageResult?) + fun onRenderAvatarImageError(error: Exception) + } + + /** + * Render Avatar Image + */ + class RenderAvatarImage(request: RenderAvatarImageRequest) : Base + { + private val request: RenderAvatarImageRequest + + init { + this.request = request + } + + override fun callApi(listener: OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = AvatarManagementApi() + val result: RenderAvatarImageResult = apiInstance.renderAvatarImage(request) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Creates missing avatars into the mentioned platform for the user. + * @param listener + */ + fun syncAvatars(listener: OnSyncAvatarsListener?) + { + apiBase.callApi(object : OnApiResultListener + { + override fun onResult(response: Any) + { + if (response is SyncAvatarsResult) + { + listener?.onSyncAvatarsResult(response as SyncAvatarsResult) + } else + { + listener?.onSyncAvatarsError(java.lang.Exception("Invalid response type")) + } + } + + override fun onError(error:Exception) + { + listener?.onSyncAvatarsError(error) + } + }) + } + + /** + * Define the listener interface for the SyncAvatars method + */ + interface OnSyncAvatarsListener + { + fun onSyncAvatarsResult(result: SyncAvatarsResult?) + fun onSyncAvatarsError(error: Exception?) + } + + /** + * The SyncAvatars class is responsible for making an API call to Creates missing avatars into the mentioned platform for the user. + */ + class SyncAvatars(syncAvatarsRequest: SyncAvatarsRequest) : Base + { + private val syncAvatarsRequest: SyncAvatarsRequest + + init { + this.syncAvatarsRequest = syncAvatarsRequest + } + + override fun callApi(listener: OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = AvatarManagementApi() + val result: SyncAvatarsResult = apiInstance.syncAvatars(syncAvatarsRequest) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Grant Avatar Preset To User + * @param listener + */ + fun grantAvatarPresetToUser(listener: OnGrantAvatarPresetToUserListener?) + { + apiBase.callApi(object : OnApiResultListener { + override fun onResult(response: Any) { + if (response is GrantAvatarPresetToUserResult) { + listener?.onGrantAvatarPresetToUserResult(response as GrantAvatarPresetToUserResult) + } else { + listener?.onGrantAvatarPresetToUserError(java.lang.Exception("Invalid response type")) + } + } + + override fun onError(error: java.lang.Exception) { + listener?.onGrantAvatarPresetToUserError(error) + } + }) + } + + /** + * Define the listener interface for the GrantAvatarPresetToUser method + */ + interface OnGrantAvatarPresetToUserListener + { + fun onGrantAvatarPresetToUserResult(result: GrantAvatarPresetToUserResult?) + fun onGrantAvatarPresetToUserError(error: java.lang.Exception?) + } + + /** + * The GrantAvatarPresetToUser class is responsible for making an API call to Grant Avatar Preset To User. + */ + class GrantAvatarPresetToUser(request: GrantAvatarPresetToUserRequest) : Base + { + private val request: GrantAvatarPresetToUserRequest + + init { + this.request = request + } + + override fun callApi(listener: OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = AvatarManagementApi() + val result: GrantAvatarPresetToUserResult = apiInstance.grantAvatarPresetToUser(request) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Retrive Avatar preset by ID + * @param listener + */ + fun getAvatarPresetsByID(listener: OnGetAvatarPresetsByIDListener?) + { + apiBase.callApi(object : OnApiResultListener + { + override fun onResult(response: Any) + { + if (response is GetAvatarPresetByIDRequest) + { + listener?.onGetAvatarPresetsByIDResult(response as GetAvatarPresetByIDRequest) + } else + { + listener?.onGetAvatarPresetsByIDError(java.lang.Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) + { + listener?.onGetAvatarPresetsByIDError(error) + } + }) + } + + /** + * Define the listener interface for the GetAvatarPresetsByID method + */ + interface OnGetAvatarPresetsByIDListener + { + fun onGetAvatarPresetsByIDResult(result: GetAvatarPresetByIDRequest?) + fun onGetAvatarPresetsByIDError(error: Exception?) + } + + /** + * The GetAvatarPresetByID class is responsible for making an API call to retrieve an avatar preset by its ID. + */ + class GetAvatarPresetByID(private val avatarPresetID: String) : Base + { + override fun callApi(listener: OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = AvatarManagementApi() + val result: GetAvatarPresetByIDRequest = apiInstance.getAvatarPresetsByID(avatarPresetID = avatarPresetID) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } +} \ No newline at end of file diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/Base.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/Base.kt new file mode 100644 index 0000000..26c9fc8 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/Base.kt @@ -0,0 +1,16 @@ +package com.Avataryug.client.Handler + +/** + * This class defines an interface called Base, which serves as a foundation for making API calls. + * It includes a nested interface called OnApiResultListener that is used to handle API call results and errors + */ +interface Base +{ + fun callApi(listener: OnApiResultListener) + + interface OnApiResultListener + { + fun onResult(response: Any) + fun onError(error: Exception) + } +} \ No newline at end of file diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/EconomyHandler.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/EconomyHandler.kt new file mode 100644 index 0000000..c57ae58 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/EconomyHandler.kt @@ -0,0 +1,527 @@ +package com.Avataryug.client.Handler + +import com.Avataryug.client.Apis.EconomyApi +import com.Avataryug.client.Infrastructure.ClientException +import com.Avataryug.client.Infrastructure.ServerException +import com.Avataryug.client.Models.GetEconomyBundleByIDResult +import com.Avataryug.client.Models.GetEconomyBundlesResult +import com.Avataryug.client.Models.GetEconomyContainerByIDResult +import com.Avataryug.client.Models.GetEconomyContainersResult +import com.Avataryug.client.Models.GetEconomyItemsByIDResult +import com.Avataryug.client.Models.GetEconomyItemsResult +import com.Avataryug.client.Models.GetEconomyStoresResult +import com.Avataryug.client.Models.GetStoreItemsByIDResult +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch + +/** + * The "EconomyHandler" class handles bundle containers, currencies, and items for economy-related operations. + * It utilizes the "Base" class for making API calls and provides methods for managing + * bundles, currencies, store, and items within the economy system. + */ +class EconomyHandler (private val apiBase: Base) +{ + /** + * Get Economy Items + * @param listener + */ + fun getEconomyItems(listener: OnGetEconomyItemsListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is GetEconomyItemsResult) { + listener.onGetEconomyItemsResult(response) + } else { + listener.onGetEconomyItemsError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onGetEconomyItemsError(error) + } + }) + } + + /** + * Define the listener interface for the GetEconomyItems method + */ + interface OnGetEconomyItemsListener + { + fun onGetEconomyItemsResult(result: GetEconomyItemsResult) + fun onGetEconomyItemsError(error: Exception) + } + + /** + * Get Economy Items + */ + class GetEconomyItems(private val category: String, private val status: Int, private val gender: Int) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = EconomyApi() + val result:GetEconomyItemsResult = apiInstance.getEconomyItems(category,status,gender) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + /** + * Get Economy Item by ID + * @param listener + */ + fun getEconomyItemsByID(listener: OnGetEconomyItemsByIDListener) + { + apiBase.callApi(object : Base.OnApiResultListener + { + override fun onResult(response: Any) + { + if (response is GetEconomyItemsByIDResult) + { + listener.onGetEconomyItemsByIDResult(response) + } else { + listener.onGetEconomyItemsByIDError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) + { + listener.onGetEconomyItemsByIDError(error) + } + }) + } + + // Define the listener interface for GetEconomyItemsByID method + interface OnGetEconomyItemsByIDListener + { + fun onGetEconomyItemsByIDResult(result: GetEconomyItemsByIDResult) + fun onGetEconomyItemsByIDError(error: Exception) + } + + /** + * Get Economy Item by ID + */ + class GetEconomyItemsByID(private val itemID: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = EconomyApi() + val result:GetEconomyItemsByIDResult = apiInstance.getEconomyItemsByID(itemID) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Get Economy Bundle + * @param listener + */ + fun getEconomyBundles(listener: OnGetEconomyBundlesListener) + { + apiBase.callApi(object : Base.OnApiResultListener + { + override fun onResult(response: Any) + { + if (response is GetEconomyBundlesResult) + { + listener.onGetEconomyBundlesResult(response) + } + else + { + listener.onGetEconomyBundlesError(Exception("Invalid response type")) + } + } + override fun onError(error: Exception) + { + listener.onGetEconomyBundlesError(error) + } + }) + } + + /** + *Define the listener interface for the GetEconomyBundles method + */ + interface OnGetEconomyBundlesListener + { + fun onGetEconomyBundlesResult(result: GetEconomyBundlesResult) + fun onGetEconomyBundlesError(error: Exception) + } + + /** + * Get Economy Bundle + * @param listener + */ + class GetEconomyBundles(private val status: Int) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = EconomyApi() + val result:GetEconomyBundlesResult = apiInstance.getEconomyBundles(status) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Get Economy Bundles by ID + * @param listener + */ + fun getEconomyBundleByID(listener: OnGetEconomyBundleByIDListener) + { + apiBase.callApi(object : Base.OnApiResultListener + { + override fun onResult(response: Any) + { + if (response is GetEconomyBundleByIDResult) + { + listener.GetEconomyBundleByIDResult(response) + } else + { + listener.onGetEconomyBundleByIDError(Exception("Invalid response type")) + } + } + override fun onError(error: Exception) + { + listener.onGetEconomyBundleByIDError(error) + } + }) + } + + /** + *Define the listener interface for the GetEconomyBundleByID methodm + */ + interface OnGetEconomyBundleByIDListener + { + fun GetEconomyBundleByIDResult(result: GetEconomyBundleByIDResult) + fun onGetEconomyBundleByIDError(error: Exception) + } + + /** + * Get Economy Bundles by ID + */ + class GetEconomyBundleByID(private val bundleID: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = EconomyApi() + val result: GetEconomyBundleByIDResult = apiInstance.getEconomyBundleByID(bundleID) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + *Get Economy Containers + */ + fun getEconomyContainers(listener: OnGetEconomyContainersListener) + { + apiBase.callApi(object : Base.OnApiResultListener + { + override fun onResult(response: Any) + { + if (response is GetEconomyBundleByIDResult) + { + listener.onGetEconomyContainersResult(response) + } else + { + listener.onGetEconomyBundleByIDError(Exception("Invalid response type")) + } + } + override fun onError(error: Exception) + { + listener.onGetEconomyBundleByIDError(error) + } + }) + } + + /** + * Define the listener interface for the GetEconomyContainers method + */ + interface OnGetEconomyContainersListener + { + fun onGetEconomyContainersResult(result: GetEconomyBundleByIDResult) + fun onGetEconomyBundleByIDError(error: Exception) + } + + /** + *Get Economy Containers + */ + class GetEconomyContainers(private val containersStatus: Int) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = EconomyApi() + val result:GetEconomyContainersResult = apiInstance.getEconomyContainers(containersStatus) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Get Economy Container by ID + * @param listener + */ + fun getEconomyContainerByID(listener: OnGetEconomyContainerByIDListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is GetEconomyContainerByIDResult) { + listener.onGetEconomyContainerByIDResult(response) + } else { + listener.onGetEconomyContainerByIDError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onGetEconomyContainerByIDError(error) + } + }) + } + + /** + * Define the listener interface for the GetEconomyContainerByID method + */ + interface OnGetEconomyContainerByIDListener + { + fun onGetEconomyContainerByIDResult(result: GetEconomyContainerByIDResult) + fun onGetEconomyContainerByIDError(error: Exception) + } + + /** + * Get Economy Container by ID + */ + class GetEconomyContainerByID(private val containerID: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = EconomyApi() + val result:GetEconomyContainerByIDResult = apiInstance.getEconomyContainerByID(containerID) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Get Economy Stores + * @param listener + */ + fun getEconomyStores(listener: OnGetEconomyStoresListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is GetEconomyStoresResult) { + listener.onGetEconomyStoresResult(response) + } else { + listener.onGetEconomyStoresError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onGetEconomyStoresError(error) + } + }) + } + + /** + * Define the listener interface for the GetEconomyStores method + */ + interface OnGetEconomyStoresListener + { + fun onGetEconomyStoresResult(result: GetEconomyStoresResult) + fun onGetEconomyStoresError(error: Exception) + } + + /** + * Get Economy Stores + */ + class GetEconomyStores(private val storesStatus: Int) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = EconomyApi() + val result:GetEconomyStoresResult = apiInstance.getEconomyStores(storesStatus) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Retrieves the set of items defined for the specified store, including all prices defined + * @param listener + */ + fun getStoreItemsByID(listener: OnGetStoreItemsByIDListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is GetStoreItemsByIDResult) { + listener.onGetStoreItemsByIDResult(response) + } else { + listener.onGetStoreItemsByIDError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onGetStoreItemsByIDError(error) + } + }) + } + + /** + * Define the listener interface for the getStoreItemsByID method + */ + interface OnGetStoreItemsByIDListener + { + fun onGetStoreItemsByIDResult(result: GetStoreItemsByIDResult) + fun onGetStoreItemsByIDError(error: Exception) + } + + /** + *Retrieves the set of items defined for the specified store, including all prices defined + */ + class GetStoreItemsByID(private val storeID: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = EconomyApi() + val result:GetStoreItemsByIDResult = apiInstance.getStoreItemsByID(storeID) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + +} \ No newline at end of file diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/UserAccountManagementHandler.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/UserAccountManagementHandler.kt new file mode 100644 index 0000000..bcdf8ea --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/UserAccountManagementHandler.kt @@ -0,0 +1,1362 @@ +package com.Avataryug.client.Handler + +import android.util.Log +import com.Avataryug.client.Apis.UserAccountManagementApi +import com.Avataryug.client.Infrastructure.ClientException +import com.Avataryug.client.Infrastructure.ServerException +import com.Avataryug.client.Models.AddGenericServiceIDRequest +import com.Avataryug.client.Models.AddGenericServiceIDResult +import com.Avataryug.client.Models.ChangePasswordRequest +import com.Avataryug.client.Models.ChangePasswordResult +import com.Avataryug.client.Models.DeleteUserResult +import com.Avataryug.client.Models.GetUserAccountInfoResult +import com.Avataryug.client.Models.GetUserProfileResult +import com.Avataryug.client.Models.LinkAndroidDeviceIDRequest +import com.Avataryug.client.Models.LinkAndroidDeviceIDResult +import com.Avataryug.client.Models.LinkAppleRequest +import com.Avataryug.client.Models.LinkAppleResult +import com.Avataryug.client.Models.LinkCustomIDRequest +import com.Avataryug.client.Models.LinkCustomIDResult +import com.Avataryug.client.Models.LinkFacebookAccountRequest +import com.Avataryug.client.Models.LinkFacebookAccountResult +import com.Avataryug.client.Models.LinkGoogleAccountRequest +import com.Avataryug.client.Models.LinkGoogleAccountResult +import com.Avataryug.client.Models.LinkIOSDeviceIDRequest +import com.Avataryug.client.Models.LinkIOSDeviceIDResult +import com.Avataryug.client.Models.RemoveGenericServiceIDResult +import com.Avataryug.client.Models.UnlinkAndroidDeviceIDResult +import com.Avataryug.client.Models.UnlinkAppleResult +import com.Avataryug.client.Models.UnlinkCustomIDResult +import com.Avataryug.client.Models.UnlinkFacebookAccountResult +import com.Avataryug.client.Models.UnlinkGoogleAccountResult +import com.Avataryug.client.Models.UnlinkIOSDeviceIDResult +import com.Avataryug.client.Models.UpdateDefaultAvatarIDRequest +import com.Avataryug.client.Models.UpdateDefaultAvatarIDResult +import com.Avataryug.client.Models.UpdateUserDemographicsRequest +import com.Avataryug.client.Models.UpdateUserDemographicsResult +import com.Avataryug.client.Models.UpdateUserProjectDisplayNameRequest +import com.Avataryug.client.Models.UpdateUserProjectDisplayNameResult +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch + +/** + * The "UserAccountManagementHandle" class manages user account-related operations through the use of the "Base" class. + * It provides a variety of methods for tasks such as + * changing passwords, deleting user accounts, updating user demographics, verifying users with email, and more. + * These methods utilize the "baseApiCall" instance to make API calls and handle responses and errors through callbacks. + */ +class UserAccountManagementHandler (private val apiBase: Base) +{ + /** + * Links a custom ID to the user's account. + * @param listener + */ + fun linkCustomID(listener: OnLinkCustomIDResultListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) + { + if (response is LinkCustomIDResult) + { + listener.onLinkCustomIDResult(response) + } + else + { + listener.onError(Exception("API response is null")) + } + } + override fun onError(error: Exception) + { + listener.onError(error) + } + }) + } + + /** + * Define the listener interface for the LinkCustomID method. + */ + interface OnLinkCustomIDResultListener + { + fun onLinkCustomIDResult(result: LinkCustomIDResult) + fun onError(error: Exception) + } + + /** + * Links the custom identifier, generated by the Project, to the user's Avataryug account + */ + class LinkCustomID(private val customID: String, private val forceLink: Boolean) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) { + try { + val apiInstance = UserAccountManagementApi() + val linkCustomIDRequest = LinkCustomIDRequest( customID = customID, forceLink = forceLink) + val result: LinkCustomIDResult = + apiInstance.linkCustomID(linkCustomIDRequest) + listener.onResult(result) + } catch (e: ClientException) { + Log.e("Links Custom ID CLIENT EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: ServerException) { + Log.e("Links Custom ID SERVER EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: Exception) { + Log.e("Links Custom ID EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + } + } + } + + /** + * Unlinks a custom ID from the user's account. + * @param listener + */ + fun unlinkCustomID(listener: OnUnlinkCustomIDListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is UnlinkCustomIDResult) { + listener.onUnlinkCustomIDResult(response) + } else { + listener.onUnlinkCustomIDError(Exception("Invalid response type")) + } + } + override fun onError(error: Exception) { + listener.onUnlinkCustomIDError(error) + } + }) + } + + /** + * Define the listener interface for the UnlinkCustomID method. + */ + interface OnUnlinkCustomIDListener + { + fun onUnlinkCustomIDResult(result: UnlinkCustomIDResult) + fun onUnlinkCustomIDError(error: Exception) + } + + /** + * Unlinks the related custom identifier from the user's Avataryug account + */ + class UnlinkCustomID : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) { + try { + val apiInstance = UserAccountManagementApi() + val result: UnlinkCustomIDResult = apiInstance.unlinkCustomID() + listener.onResult(result) + } catch (e: ClientException) { + Log.e("Unlinks Custom ID CLIENT EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: ServerException) { + Log.e("Unlinks Custom ID SERVER EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: Exception) { + Log.e("Unlinks Custom ID EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + } + } + } + + /** + * Links an Android device ID to the user's account. + * @param listener + */ + fun linkAndroidDeviceID(listener: LinkAndroidDeviceIDListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is LinkAndroidDeviceIDResult) { + listener.onLinkAndroidDeviceIDResult(response) + } else { + listener.onLinkAndroidDeviceIDError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onLinkAndroidDeviceIDError(error) + } + }) + } + + /** + * Define the listener interface for the LinkAndroidDeviceID method. + */ + interface LinkAndroidDeviceIDListener + { + fun onLinkAndroidDeviceIDResult(result: LinkAndroidDeviceIDResult) + fun onLinkAndroidDeviceIDError(error: Exception) + } + + /** + * Links the Android device identifier to the user's Avataryug account + */ + class LinkAndroidDeviceID(private val androidDeviceID: String, private val forceLink: Boolean) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + + GlobalScope.launch(Dispatchers.IO) { + try { + val apiInstance = UserAccountManagementApi() + val linkAndroidDeviceIDRequest = LinkAndroidDeviceIDRequest( + androidDeviceID = androidDeviceID, + forceLink = forceLink + ) + val result: LinkAndroidDeviceIDResult = apiInstance.linkAndroidDeviceID(linkAndroidDeviceIDRequest) + listener.onResult(result) + } catch (e: ClientException) { + Log.e("Links the Android device ID CLIENT EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: ServerException) { + Log.e("Links the Android device ID SERVER EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: Exception) { + Log.e("Links the Android device ID EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + } + + + } + } + + /** + * Unlinks an Android device ID from the user's account. + * @param listener + */ + fun unlinkAndroidDeviceID(listener: UnlinkAndroidDeviceIDListener) + { + apiBase.callApi(object : Base.OnApiResultListener + { + override fun onResult(response: Any) { + if (response is UnlinkAndroidDeviceIDResult) { + listener.onUnlinkAndroidDeviceIDResult(response) + } else { + listener.onUnlinkAndroidDeviceIDError(Exception("Invalid response type")) + } + } + override fun onError(error: Exception) { + listener.onUnlinkAndroidDeviceIDError(error) + } + }) + } + + /** + * Define the listener interface for the UnlinkAndroidDeviceID method. + */ + interface UnlinkAndroidDeviceIDListener + { + fun onUnlinkAndroidDeviceIDResult(result: UnlinkAndroidDeviceIDResult) + fun onUnlinkAndroidDeviceIDError(error: Exception) + } + + /** + * Unlinks the related Android device identifier from the user's Avataryug account. + */ + class UnlinkAndroidDeviceID : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try { + val apiInstance = UserAccountManagementApi() + val result: UnlinkAndroidDeviceIDResult = apiInstance.unlinkAndroidDeviceID() + listener.onResult(result) + } catch (e: ClientException) { + Log.e("Unlinks the Android device ID CLIENT EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: ServerException) { + Log.e("Unlinks the Android device ID SERVER EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: Exception) { + Log.e("Unlinks the Android device ID EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + } + } + } + + /** + * Links an Apple account to the user's account. + * @param listener + */ + fun linkApple(listener: LinkAppleListener) + { + apiBase.callApi(object : Base.OnApiResultListener + { + override fun onResult(response: Any) { + if (response is LinkAppleResult) { + listener.onLinkAppleResult(response) + } else { + listener.onLinkAppleError(Exception("Invalid response type")) + } + } + override fun onError(error: Exception) { + listener.onLinkAppleError(error) + } + }) + } + + /** + * Define the listener interface for the linkApple method. + */ + interface LinkAppleListener + { + fun onLinkAppleResult(result: LinkAppleResult) + fun onLinkAppleError(error: Exception) + } + + /** + * Links the Apple account associated with the token to the user's Avataryug account. + */ + class LinkApple(private val appleID: String, private val forceLink: Boolean, private val identityToken: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try { + val linkAppleRequest = LinkAppleRequest( + appleID = appleID, + forceLink = forceLink, + identityToken = identityToken + ) + val apiInstance = UserAccountManagementApi() + val result: LinkAppleResult = apiInstance.linkApple(linkAppleRequest) + listener.onResult(result) + } catch (e: ClientException) { + Log.e("Links the Apple account CLIENT EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: ServerException) { + Log.e("Links the Apple account SERVER EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: Exception) { + Log.e("Links the Apple account EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + } + + } + } + + /** + * Unlinks an Apple account from the user's account. + * @param listener + */ + fun unlinkApple(listener: UnlinkAppleResultListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is UnlinkAppleResult) { + listener.onUnlinkAppleResult(response) + } else { + listener.onUnlinkAppleError(Exception("Invalid response type")) + } + } + override fun onError(error: Exception) { + listener.onUnlinkAppleError(error) + } + }) + } + + /** + * Define the listener interface for the unlinkApple method. + */ + interface UnlinkAppleResultListener + { + fun onUnlinkAppleResult(result: UnlinkAppleResult) + fun onUnlinkAppleError(error: Exception) + } + +/** + * Unlinks the related Apple account from the user's Avataryug accou + */ + class UnlinkApple : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try { + + val apiInstance = UserAccountManagementApi() + val result: UnlinkAppleResult = apiInstance.unlinkApple() + listener.onResult(result) + } catch (e: ClientException) { + Log.e("Unlinks the Apple account CLIENT EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: ServerException) { + Log.e("Unlinks the Apple account SERVER EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: Exception) { + Log.e("Unlinks the Apple account EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + } + } + } + + /** + * Links an iOS device ID to the user's account. + * @param listener + */ + fun linkIOSDeviceID(listener: LinkIOSDeviceIDListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is LinkIOSDeviceIDResult) { + listener.onLinkIOSDeviceIDResult(response) + } else { + listener.onLinkIOSDeviceIDError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onLinkIOSDeviceIDError(error) + } + }) + } + + /** + * Define the listener interface for the linkIOSDeviceID method. + */ + interface LinkIOSDeviceIDListener + { + fun onLinkIOSDeviceIDResult(result: LinkIOSDeviceIDResult) + fun onLinkIOSDeviceIDError(error: Exception) + } + + /** + * Links the vendor-specific iOS device identifier to the user's Avataryug account. + */ + class LinkIOSDeviceID(private val deviceID: String, private val forceLink: Boolean) : Base + { + override fun callApi(listener: Base.OnApiResultListener) { + + GlobalScope.launch(Dispatchers.IO) + { + try { + val linkIOSDeviceIDRequest = LinkIOSDeviceIDRequest( deviceID = deviceID, forceLink = forceLink) + val apiInstance = UserAccountManagementApi() + val result: LinkIOSDeviceIDResult = apiInstance.linkIOSDeviceID(linkIOSDeviceIDRequest) + listener.onResult(result) + } catch (e: ClientException) { + Log.e("Links the iOS device account CLIENT EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: ServerException) { + Log.e("Links the iOS device account SERVER EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: Exception) { + Log.e("Links the iOS device account EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + } + + } + } + + /** + * Unlinks an iOS device ID from the user's account. + * @param listener + */ + fun unlinkIOSDeviceID(listener: UnlinkIOSDeviceIDListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is UnlinkIOSDeviceIDResult) { + listener.onUnlinkIOSDeviceIDResult(response) + } else { + listener.onUnlinkIOSDeviceIDError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onUnlinkIOSDeviceIDError(error) + } + }) + } + + /** + * Define the listener interface for the unlinkIOSDeviceID method. + */ + interface UnlinkIOSDeviceIDListener + { + fun onUnlinkIOSDeviceIDResult(result: UnlinkIOSDeviceIDResult) + fun onUnlinkIOSDeviceIDError(error: Exception) + } + + /** + * Unlinks the related iOS device identifier from the user's Avataryug account. + */ + class UnlinkIOSDeviceID : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try { + + val apiInstance = UserAccountManagementApi() + val result: UnlinkIOSDeviceIDResult = apiInstance.unlinkIOSDeviceID() + listener.onResult(result) + } catch (e: ClientException) { + Log.e("Unlinks the iOS device CLIENT EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: ServerException) { + Log.e("Unlinks the iOS device SERVER EXCEPTION", e.message ?: "", e) + listener.onError(e) + } catch (e: Exception) { + Log.e("Unlinks the iOS device EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + } + } + } + + /** + * Links a Google account to the user's account. + * @param listener + */ + fun linkGoogleAccount(listener: LinkGoogleAccountListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is LinkGoogleAccountResult) { + listener.onLinkGoogleAccountResult(response) + } else { + listener.onLinkGoogleAccountError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onLinkGoogleAccountError(error) + } + }) + } + + /** + * Define the listener interface for the linkGoogleAccount method. + */ + interface LinkGoogleAccountListener + { + fun onLinkGoogleAccountResult(result: LinkGoogleAccountResult) + fun onLinkGoogleAccountError(error: Exception) + } + + /** + * Links the currently signed-in user account to their Google account, using their Google account credentials. + */ + class LinkGoogleAccount(private val googleID: String, private val forceLink: Boolean, private val googleServerAuthCode: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) { + + GlobalScope.launch(Dispatchers.IO) + { + try { + val request = LinkGoogleAccountRequest( + googleID = googleID, + forceLink = forceLink, + googleServerAuthCode = googleServerAuthCode + ) + val apiInstance = UserAccountManagementApi() + val result: LinkGoogleAccountResult = apiInstance.linkGoogleAccount(request) + listener.onResult(result) + } + catch (e: ClientException) + { + Log.e("links the Google account CLIENT EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + catch (e: ServerException) + { + Log.e("links the Google account SERVER EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + catch (e: Exception) + { + Log.e("links the Google account EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + } + + } + } + + /** + * Unlinks a Google account from the user's account. + * @param listener + */ + fun unlinkGoogleAccount(listener: OnUnlinkGoogleAccountResultListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) + { + if (response is UnlinkGoogleAccountResult) + { + listener.onUnlinkGoogleAccountResult(response) + } else { + listener.onUnlinkGoogleAccountError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) + { + listener.onUnlinkGoogleAccountError(error) + } + }) + } + + /** + * Define the listener interface for the unlinkGoogleAccount method. + */ + interface OnUnlinkGoogleAccountResultListener + { + fun onUnlinkGoogleAccountResult(result: UnlinkGoogleAccountResult) + fun onUnlinkGoogleAccountError(error: Exception) + } + + /** + * Unlinks the related Google account from the user's Avataryug accoun + */ + class UnlinkGoogleAccount : Base + { + override fun callApi(listener: Base.OnApiResultListener) { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = UserAccountManagementApi() + val result: UnlinkGoogleAccountResult = apiInstance.unlinkGoogleAccount() + listener.onResult(result) + } + catch (e: ClientException) + { + Log.e("Unlinks the Google account CLIENT EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + catch (e: ServerException) + { + Log.e("Unlinks the Google account SERVER EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + catch (e: Exception) + { + Log.e("Unlinks the Google account EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + } + } + } + + /** + * Links a Facebook account to the user's account. + * @param listener + */ + fun linkFacebookAccount(listener: OnLinkFacebookAccountListener) + { + apiBase.callApi(object : Base.OnApiResultListener + { + override fun onResult(response: Any) + { + if (response is LinkFacebookAccountResult) + { + listener.onLinkFacebookAccountResult(response) + } else { + listener.onLinkFacebookAccountError(Exception("Invalid response type")) + } + } + override fun onError(error: Exception) + { + listener.onLinkFacebookAccountError(error) + } + }) + } + + /** + * Define the listener interface for the linkFacebookAccount method. + */ + interface OnLinkFacebookAccountListener + { + fun onLinkFacebookAccountResult(result: LinkFacebookAccountResult) + fun onLinkFacebookAccountError(error: Exception) + } + + /** + * Links the Facebook account associated with the provided Facebook access token to the user's Avataryug account + */ + class LinkFacebookAccount(private val accessToken: String, private val forceLink: Boolean, private val facebookID: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) { + GlobalScope.launch(Dispatchers.IO) + { + try { + val request = LinkFacebookAccountRequest(accessToken = accessToken,forceLink = forceLink,facebookID = facebookID) + val apiInstance = UserAccountManagementApi() + val result: LinkFacebookAccountResult = apiInstance.linkFacebookAccount(request) + listener.onResult(result) + } + catch (e: ClientException) + { + Log.e("links the Facebook account CLIENT EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + catch (e: ServerException) + { + Log.e("links the Facebook account SERVER EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + catch (e: Exception) + { + Log.e("links the Facebook account EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + } + } + } + + /** + * Unlinks a Facebook account from the user's account. + * @param listener + */ + fun unlinkFacebookAccount(listener: OnUnlinkFacebookAccountListener) + { + apiBase.callApi(object : Base.OnApiResultListener + { + override fun onResult(response: Any) + { + if (response is UnlinkFacebookAccountResult) + { + listener.onUnlinkFacebookAccountResult(response) + } else { + listener.onUnlinkFacebookAccountError(Exception("Invalid response type")) + } + } + override fun onError(error: Exception) + { + listener.onUnlinkFacebookAccountError(error) + } + }) + } + + /** + * Define the listener interface for the unlinkFacebookAccount method. + */ + interface OnUnlinkFacebookAccountListener + { + fun onUnlinkFacebookAccountResult(result: UnlinkFacebookAccountResult) + fun onUnlinkFacebookAccountError(error: Exception) + } + + /** + * Unlinks the related Facebook account from the user's Avataryug account. + */ + class UnlinkFacebookAccount : Base + { + override fun callApi(listener: Base.OnApiResultListener) { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = UserAccountManagementApi() + val result: UnlinkFacebookAccountResult = apiInstance.unlinkFacebookAccount() + listener.onResult(result) + } + catch (e: ClientException) + { + Log.e("Unlinks the Facebook account CLIENT EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + catch (e: ServerException) + { + Log.e("Unlinks the Facebook account SERVER EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + catch (e: Exception) + { + Log.e("Unlinks the Facebook account EXCEPTION", e.message ?: "", e) + listener.onError(e) + } + } + } + } + + /** + * Adds the specified generic service identifier to the user's Avataryug account. + * This is designed to allow for a Avataryug ID lookup of any arbitrary service identifier a Project wants to add. + * This identifier should never be used as authentication credentials, as the intent is that it is easily accessible by other users + * @param listener + */ + fun addGenericServiceID(listener: OnAddGenericServiceIDListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is AddGenericServiceIDResult) { + listener.onAddGenericServiceIDResult(response) + } else { + listener.onAddGenericServiceIDError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onAddGenericServiceIDError(error) + } + }) + } + + /** + * Define the listener interface for the addGenericServiceID method. + */ + interface OnAddGenericServiceIDListener + { + fun onAddGenericServiceIDResult(result: AddGenericServiceIDResult) + fun onAddGenericServiceIDError(error: Exception) + } + + /** + * Adds the specified generic service identifier to the user's Avataryug account. + * This is designed to allow for a Avataryug ID lookup of any arbitrary service identifier a Project wants to add. + * This identifier should never be used as authentication credentials, as the intent is that it is easily accessible by other us + */ + class AddGenericServiceID(private val genericServiceID: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val request = AddGenericServiceIDRequest( genericServiceID = genericServiceID ) + val apiInstance = UserAccountManagementApi() + val result: AddGenericServiceIDResult = apiInstance.addGenericServiceID(request) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + + } + } + + /** + * Removes a generic service ID from the user's account. + * @param listener + */ + fun removeGenericServiceID(listener: OnRemoveGenericServiceIDListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is RemoveGenericServiceIDResult) { + listener.onRemoveGenericServiceIDResult(response) + } else { + listener.onRemoveGenericServiceIDError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onRemoveGenericServiceIDError(error) + } + }) + } + + /** + * Define the listener interface for the removeGenericServiceID method. + */ + interface OnRemoveGenericServiceIDListener + { + fun onRemoveGenericServiceIDResult(result: RemoveGenericServiceIDResult) + fun onRemoveGenericServiceIDError(error: Exception) + } + + /** + * Removes the generic service identifier from the user's Avataryug account. + */ + class RemoveGenericServiceID : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + // Use Retrofit to make the API call + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = UserAccountManagementApi() + val result: RemoveGenericServiceIDResult = apiInstance.removeGenericServiceID() + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Updates the display name of the user in the project. + * @param listener + */ + fun updateUserProjectDisplayName(listener: OnUpdateUserProjectDisplayNameListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is UpdateUserProjectDisplayNameResult) { + listener.onUpdateUserProjectDisplayNameResult(response) + } else { + listener.onUpdateUserProjectDisplayNameError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onUpdateUserProjectDisplayNameError(error) + } + }) + } + + /** + * Define the listener interface for the updateUserProjectDisplayName method. + */ + interface OnUpdateUserProjectDisplayNameListener + { + fun onUpdateUserProjectDisplayNameResult(result: UpdateUserProjectDisplayNameResult) + fun onUpdateUserProjectDisplayNameError(error: Exception) + } + + /** + * Updates the display name for the user in the project. + */ + class UpdateUserProjectDisplayName(private val displayName: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val request = UpdateUserProjectDisplayNameRequest(displayName = displayName) + val apiInstance = UserAccountManagementApi() + val result: UpdateUserProjectDisplayNameResult = apiInstance.updateUserProjectDisplayName(request) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Retrieves information about the user's account. + * @param listener + */ + fun getUserAccountInfo(listener: OnGetUserAccountInfoListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is GetUserAccountInfoResult) { + listener.onGetUserAccountInfoResult(response) + } else { + listener.onGetUserAccountInfoError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onGetUserAccountInfoError(error) + } + }) + } + + /** + * Define the listener interface for the getUserAccountInfo method. + */ + interface OnGetUserAccountInfoListener + { + fun onGetUserAccountInfoResult(result: GetUserAccountInfoResult) + fun onGetUserAccountInfoError(error: Exception) + } + + /** + * Retrieves information about the user's account. + */ + class GetUserAccountInfo : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = UserAccountManagementApi() + val result: GetUserAccountInfoResult = apiInstance.getUserAccountInfo() + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Add the UpdateUserDemographics method + * @param listener + */ + fun updateUserDemographics(listener: OnUpdateUserDemographicsListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is UpdateUserDemographicsResult) { + listener.onUpdateUserDemographicsResult(response) + } else { + listener.onUpdateUserDemographicsError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onUpdateUserDemographicsError(error) + } + }) + } + + /** + * Define the listener interface for the updateUserDemographics method. + */ + interface OnUpdateUserDemographicsListener + { + fun onUpdateUserDemographicsResult(result: UpdateUserDemographicsResult) + fun onUpdateUserDemographicsError(error: Exception) + } + + /** + * Updates user demographic information. + */ + class UpdateUserDemographics(private val gender: String, private val ageRange: String, private val race: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val request = UpdateUserDemographicsRequest(ageRange = ageRange,race = race,gender = gender) + val apiInstance = UserAccountManagementApi() + val result: UpdateUserDemographicsResult = apiInstance.updateUserDemographics(request) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + + + } + } + + /** + * Retrieves the user's public profile information. + * @param listener + */ + fun getUserProfile(listener: OnGetUserProfileListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is GetUserProfileResult) { + listener.onGetUserProfileResult(response) + } else { + listener.onGetUserProfileError(Exception("Invalid response type")) + } + } + override fun onError(error: Exception) { + listener.onGetUserProfileError(error) + } + }) + } + + /** + * Define the listener interface for the getUserProfile method. + */ + interface OnGetUserProfileListener + { + fun onGetUserProfileResult(result: GetUserProfileResult) + fun onGetUserProfileError(error: Exception) + } + + /** + * Retrieves the user's public profile information. + */ + class GetUserProfile(private val userID: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = UserAccountManagementApi() + val result: GetUserProfileResult = apiInstance.getUserProfile(userID) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Deletes a user account. + * @param listener + */ + fun deleteUser(listener: OnDeleteUserListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is DeleteUserResult) { + listener.onDeleteUserResult(response) + } else { + listener.onDeleteUserError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onDeleteUserError(error) + } + }) + } + + /** + * Define the listener interface for the deleteUser method. + */ + interface OnDeleteUserListener + { + fun onDeleteUserResult(result: DeleteUserResult) + fun onDeleteUserError(error: Exception) + } + + /** + * Delete User Account from Avataryug platform. + */ + class DeleteUser : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + // Use Retrofit to make the API call + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = UserAccountManagementApi() + val result: DeleteUserResult = apiInstance.deleteUser() + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + *Updates the default avatar ID for the user. + * @param listener + */ + fun updateDefaultAvatarID(listener: OnUpdateDefaultAvatarIDListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is UpdateDefaultAvatarIDResult) { + listener.onUpdateDefaultAvatarIDResult(response) + } else { + listener.onUpdateDefaultAvatarIDError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onUpdateDefaultAvatarIDError(error) + } + }) + } + + /** + * Define the listener interface for the updateDefaultAvatarID method + */ + interface OnUpdateDefaultAvatarIDListener + { + fun onUpdateDefaultAvatarIDResult(result: UpdateDefaultAvatarIDResult) + fun onUpdateDefaultAvatarIDError(error: Exception) + } + + /** + * Sets the default avatar ID to users account + */ + class UpdateDefaultAvatarID(private val defaultAvatarID: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val request = UpdateDefaultAvatarIDRequest(defaultAvatarID = defaultAvatarID) + val apiInstance = UserAccountManagementApi() + val result: UpdateDefaultAvatarIDResult = apiInstance.updateDefaultAvatarID(request) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + + } + } + + /** + * Allows users to change their password. + * @param listener + */ + fun changePassword(listener: OnChangePasswordListener) + { + apiBase.callApi(object : Base.OnApiResultListener + { + override fun onResult(response: Any) + { + if (response is ChangePasswordResult) + { + listener.onChangePasswordResult(response) + } else + { + listener.onChangePasswordError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) + { + listener.onChangePasswordError(error) + } + }) + } + + /** + * Define the listener interface for the ChangePassword method + */ + interface OnChangePasswordListener + { + fun onChangePasswordResult(result: ChangePasswordResult?) + fun onChangePasswordError(error: Exception) + } + + /** + * Allows users to change their password. + */ + class ChangePassword(private val newPassword: String, private val oldPassword: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val request = ChangePasswordRequest(newPassword = newPassword,oldPassword = oldPassword) + val apiInstance = UserAccountManagementApi() + val result: ChangePasswordResult = apiInstance.changePassword(request) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + + } + + } +} + + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/UserDataManagementHandler.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/UserDataManagementHandler.kt new file mode 100644 index 0000000..482e9fd --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Handler/UserDataManagementHandler.kt @@ -0,0 +1,970 @@ +package com.Avataryug.client.Handler + +import com.Avataryug.client.Apis.UserDataManagementApi +import com.Avataryug.client.Handler.Base.OnApiResultListener +import com.Avataryug.client.Infrastructure.ClientException +import com.Avataryug.client.Infrastructure.ServerException +import com.Avataryug.client.Models.AddUserAvatarRequest +import com.Avataryug.client.Models.AddUserAvatarResult +import com.Avataryug.client.Models.AddVirtualCurrencyToUserRequest +import com.Avataryug.client.Models.AddVirtualCurrencyToUserResult +import com.Avataryug.client.Models.ConfirmPurchaseRequest +import com.Avataryug.client.Models.ConfirmPurchaseResult +import com.Avataryug.client.Models.ConsumeInstanceRequest +import com.Avataryug.client.Models.ConsumeInstanceResult +import com.Avataryug.client.Models.DeleteUserAvatarResult +import com.Avataryug.client.Models.GetPurchaseResult +import com.Avataryug.client.Models.GetUserInventoryResult +import com.Avataryug.client.Models.GetUsersAllAvatarsResult +import com.Avataryug.client.Models.GrantInstanceToUserRequest +import com.Avataryug.client.Models.GrantInstanceToUserResult +import com.Avataryug.client.Models.PayForPurchaseRequest +import com.Avataryug.client.Models.PayForPurchaseResult +import com.Avataryug.client.Models.PurchaseInstanceRequest +import com.Avataryug.client.Models.PurchaseInstanceResult +import com.Avataryug.client.Models.SubtractUserVirtualCurrencyRequest +import com.Avataryug.client.Models.SubtractUserVirtualCurrencyResult +import com.Avataryug.client.Models.UnlockContainerInstanceRequest +import com.Avataryug.client.Models.UnlockContainerInstanceResult +import com.Avataryug.client.Models.UpdateUserAvatarRequest +import com.Avataryug.client.Models.UpdateUserAvatarResult +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch + +class UserDataManagementHandler (private val apiBase: Base) +{ + /** + * Retrieves the user's current inventory of virtual goods. + * @param listener + */ + fun getUserInventory(listener: OnGetUserInventoryListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is GetUserInventoryResult) { + listener.onGetUserInventoryResult(response) + } else { + listener.onGetUserInventoryError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onGetUserInventoryError(error) + } + }) + } + + /** + * Define the listener interface for the GetUserInventory method. + */ + interface OnGetUserInventoryListener + { + fun onGetUserInventoryResult(result: GetUserInventoryResult) + fun onGetUserInventoryError(error: Exception) + } + + /** + * Retrieves the user's current inventory of virtual goods. + */ + class GetUserInventory(private val userID: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = UserDataManagementApi() + val result: GetUserInventoryResult = apiInstance.getUserInventory(userID) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Lists all of the avatars that belong to a specific user. + * @param listener + */ + fun getUsersAllAvatars(listener: OnGetUsersAllAvatarsListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is GetUsersAllAvatarsResult) { + listener.onGetUsersAllAvatarsResult(response) + } else { + listener.onGetUsersAllAvatarsError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onGetUsersAllAvatarsError(error) + } + }) + } + + /** + * Define the listener interface for the GetUsersAllAvatars method + */ + interface OnGetUsersAllAvatarsListener + { + fun onGetUsersAllAvatarsResult(result: GetUsersAllAvatarsResult) + fun onGetUsersAllAvatarsError(error: Exception) + } + + /** + * Lists all of the avatars that belong to a specific user. + */ + class GetUsersAllAvatars(private val userID: String) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = UserDataManagementApi() + val result: GetUsersAllAvatarsResult = apiInstance.getUsersAllAvatars(userID) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Adds the specified items to the specified user's inventory. + * @param listener + */ + fun grantInstanceToUser(listener: OnGrantInstanceToUserListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is GrantInstanceToUserResult) { + listener.onGrantInstanceToUserResult(response) + } else { + listener.onGrantInstanceToUserError(Exception("Invalid response type")) + } + } + override fun onError(error: Exception) { + listener.onGrantInstanceToUserError(error) + } + }) + } + + /** + * Define the listener interface for the GrantInstanceToUser method + */ + interface OnGrantInstanceToUserListener + { + fun onGrantInstanceToUserResult(result: GrantInstanceToUserResult) + fun onGrantInstanceToUserError(error: Exception) + } + + /** + * Adds the specified items to the specified user's inventory. + */ + class GrantInstanceToUser(private val grantInstanceToUserRequest: GrantInstanceToUserRequest) : Base + { + override fun callApi(listener: Base.OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val instanceID : String = grantInstanceToUserRequest.instanceIDs.toString() + + val apiInstance = UserDataManagementApi() + val result: GetUsersAllAvatarsResult = apiInstance.getUsersAllAvatars(instanceID) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Update Avatar for the user. + * @param listener + */ + fun updateUserAvatar(listener: OnUpdateUserAvatarListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is UpdateUserAvatarResult) { + listener.onUpdateUserAvatarResult(response) + } else { + listener.onUpdateUserAvatarError(Exception("Invalid response type")) + } + } + override fun onError(error: Exception) { + listener.onUpdateUserAvatarError(error) + } + }) + } + + /** + * Define the listener interface for the UpdateUserAvatar method + */ + interface OnUpdateUserAvatarListener + { + fun onUpdateUserAvatarResult(result: UpdateUserAvatarResult) + fun onUpdateUserAvatarError(error: Exception) + } + + /** + * Update Avatar for the user. + */ + class UpdateUserAvatar(userAvatarRequest: UpdateUserAvatarRequest) : Base + { + private val userAvatarRequest: UpdateUserAvatarRequest + + init { + this.userAvatarRequest = userAvatarRequest + } + + override fun callApi(listener: OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = UserDataManagementApi() + val result: UpdateUserAvatarResult = apiInstance.updateUserAvatar(userAvatarRequest) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Consume uses of a consumable item. When all uses are consumed, it will be removed from the user's inventory. + * @param listener + */ + fun consumeInstance(listener: OnConsumeInstanceListener) + { + apiBase.callApi(object : Base.OnApiResultListener + { + override fun onResult(response: Any) + { + if (response is ConsumeInstanceResult) + { + listener.onConsumeInstanceResult(response) + } else + { + listener.onConsumeInstanceError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onConsumeInstanceError(error) + } + }) + } + + /** + * Define the listener interface for the consumeInstance method + */ + interface OnConsumeInstanceListener + { + fun onConsumeInstanceResult(result: ConsumeInstanceResult) + fun onConsumeInstanceError(error: Exception) + } + + /** + * Consume uses of a consumable item. When all uses are consumed, it will be removed from the user's inventory. + */ + class ConsumeInstance(private val ID: String, private val instanceCount: Int) : Base + { + override fun callApi(listener: OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = UserDataManagementApi() + val request = ConsumeInstanceRequest( + userID = ID, + instanceCount = instanceCount + ) + val result: ConsumeInstanceResult = apiInstance.consumeInstance(request) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + + } + + /** + *Buys a single item with virtual currency. You must specify both the virtual currency to use to purchase, + * as well as what the client believes the price to be. This lets the server fail the purchase if the price has changed. + * @param listener + */ + fun purchaseInstance(listener: OnPurchaseInstanceListener) + { + apiBase.callApi(object : Base.OnApiResultListener + { + override fun onResult(response: Any) + { + if (response is String) + { + listener.onPurchaseInstanceResult(response) + } else + { + listener.onPurchaseInstanceError(Exception("Invalid response type")) + } + } + override fun onError(error: Exception) + { + listener.onPurchaseInstanceError(error) + } + }) + } + + /** + * Define the listener interface for the PurchaseInstance method. + */ + interface OnPurchaseInstanceListener + { + fun onPurchaseInstanceResult(result: String) + fun onPurchaseInstanceError(error: Exception) + } + + /** + * Buys a single item with virtual currency. + * You must specify both the virtual currency to use to purchase, as well as what the client believes the price to be. + * This lets the server fail the purchase if the price has changed. + */ + class PurchaseInstance(private val purchaseInstanceRequest: PurchaseInstanceRequest) : Base + { + private val purchaseReq: PurchaseInstanceRequest = purchaseInstanceRequest + + override fun callApi(listener: OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = UserDataManagementApi() + val result: PurchaseInstanceResult = apiInstance.purchaseInstance(purchaseReq) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Increments the user's balance of the specified virtual currency by the stated amount. + * @param listener + */ + fun addVirtualCurrencyToUser(listener: OnAddVirtualCurrencyToUserListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is AddVirtualCurrencyToUserResult) { + listener.onAddVirtualCurrencyToUserResult(response) + } else { + listener.onAddVirtualCurrencyToUserError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onAddVirtualCurrencyToUserError(error) + } + }) + } + + /** + * Define the listener interface for the AddVirtualCurrencyToUser method + */ + interface OnAddVirtualCurrencyToUserListener + { + fun onAddVirtualCurrencyToUserResult(result: AddVirtualCurrencyToUserResult) + fun onAddVirtualCurrencyToUserError(error: Exception) + } + + /** + * Increments the user's balance of the specified virtual currency by the stated amount. + */ + class AddVirtualCurrencyToUser(private val virtualCurrency: String, private val amount: Int) : Base + { + override fun callApi(listener: OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val request = AddVirtualCurrencyToUserRequest( + virtualCurrency = virtualCurrency, + amount = amount + ) + val apiInstance = UserDataManagementApi() + val result: AddVirtualCurrencyToUserResult = apiInstance.addVirtualCurrencyToUser(request) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + + } + } + + /** + * Decrements the user's balance of the specified virtual currency by the stated amount. It is possible to make a VC balance negative with this API + * @param listener + */ + fun subtractUserVirtualCurrency(listener: OnSubtractUserVirtualCurrencyListener) + { + apiBase.callApi(object : Base.OnApiResultListener + { + override fun onResult(response: Any) + { + if (response is SubtractUserVirtualCurrencyResult) + { + listener.onSubtractUserVirtualCurrencyResult(response) + } else + { + listener.onSubtractUserVirtualCurrencyError(Exception("Invalid response type")) + } + } + override fun onError(error: Exception) + { + listener.onSubtractUserVirtualCurrencyError(error) + } + }) + } + + /** + * Define the listener interface for the SubtractUserVirtualCurrency method + */ + interface OnSubtractUserVirtualCurrencyListener + { + fun onSubtractUserVirtualCurrencyResult(result: SubtractUserVirtualCurrencyResult) + fun onSubtractUserVirtualCurrencyError(error: Exception) + } + + /** + * Decrements the user's balance of the specified virtual currency by the stated amount. + * It is possible to make a VC balance negative with this API. + */ + class SubtractUserVirtualCurrency(private val virtualCurrency: String, private val amount: Int) : Base + { + override fun callApi(listener: OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val request = SubtractUserVirtualCurrencyRequest( + virtualCurrency = virtualCurrency, + amount = amount + ) + val apiInstance = UserDataManagementApi() + val result: SubtractUserVirtualCurrencyResult = apiInstance.subtractUserVirtualCurrency(request) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + + + } + } + + /** + * Add Avatar to the user. + * @param listener + */ + fun addUserAvatar(listener: OnAddUserAvatarListener) + { + apiBase.callApi(object : Base.OnApiResultListener { + override fun onResult(response: Any) { + if (response is AddUserAvatarResult) { + listener.onAddUserAvatarResult(response) + } else { + listener.onAddUserAvatarError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onAddUserAvatarError(error) + } + }) + } + + /** + * Define the listener interface for the AddUserAvatar method + */ + interface OnAddUserAvatarListener + { + fun onAddUserAvatarResult(result: AddUserAvatarResult) + fun onAddUserAvatarError(error: Exception) + } + + class AddUserAvatar(private val avatarData: String) : Base + { + override fun callApi(listener: OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val request = AddUserAvatarRequest( avatarID = "", avatarData = avatarData!!) + val apiInstance = UserDataManagementApi() + val result: AddUserAvatarResult = apiInstance.addUserAvatar(request) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + + } + } + + /** + * Delete specified Avatar for the user. + * @param listener + */ + fun deleteUserAvatar(listener: OnDeleteUserAvatarListener) + { + apiBase.callApi(object : Base.OnApiResultListener + { + override fun onResult(response: Any) + { + if (response is DeleteUserAvatarResult) + { + listener.onDeleteUserAvatarResult(response) + } else + { + listener.onDeleteUserAvatarError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) + { + listener.onDeleteUserAvatarError(error) + } + }) + } + + /** + * Define the listener interface for the DeleteUserAvatar method + */ + interface OnDeleteUserAvatarListener + { + fun onDeleteUserAvatarResult(result: DeleteUserAvatarResult) + fun onDeleteUserAvatarError(error: Exception) + } + + /** + * Delete specified Avatar for the user + */ + class DeleteUserAvatar(private val avatarID: String) : Base + { + override fun callApi(listener: OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = UserDataManagementApi() + val result: DeleteUserAvatarResult = apiInstance.deleteUserAvatar(avatarID) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Confirms with the payment provider that the purchase was approved (if applicable) and adjusts inventory and virtual currency balances as appropriate. + * @param listener + */ + fun confirmPurchase(listener: OnConfirmPurchaseListener) + { + apiBase.callApi(object : Base.OnApiResultListener + { + override fun onResult(response: Any) + { + if (response is ConfirmPurchaseResult) + { + listener.onConfirmPurchaseResult(response) + } else + { + listener.onConfirmPurchaseError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) + { + listener.onConfirmPurchaseError(error) + } + }) + } + + /** + * Define the listener interface for the ConfirmPurchase method + */ + interface OnConfirmPurchaseListener + { + fun onConfirmPurchaseResult(result: ConfirmPurchaseResult) + fun onConfirmPurchaseError(error: Exception) + } + + /** + * Confirms with the payment provider that the purchase was approved (if applicable) and adjusts inventory and virtual currency balances as appropriate. + */ + class ConfirmPurchase(private val transactionID: String) : Base + { + override fun callApi(listener: OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val request = ConfirmPurchaseRequest( + transactionID = transactionID + ) + val apiInstance = UserDataManagementApi() + val result: ConfirmPurchaseResult = apiInstance.confirmPurchase(request) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Get the purchase detials + * @param listener + */ + fun getPurchase(listener: OnGetPurchaseListener) + { + apiBase.callApi(object : Base.OnApiResultListener + { + override fun onResult(response: Any) + { + if (response is GetPurchaseResult) + { + listener.onGetPurchaseResult(response) + } else + { + listener.onGetPurchaseError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) + { + listener.onGetPurchaseError(error) + } + }) + } + + /** + * Define the listener interface for the GetPurchase method + */ + interface OnGetPurchaseListener + { + fun onGetPurchaseResult(result: GetPurchaseResult) + fun onGetPurchaseError(error: Exception) + } + + /** + * Retrieves a purchase along with its current Avataryug status. + * Returns inventory items from the purchase that are still active. + */ + class GetPurchase : Base + { + override fun callApi(listener: OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val apiInstance = UserDataManagementApi() + val result: GetPurchaseResult = apiInstance.getPurchase() + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Buys a single item with virtual currency. You must specify both the virtual currency to use to purchase, + * as well as what the client believes the price to be. This lets the server fail the purchase if the price has changed. + * @param listener + */ + fun payForPurchase(listener: OnPayForPurchaseListener) + { + apiBase.callApi(object : Base.OnApiResultListener + { + override fun onResult(response: Any) + { + if (response is PayForPurchaseResult) + { + listener.onPayForPurchaseResult(response) + } else + { + listener.onPayForPurchaseError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) { + listener.onPayForPurchaseError(error) + } + }) + } + + /** + * Define the listener interface for the PayForPurchase method + */ + interface OnPayForPurchaseListener + { + fun onPayForPurchaseResult(result: PayForPurchaseResult) + fun onPayForPurchaseError(error: Exception) + } + + /** + * Pay For purchase items. + */ + class PayForPurchase(private val purchaseRequest: PayForPurchaseRequest) : Base + { + override fun callApi(listener: OnApiResultListener) + { + GlobalScope.launch(Dispatchers.IO) + { + try + { + val Request: PayForPurchaseRequest? = null + val apiInstance = UserDataManagementApi() + val result: PayForPurchaseResult = apiInstance.payForPurchase(Request) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + } + } + + /** + * Opens the specified container, with the specified key (when required),and returns the contents of the opened container. + * If the container (and key when relevant) are consumable (RemainingUses > 0),their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + * @param listener + */ + fun unlockContainerInstance(listener: OnUnlockContainerInstanceListener) + { + apiBase.callApi(object : Base.OnApiResultListener + { + override fun onResult(response: Any) + { + if (response is UnlockContainerInstanceResult) + { + listener.onUnlockContainerInstanceResult(response) + } else + { + listener.onUnlockContainerInstanceError(Exception("Invalid response type")) + } + } + + override fun onError(error: Exception) + { + listener.onUnlockContainerInstanceError(error) + } + }) + } + + /** + * Define the listener interface for the UnlockContainerInstance method + */ + interface OnUnlockContainerInstanceListener + { + fun onUnlockContainerInstanceResult(result: UnlockContainerInstanceResult) + fun onUnlockContainerInstanceError(error: Exception) + } + + /** + * Opens the specified container, with the specified key (when required), and returns the contents of the opened container. + * If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem. + */ + class UnlockContainerInstance(private val containerInstanceID: String, private val keyInstanceID: String) : Base + { + override fun callApi(listener: OnApiResultListener) + { + + GlobalScope.launch(Dispatchers.IO) + { + try + { + val request = UnlockContainerInstanceRequest( + containerInstanceID = containerInstanceID, + keyInstanceID = keyInstanceID + ) + val apiInstance = UserDataManagementApi() + val result: UnlockContainerInstanceResult = apiInstance.unlockContainerInstance(request) + listener.onResult(result) + } + catch (e: ClientException) + { + listener.onError(e) + } + catch (e: ServerException) + { + listener.onError(e) + } + catch (e: Exception) + { + listener.onError(e) + } + } + + + } + } + +} + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/ApiAbstractions.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/ApiAbstractions.kt new file mode 100644 index 0000000..fdfbc81 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/ApiAbstractions.kt @@ -0,0 +1,25 @@ +package com.Avataryug.client.Infrastructure + +typealias MultiValueMap = MutableMap> + +fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) +{ + "csv" -> "," + "tsv" -> "\t" + "pipe" -> "|" + "space" -> " " + else -> "" +} + +val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } + +fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) + = toMultiValue(items.asIterable(), collectionFormat, map) + +fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List +{ + return when(collectionFormat) { + "multi" -> items.map(map) + else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) + } +} \ No newline at end of file diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/ApiClient.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/ApiClient.kt new file mode 100644 index 0000000..e6519b3 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/ApiClient.kt @@ -0,0 +1,258 @@ +package com.Avataryug.client.Infrastructure + +import android.os.Build +import androidx.annotation.RequiresApi +import okhttp3.OkHttpClient +import okhttp3.RequestBody +import okhttp3.RequestBody.Companion.asRequestBody +import okhttp3.RequestBody.Companion.toRequestBody +import okhttp3.FormBody +import okhttp3.HttpUrl.Companion.toHttpUrlOrNull +import okhttp3.ResponseBody +import okhttp3.MediaType.Companion.toMediaTypeOrNull +import okhttp3.Request +import okhttp3.Headers.Companion.toHeaders +import okhttp3.MultipartBody +import okhttp3.internal.EMPTY_REQUEST +import java.io.File +import java.net.URLConnection +import java.time.LocalDate +import java.time.LocalDateTime +import java.time.LocalTime +import java.time.OffsetDateTime +import java.time.OffsetTime +import java.util.Locale +import com.squareup.moshi.adapter + +open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { + companion object { + protected const val ContentType = "Content-Type" + protected const val Accept = "Accept" + protected const val Authorization = "Authorization" + protected const val JsonMediaType = "application/json" + protected const val FormDataMediaType = "multipart/form-data" + protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" + protected const val XmlMediaType = "application/xml" + + val apiKey: MutableMap = mutableMapOf() + val apiKeyPrefix: MutableMap = mutableMapOf() + var username: String? = null + var password: String? = null + var accessToken: String? = null + // +// val accessHolder = ConfigurationApi() +// var accessToken: String? = accessHolder.getAccessToken() + const val baseUrlKey = "org.openapitools.client.baseUrl" + + @JvmStatic + val defaultClient: OkHttpClient by lazy { + builder.build() + } + + @JvmStatic + val builder: OkHttpClient.Builder = OkHttpClient.Builder() + } + + /** + * Guess Content-Type header from the given file (defaults to "application/octet-stream"). + * + * @param file The given file + * @return The guessed Content-Type + */ + protected fun guessContentTypeFromFile(file: File): String { + val contentType = URLConnection.guessContentTypeFromName(file.name) + return contentType ?: "application/octet-stream" + } + + protected inline fun requestBody(content: T, mediaType: String?): RequestBody = + when { + content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) + mediaType == FormDataMediaType -> + MultipartBody.Builder() + .setType(MultipartBody.FORM) + .apply { + // content's type *must* be Map> + @Suppress("UNCHECKED_CAST") + (content as Map>).forEach { (name, part) -> + if (part.body is File) { + val partHeaders = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") + val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() + addPart( + partHeaders.toHeaders(), + part.body.asRequestBody(fileMediaType) + ) + } else { + val partHeaders = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"") + addPart( + partHeaders.toHeaders(), + parameterToString(part.body).toRequestBody(null) + ) + } + } + }.build() + mediaType == FormUrlEncMediaType -> { + FormBody.Builder().apply { + // content's type *must* be Map> + @Suppress("UNCHECKED_CAST") + (content as Map>).forEach { (name, part) -> + add(name, parameterToString(part.body)) + } + }.build() + } + mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> + if (content == null) { + EMPTY_REQUEST + } else { + Serializer.moshi.adapter(T::class.java).toJson(content) + .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) + } + mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") + // TODO: this should be extended with other serializers + else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") + } + + @RequiresApi(Build.VERSION_CODES.O) + @OptIn(ExperimentalStdlibApi::class) + protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { + if(body == null) { + return null + } + if (T::class.java == File::class.java) { + // return tempFile + // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options + val tempFile = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() + tempFile.deleteOnExit() + body.byteStream().use { inputStream -> + tempFile.outputStream().use { tempFileOutputStream -> + inputStream.copyTo(tempFileOutputStream) + } + } + return tempFile as T + } + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } + return when { + mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> + Serializer.moshi.adapter().fromJson(bodyContent) + else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") + } + } + + protected fun updateAuthParams(requestConfig: RequestConfig) { + if (requestConfig.headers[Authorization].isNullOrEmpty()) { + accessToken?.let { accessToken -> + requestConfig.headers[Authorization] ="Bearer $accessToken" + } + } + } + + protected inline fun request(requestConfig: RequestConfig): ApiResponse { + val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") + + // take authMethod from operation + updateAuthParams(requestConfig) + + val url = httpUrl.newBuilder() + .addEncodedPathSegments(requestConfig.path.trimStart('/')) + .apply { + requestConfig.query.forEach { query -> + query.value.forEach { queryValue -> + addQueryParameter(query.key, queryValue) + } + } + }.build() + + // take content-type/accept from spec or set to default (application/json) if not defined + if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { + requestConfig.headers[ContentType] = JsonMediaType + } + if (requestConfig.headers[Accept].isNullOrEmpty()) { + requestConfig.headers[Accept] = JsonMediaType + } + val headers = requestConfig.headers + + if (headers[Accept].isNullOrEmpty()) { + throw kotlin.IllegalStateException("Missing Accept header. This is required.") + } + + val contentType = if (headers[ContentType] != null) { + // TODO: support multiple contentType options here. + (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) + } else { + null + } + + val request = when (requestConfig.method) { + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) + RequestMethod.GET -> Request.Builder().url(url) + RequestMethod.HEAD -> Request.Builder().url(url).head() + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) + RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) + }.apply { + headers.forEach { header -> addHeader(header.key, header.value) } + }.build() + + val response = client.newCall(request).execute() + + val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) + + // TODO: handle specific mapping types. e.g. Map> + return when { + response.isRedirect -> Redirection( + response.code, + response.headers.toMultimap() + ) + response.isInformational -> Informational( + response.message, + response.code, + response.headers.toMultimap() + ) + response.isSuccessful -> Success( + responseBody(response.body, accept), + response.code, + response.headers.toMultimap() + ) + response.isClientError -> ClientError( + response.message, + response.body?.string(), + response.code, + response.headers.toMultimap() + ) + else -> ServerError( + response.message, + response.body?.string(), + response.code, + response.headers.toMultimap() + ) + } + } + + protected fun parameterToString(value: Any?): String = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + when (value) { + null -> "" + is Array<*> -> toMultiValue(value, "csv").toString() + is Iterable<*> -> toMultiValue(value, "csv").toString() + is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> + parseDateToQueryString(value) + else -> value.toString() + } + } else { + TODO("VERSION.SDK_INT < O") + } + + protected inline fun parseDateToQueryString(value : T): String { + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") + } +} diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/ApiResponse.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/ApiResponse.kt new file mode 100644 index 0000000..e50e488 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/ApiResponse.kt @@ -0,0 +1,43 @@ +package com.Avataryug.client.Infrastructure + +enum class ResponseType { + Success, Informational, Redirection, ClientError, ServerError +} + +interface Response + +abstract class ApiResponse(val responseType: ResponseType): Response { + abstract val statusCode: Int + abstract val headers: Map> +} + +class Success( + val data: T, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +): ApiResponse(ResponseType.Success) + +class Informational( + val statusText: String, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiResponse(ResponseType.Informational) + +class Redirection( + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiResponse(ResponseType.Redirection) + +class ClientError( + val message: String? = null, + val body: Any? = null, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiResponse(ResponseType.ClientError) + +class ServerError( + val message: String? = null, + val body: Any? = null, + override val statusCode: Int = -1, + override val headers: Map> +): ApiResponse(ResponseType.ServerError) diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/BigDecimalAdapter.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/BigDecimalAdapter.kt new file mode 100644 index 0000000..01995e3 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/BigDecimalAdapter.kt @@ -0,0 +1,17 @@ +package com.Avataryug.client.Infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.math.BigDecimal + +class BigDecimalAdapter { + @ToJson + fun toJson(value: BigDecimal): String { + return value.toPlainString() + } + + @FromJson + fun fromJson(value: String): BigDecimal { + return BigDecimal(value) + } +} diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/BigIntegerAdapter.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/BigIntegerAdapter.kt new file mode 100644 index 0000000..4d4e736 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/BigIntegerAdapter.kt @@ -0,0 +1,17 @@ +package com.Avataryug.client.Infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.math.BigInteger + +class BigIntegerAdapter { + @ToJson + fun toJson(value: BigInteger): String { + return value.toString() + } + + @FromJson + fun fromJson(value: String): BigInteger { + return BigInteger(value) + } +} diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/ByteArrayAdapter.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/ByteArrayAdapter.kt new file mode 100644 index 0000000..0e9e5ce --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/ByteArrayAdapter.kt @@ -0,0 +1,12 @@ +package com.Avataryug.client.Infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson + +class ByteArrayAdapter { + @ToJson + fun toJson(data: ByteArray): String = String(data) + + @FromJson + fun fromJson(data: String): ByteArray = data.toByteArray() +} diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/Errors.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/Errors.kt new file mode 100644 index 0000000..7295fd2 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/Errors.kt @@ -0,0 +1,19 @@ +@file:Suppress("unused") +package com.Avataryug.client.Infrastructure + +import com.Avataryug.client.Infrastructure.Response +import java.lang.RuntimeException + +open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { + + companion object { + private const val serialVersionUID: Long = 123L + } +} + +open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { + + companion object { + private const val serialVersionUID: Long = 456L + } +} \ No newline at end of file diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/LocalDateAdapter.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/LocalDateAdapter.kt new file mode 100644 index 0000000..590239e --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/LocalDateAdapter.kt @@ -0,0 +1,23 @@ +package com.Avataryug.client.Infrastructure + +import android.os.Build +import androidx.annotation.RequiresApi +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.LocalDate +import java.time.format.DateTimeFormatter + +class LocalDateAdapter { + @RequiresApi(Build.VERSION_CODES.O) + @ToJson + fun toJson(value: LocalDate): String { + return DateTimeFormatter.ISO_LOCAL_DATE.format(value) + } + + @RequiresApi(Build.VERSION_CODES.O) + @FromJson + fun fromJson(value: String): LocalDate { + return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) + } + +} diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/LocalDateTimeAdapter.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/LocalDateTimeAdapter.kt new file mode 100644 index 0000000..e91fa74 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/LocalDateTimeAdapter.kt @@ -0,0 +1,23 @@ +package com.Avataryug.client.Infrastructure + +import android.os.Build +import androidx.annotation.RequiresApi +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.LocalDateTime +import java.time.format.DateTimeFormatter + +class LocalDateTimeAdapter { + @RequiresApi(Build.VERSION_CODES.O) + @ToJson + fun toJson(value: LocalDateTime): String { + return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) + } + + @RequiresApi(Build.VERSION_CODES.O) + @FromJson + fun fromJson(value: String): LocalDateTime { + return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) + } + +} diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/OffsetDateTimeAdapter.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/OffsetDateTimeAdapter.kt new file mode 100644 index 0000000..2189cef --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/OffsetDateTimeAdapter.kt @@ -0,0 +1,23 @@ +package com.Avataryug.client.Infrastructure + +import android.os.Build +import androidx.annotation.RequiresApi +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.OffsetDateTime +import java.time.format.DateTimeFormatter + +class OffsetDateTimeAdapter { + @RequiresApi(Build.VERSION_CODES.O) + @ToJson + fun toJson(value: OffsetDateTime): String { + return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) + } + + @RequiresApi(Build.VERSION_CODES.O) + @FromJson + fun fromJson(value: String): OffsetDateTime { + return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) + } + +} diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/PartConfig.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/PartConfig.kt new file mode 100644 index 0000000..516e566 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/PartConfig.kt @@ -0,0 +1,11 @@ +package com.Avataryug.client.Infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/RequestConfig.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/RequestConfig.kt new file mode 100644 index 0000000..47852fb --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/RequestConfig.kt @@ -0,0 +1,18 @@ +package com.Avataryug.client.Infrastructure + +/** + * Defines a config object for a given request. + * NOTE: This object doesn't include 'body' because it + * allows for caching of the constructed object + * for many request definitions. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class RequestConfig( + val method: RequestMethod, + val path: String, + val headers: MutableMap = mutableMapOf(), + val query: MutableMap> = mutableMapOf(), + val requiresAuthentication: Boolean, + val body: T? = null +) \ No newline at end of file diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/RequestMethod.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/RequestMethod.kt new file mode 100644 index 0000000..50ef84c --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/RequestMethod.kt @@ -0,0 +1,8 @@ +package com.Avataryug.client.Infrastructure + +/** + * Provides enumerated HTTP verbs + */ +enum class RequestMethod { + GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT +} \ No newline at end of file diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/ResponseExtensions.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/ResponseExtensions.kt new file mode 100644 index 0000000..65278ec --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/ResponseExtensions.kt @@ -0,0 +1,24 @@ +package com.Avataryug.client.Infrastructure + +import okhttp3.Response + +/** + * Provides an extension to evaluation whether the response is a 1xx code + */ +val Response.isInformational : Boolean get() = this.code in 100..199 + +/** + * Provides an extension to evaluation whether the response is a 3xx code + */ +@Suppress("EXTENSION_SHADOWED_BY_MEMBER") +val Response.isRedirect : Boolean get() = this.code in 300..399 + +/** + * Provides an extension to evaluation whether the response is a 4xx code + */ +val Response.isClientError : Boolean get() = this.code in 400..499 + +/** + * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code + */ +val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/Serializer.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/Serializer.kt new file mode 100644 index 0000000..5a8860b --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/Serializer.kt @@ -0,0 +1,23 @@ +package com.Avataryug.client.Infrastructure + +import com.squareup.moshi.Moshi +import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory + +object Serializer { + @JvmStatic + val moshiBuilder: Moshi.Builder = Moshi.Builder() + .add(OffsetDateTimeAdapter()) + .add(LocalDateTimeAdapter()) + .add(LocalDateAdapter()) + .add(UUIDAdapter()) + .add(ByteArrayAdapter()) + .add(URIAdapter()) + .add(KotlinJsonAdapterFactory()) + .add(BigDecimalAdapter()) + .add(BigIntegerAdapter()) + + @JvmStatic + val moshi: Moshi by lazy { + moshiBuilder.build() + } +} diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/URIAdapter.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/URIAdapter.kt new file mode 100644 index 0000000..0fa5603 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/URIAdapter.kt @@ -0,0 +1,13 @@ +package com.Avataryug.client.Infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.net.URI + +class URIAdapter { + @ToJson + fun toJson(uri: URI) = uri.toString() + + @FromJson + fun fromJson(s: String): URI = URI.create(s) +} diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/UUIDAdapter.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/UUIDAdapter.kt new file mode 100644 index 0000000..80e8c7f --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Infrastructure/UUIDAdapter.kt @@ -0,0 +1,13 @@ +package com.Avataryug.client.Infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.util.UUID + +class UUIDAdapter { + @ToJson + fun toJson(uuid: UUID) = uuid.toString() + + @FromJson + fun fromJson(s: String): UUID = UUID.fromString(s) +} diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddEmailPasswordRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddEmailPasswordRequest.kt new file mode 100644 index 0000000..a55ac69 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddEmailPasswordRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param emailID User email address attached to their account + * @param password Password for the AvatarYug account (6-100 characters) + */ + + +data class AddEmailPasswordRequest ( + + /* User email address attached to their account */ + @Json(name = "EmailID") + val emailID: kotlin.String, + + /* Password for the AvatarYug account (6-100 characters) */ + @Json(name = "Password") + val password: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddEmailPasswordResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddEmailPasswordResult.kt new file mode 100644 index 0000000..cae75b7 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddEmailPasswordResult.kt @@ -0,0 +1,43 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code this is test description + * @param status + * @param message + */ + + +data class AddEmailPasswordResult ( + + /* this is test description */ + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddGenericServiceIDRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddGenericServiceIDRequest.kt new file mode 100644 index 0000000..ab6ccb1 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddGenericServiceIDRequest.kt @@ -0,0 +1,35 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param genericServiceID Generic service identifier to add to the player account. + */ + + +data class AddGenericServiceIDRequest ( + + /* Generic service identifier to add to the player account. */ + @Json(name = "GenericServiceID") + val genericServiceID: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddGenericServiceIDResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddGenericServiceIDResult.kt new file mode 100644 index 0000000..d26ca67 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddGenericServiceIDResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class AddGenericServiceIDResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddUserAvatarRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddUserAvatarRequest.kt new file mode 100644 index 0000000..21ac9f5 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddUserAvatarRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param avatarID Unique identifier for the generated avatar + * @param avatarData Data related to the AvatarID + */ + + +data class AddUserAvatarRequest ( + + /* Unique identifier for the generated avatar */ + @Json(name = "AvatarID") + val avatarID: kotlin.String, + + /* Data related to the AvatarID */ + @Json(name = "AvatarData") + val avatarData: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddUserAvatarResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddUserAvatarResult.kt new file mode 100644 index 0000000..72216a4 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddUserAvatarResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class AddUserAvatarResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: AddUserAvatarResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddUserAvatarResultData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddUserAvatarResultData.kt new file mode 100644 index 0000000..6fa050a --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddUserAvatarResultData.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param avatarID + */ + + +data class AddUserAvatarResultData ( + + @Json(name = "AvatarID") + val avatarID: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddVirtualCurrencyToUserRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddVirtualCurrencyToUserRequest.kt new file mode 100644 index 0000000..70eda94 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddVirtualCurrencyToUserRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param virtualCurrency Name of the virtual currency which is to be added. + * @param amount Amount to be added to the user balance of the specified virtual currency. + */ + + +data class AddVirtualCurrencyToUserRequest ( + + /* Name of the virtual currency which is to be added. */ + @Json(name = "VirtualCurrency") + val virtualCurrency: kotlin.String, + + /* Amount to be added to the user balance of the specified virtual currency. */ + @Json(name = "Amount") + val amount: kotlin.Int + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddVirtualCurrencyToUserResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddVirtualCurrencyToUserResult.kt new file mode 100644 index 0000000..61087ea --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/AddVirtualCurrencyToUserResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class AddVirtualCurrencyToUserResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ApiErrorWrapper.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ApiErrorWrapper.kt new file mode 100644 index 0000000..b68203c --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ApiErrorWrapper.kt @@ -0,0 +1,50 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param error + * @param errorCode + * @param errorMessage + */ + + +data class ApiErrorWrapper ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Error") + val error: kotlin.String? = null, + + @Json(name = "ErrorCode") + val errorCode: kotlin.Int? = null, + + @Json(name = "ErrorMessage") + val errorMessage: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ChangePasswordRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ChangePasswordRequest.kt new file mode 100644 index 0000000..d7af2ba --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ChangePasswordRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param oldPassword Current Password of the account. + * @param newPassword New password which needs to be updated. + */ + + +data class ChangePasswordRequest ( + + /* Current Password of the account. */ + @Json(name = "OldPassword") + val oldPassword: kotlin.String, + + /* New password which needs to be updated. */ + @Json(name = "NewPassword") + val newPassword: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ChangePasswordResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ChangePasswordResult.kt new file mode 100644 index 0000000..87eacbd --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ChangePasswordResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class ChangePasswordResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ClipThumbnails.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ClipThumbnails.kt new file mode 100644 index 0000000..00769f5 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ClipThumbnails.kt @@ -0,0 +1,55 @@ +package com.Avataryug.client.Models + +import java.util.Objects + +class ClipThumbnails +{ + // Private fields + private var device: Int? = null + private var textureSize: Int? = null + private var thumbnailUrl: String? = null + + // Constructor + fun ClipThumbnails(device: Int?, textureSize: Int?, thumbnailUrl: String?) { + this.device = device + this.textureSize = textureSize + this.thumbnailUrl = thumbnailUrl + } + + // Getters and Setters + fun getDevice(): Int? { + return device + } + + fun setDevice(device: Int?) { + this.device = device + } + + fun getTextureSize(): Int? { + return textureSize + } + + fun setTextureSize(textureSize: Int?) { + this.textureSize = textureSize + } + + fun getThumbnailUrl(): String? { + return thumbnailUrl + } + + fun setThumbnailUrl(thumbnailUrl: String?) { + this.thumbnailUrl = thumbnailUrl + } + + // Override equals and hashCode methods + override fun equals(o: Any?): Boolean { + if (this === o) return true + if (o == null || javaClass != o.javaClass) return false + val that = o as ClipThumbnails + return device == this.device && textureSize == this.textureSize && thumbnailUrl == this.thumbnailUrl + } + + override fun hashCode(): Int { + return Objects.hash(device, textureSize, thumbnailUrl) + } +} \ No newline at end of file diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ConfirmPurchaseRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ConfirmPurchaseRequest.kt new file mode 100644 index 0000000..886afb3 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ConfirmPurchaseRequest.kt @@ -0,0 +1,35 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param transactionID ID of Transaction. + */ + + +data class ConfirmPurchaseRequest ( + + /* ID of Transaction. */ + @Json(name = "TransactionID") + val transactionID: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ConfirmPurchaseResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ConfirmPurchaseResult.kt new file mode 100644 index 0000000..b3b6adb --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ConfirmPurchaseResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class ConfirmPurchaseResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: ConfirmPurchaseResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ConfirmPurchaseResultData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ConfirmPurchaseResultData.kt new file mode 100644 index 0000000..33e705a --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ConfirmPurchaseResultData.kt @@ -0,0 +1,74 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param owner + * @param transactionID + * @param paymentProvider + * @param transactionStatus + * @param instanceID + * @param instanceType + * @param metadata + * @param currencyCode + * @param currencyAmount + * @param currencyAmountUsd + * @param ID + */ + + +data class ConfirmPurchaseResultData ( + + @Json(name = "Owner") + val owner: kotlin.String? = null, + + @Json(name = "TransactionID") + val transactionID: kotlin.String? = null, + + @Json(name = "PaymentProvider") + val paymentProvider: kotlin.String? = null, + + @Json(name = "TransactionStatus") + val transactionStatus: kotlin.String? = null, + + @Json(name = "InstanceID") + val instanceID: kotlin.String? = null, + + @Json(name = "InstanceType") + val instanceType: kotlin.String? = null, + + @Json(name = "Metadata") + val metadata: kotlin.String? = null, + + @Json(name = "CurrencyCode") + val currencyCode: kotlin.String? = null, + + @Json(name = "CurrencyAmount") + val currencyAmount: kotlin.String? = null, + + @Json(name = "CurrencyAmountUsd") + val currencyAmountUsd: kotlin.Int? = null, + + @Json(name = "ID") + val ID: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ConsumeInstanceRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ConsumeInstanceRequest.kt new file mode 100644 index 0000000..846bcbd --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ConsumeInstanceRequest.kt @@ -0,0 +1,44 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param instanceCount + * @param userID Unique instance identifier of the item to be consumed. + * @param ID Number of uses to consume from the item. + */ + + +data class ConsumeInstanceRequest ( + + @Json(name = "InstanceCount") + val instanceCount: kotlin.Int, + + /* Unique instance identifier of the item to be consumed. */ + @Json(name = "UserID") + val userID: kotlin.String? = null, + + /* Number of uses to consume from the item. */ + @Json(name = "ID") + val ID: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ConsumeInstanceResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ConsumeInstanceResult.kt new file mode 100644 index 0000000..07df8bf --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/ConsumeInstanceResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class ConsumeInstanceResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/DeleteUserAvatarRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/DeleteUserAvatarRequest.kt new file mode 100644 index 0000000..2677c98 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/DeleteUserAvatarRequest.kt @@ -0,0 +1,35 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param avatarID Unique identifier for the avatar being deleted + */ + + +data class DeleteUserAvatarRequest ( + + /* Unique identifier for the avatar being deleted */ + @Json(name = "AvatarID") + val avatarID: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/DeleteUserAvatarResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/DeleteUserAvatarResult.kt new file mode 100644 index 0000000..73236ff --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/DeleteUserAvatarResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class DeleteUserAvatarResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/DeleteUserResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/DeleteUserResult.kt new file mode 100644 index 0000000..e02bb26 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/DeleteUserResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class DeleteUserResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GenerateAvatarMeshRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GenerateAvatarMeshRequest.kt new file mode 100644 index 0000000..d27edbd --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GenerateAvatarMeshRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param avatarID Unique identifier for the generated avatar + * @param platform Name of the platform i.e. Android, IOS + */ + + +data class GenerateAvatarMeshRequest ( + + /* Unique identifier for the generated avatar */ + @Json(name = "AvatarID") + val avatarID: kotlin.String, + + /* Name of the platform i.e. Android, IOS */ + @Json(name = "Platform") + val platform: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GenerateAvatarMeshResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GenerateAvatarMeshResult.kt new file mode 100644 index 0000000..517c2e5 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GenerateAvatarMeshResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GenerateAvatarMeshResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: GenerateAvatarMeshResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GenerateAvatarMeshResultData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GenerateAvatarMeshResultData.kt new file mode 100644 index 0000000..bc4e373 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GenerateAvatarMeshResultData.kt @@ -0,0 +1,38 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param platform + * @param meshURL + */ + + +data class GenerateAvatarMeshResultData ( + + @Json(name = "Platform") + val platform: kotlin.String? = null, + + @Json(name = "MeshURL") + val meshURL: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GenerateAvatarRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GenerateAvatarRequest.kt new file mode 100644 index 0000000..e19f4b8 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GenerateAvatarRequest.kt @@ -0,0 +1,46 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param meta + * @param colors + * @param blendShapes + * @param bucketData + */ + + +data class GenerateAvatarRequest ( + + @Json(name = "Meta") + val meta: kotlin.String? = null, + + @Json(name = "Colors") + val colors: kotlin.String? = null, + + @Json(name = "BlendShapes") + val blendShapes: kotlin.String? = null, + + @Json(name = "BucketData") + val bucketData: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GenerateAvatarResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GenerateAvatarResult.kt new file mode 100644 index 0000000..e4ea2a1 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GenerateAvatarResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GenerateAvatarResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: GenerateAvatarResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GenerateAvatarResultData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GenerateAvatarResultData.kt new file mode 100644 index 0000000..b8f2dea --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GenerateAvatarResultData.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param ID + * @param thumbnailUrl + * @param meshUrl + */ + + +data class GenerateAvatarResultData ( + + @Json(name = "ID") + val ID: kotlin.String? = null, + + @Json(name = "ThumbnailUrl") + val thumbnailUrl: kotlin.String? = null, + + @Json(name = "MeshUrl") + val meshUrl: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAdPlacementByIDResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAdPlacementByIDResult.kt new file mode 100644 index 0000000..24dc8c4 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAdPlacementByIDResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetAdPlacementByIDResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: GetAdPlacementByIDResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAdPlacementByIDResultData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAdPlacementByIDResultData.kt new file mode 100644 index 0000000..b388160 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAdPlacementByIDResultData.kt @@ -0,0 +1,61 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param placementName + * @param platform + * @param adFormat + * @param adUnit + * @param rewards + * @param adLimits + * @param status + * @param ID + */ + + +data class GetAdPlacementByIDResultData ( + + @Json(name = "PlacementName") + val placementName: kotlin.String? = null, + + @Json(name = "Platform") + val platform: kotlin.String? = null, + + @Json(name = "AdFormat") + val adFormat: kotlin.String? = null, + + @Json(name = "AdUnit") + val adUnit: kotlin.String? = null, + + @Json(name = "Rewards") + val rewards: kotlin.String? = null, + + @Json(name = "AdLimits") + val adLimits: kotlin.String? = null, + + @Json(name = "Status") + val status: kotlin.Int? = null, + + @Json(name = "ID") + val ID: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAdPlacementByIDResultDataRewardsInner.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAdPlacementByIDResultDataRewardsInner.kt new file mode 100644 index 0000000..f3519d9 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAdPlacementByIDResultDataRewardsInner.kt @@ -0,0 +1,65 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param actionArray + * @param checked + * @param description + * @param ID + * @param name + * @param odds + * @param rewardURL + * @param selected + * @param `value` + */ + + +data class GetAdPlacementByIDResultDataRewardsInner ( + + @Json(name = "ActionArray") + val actionArray: kotlin.collections.List, + + @Json(name = "Checked") + val checked: kotlin.Boolean, + + @Json(name = "Description") + val description: kotlin.Any?, + + @Json(name = "ID") + val ID: kotlin.Int, + + @Json(name = "Name") + val name: kotlin.String, + + @Json(name = "Odds") + val odds: kotlin.String, + + @Json(name = "RewardURL") + val rewardURL: kotlin.Any?, + + @Json(name = "Selected") + val selected: kotlin.Boolean, + + @Json(name = "Value") + val `value`: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAdPlacementByIDResultDataRewardsInnerActionArrayInner.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAdPlacementByIDResultDataRewardsInnerActionArrayInner.kt new file mode 100644 index 0000000..8c15bad --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAdPlacementByIDResultDataRewardsInnerActionArrayInner.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param metaData + * @param quantity + * @param type + */ + + +data class GetAdPlacementByIDResultDataRewardsInnerActionArrayInner ( + + @Json(name = "MetaData") + val metaData: GetAdPlacementByIDResultDataRewardsInnerActionArrayInnerMetaData, + + @Json(name = "Quantity") + val quantity: kotlin.String, + + @Json(name = "Type") + val type: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAdPlacementByIDResultDataRewardsInnerActionArrayInnerMetaData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAdPlacementByIDResultDataRewardsInnerActionArrayInnerMetaData.kt new file mode 100644 index 0000000..6eff407 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAdPlacementByIDResultDataRewardsInnerActionArrayInnerMetaData.kt @@ -0,0 +1,38 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param instanceID + * @param instanceType + */ + + +data class GetAdPlacementByIDResultDataRewardsInnerActionArrayInnerMetaData ( + + @Json(name = "InstanceID") + val instanceID: kotlin.String? = null, + + @Json(name = "InstanceType") + val instanceType: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAllBucketVerticesResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAllBucketVerticesResult.kt new file mode 100644 index 0000000..c2f3212 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAllBucketVerticesResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetAllBucketVerticesResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: kotlin.collections.List? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAllBucketVerticesResultDataInner.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAllBucketVerticesResultDataInner.kt new file mode 100644 index 0000000..48844e2 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAllBucketVerticesResultDataInner.kt @@ -0,0 +1,54 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param bucketName + * @param mainCatID + * @param platform + * @param vertexArray + * @param meta + * @param ID + */ + + +data class GetAllBucketVerticesResultDataInner ( + + @Json(name = "BucketName") + val bucketName: kotlin.String, + + @Json(name = "MainCatID") + val mainCatID: kotlin.String, + + @Json(name = "Platform") + val platform: kotlin.String, + + @Json(name = "VertexArray") + val vertexArray: kotlin.String, + + @Json(name = "Meta") + val meta: kotlin.String, + + @Json(name = "ID") + val ID: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAllUserAvatarResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAllUserAvatarResult.kt new file mode 100644 index 0000000..eae369d --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAllUserAvatarResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetAllUserAvatarResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: kotlin.collections.List? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAllUserAvatarResultDataInner.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAllUserAvatarResultDataInner.kt new file mode 100644 index 0000000..05a2858 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAllUserAvatarResultDataInner.kt @@ -0,0 +1,46 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param avatarID + * @param displayID + * @param avatarUrl + * @param thumbUrl + */ + + +data class GetAllUserAvatarResultDataInner ( + + @Json(name = "AvatarID") + val avatarID: kotlin.String, + + @Json(name = "DisplayID") + val displayID: kotlin.String, + + @Json(name = "AvatarUrl") + val avatarUrl: kotlin.String, + + @Json(name = "ThumbUrl") + val thumbUrl: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAvatarPresetByIDRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAvatarPresetByIDRequest.kt new file mode 100644 index 0000000..2b41bc9 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAvatarPresetByIDRequest.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetAvatarPresetByIDRequest ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: GetAvatarPresetByIDRequestData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAvatarPresetByIDRequestData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAvatarPresetByIDRequestData.kt new file mode 100644 index 0000000..58d658f --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAvatarPresetByIDRequestData.kt @@ -0,0 +1,98 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param displayName + * @param description + * @param virtualCurrency + * @param realCurrency + * @param customMetaData + * @param imageArtifacts + * @param meshArtifacts + * @param blendshapeKeys + * @param tags + * @param props + * @param gender + * @param color + * @param metadata + * @param status + * @param race + * @param ageRange + * @param ID + */ + + +data class GetAvatarPresetByIDRequestData ( + + @Json(name = "DisplayName") + val displayName: kotlin.String? = null, + + @Json(name = "Description") + val description: kotlin.String? = null, + + @Json(name = "VirtualCurrency") + val virtualCurrency: kotlin.String? = null, + + @Json(name = "RealCurrency") + val realCurrency: kotlin.Int? = null, + + @Json(name = "CustomMetaData") + val customMetaData: kotlin.String? = null, + + @Json(name = "ImageArtifacts") + val imageArtifacts: kotlin.String? = null, + + @Json(name = "MeshArtifacts") + val meshArtifacts: kotlin.String? = null, + + @Json(name = "BlendshapeKeys") + val blendshapeKeys: kotlin.String? = null, + + @Json(name = "Tags") + val tags: kotlin.String? = null, + + @Json(name = "Props") + val props: kotlin.String? = null, + + @Json(name = "Gender") + val gender: kotlin.Int? = null, + + @Json(name = "Color") + val color: kotlin.String? = null, + + @Json(name = "Metadata") + val metadata: kotlin.String? = null, + + @Json(name = "Status") + val status: kotlin.Int? = null, + + @Json(name = "Race") + val race: kotlin.String? = null, + + @Json(name = "AgeRange") + val ageRange: kotlin.String? = null, + + @Json(name = "ID") + val ID: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAvatarPresetsByIDResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAvatarPresetsByIDResult.kt new file mode 100644 index 0000000..8b057b3 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAvatarPresetsByIDResult.kt @@ -0,0 +1,5 @@ +package com.Avataryug.client.Models + +class GetAvatarPresetsByIDResult { + +} diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAvatarPresetsResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAvatarPresetsResult.kt new file mode 100644 index 0000000..dd13438 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAvatarPresetsResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetAvatarPresetsResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: kotlin.collections.List? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAvatarPresetsResultDataInner.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAvatarPresetsResultDataInner.kt new file mode 100644 index 0000000..48c377a --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetAvatarPresetsResultDataInner.kt @@ -0,0 +1,98 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param displayName + * @param description + * @param virtualCurrency + * @param realCurrency + * @param customMetaData + * @param itemThumbnailsUrl + * @param artifacts + * @param blendshapeKeys + * @param tags + * @param props + * @param gender + * @param color + * @param metadata + * @param status + * @param race + * @param ageRange + * @param userID + */ + + +data class GetAvatarPresetsResultDataInner ( + + @Json(name = "DisplayName") + val displayName: kotlin.String, + + @Json(name = "Description") + val description: kotlin.String, + + @Json(name = "VirtualCurrency") + val virtualCurrency: kotlin.String, + + @Json(name = "RealCurrency") + val realCurrency: kotlin.Int, + + @Json(name = "CustomMetaData") + val customMetaData: kotlin.String, + + @Json(name = "ItemThumbnailsUrl") + val itemThumbnailsUrl: kotlin.String, + + @Json(name = "Artifacts") + val artifacts: kotlin.String, + + @Json(name = "BlendshapeKeys") + val blendshapeKeys: kotlin.String, + + @Json(name = "Tags") + val tags: kotlin.String, + + @Json(name = "Props") + val props: kotlin.String, + + @Json(name = "Gender") + val gender: kotlin.Int, + + @Json(name = "Color") + val color: kotlin.String, + + @Json(name = "Metadata") + val metadata: kotlin.String, + + @Json(name = "Status") + val status: kotlin.Int, + + @Json(name = "Race") + val race: kotlin.String, + + @Json(name = "AgeRange") + val ageRange: kotlin.String, + + @Json(name = "userID") + val userID: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetClipsByIDResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetClipsByIDResult.kt new file mode 100644 index 0000000..408aff7 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetClipsByIDResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetClipsByIDResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: GetClipsByIDResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetClipsByIDResultData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetClipsByIDResultData.kt new file mode 100644 index 0000000..7c21b56 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetClipsByIDResultData.kt @@ -0,0 +1,80 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param displayName + * @param description + * @param category + * @param customMetaData + * @param ThumbnailUrl + * @param artifacts + * @param tags + * @param color + * @param metadata + * @param status + * @param clipType + * @param ID + * @param ClipTemplateID + */ + + +data class GetClipsByIDResultData ( + + @Json(name = "DisplayName") + val displayName: kotlin.String? = null, + + @Json(name = "Description") + val description: kotlin.String? = null, + + @Json(name = "Category") + val category: kotlin.String? = null, + + @Json(name = "CustomMetaData") + val customMetaData: kotlin.String? = null, + + @Json(name = "ThumbnailUrl") + val ThumbnailUrl: kotlin.String? = null, + + @Json(name = "Artifacts") + val artifacts: kotlin.String? = null, + + @Json(name = "Tags") + val tags: kotlin.String? = null, + + @Json(name = "Color") + val color: kotlin.String? = null, + + @Json(name = "Metadata") + val metadata: kotlin.String? = null, + + @Json(name = "Status") + val status: kotlin.Int? = null, + + @Json(name = "ClipType") + val clipType: kotlin.Int? = null, + + @Json(name = "ID") + val ID: kotlin.String? = null, + + @Json(name = "ClipTemplateID") + val ClipTemplateID: kotlin.String? = null +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetClipsByIDResultDataCustomMetaDataInner.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetClipsByIDResultDataCustomMetaDataInner.kt new file mode 100644 index 0000000..dd1e3a4 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetClipsByIDResultDataCustomMetaDataInner.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param key + * @param selected + * @param `value` + */ + + +data class GetClipsByIDResultDataCustomMetaDataInner ( + + @Json(name = "key") + val key: kotlin.String, + + @Json(name = "selected") + val selected: kotlin.Boolean, + + @Json(name = "value") + val `value`: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetClipsResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetClipsResult.kt new file mode 100644 index 0000000..4162128 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetClipsResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetClipsResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: kotlin.collections.List? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetClipsResultDataInner.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetClipsResultDataInner.kt new file mode 100644 index 0000000..2cd18bf --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetClipsResultDataInner.kt @@ -0,0 +1,78 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param displayName + * @param description + * @param category + * @param customMetaData + * @param ThumbnailUrl + * @param artifacts + * @param tags + * @param color + * @param metadata + * @param status + * @param clipType + * @param ID + * @param ClipTemplateID + */ + + +data class GetClipsResultDataInner ( + + @Json(name = "DisplayName") + val displayName: kotlin.String, + + @Json(name = "Description") + val description: kotlin.String, + + @Json(name = "Category") + val category: kotlin.String, + + @Json(name = "CustomMetaData") + val customMetaData: kotlin.String, + + @Json(name = "ThumbnailUrl") + private var ThumbnailUrl: List, + + @Json(name = "Tags") + val tags: kotlin.String, + + @Json(name = "Color") + val color: kotlin.String, + + @Json(name = "Metadata") + val metadata: kotlin.String, + + @Json(name = "Status") + val status: kotlin.Int, + + @Json(name = "ClipType") + val clipType: kotlin.Int, + + @Json(name = "ID") + val ID: kotlin.String, + + @Json(name = "ClipTemplateID") + val ClipTemplateID: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyBundleByIDResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyBundleByIDResult.kt new file mode 100644 index 0000000..3fb1228 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyBundleByIDResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetEconomyBundleByIDResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: GetEconomyBundleByIDResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyBundleByIDResultData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyBundleByIDResultData.kt new file mode 100644 index 0000000..65a3c0e --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyBundleByIDResultData.kt @@ -0,0 +1,90 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param bundleCategory + * @param displayName + * @param description + * @param virtualCurrency + * @param realCurrency + * @param tags + * @param entitlement + * @param isStackable + * @param bundleImageUrl + * @param isLimitedEdition + * @param limitedEditionIntialCount + * @param customMetaData + * @param bundleContents + * @param status + * @param ID + */ + + +data class GetEconomyBundleByIDResultData ( + + @Json(name = "BundleCategory") + val bundleCategory: kotlin.String? = null, + + @Json(name = "DisplayName") + val displayName: kotlin.String? = null, + + @Json(name = "Description") + val description: kotlin.String? = null, + + @Json(name = "VirtualCurrency") + val virtualCurrency: kotlin.String? = null, + + @Json(name = "RealCurrency") + val realCurrency: kotlin.Int? = null, + + @Json(name = "Tags") + val tags: kotlin.String? = null, + + @Json(name = "Entitlement") + val entitlement: kotlin.String? = null, + + @Json(name = "IsStackable") + val isStackable: kotlin.Int? = null, + + @Json(name = "BundleImageUrl") + val bundleImageUrl: kotlin.String? = null, + + @Json(name = "IsLimitedEdition") + val isLimitedEdition: kotlin.Int? = null, + + @Json(name = "LimitedEditionIntialCount") + val limitedEditionIntialCount: kotlin.Int? = null, + + @Json(name = "CustomMetaData") + val customMetaData: kotlin.String? = null, + + @Json(name = "BundleContents") + val bundleContents: kotlin.String? = null, + + @Json(name = "Status") + val status: kotlin.Int? = null, + + @Json(name = "ID") + val ID: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyBundlesResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyBundlesResult.kt new file mode 100644 index 0000000..3d53d19 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyBundlesResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetEconomyBundlesResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: kotlin.collections.List? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyBundlesResultDataInner.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyBundlesResultDataInner.kt new file mode 100644 index 0000000..8d39b8c --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyBundlesResultDataInner.kt @@ -0,0 +1,90 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param bundleCategory + * @param displayName + * @param description + * @param virtualCurrency + * @param realCurrency + * @param tags + * @param entitlement + * @param isStackable + * @param bundleImageUrl + * @param isLimitedEdition + * @param limitedEditionIntialCount + * @param customMetaData + * @param bundleContents + * @param status + * @param ID + */ + + +data class GetEconomyBundlesResultDataInner ( + + @Json(name = "BundleCategory") + val bundleCategory: kotlin.String, + + @Json(name = "DisplayName") + val displayName: kotlin.String, + + @Json(name = "Description") + val description: kotlin.String, + + @Json(name = "VirtualCurrency") + val virtualCurrency: kotlin.String, + + @Json(name = "RealCurrency") + val realCurrency: kotlin.Int, + + @Json(name = "Tags") + val tags: kotlin.String, + + @Json(name = "Entitlement") + val entitlement: kotlin.String, + + @Json(name = "IsStackable") + val isStackable: kotlin.Int, + + @Json(name = "BundleImageUrl") + val bundleImageUrl: kotlin.String, + + @Json(name = "IsLimitedEdition") + val isLimitedEdition: kotlin.Int, + + @Json(name = "LimitedEditionIntialCount") + val limitedEditionIntialCount: kotlin.Int, + + @Json(name = "CustomMetaData") + val customMetaData: kotlin.String, + + @Json(name = "BundleContents") + val bundleContents: kotlin.String, + + @Json(name = "Status") + val status: kotlin.Int, + + @Json(name = "ID") + val ID: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyContainerByIDResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyContainerByIDResult.kt new file mode 100644 index 0000000..b872de3 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyContainerByIDResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetEconomyContainerByIDResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: GetEconomyContainerByIDResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyContainerByIDResultData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyContainerByIDResultData.kt new file mode 100644 index 0000000..3f31d93 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyContainerByIDResultData.kt @@ -0,0 +1,94 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param status + * @param displayName + * @param containerCategory + * @param description + * @param tags + * @param containerImageUrl + * @param isStackable + * @param isLimitedEdition + * @param limitedEditionIntialCount + * @param entitlement + * @param containerSettings + * @param containerContents + * @param virtualCurrency + * @param realCurrency + * @param customMetaData + * @param ID + */ + + +data class GetEconomyContainerByIDResultData ( + + @Json(name = "Status") + val status: kotlin.Int? = null, + + @Json(name = "DisplayName") + val displayName: kotlin.String? = null, + + @Json(name = "ContainerCategory") + val containerCategory: kotlin.String? = null, + + @Json(name = "Description") + val description: kotlin.String? = null, + + @Json(name = "Tags") + val tags: kotlin.String? = null, + + @Json(name = "ContainerImageUrl") + val containerImageUrl: kotlin.String? = null, + + @Json(name = "IsStackable") + val isStackable: kotlin.Int? = null, + + @Json(name = "IsLimitedEdition") + val isLimitedEdition: kotlin.Int? = null, + + @Json(name = "LimitedEditionIntialCount") + val limitedEditionIntialCount: kotlin.Int? = null, + + @Json(name = "Entitlement") + val entitlement: kotlin.String? = null, + + @Json(name = "ContainerSettings") + val containerSettings: kotlin.String? = null, + + @Json(name = "ContainerContents") + val containerContents: kotlin.String? = null, + + @Json(name = "VirtualCurrency") + val virtualCurrency: kotlin.String? = null, + + @Json(name = "RealCurrency") + val realCurrency: kotlin.Int? = null, + + @Json(name = "CustomMetaData") + val customMetaData: kotlin.String? = null, + + @Json(name = "ID") + val ID: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyContainersResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyContainersResult.kt new file mode 100644 index 0000000..0ddf31f --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyContainersResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetEconomyContainersResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: kotlin.collections.List? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyContainersResultDataInner.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyContainersResultDataInner.kt new file mode 100644 index 0000000..c393d11 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyContainersResultDataInner.kt @@ -0,0 +1,94 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param status + * @param displayName + * @param containerCategory + * @param description + * @param tags + * @param containerImageUrl + * @param isStackable + * @param isLimitedEdition + * @param limitedEditionIntialCount + * @param entitlement + * @param containerSettings + * @param containerContents + * @param virtualCurrency + * @param realCurrency + * @param customMetaData + * @param ID + */ + + +data class GetEconomyContainersResultDataInner ( + + @Json(name = "Status") + val status: kotlin.Int, + + @Json(name = "DisplayName") + val displayName: kotlin.String, + + @Json(name = "ContainerCategory") + val containerCategory: kotlin.String, + + @Json(name = "Description") + val description: kotlin.String, + + @Json(name = "Tags") + val tags: kotlin.String, + + @Json(name = "ContainerImageUrl") + val containerImageUrl: kotlin.String, + + @Json(name = "IsStackable") + val isStackable: kotlin.Int, + + @Json(name = "IsLimitedEdition") + val isLimitedEdition: kotlin.Int, + + @Json(name = "LimitedEditionIntialCount") + val limitedEditionIntialCount: kotlin.Int, + + @Json(name = "Entitlement") + val entitlement: kotlin.String, + + @Json(name = "ContainerSettings") + val containerSettings: kotlin.String, + + @Json(name = "ContainerContents") + val containerContents: kotlin.String, + + @Json(name = "VirtualCurrency") + val virtualCurrency: kotlin.String, + + @Json(name = "RealCurrency") + val realCurrency: kotlin.Int, + + @Json(name = "CustomMetaData") + val customMetaData: kotlin.String, + + @Json(name = "ID") + val ID: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyItemsByIDResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyItemsByIDResult.kt new file mode 100644 index 0000000..e5e628b --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyItemsByIDResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetEconomyItemsByIDResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: GetEconomyItemsByIDResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyItemsByIDResultData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyItemsByIDResultData.kt new file mode 100644 index 0000000..1b2ccea --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyItemsByIDResultData.kt @@ -0,0 +1,125 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param templateID + * @param itemGender + * @param itemCategory + * @param itemSubCategory + * @param displayName + * @param description + * @param virtualCurrency + * @param realCurrency + * @param tags + * @param entitlement + * @param isStackable + * @param isLimitedEdition + * @param limitedEditionIntialCount + * @param customMetaData + * @param style + * @param itemThumbnailsUrl + * @param artifacts + * @param blendshapeKeys + * @param itemSkin + * @param status + * @param ID + * @param config + * @param coreBucket + * @param conflictingBuckets + */ + + +data class GetEconomyItemsByIDResultData ( + + @Json(name = "TemplateID") + val templateID: kotlin.String? = null, + + @Json(name = "ItemGender") + val itemGender: kotlin.Int? = null, + + @Json(name = "ItemCategory") + val itemCategory: kotlin.String? = null, + + @Json(name = "ItemSubCategory") + val itemSubCategory: kotlin.String? = null, + + @Json(name = "DisplayName") + val displayName: kotlin.String? = null, + + @Json(name = "Description") + val description: kotlin.String? = null, + + @Json(name = "VirtualCurrency") + val virtualCurrency: kotlin.String? = null, + + @Json(name = "RealCurrency") + val realCurrency: kotlin.Int? = null, + + @Json(name = "Tags") + val tags: kotlin.String? = null, + + @Json(name = "Entitlement") + val entitlement: kotlin.String? = null, + + @Json(name = "IsStackable") + val isStackable: kotlin.Int? = null, + + @Json(name = "IsLimitedEdition") + val isLimitedEdition: kotlin.Int? = null, + + @Json(name = "LimitedEditionIntialCount") + val limitedEditionIntialCount: kotlin.Int? = null, + + @Json(name = "CustomMetaData") + val customMetaData: kotlin.String? = null, + + @Json(name = "Style") + val style: kotlin.String? = null, + + @Json(name = "ItemThumbnailsUrl") + val itemThumbnailsUrl: kotlin.String? = null, + + @Json(name = "Artifacts") + val artifacts: kotlin.String? = null, + + @Json(name = "BlendshapeKeys") + val blendshapeKeys: kotlin.String? = null, + + @Json(name = "ItemSkin") + val itemSkin: kotlin.String? = null, + + @Json(name = "Status") + val status: kotlin.Int? = null, + + @Json(name = "ID") + val ID: kotlin.String? = null, + + @Json(name = "Config") + val config: kotlin.String? = null, + + @Json(name = "CoreBucket") + val coreBucket: kotlin.String? = null, + + @Json(name = "ConflictingBuckets") + val conflictingBuckets: kotlin.String? = null +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyItemsResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyItemsResult.kt new file mode 100644 index 0000000..a2915ea --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyItemsResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetEconomyItemsResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: kotlin.collections.List? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyItemsResultDataInner.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyItemsResultDataInner.kt new file mode 100644 index 0000000..21ca3f8 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyItemsResultDataInner.kt @@ -0,0 +1,125 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param templateID + * @param itemGender + * @param itemCategory + * @param itemSubCategory + * @param displayName + * @param description + * @param virtualCurrency + * @param realCurrency + * @param tags + * @param entitlement + * @param isStackable + * @param isLimitedEdition + * @param limitedEditionIntialCount + * @param customMetaData + * @param style + * @param itemThumbnailsUrl + * @param artifacts + * @param blendshapeKeys + * @param itemSkin + * @param status + * @param ID + * @param config + * @param coreBucket + * @param conflictingBuckets + */ + + +data class GetEconomyItemsResultDataInner ( + + @Json(name = "TemplateID") + val templateID: kotlin.String, + + @Json(name = "ItemGender") + val itemGender: kotlin.Int, + + @Json(name = "ItemCategory") + val itemCategory: kotlin.String, + + @Json(name = "ItemSubCategory") + val itemSubCategory: kotlin.String, + + @Json(name = "DisplayName") + val displayName: kotlin.String, + + @Json(name = "Description") + val description: kotlin.String, + + @Json(name = "VirtualCurrency") + val virtualCurrency: kotlin.String, + + @Json(name = "RealCurrency") + val realCurrency: kotlin.Int, + + @Json(name = "Tags") + val tags: kotlin.String, + + @Json(name = "Entitlement") + val entitlement: kotlin.String, + + @Json(name = "IsStackable") + val isStackable: kotlin.Int, + + @Json(name = "IsLimitedEdition") + val isLimitedEdition: kotlin.Int, + + @Json(name = "LimitedEditionIntialCount") + val limitedEditionIntialCount: kotlin.Int, + + @Json(name = "CustomMetaData") + val customMetaData: kotlin.String, + + @Json(name = "Style") + val style: kotlin.String, + + @Json(name = "ItemThumbnailsUrl") + val itemThumbnailsUrl: kotlin.String, + + @Json(name = "Artifacts") + val artifacts: kotlin.String, + + @Json(name = "BlendshapeKeys") + val blendshapeKeys: kotlin.String, + + @Json(name = "ItemSkin") + val itemSkin: kotlin.String, + + @Json(name = "Status") + val status: kotlin.Int, + + @Json(name = "ID") + val ID: kotlin.String, + + @Json(name = "Config") + val config: kotlin.String, + + @Json(name = "CoreBucket") + val coreBucket: kotlin.String, + + @Json(name = "ConflictingBuckets") + val conflictingBuckets: kotlin.String +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyStoresResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyStoresResult.kt new file mode 100644 index 0000000..6bc2e5b --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyStoresResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.Avataryug.client.Models.GetEconomyStoresResultDataInner +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetEconomyStoresResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: kotlin.collections.List? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyStoresResultDataInner.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyStoresResultDataInner.kt new file mode 100644 index 0000000..420c760 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetEconomyStoresResultDataInner.kt @@ -0,0 +1,58 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param storeID + * @param displayName + * @param description + * @param customMetaData + * @param storeContents + * @param status + * @param ID + */ + + +data class GetEconomyStoresResultDataInner ( + + @Json(name = "StoreID") + val storeID: kotlin.String? = null, + + @Json(name = "DisplayName") + val displayName: kotlin.String, + + @Json(name = "Description") + val description: kotlin.String, + + @Json(name = "CustomMetaData") + val customMetaData: kotlin.String, + + @Json(name = "StoreContents") + val storeContents: kotlin.String, + + @Json(name = "Status") + val status: kotlin.Int, + + @Json(name = "ID") + val ID: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetExpressionByIDResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetExpressionByIDResult.kt new file mode 100644 index 0000000..48fefea --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetExpressionByIDResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetExpressionByIDResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: GetExpressionByIDResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetExpressionByIDResultData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetExpressionByIDResultData.kt new file mode 100644 index 0000000..e97e708 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetExpressionByIDResultData.kt @@ -0,0 +1,74 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param displayName + * @param description + * @param category + * @param customMetaData + * @param ThumbnailUrl + * @param blendshapeKeys + * @param tags + * @param color + * @param metadata + * @param status + * @param ID + */ + + +data class GetExpressionByIDResultData ( + + @Json(name = "DisplayName") + val displayName: kotlin.String? = null, + + @Json(name = "Description") + val description: kotlin.String? = null, + + @Json(name = "Category") + val category: kotlin.String? = null, + + @Json(name = "CustomMetaData") + val customMetaData: kotlin.String? = null, + + @Json(name = "ThumbnailUrl") + val ThumbnailUrl: kotlin.String? = null, + + @Json(name = "BlendshapeKeys") + val blendshapeKeys: kotlin.String? = null, + + @Json(name = "Tags") + val tags: kotlin.String? = null, + + @Json(name = "Color") + val color: kotlin.String? = null, + + @Json(name = "Metadata") + val metadata: kotlin.String? = null, + + @Json(name = "Status") + val status: kotlin.Int? = null, + + @Json(name = "ID") + val ID: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetExpressionsResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetExpressionsResult.kt new file mode 100644 index 0000000..05d44f0 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetExpressionsResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetExpressionsResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: kotlin.collections.List? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetExpressionsResultDataInner.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetExpressionsResultDataInner.kt new file mode 100644 index 0000000..918cd83 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetExpressionsResultDataInner.kt @@ -0,0 +1,74 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param displayName + * @param description + * @param category + * @param customMetaData + * @param ThumbnailUrl + * @param blendshapeKeys + * @param tags + * @param color + * @param metadata + * @param status + * @param ID + */ + + +data class GetExpressionsResultDataInner ( + + @Json(name = "DisplayName") + val displayName: kotlin.String, + + @Json(name = "Description") + val description: kotlin.String, + + @Json(name = "Category") + val category: kotlin.String, + + @Json(name = "CustomMetaData") + val customMetaData: kotlin.String, + + @Json(name = "ThumbnailUrl") + val ThumbnailUrl: kotlin.String, + + @Json(name = "BlendshapeKeys") + val blendshapeKeys: kotlin.String, + + @Json(name = "Tags") + val tags: kotlin.String, + + @Json(name = "Color") + val color: kotlin.String, + + @Json(name = "Metadata") + val metadata: kotlin.String, + + @Json(name = "Status") + val status: kotlin.Int, + + @Json(name = "ID") + val ID: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetPurchaseResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetPurchaseResult.kt new file mode 100644 index 0000000..5bfea39 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetPurchaseResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.Avataryug.client.Models.ConfirmPurchaseResultData +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetPurchaseResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: ConfirmPurchaseResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetRewardedAdPlacementsResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetRewardedAdPlacementsResult.kt new file mode 100644 index 0000000..f587e0e --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetRewardedAdPlacementsResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetRewardedAdPlacementsResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: GetRewardedAdPlacementsResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetRewardedAdPlacementsResultData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetRewardedAdPlacementsResultData.kt new file mode 100644 index 0000000..5ddd9c7 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetRewardedAdPlacementsResultData.kt @@ -0,0 +1,58 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param placementName + * @param appId + * @param adUnit + * @param rewards + * @param segments + * @param status + * @param ID + */ + + +data class GetRewardedAdPlacementsResultData ( + + @Json(name = "PlacementName") + val placementName: kotlin.String? = null, + + @Json(name = "AppId") + val appId: kotlin.String? = null, + + @Json(name = "AdUnit") + val adUnit: kotlin.String? = null, + + @Json(name = "Rewards") + val rewards: kotlin.String? = null, + + @Json(name = "Segments") + val segments: kotlin.String? = null, + + @Json(name = "Status") + val status: kotlin.Int? = null, + + @Json(name = "ID") + val ID: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetStoreItemsByIDResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetStoreItemsByIDResult.kt new file mode 100644 index 0000000..0e1a6d9 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetStoreItemsByIDResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetStoreItemsByIDResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: GetStoreItemsByIDResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetStoreItemsByIDResultData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetStoreItemsByIDResultData.kt new file mode 100644 index 0000000..667fb98 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetStoreItemsByIDResultData.kt @@ -0,0 +1,58 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param storeID + * @param displayName + * @param description + * @param customMetaData + * @param storeContents + * @param status + * @param ID + */ + + +data class GetStoreItemsByIDResultData ( + + @Json(name = "StoreID") + val storeID: kotlin.String? = null, + + @Json(name = "DisplayName") + val displayName: kotlin.String? = null, + + @Json(name = "Description") + val description: kotlin.String? = null, + + @Json(name = "CustomMetaData") + val customMetaData: kotlin.String? = null, + + @Json(name = "StoreContents") + val storeContents: kotlin.String? = null, + + @Json(name = "Status") + val status: kotlin.Int? = null, + + @Json(name = "ID") + val ID: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserAccountInfoResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserAccountInfoResult.kt new file mode 100644 index 0000000..a0cf71b --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserAccountInfoResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetUserAccountInfoResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: GetUserAccountInfoResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserAccountInfoResultData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserAccountInfoResultData.kt new file mode 100644 index 0000000..4ba3b8c --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserAccountInfoResultData.kt @@ -0,0 +1,38 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param userID + * @param updatedAt + */ + + +data class GetUserAccountInfoResultData ( + + @Json(name = "UserID") + val userID: kotlin.String? = null, + + @Json(name = "UpdatedAt") + val updatedAt: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserIDfromSessionTicket.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserIDfromSessionTicket.kt new file mode 100644 index 0000000..90f2f25 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserIDfromSessionTicket.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param userID + */ + + +data class GetUserIDfromSessionTicket ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "UserID") + val userID: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserInventoryResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserInventoryResult.kt new file mode 100644 index 0000000..b6fe48b --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserInventoryResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetUserInventoryResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: kotlin.collections.List? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserInventoryResultDataInner.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserInventoryResultDataInner.kt new file mode 100644 index 0000000..4f85f0e --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserInventoryResultDataInner.kt @@ -0,0 +1,66 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param userID + * @param instanceID + * @param instanceType + * @param displayName + * @param expires + * @param count + * @param status + * @param content + * @param ID + */ + + +data class GetUserInventoryResultDataInner ( + + @Json(name = "UserID") + val userID: kotlin.String, + + @Json(name = "InstanceID") + val instanceID: kotlin.String, + + @Json(name = "InstanceType") + val instanceType: kotlin.String, + + @Json(name = "DisplayName") + val displayName: kotlin.String, + + @Json(name = "Expires") + val expires: kotlin.String, + + @Json(name = "Count") + val count: kotlin.Int, + + @Json(name = "Status") + val status: kotlin.Int, + + @Json(name = "Content") + val content: kotlin.String, + + @Json(name = "ID") + val ID: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserProfileResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserProfileResult.kt new file mode 100644 index 0000000..c8c8b4e --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserProfileResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetUserProfileResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: GetUserProfileResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserProfileResultData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserProfileResultData.kt new file mode 100644 index 0000000..add50b8 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUserProfileResultData.kt @@ -0,0 +1,46 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param ID + * @param displayName + * @param DefaultAvatarID + * @param updatedAt + */ + + +data class GetUserProfileResultData ( + + @Json(name = "ID") + val ID: kotlin.String? = null, + + @Json(name = "DisplayName") + val displayName: kotlin.String? = null, + + @Json(name = "DefaultAvatarID") + val DefaultAvatarID: kotlin.String? = null, + + @Json(name = "UpdatedAt") + val updatedAt: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUsersAllAvatarsResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUsersAllAvatarsResult.kt new file mode 100644 index 0000000..d51af36 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUsersAllAvatarsResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GetUsersAllAvatarsResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: kotlin.collections.List? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUsersAllAvatarsResultDataInner.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUsersAllAvatarsResultDataInner.kt new file mode 100644 index 0000000..5d1f51b --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GetUsersAllAvatarsResultDataInner.kt @@ -0,0 +1,46 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param avatarID + * @param avatarUrl + * @param thumbUrl + * @param avatarData + */ + + +data class GetUsersAllAvatarsResultDataInner ( + + @Json(name = "AvatarID") + val avatarID: kotlin.String, + + @Json(name = "AvatarUrl") + val avatarUrl: kotlin.String, + + @Json(name = "ThumbUrl") + val thumbUrl: kotlin.String, + + @Json(name = "AvatarData") + val avatarData: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAdsRewardRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAdsRewardRequest.kt new file mode 100644 index 0000000..6055a3e --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAdsRewardRequest.kt @@ -0,0 +1,35 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param placementID Unique identifier of the placement. + */ + + +data class GrantAdsRewardRequest ( + + /* Unique identifier of the placement. */ + @Json(name = "PlacementID") + val placementID: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAdsRewardResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAdsRewardResult.kt new file mode 100644 index 0000000..d8325a2 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAdsRewardResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class GrantAdsRewardResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarPresetItemsToUserRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarPresetItemsToUserRequest.kt new file mode 100644 index 0000000..bb9f258 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarPresetItemsToUserRequest.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param itemIDs + */ + + +data class GrantAvatarPresetItemsToUserRequest ( + + @Json(name = "ItemIDs") + val itemIDs: kotlin.collections.List? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarPresetItemsToUserRequestItemIDsInner.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarPresetItemsToUserRequestItemIDsInner.kt new file mode 100644 index 0000000..432502a --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarPresetItemsToUserRequestItemIDsInner.kt @@ -0,0 +1,35 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param itemID Unique idenifier of the item being granted + */ + + +data class GrantAvatarPresetItemsToUserRequestItemIDsInner ( + + /* Unique idenifier of the item being granted */ + @Json(name = "ItemID") + val itemID: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarPresetItemsToUserResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarPresetItemsToUserResult.kt new file mode 100644 index 0000000..3ef4761 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarPresetItemsToUserResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class GrantAvatarPresetItemsToUserResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarPresetToUserRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarPresetToUserRequest.kt new file mode 100644 index 0000000..aac982d --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarPresetToUserRequest.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param avatarID Unique identifier for the generated avatar + * @param avatarData Data related to the AvatarID + */ + + +data class GrantAvatarPresetToUserRequest ( + + /* Unique identifier for the generated avatar */ + @Json(name = "AvatarID") + val avatarID: kotlin.String, + + /* Data related to the AvatarID */ + @Json(name = "AvatarData") + val avatarData: kotlin.String, + + + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarPresetToUserResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarPresetToUserResult.kt new file mode 100644 index 0000000..d7fa080 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarPresetToUserResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GrantAvatarPresetToUserResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: GrantAvatarToUserResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarToUserRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarToUserRequest.kt new file mode 100644 index 0000000..c879814 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarToUserRequest.kt @@ -0,0 +1,46 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param userID + * @param avatarUrl + * @param thumbUrl + * @param avatarData + */ + + +data class GrantAvatarToUserRequest ( + + @Json(name = "UserID") + val userID: kotlin.String? = null, + + @Json(name = "AvatarUrl") + val avatarUrl: kotlin.String? = null, + + @Json(name = "ThumbUrl") + val thumbUrl: kotlin.String? = null, + + @Json(name = "AvatarData") + val avatarData: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarToUserResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarToUserResult.kt new file mode 100644 index 0000000..dd8b515 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarToUserResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class GrantAvatarToUserResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: GrantAvatarToUserResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarToUserResultData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarToUserResultData.kt new file mode 100644 index 0000000..7b72e52 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantAvatarToUserResultData.kt @@ -0,0 +1,46 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param avatarID + * @param avatarUrl + * @param thumbUrl + * @param avatarData + */ + + +data class GrantAvatarToUserResultData ( + + @Json(name = "AvatarID") + val avatarID: kotlin.String? = null, + + @Json(name = "AvatarUrl") + val avatarUrl: kotlin.String? = null, + + @Json(name = "ThumbUrl") + val thumbUrl: kotlin.String? = null, + + @Json(name = "AvatarData") + val avatarData: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantInstanceToUserRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantInstanceToUserRequest.kt new file mode 100644 index 0000000..293932d --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantInstanceToUserRequest.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param instanceIDs + */ + + +data class GrantInstanceToUserRequest ( + + @Json(name = "InstanceIDs") + val instanceIDs: kotlin.collections.List? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantInstanceToUserRequestInstanceIDsInner.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantInstanceToUserRequestInstanceIDsInner.kt new file mode 100644 index 0000000..700326d --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantInstanceToUserRequestInstanceIDsInner.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param instanceID + * @param instanceType + * @param quantity + */ + + +data class GrantInstanceToUserRequestInstanceIDsInner ( + + @Json(name = "InstanceID") + val instanceID: kotlin.String, + + @Json(name = "InstanceType") + val instanceType: kotlin.String, + + @Json(name = "Quantity") + val quantity: kotlin.Int + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantInstanceToUserResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantInstanceToUserResult.kt new file mode 100644 index 0000000..8bd7597 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/GrantInstanceToUserResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class GrantInstanceToUserResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkAndroidDeviceIDRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkAndroidDeviceIDRequest.kt new file mode 100644 index 0000000..dafaa12 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkAndroidDeviceIDRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param androidDeviceID Android device identifier for the user's device. + * @param forceLink If another user is already linked to the device, unlink the other user and re-link. + */ + + +data class LinkAndroidDeviceIDRequest ( + + /* Android device identifier for the user's device. */ + @Json(name = "AndroidDeviceID") + val androidDeviceID: kotlin.String, + + /* If another user is already linked to the device, unlink the other user and re-link. */ + @Json(name = "ForceLink") + val forceLink: kotlin.Boolean? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkAndroidDeviceIDResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkAndroidDeviceIDResult.kt new file mode 100644 index 0000000..62648c7 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkAndroidDeviceIDResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class LinkAndroidDeviceIDResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkAppleRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkAppleRequest.kt new file mode 100644 index 0000000..1b7132d --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkAppleRequest.kt @@ -0,0 +1,45 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param appleID Apple ID provided by Apple. + * @param forceLink If another user is already linked to a specific Apple account, unlink the other user and re-link. + * @param identityToken The JSON Web token (JWT) returned by Apple after login. Represented as the identityToken field in the authorization credential payload. Used to validate the request and find the user ID (Apple subject) to link with. + */ + + +data class LinkAppleRequest ( + + /* Apple ID provided by Apple. */ + @Json(name = "AppleID") + val appleID: kotlin.String, + + /* If another user is already linked to a specific Apple account, unlink the other user and re-link. */ + @Json(name = "ForceLink") + val forceLink: kotlin.Boolean? = null, + + /* The JSON Web token (JWT) returned by Apple after login. Represented as the identityToken field in the authorization credential payload. Used to validate the request and find the user ID (Apple subject) to link with. */ + @Json(name = "IdentityToken") + val identityToken: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkAppleResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkAppleResult.kt new file mode 100644 index 0000000..fa54ecd --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkAppleResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class LinkAppleResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkCustomIDRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkCustomIDRequest.kt new file mode 100644 index 0000000..0e69376 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkCustomIDRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param customID Custom unique identifier for the user, generated by the project. + * @param forceLink If another user is already linked to the custom ID, unlink the other user and re-link. + */ + + +data class LinkCustomIDRequest ( + + /* Custom unique identifier for the user, generated by the project. */ + @Json(name = "CustomID") + val customID: kotlin.String, + + /* If another user is already linked to the custom ID, unlink the other user and re-link. */ + @Json(name = "ForceLink") + val forceLink: kotlin.Boolean? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkCustomIDResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkCustomIDResult.kt new file mode 100644 index 0000000..1587c47 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkCustomIDResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class LinkCustomIDResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkFacebookAccountRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkFacebookAccountRequest.kt new file mode 100644 index 0000000..fe9abdb --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkFacebookAccountRequest.kt @@ -0,0 +1,45 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param facebookID Facebook ID provided by Facebook. + * @param forceLink If another user is already linked to the account, unlink the other user and re-link. + * @param accessToken Unique identifier from Facebook for the user. + */ + + +data class LinkFacebookAccountRequest ( + + /* Facebook ID provided by Facebook. */ + @Json(name = "FacebookID") + val facebookID: kotlin.String, + + /* If another user is already linked to the account, unlink the other user and re-link. */ + @Json(name = "ForceLink") + val forceLink: kotlin.Boolean? = null, + + /* Unique identifier from Facebook for the user. */ + @Json(name = "AccessToken") + val accessToken: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkFacebookAccountResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkFacebookAccountResult.kt new file mode 100644 index 0000000..a79f31c --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkFacebookAccountResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class LinkFacebookAccountResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkGoogleAccountRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkGoogleAccountRequest.kt new file mode 100644 index 0000000..b8c42fa --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkGoogleAccountRequest.kt @@ -0,0 +1,45 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param forceLink If another user is already linked to the account, unlink the other user and re-link. If the current user is already linked, link both accounts. + * @param googleID Google ID provided by Google. + * @param googleServerAuthCode Server authentication code obtained on the client by calling getServerAuthCode() (https://developers.google.com/identity/sign-in/android/offline-access) from Google Play for the user. + */ + + +data class LinkGoogleAccountRequest ( + + /* If another user is already linked to the account, unlink the other user and re-link. If the current user is already linked, link both accounts. */ + @Json(name = "ForceLink") + val forceLink: kotlin.Boolean? = null, + + /* Google ID provided by Google. */ + @Json(name = "GoogleID") + val googleID: kotlin.String? = null, + + /* Server authentication code obtained on the client by calling getServerAuthCode() (https://developers.google.com/identity/sign-in/android/offline-access) from Google Play for the user. */ + @Json(name = "GoogleServerAuthCode") + val googleServerAuthCode: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkGoogleAccountResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkGoogleAccountResult.kt new file mode 100644 index 0000000..f9eb2c2 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkGoogleAccountResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class LinkGoogleAccountResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkIOSDeviceIDRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkIOSDeviceIDRequest.kt new file mode 100644 index 0000000..330593e --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkIOSDeviceIDRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param deviceID iOS identifier for the user's device. + * @param forceLink If another user is already linked to the device, unlink the other user and re-link. + */ + + +data class LinkIOSDeviceIDRequest ( + + /* iOS identifier for the user's device. */ + @Json(name = "DeviceID") + val deviceID: kotlin.String, + + /* If another user is already linked to the device, unlink the other user and re-link. */ + @Json(name = "ForceLink") + val forceLink: kotlin.Boolean? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkIOSDeviceIDResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkIOSDeviceIDResult.kt new file mode 100644 index 0000000..bdd6754 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LinkIOSDeviceIDResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class LinkIOSDeviceIDResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithAndroidDeviceIDRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithAndroidDeviceIDRequest.kt new file mode 100644 index 0000000..7efb6ff --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithAndroidDeviceIDRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param androidDeviceID Android device identifier for the user's device. + * @param createAccount Automatically create a AvatarYug account if one is not currently linked to this ID. + */ + + +data class LoginWithAndroidDeviceIDRequest ( + + /* Android device identifier for the user's device. */ + @Json(name = "AndroidDeviceID") + val androidDeviceID: kotlin.String, + + /* Automatically create a AvatarYug account if one is not currently linked to this ID. */ + @Json(name = "CreateAccount") + val createAccount: kotlin.Boolean? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithAndroidDeviceIDResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithAndroidDeviceIDResult.kt new file mode 100644 index 0000000..0a3441e --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithAndroidDeviceIDResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class LoginWithAndroidDeviceIDResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: LoginWithAndroidDeviceIDResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithAndroidDeviceIDResultData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithAndroidDeviceIDResultData.kt new file mode 100644 index 0000000..8a7123d --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithAndroidDeviceIDResultData.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param accessToken + * @param user + * @param linkedAccounts + */ + + +data class LoginWithAndroidDeviceIDResultData ( + + @Json(name = "AccessToken") + val accessToken: kotlin.String? = null, + + @Json(name = "User") + val user: LoginWithAndroidDeviceIDResultDataUser? = null, + + @Json(name = "LinkedAccounts") + val linkedAccounts: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithAndroidDeviceIDResultDataUser.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithAndroidDeviceIDResultDataUser.kt new file mode 100644 index 0000000..26ae0fe --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithAndroidDeviceIDResultDataUser.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param userID + * @param displayName + * @param createdAt + */ + + +data class LoginWithAndroidDeviceIDResultDataUser ( + + @Json(name = "UserID") + val userID: kotlin.String? = null, + + @Json(name = "DisplayName") + val displayName: kotlin.String? = null, + + @Json(name = "CreatedAt") + val createdAt: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithAppleRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithAppleRequest.kt new file mode 100644 index 0000000..87d46a0 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithAppleRequest.kt @@ -0,0 +1,45 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param appleIdentityToken The JSON Web token (JWT) returned by Apple after login. Represented as the identityToken field in the authorization credential payload. + * @param appleID Identifier provided by Apple for this users AppleID. + * @param createAccount Automatically create a AvatarYug account if one is not currently linked to this ID. + */ + + +data class LoginWithAppleRequest ( + + /* The JSON Web token (JWT) returned by Apple after login. Represented as the identityToken field in the authorization credential payload. */ + @Json(name = "AppleIdentityToken") + val appleIdentityToken: kotlin.String, + + /* Identifier provided by Apple for this users AppleID. */ + @Json(name = "AppleID") + val appleID: kotlin.String? = null, + + /* Automatically create a AvatarYug account if one is not currently linked to this ID. */ + @Json(name = "CreateAccount") + val createAccount: kotlin.Boolean? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithAppleResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithAppleResult.kt new file mode 100644 index 0000000..360401b --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithAppleResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.Avataryug.client.Models.LoginWithAndroidDeviceIDResultData +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class LoginWithAppleResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: LoginWithAndroidDeviceIDResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithCustomIDRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithCustomIDRequest.kt new file mode 100644 index 0000000..c4cfbb5 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithCustomIDRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param customID Custom unique identifier for the user sent from the client. + * @param createAccount Automatically create a AvatarYug account if one is not currently linked to this ID. + */ + + +data class LoginWithCustomIDRequest ( + + /* Custom unique identifier for the user sent from the client. */ + @Json(name = "CustomID") + var customID: kotlin.String, + + /* Automatically create a AvatarYug account if one is not currently linked to this ID. */ + @Json(name = "CreateAccount") + val createAccount: kotlin.Boolean? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithCustomIDResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithCustomIDResult.kt new file mode 100644 index 0000000..083bc9e --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithCustomIDResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.Avataryug.client.Models.LoginWithAndroidDeviceIDResultData +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class LoginWithCustomIDResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: LoginWithAndroidDeviceIDResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithEmailAddressRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithEmailAddressRequest.kt new file mode 100644 index 0000000..be3ba75 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithEmailAddressRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param emailID Email address for the account. + * @param password Password for the AvatarYug account (6-100 characters) + */ + + +data class LoginWithEmailAddressRequest ( + + /* Email address for the account. */ + @Json(name = "EmailID") + val emailID: kotlin.String, + + /* Password for the AvatarYug account (6-100 characters) */ + @Json(name = "Password") + val password: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithEmailAddressResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithEmailAddressResult.kt new file mode 100644 index 0000000..29d2eb2 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithEmailAddressResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.Avataryug.client.Models.LoginWithAndroidDeviceIDResultData +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class LoginWithEmailAddressResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: LoginWithAndroidDeviceIDResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithFacebookRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithFacebookRequest.kt new file mode 100644 index 0000000..6bfa36a --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithFacebookRequest.kt @@ -0,0 +1,45 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param facebookID Identifier provided by Facebook for this users FacebookID. + * @param fbAccessToken Unique identifier from Facebook for the user. + * @param createAccount Automatically create a AvatarYug account if one is not currently linked to this ID. + */ + + +data class LoginWithFacebookRequest ( + + /* Identifier provided by Facebook for this users FacebookID. */ + @Json(name = "FacebookID") + val facebookID: kotlin.String, + + /* Unique identifier from Facebook for the user. */ + @Json(name = "FbAccessToken") + val fbAccessToken: kotlin.String, + + /* Automatically create a AvatarYug account if one is not currently linked to this ID. */ + @Json(name = "CreateAccount") + val createAccount: kotlin.Boolean? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithFacebookResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithFacebookResult.kt new file mode 100644 index 0000000..651a72a --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithFacebookResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.Avataryug.client.Models.LoginWithAndroidDeviceIDResultData +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class LoginWithFacebookResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: LoginWithAndroidDeviceIDResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithGoogleRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithGoogleRequest.kt new file mode 100644 index 0000000..4ffb382 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithGoogleRequest.kt @@ -0,0 +1,45 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param googleID Identifier provided by Google for this users Google ID + * @param googleServerAuthCode OAuth 2.0 server authentication code obtained on the client by calling the getServerAuthCode() (https://developers.google.com/identity/sign-in/android/offline-access) Google client API. + * @param createAccount Automatically create a AvatarYug account if one is not currently linked to this ID. + */ + + +data class LoginWithGoogleRequest ( + + /* Identifier provided by Google for this users Google ID */ + @Json(name = "GoogleID") + val googleID: kotlin.String, + + /* OAuth 2.0 server authentication code obtained on the client by calling the getServerAuthCode() (https://developers.google.com/identity/sign-in/android/offline-access) Google client API. */ + @Json(name = "GoogleServerAuthCode") + val googleServerAuthCode: kotlin.String, + + /* Automatically create a AvatarYug account if one is not currently linked to this ID. */ + @Json(name = "CreateAccount") + val createAccount: kotlin.Boolean? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithGoogleResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithGoogleResult.kt new file mode 100644 index 0000000..8f58cec --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithGoogleResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.Avataryug.client.Models.LoginWithAndroidDeviceIDResultData +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class LoginWithGoogleResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: LoginWithAndroidDeviceIDResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithIOSDeviceIDRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithIOSDeviceIDRequest.kt new file mode 100644 index 0000000..a90a8e7 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithIOSDeviceIDRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param ioSDeviceID iOS device identifier for the user's device. + * @param createAccount Automatically create a AvatarYug account if one is not currently linked to this ID. + */ + + +data class LoginWithIOSDeviceIDRequest ( + + /* iOS device identifier for the user's device. */ + @Json(name = "IOSDeviceID") + val ioSDeviceID: kotlin.String, + + /* Automatically create a AvatarYug account if one is not currently linked to this ID. */ + @Json(name = "CreateAccount") + val createAccount: kotlin.Boolean? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithIOSDeviceIDResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithIOSDeviceIDResult.kt new file mode 100644 index 0000000..2cb6a99 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/LoginWithIOSDeviceIDResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.Avataryug.client.Models.LoginWithAndroidDeviceIDResultData +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class LoginWithIOSDeviceIDResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: LoginWithAndroidDeviceIDResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/PayForPurchaseRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/PayForPurchaseRequest.kt new file mode 100644 index 0000000..07cd344 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/PayForPurchaseRequest.kt @@ -0,0 +1,50 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param userID + * @param transactionID + * @param paymentProvider + * @param metadata + * @param currencyCode + */ + + +data class PayForPurchaseRequest ( + + @Json(name = "UserID") + val userID: kotlin.String? = null, + + @Json(name = "TransactionID") + val transactionID: kotlin.String? = null, + + @Json(name = "PaymentProvider") + val paymentProvider: kotlin.String? = null, + + @Json(name = "Metadata") + val metadata: kotlin.String? = null, + + @Json(name = "CurrencyCode") + val currencyCode: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/PayForPurchaseResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/PayForPurchaseResult.kt new file mode 100644 index 0000000..0c9b81f --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/PayForPurchaseResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class PayForPurchaseResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/PurchaseInstanceRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/PurchaseInstanceRequest.kt new file mode 100644 index 0000000..396b9d3 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/PurchaseInstanceRequest.kt @@ -0,0 +1,60 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param userID Unique AvatarYug identifier of the user whose info is being requested. Optional, defaults to the authenticated user if no other lookup identifier set. + * @param instanceID Unique identifier of the item to purchase. + * @param instanceType Type of the instance i.e item,bundle,container. + * @param price Price the client expects to pay for the item. + * @param virtualCurrency Virtual currency to use to purchase the item. + * @param storeID Store to buy this item through. If not set, prices default to those in the catalog. + */ + + +data class PurchaseInstanceRequest ( + + /* Unique AvatarYug identifier of the user whose info is being requested. Optional, defaults to the authenticated user if no other lookup identifier set. */ + @Json(name = "UserID") + val userID: kotlin.String, + + /* Unique identifier of the item to purchase. */ + @Json(name = "InstanceID") + val instanceID: kotlin.String, + + /* Type of the instance i.e item,bundle,container. */ + @Json(name = "InstanceType") + val instanceType: kotlin.String, + + /* Price the client expects to pay for the item. */ + @Json(name = "Price") + val price: kotlin.Int, + + /* Virtual currency to use to purchase the item. */ + @Json(name = "VirtualCurrency") + val virtualCurrency: kotlin.String, + + /* Store to buy this item through. If not set, prices default to those in the catalog. */ + @Json(name = "StoreID") + val storeID: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/PurchaseInstanceResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/PurchaseInstanceResult.kt new file mode 100644 index 0000000..7ba07bf --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/PurchaseInstanceResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class PurchaseInstanceResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RecordAdsActivityRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RecordAdsActivityRequest.kt new file mode 100644 index 0000000..ec4b79e --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RecordAdsActivityRequest.kt @@ -0,0 +1,45 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param placementID Unique identifier of the placement. + * @param revenueCurrency ISO 4217 code of the currency. + * @param adRevenue Revenue generated from Ad Activity in centesimal units (Eg.100). + */ + + +data class RecordAdsActivityRequest ( + + /* Unique identifier of the placement. */ + @Json(name = "PlacementID") + val placementID: kotlin.String, + + /* ISO 4217 code of the currency. */ + @Json(name = "RevenueCurrency") + val revenueCurrency: kotlin.String, + + /* Revenue generated from Ad Activity in centesimal units (Eg.100). */ + @Json(name = "AdRevenue") + val adRevenue: kotlin.Int + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RecordAdsActivityResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RecordAdsActivityResult.kt new file mode 100644 index 0000000..4d741bb --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RecordAdsActivityResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class RecordAdsActivityResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: RecordAdsActivityResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RecordAdsActivityResultData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RecordAdsActivityResultData.kt new file mode 100644 index 0000000..5fb95eb --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RecordAdsActivityResultData.kt @@ -0,0 +1,54 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param owner + * @param revenueCurrency + * @param adRevenue + * @param placementID + * @param updatedAt + * @param ID + */ + + +data class RecordAdsActivityResultData ( + + @Json(name = "Owner") + val owner: kotlin.String? = null, + + @Json(name = "RevenueCurrency") + val revenueCurrency: kotlin.String? = null, + + @Json(name = "AdRevenue") + val adRevenue: kotlin.Int? = null, + + @Json(name = "PlacementID") + val placementID: kotlin.String? = null, + + @Json(name = "UpdatedAt") + val updatedAt: kotlin.String? = null, + + @Json(name = "ID") + val ID: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RegisterUserRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RegisterUserRequest.kt new file mode 100644 index 0000000..6eebaae --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RegisterUserRequest.kt @@ -0,0 +1,45 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param emailID User email address attached to their account. + * @param password Password for the AvatarYug account (6-100 characters). + * @param displayName An optional parameter for setting the display name for this Project (3-25 characters). + */ + + +data class RegisterUserRequest ( + + /* User email address attached to their account. */ + @Json(name = "EmailID") + val emailID: kotlin.String, + + /* Password for the AvatarYug account (6-100 characters). */ + @Json(name = "Password") + val password: kotlin.String, + + /* An optional parameter for setting the display name for this Project (3-25 characters). */ + @Json(name = "DisplayName") + val displayName: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RegisterUserResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RegisterUserResult.kt new file mode 100644 index 0000000..22696fb --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RegisterUserResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class RegisterUserResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: RegisterUserResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RegisterUserResultData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RegisterUserResultData.kt new file mode 100644 index 0000000..0bb2e6f --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RegisterUserResultData.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param accessToken + * @param user + * @param linkedAccounts + */ + + +data class RegisterUserResultData ( + + @Json(name = "AccessToken") + val accessToken: kotlin.String? = null, + + @Json(name = "User") + val user: RegisterUserResultDataUser? = null, + + @Json(name = "LinkedAccounts") + val linkedAccounts: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RegisterUserResultDataUser.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RegisterUserResultDataUser.kt new file mode 100644 index 0000000..cae14a4 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RegisterUserResultDataUser.kt @@ -0,0 +1,46 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param userID + * @param displayName + * @param createdAt + * @param verified + */ + + +data class RegisterUserResultDataUser ( + + @Json(name = "UserID") + val userID: kotlin.String? = null, + + @Json(name = "DisplayName") + val displayName: kotlin.String? = null, + + @Json(name = "CreatedAt") + val createdAt: kotlin.String? = null, + + @Json(name = "Verified") + val verified: kotlin.Int? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RemoveGenericServiceIDResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RemoveGenericServiceIDResult.kt new file mode 100644 index 0000000..446d726 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RemoveGenericServiceIDResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class RemoveGenericServiceIDResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RenderAvatarImageRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RenderAvatarImageRequest.kt new file mode 100644 index 0000000..730aace --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RenderAvatarImageRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param avatarID Unique identifier for the generated avatar + * @param platform Name of the platform i.e. Android, IOS + */ + + +data class RenderAvatarImageRequest ( + + /* Unique identifier for the generated avatar */ + @Json(name = "AvatarID") + val avatarID: kotlin.String, + + /* Name of the platform i.e. Android, IOS */ + @Json(name = "Platform") + val platform: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RenderAvatarImageResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RenderAvatarImageResult.kt new file mode 100644 index 0000000..e00d311 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RenderAvatarImageResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class RenderAvatarImageResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: RenderAvatarImageResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RenderAvatarImageResultData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RenderAvatarImageResultData.kt new file mode 100644 index 0000000..4891347 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/RenderAvatarImageResultData.kt @@ -0,0 +1,38 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param platform + * @param imageURL + */ + + +data class RenderAvatarImageResultData ( + + @Json(name = "Platform") + val platform: kotlin.String? = null, + + @Json(name = "ImageURL") + val imageURL: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SendAccountRecoveryEmailRequset.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SendAccountRecoveryEmailRequset.kt new file mode 100644 index 0000000..1f5ea10 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SendAccountRecoveryEmailRequset.kt @@ -0,0 +1,35 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param emailID User's email address attached to their account. + */ + + +data class SendAccountRecoveryEmailRequset ( + + /* User's email address attached to their account. */ + @Json(name = "EmailID") + val emailID: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SendAccountRecoveryEmailResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SendAccountRecoveryEmailResult.kt new file mode 100644 index 0000000..9d04ed9 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SendAccountRecoveryEmailResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class SendAccountRecoveryEmailResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SendAccountVerificationEmailRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SendAccountVerificationEmailRequest.kt new file mode 100644 index 0000000..8f7ef3b --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SendAccountVerificationEmailRequest.kt @@ -0,0 +1,35 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param emailID Email address which is being verified. + */ + + +data class SendAccountVerificationEmailRequest ( + + /* Email address which is being verified. */ + @Json(name = "EmailID") + val emailID: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SendAccountVerificationEmailResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SendAccountVerificationEmailResult.kt new file mode 100644 index 0000000..0442c14 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SendAccountVerificationEmailResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class SendAccountVerificationEmailResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SubtractUserVirtualCurrencyRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SubtractUserVirtualCurrencyRequest.kt new file mode 100644 index 0000000..f17d415 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SubtractUserVirtualCurrencyRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param virtualCurrency Name of the virtual currency which is to be decremented. + * @param amount Amount to be subtracted from the user balance of the specified virtual currency. + */ + + +data class SubtractUserVirtualCurrencyRequest ( + + /* Name of the virtual currency which is to be decremented. */ + @Json(name = "VirtualCurrency") + val virtualCurrency: kotlin.String, + + /* Amount to be subtracted from the user balance of the specified virtual currency. */ + @Json(name = "Amount") + val amount: kotlin.Int + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SubtractUserVirtualCurrencyResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SubtractUserVirtualCurrencyResult.kt new file mode 100644 index 0000000..7bb6e95 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SubtractUserVirtualCurrencyResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class SubtractUserVirtualCurrencyResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SyncAvatarsRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SyncAvatarsRequest.kt new file mode 100644 index 0000000..58e86e7 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SyncAvatarsRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param platform Name of the platform i.e. Android, IOS + * @param mesh 3D Mesh generation is required or not + */ + + +data class SyncAvatarsRequest ( + + /* Name of the platform i.e. Android, IOS */ + @Json(name = "Platform") + val platform: kotlin.String, + + /* 3D Mesh generation is required or not */ + @Json(name = "Mesh") + val mesh: kotlin.Boolean + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SyncAvatarsResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SyncAvatarsResult.kt new file mode 100644 index 0000000..2241069 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/SyncAvatarsResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class SyncAvatarsResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlinkAndroidDeviceIDResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlinkAndroidDeviceIDResult.kt new file mode 100644 index 0000000..db0e126 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlinkAndroidDeviceIDResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class UnlinkAndroidDeviceIDResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlinkAppleResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlinkAppleResult.kt new file mode 100644 index 0000000..2957d72 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlinkAppleResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class UnlinkAppleResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlinkCustomIDResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlinkCustomIDResult.kt new file mode 100644 index 0000000..ed50971 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlinkCustomIDResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class UnlinkCustomIDResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlinkFacebookAccountResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlinkFacebookAccountResult.kt new file mode 100644 index 0000000..6c1cb47 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlinkFacebookAccountResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class UnlinkFacebookAccountResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlinkGoogleAccountResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlinkGoogleAccountResult.kt new file mode 100644 index 0000000..d50663c --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlinkGoogleAccountResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class UnlinkGoogleAccountResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlinkIOSDeviceIDResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlinkIOSDeviceIDResult.kt new file mode 100644 index 0000000..14fcc56 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlinkIOSDeviceIDResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class UnlinkIOSDeviceIDResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlockContainerInstanceRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlockContainerInstanceRequest.kt new file mode 100644 index 0000000..bccae76 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlockContainerInstanceRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param containerInstanceID ItemInstanceId of the container to unlock. + * @param keyInstanceID ItemInstanceId of the key that will be consumed by unlocking this container. If the container requires a key, this parameter is required. + */ + + +data class UnlockContainerInstanceRequest ( + + /* ItemInstanceId of the container to unlock. */ + @Json(name = "ContainerInstanceID") + val containerInstanceID: kotlin.String, + + /* ItemInstanceId of the key that will be consumed by unlocking this container. If the container requires a key, this parameter is required. */ + @Json(name = "KeyInstanceID") + val keyInstanceID: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlockContainerInstanceResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlockContainerInstanceResult.kt new file mode 100644 index 0000000..2904e05 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UnlockContainerInstanceResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class UnlockContainerInstanceResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateAvatarUrlRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateAvatarUrlRequest.kt new file mode 100644 index 0000000..a981734 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateAvatarUrlRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param userID Unique AvatarYug assigned ID of the user on whom the operation will be performed. + * @param meshUrl 3D Avatar Url for the user. + */ + + +data class UpdateAvatarUrlRequest ( + + /* Unique AvatarYug assigned ID of the user on whom the operation will be performed. */ + @Json(name = "UserID") + val userID: kotlin.String, + + /* 3D Avatar Url for the user. */ + @Json(name = "MeshUrl") + val meshUrl: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateAvatarUrlResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateAvatarUrlResult.kt new file mode 100644 index 0000000..1b60fb8 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateAvatarUrlResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class UpdateAvatarUrlResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateDefaultAvatarIDRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateDefaultAvatarIDRequest.kt new file mode 100644 index 0000000..8c74906 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateDefaultAvatarIDRequest.kt @@ -0,0 +1,35 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param defaultAvatarID Avatar ID of which needs to be set as Default + */ + + +data class UpdateDefaultAvatarIDRequest ( + + /* Avatar ID of which needs to be set as Default */ + @Json(name = "DefaultAvatarID") + val defaultAvatarID: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateDefaultAvatarIDResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateDefaultAvatarIDResult.kt new file mode 100644 index 0000000..827cfea --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateDefaultAvatarIDResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class UpdateDefaultAvatarIDResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateEmailPasswordRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateEmailPasswordRequest.kt new file mode 100644 index 0000000..ddac396 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateEmailPasswordRequest.kt @@ -0,0 +1,45 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param emailID User email address attached to their account + * @param password Password for the AvatarYug account (6-100 characters) + * @param verificationCode Verification Code received on email + */ + + +data class UpdateEmailPasswordRequest ( + + /* User email address attached to their account */ + @Json(name = "EmailID") + val emailID: kotlin.String, + + /* Password for the AvatarYug account (6-100 characters) */ + @Json(name = "Password") + val password: kotlin.String, + + /* Verification Code received on email */ + @Json(name = "VerificationCode") + val verificationCode: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateEmailPasswordResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateEmailPasswordResult.kt new file mode 100644 index 0000000..083e7fa --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateEmailPasswordResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class UpdateEmailPasswordResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateImageAvatarUrlRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateImageAvatarUrlRequest.kt new file mode 100644 index 0000000..7c54794 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateImageAvatarUrlRequest.kt @@ -0,0 +1,35 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param imageUrl Avatar Image Url for the user. + */ + + +data class UpdateImageAvatarUrlRequest ( + + /* Avatar Image Url for the user. */ + @Json(name = "ImageUrl") + val imageUrl: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateImageAvatarUrlResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateImageAvatarUrlResult.kt new file mode 100644 index 0000000..fa9c144 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateImageAvatarUrlResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class UpdateImageAvatarUrlResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserAvatarRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserAvatarRequest.kt new file mode 100644 index 0000000..6fe6d06 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserAvatarRequest.kt @@ -0,0 +1,50 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param avatarID Unique identifier for the generated avatar + * @param avatarData Data related to the AvatarID + * @param avatarUrl Mesh URL of the Avatar + * @param thumbUrl Rendered Image URL of the Avatar + */ + + +data class UpdateUserAvatarRequest ( + + /* Unique identifier for the generated avatar */ + @Json(name = "AvatarID") + val avatarID: kotlin.String, + + /* Data related to the AvatarID */ + @Json(name = "AvatarData") + val avatarData: kotlin.String, + + /* Mesh URL of the Avatar */ + @Json(name = "AvatarUrl") + val avatarUrl: kotlin.String, + + /* Rendered Image URL of the Avatar */ + @Json(name = "ThumbUrl") + val thumbUrl: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserAvatarResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserAvatarResult.kt new file mode 100644 index 0000000..01b352d --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserAvatarResult.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param `data` + */ + + +data class UpdateUserAvatarResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Data") + val `data`: UpdateUserAvatarResultData? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserAvatarResultData.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserAvatarResultData.kt new file mode 100644 index 0000000..d2fdbf2 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserAvatarResultData.kt @@ -0,0 +1,46 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param avatarID + * @param displayID + * @param avatarUrl + * @param thumbUrl + */ + + +data class UpdateUserAvatarResultData ( + + @Json(name = "AvatarID") + val avatarID: kotlin.String? = null, + + @Json(name = "DisplayID") + val displayID: kotlin.String? = null, + + @Json(name = "AvatarUrl") + val avatarUrl: kotlin.String? = null, + + @Json(name = "ThumbUrl") + val thumbUrl: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserDemographicsRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserDemographicsRequest.kt new file mode 100644 index 0000000..4941f10 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserDemographicsRequest.kt @@ -0,0 +1,45 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param gender Gender of the user. + * @param ageRange Age Range of the user. + * @param race Race of the user. + */ + + +data class UpdateUserDemographicsRequest ( + + /* Gender of the user. */ + @Json(name = "Gender") + val gender: kotlin.String? = null, + + /* Age Range of the user. */ + @Json(name = "AgeRange") + val ageRange: kotlin.String? = null, + + /* Race of the user. */ + @Json(name = "Race") + val race: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserDemographicsResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserDemographicsResult.kt new file mode 100644 index 0000000..0e2a9e8 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserDemographicsResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class UpdateUserDemographicsResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserProjectDisplayNameRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserProjectDisplayNameRequest.kt new file mode 100644 index 0000000..3a12d04 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserProjectDisplayNameRequest.kt @@ -0,0 +1,35 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param displayName New display name for the user - must be between 3 and 25 characters. + */ + + +data class UpdateUserProjectDisplayNameRequest ( + + /* New display name for the user - must be between 3 and 25 characters. */ + @Json(name = "DisplayName") + val displayName: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserProjectDisplayNameResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserProjectDisplayNameResult.kt new file mode 100644 index 0000000..a587779 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/UpdateUserProjectDisplayNameResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class UpdateUserProjectDisplayNameResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/VerifyUserWithEmailRequest.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/VerifyUserWithEmailRequest.kt new file mode 100644 index 0000000..e2d3cd5 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/VerifyUserWithEmailRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param userID Unique AvatarYug assigned ID of the user on whom the operation will be performed. + * @param verificationCode Verification Code received on email. + */ + + +data class VerifyUserWithEmailRequest ( + + /* Unique AvatarYug assigned ID of the user on whom the operation will be performed. */ + @Json(name = "UserID") + val userID: kotlin.String, + + /* Verification Code received on email. */ + @Json(name = "VerificationCode") + val verificationCode: kotlin.String + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/VerifyUserWithEmailResult.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/VerifyUserWithEmailResult.kt new file mode 100644 index 0000000..65e32bd --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Client/Models/VerifyUserWithEmailResult.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package com.Avataryug.client.Models + + +import com.squareup.moshi.Json + +/** + * + * + * @param code + * @param status + * @param message + */ + + +data class VerifyUserWithEmailResult ( + + @Json(name = "Code") + val code: kotlin.Int? = null, + + @Json(name = "Status") + val status: kotlin.String? = null, + + @Json(name = "Message") + val message: kotlin.String? = null + +) + diff --git a/AvataryugKotlinSDK/app/src/main/java/Avataryug/Example/AvatarLoader/AvatarLoaderLogin.kt b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Example/AvatarLoader/AvatarLoaderLogin.kt new file mode 100644 index 0000000..0a3c5b6 --- /dev/null +++ b/AvataryugKotlinSDK/app/src/main/java/Avataryug/Example/AvatarLoader/AvatarLoaderLogin.kt @@ -0,0 +1,31 @@ +package Avataryug.Example.AvatarLoader + +import Avataryug.Example.QuickTest.StartScreen +import android.content.Intent +import android.os.Bundle +import android.widget.Button +import android.widget.Toast +import androidx.appcompat.app.AppCompatActivity +import com.example.mykotlinandroidsdk.R +import com.google.android.material.floatingactionbutton.FloatingActionButton + +class AvatarLoaderLogin : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_avatar_loader_login) + + val backButton = findViewById(R.id.floatingActionButton) + backButton.setOnClickListener { + val i = Intent(this@AvatarLoaderLogin, StartScreen::class.java) + startActivity(i) + Toast.makeText(baseContext, "Avatar Loader BACK", Toast.LENGTH_SHORT).show() + } + + val LoginBtn = findViewById